LUA-天龍八部場景指令碼

loovpfoxmail發表於2018-10-08

程式設計師們每天都在忙碌著怎麼樣完好自己的製作,來看看天龍八部LUA場景指令碼,分享下啊。

--場景的指令碼檔案


--指令碼號

x888888_g_scriptId_scene = 888888


x888888_g_defaultRelive_SceneID_1=0;--77;

x888888_g_defaultRelive_SceneID_2=0;--2;


-- ==========華山論劍相關的一些常量定義===========

x888888_g_HS_PK_SceneId = 125   --hongyu


x888888_g_Jinghu_SceneId = 5   --hongyu

x888888_g_jingji_SceneId = 414 --hongyu 競技場

x888888_g_HanYuBed_SceneId = 194 --寒玉床

x888888_g_NianShou_SceneId = 6 --年獸

x888888_g_XinShou_SceneId = 0 --泡點地圖號


--下面定義玩家每個等級傳送的郵件數量

--格式為{2,0},2為等級,0是該等級要傳送的郵件數目,在客戶端的strdictionary.txt裡面有LevelMail_2_1代表2級第一封郵件,新增郵件內容時需同時修改客戶端和該結構的內容

x888888_g_MailNum = {

{1,1},{2,1},{3,1},{4,1},{5,1},{6,1},{7,1},{8,1},{9,1},{10,1},{11,1},

{12,1},{13,1},{14,1},{15,1},{16,1},{17,1},{18,1},{19,1},{20,1},{21,1},

{22,1},{23,1},{24,1},{25,1},{26,1},{27,1},{28,1},{29,1},{30,1},{31,1},

{32,1},{33,1},{34,1},{35,1},{36,1},{37,1},{38,1},{39,1},{40,1},{41,1},

{42,1},{43,1},{44,1},{45,1},{46,1},{47,1},{48,1},{49,1},{50,1},{51,1},

{52,1},{53,1},{54,1},{55,1},{56,1},{57,1},{58,1},{59,1},{60,1},{61,1},

{62,1},{63,1},{64,1},{65,1},{66,1},{67,1},{68,1},{69,1},{70,1},{71,1},

{72,1},{73,1},{74,1},{75,1},{76,1},{77,1},{78,1},{79,1},{80,1},{81,1},

{82,1},{83,1},{84,1},{85,1},{86,1},{87,1},{88,1},{89,1},{90,1},{91,1},

{92,1},{93,1},{94,1},{95,1},{96,1},{97,1},{98,1},{99,1},{100,1},{101,0},

{102,1},{103,1},{104,1},{105,1},{106,1},{107,1},{108,1},{109,1},{110,1},

{111,1},{112,1},{113,1},{114,1},{115,1},{116,1},{117,1},{118,1},{119,1},{120,1},

 

   }


-- ===============================================


---------------------------------------------------------------

---當玩家獲得35級心法秘籍及65級武功秘籍,會在世界公告

x888888_MenPaiBroadMsg = 

{

[0] = { mp = "少林門派", XinFa = 30308002, MiJi = 30308011 }, --少林

[1] = { mp = "明教門派", XinFa = 30308003, MiJi = 30308012 }, --明教

[2] = { mp = "丐幫門派", XinFa = 30308004, MiJi = 30308013 }, --丐幫

[3] = { mp = "武當門派", XinFa = 30308005, MiJi = 30308014 }, --武當

[4] = { mp = "峨嵋門派", XinFa = 30308006, MiJi = 30308015 }, --峨嵋

[5] = { mp = "星宿門派", XinFa = 30308007, MiJi = 30308016 }, --星宿

[6] = { mp = "天龍門派", XinFa = 30308008, MiJi = 30308017 }, --天龍

[7] = { mp = "天山門派", XinFa = 30308009, MiJi = 30308018 }, --天山

[8] = { mp = "逍遙門派", XinFa = 30308010, MiJi = 30308019 }, --逍遙

}




-- 副本存玩家平均級別與怪物預設級別的級別差,差值用於場景初始化時對怪物級別進行調整,此編號固定不能改

CopyScene_LevelGap =31


-- 玩家升級時可以完成的任務

x888888_g_FullLevel_MissionList = {}

--x888888_g_FullLevel_MissionList[28] = { MissionId = 403, MissionIndex = 500606, LevelLimit = 28, CompleteIdx = 0, RecordIdx = 1, MsgStr = "#{YD_20080421_188}" }

--x888888_g_FullLevel_MissionList[30] = { MissionId = 409, MissionIndex = 500602, LevelLimit = 30, CompleteIdx = 0, RecordIdx = 1, MsgStr = "#{YD_20080421_181}" } -- 任務ID,任務索引號,需求等級,任務完成標誌在任務引數第幾位,任務跟蹤標誌在任務引數第幾位

--x888888_g_FullLevel_MissionList[32] = { MissionId = 412, MissionIndex = 500603, LevelLimit = 32, CompleteIdx = 0, RecordIdx = 1, MsgStr = "#{YD_20080421_183}" }

--x888888_g_FullLevel_MissionList[35] = { MissionId = 415, MissionIndex = 500605, LevelLimit = 35, CompleteIdx = 0, RecordIdx = 1, MsgStr = "#{YD_20080421_186}" }

--x888888_g_FullLevel_MissionList[38] = { MissionId = 418, MissionIndex = 500608, LevelLimit = 38, CompleteIdx = 0, RecordIdx = 1, MsgStr = "#{YD_20080421_191}" }

--x888888_g_FullLevel_MissionList[40] = { MissionId = 428, MissionIndex = 500612, LevelLimit = 40, CompleteIdx = 0, RecordIdx = 1, MsgStr = "#{YD_20080421_196}" }

--x888888_g_FullLevel_MissionList[42] = { MissionId = 433, MissionIndex = 500613, LevelLimit = 42, CompleteIdx = 0, RecordIdx = 1, MsgStr = "#{YD_20080421_198}" }

--x888888_g_FullLevel_MissionList[45] = { MissionId = 437, MissionIndex = 500614, LevelLimit = 45, CompleteIdx = 0, RecordIdx = 1, MsgStr = "#{YD_20080421_200}" }

--x888888_g_FullLevel_MissionList[48] = { MissionId = 476, MissionIndex = 500615, LevelLimit = 48, CompleteIdx = 0, RecordIdx = 1, MsgStr = "#{YD_20080421_202}" }

--x888888_g_FullLevel_MissionList[50] = { MissionId = 480, MissionIndex = 500616, LevelLimit = 50, CompleteIdx = 0, RecordIdx = 1, MsgStr = "#{YD_20080421_204}" }


-- 玩家升級時可以自動新增的任務

x888888_g_AutoAccept_MissionList = {}

--x888888_g_AutoAccept_MissionList[26] = { MissionId = 400, MissionIndex = 1018700, PreMissionId = 0,   pKill = 0, pArea = 0, pItem = 0, EventId = 4 }

--x888888_g_AutoAccept_MissionList[28] = { MissionId = 403, MissionIndex = 500606, PreMissionId = 0, pKill = 0, pArea = 0, pItem = 0, EventId = 0 } -- 任務ID,任務索引號,前續任務ID,任務型別引數(3),指令碼任務時MissionIndex為ScriptId

--x888888_g_AutoAccept_MissionList[30] = { MissionId = 409, MissionIndex = 500602, PreMissionId = 0, pKill = 0, pArea = 0, pItem = 0, EventId = 0 }

--x888888_g_AutoAccept_MissionList[32] = { MissionId = 412, MissionIndex = 500603, PreMissionId = 0, pKill = 0, pArea = 0, pItem = 0, EventId = 0 }

--x888888_g_AutoAccept_MissionList[35] = { MissionId = 415, MissionIndex = 500605, PreMissionId = 0, pKill = 0, pArea = 0, pItem = 0, EventId = 0 }

--x888888_g_AutoAccept_MissionList[38] = { MissionId = 418, MissionIndex = 500608, PreMissionId = 0, pKill = 0, pArea = 0, pItem = 0, EventId = 0 }

--x888888_g_AutoAccept_MissionList[40] = { MissionId = 428, MissionIndex = 500612, PreMissionId = 0, pKill = 0, pArea = 0, pItem = 0, EventId = 0 }

--x888888_g_AutoAccept_MissionList[42] = { MissionId = 433, MissionIndex = 500613, PreMissionId = 0, pKill = 0, pArea = 0, pItem = 0, EventId = 0 }

--x888888_g_AutoAccept_MissionList[45] = { MissionId = 437, MissionIndex = 500614, PreMissionId = 0, pKill = 0, pArea = 0, pItem = 0, EventId = 0 }

--x888888_g_AutoAccept_MissionList[48] = { MissionId = 476, MissionIndex = 500615, PreMissionId = 0, pKill = 0, pArea = 0, pItem = 0, EventId = 0 }

--x888888_g_AutoAccept_MissionList[50] = { MissionId = 480, MissionIndex = 500616, PreMissionId = 0, pKill = 0, pArea = 0, pItem = 0, EventId = 0 }


function x888888_OnSceneInit( sceneId )

--場景在初始化完成後呼叫

local LevelGap = LuaFnGetCopySceneData_Param( sceneId, CopyScene_LevelGap )

local monstercount = GetMonsterCount( sceneId )

local monsterobjid = -1


local i

for i=0, monstercount-1 do

monsterobjid = GetMonsterObjID( sceneId, i )

SetLevel( sceneId, monsterobjid, GetLevel( sceneId, monsterobjid ) + LevelGap )

end

end


function x888888_OnSceneTimer( sceneId, nowTime )

--場景計時器

--sceneId表示場景號,nowTime表示當前時間(程式啟動後的時間,單位毫秒)



sceneType = LuaFnGetSceneType(sceneId) ;


if sceneType == 1 then --場景型別是副本

copyscenetype = LuaFnGetCopySceneData_Param(sceneId,0) ;--取得副本號

copyscenescript = LuaFnGetCopySceneData_Param(sceneId,1) ; --取得指令碼號

if copyscenetype==FUBEN_EXAMPLE then --例子

--例子不提供定時時間

print("不能使用例子副本型別,例子副本型別不提供定時事件")

elseif copyscenetype==FUBEN_EXAMPLE then --

CallScriptFunction( copyscenescript, "OnCopySceneTimer", sceneId, nowTime ) ;

elseif copyscenetype==FUBEN_MURENXIANG_7 then --7級木人巷副本

CallScriptFunction( copyscenescript, "OnCopySceneTimer", sceneId, nowTime ) ;

elseif copyscenetype==FUBEN_MURENXIANG_9 then --9級木人巷副本

CallScriptFunction( copyscenescript, "OnCopySceneTimer", sceneId, nowTime ) ;

elseif copyscenetype==FUBEN_MURENXIANG then --標準木人巷副本

CallScriptFunction( copyscenescript, "OnCopySceneTimer", sceneId, nowTime ) ;

elseif copyscenetype==FUBEN_SHUILAO then --水牢副本

CallScriptFunction( copyscenescript, "OnCopySceneTimer", sceneId, nowTime ) ;

elseif copyscenetype==FUBEN_ZHENGLONG then --珍瓏棋局副本

CallScriptFunction( copyscenescript, "OnCopySceneTimer", sceneId, nowTime ) ;

elseif copyscenetype==FUBEN_PVP_LEITAI then --擂臺副本

CallScriptFunction( copyscenescript, "OnCopySceneTimer", sceneId, nowTime ) ;

else

CallScriptFunction( copyscenescript, "OnCopySceneTimer", sceneId, nowTime ) ;

end

end

end


function x888888_OnSceneQuit( sceneId )

--場景在關閉前呼叫


end




function x888888_OnScenePlayerEnter( sceneId, playerId, isReconnect )

LuaFnSendSpecificImpactToUnit(sceneId, playerId, playerId, playerId, 5927, 100 )

--設定預設的復活資訊


-- 清除臨時陣營(例如挑戰之類的,避免因為一些不能捕捉的移動事件——死亡等——導致一些未期望的陣營號被帶出原場景)

--SetUnitCampID(sceneId, playerId, playerId, -1)  --這個改團了所以不清空


    --BeginUICommand( sceneId )

   -- EndUICommand( sceneId )

   -- DispatchUICommand( sceneId, playerId, 201404271)


--清除縹緲峰副本里加的降低毒抗的buff....

LuaFnCancelSpecificImpact( sceneId, playerId, 10249 )

LuaFnCancelSpecificImpact( sceneId, playerId, 19801 )


sceneType = LuaFnGetSceneType(sceneId) ;

if sceneType == 1 then --場景型別是副本

copyscenescript = LuaFnGetCopySceneData_Param(sceneId,1) ; --取得指令碼號

CallScriptFunction( copyscenescript, "OnPlayerEnter", sceneId, playerId ) ;


local copyscenetype = LuaFnGetCopySceneData_Param( sceneId, 0 ) --取得副本號

if copyscenetype == FUBEN_MURENXIANG_7

or copyscenetype == FUBEN_MURENXIANG_9

or copyscenetype == FUBEN_MURENXIANG

or copyscenetype == FUBEN_SHUILAO

or copyscenetype == FUBEN_ZHENGLONG

or copyscenetype == FUBEN_PVP_LEITAI

or copyscenetype == FUBEN_BIANGUAN

or copyscenetype == FUBEN_SHIJI1

or copyscenetype == FUBEN_KAOCHANG

or copyscenetype == FUBEN_DATAOSHA

or copyscenetype == FUBEN_ZEIBINGRUQIN

or copyscenetype == FUBEN_JIAOFEI

or copyscenetype == FUBEN_CUJU

or copyscenetype == FUBEN_DAZHAN_YZW

or copyscenetype == FUBEN_GODFIRE

or copyscenetype == FUBEN_PROTECTGUILD

or copyscenetype == FUBEN_PIAOMIAOFENG

or copyscenetype == FUBEN_XINSHENGSHOUSHAN

or copyscenetype == FUBEN_SEEK_TREASURE -- zchw

or copyscenetype == FUBEN_TIANLONG1

or copyscenetype == FUBEN_SHAOLIN1

or copyscenetype == FUBEN_MINGJIAO1

or copyscenetype == FUBEN_GAIBANG1

or copyscenetype == FUBEN_EMEI1

or copyscenetype == FUBEN_XINGXIU1

or copyscenetype == FUBEN_XIAOYAO1

or copyscenetype == FUBEN_WUDANG1

or copyscenetype == FUBEN_TIANSHAN1

or copyscenetype == FUBEN_BANGZHAN

or copyscenetype == FUBEN_SONGLIAO

or copyscenetype == FUBEN_FEIZHAI

or copyscenetype == FUBEN_ZHULIN

-----------------------------

or copyscenetype == FUBEN_LANGHUAN --琅嬛副本

or copyscenetype == FUBEN_XUEZHANYMG--血戰雁門關

or copyscenetype == FUBEN_SHAOSHISHAN--少室山

or copyscenetype == FUBEN_SIJUEZHUANG--四絕莊

or copyscenetype == FUBEN_PIAOMIAOFENG--飄渺峰

or copyscenetype == FUBEN_BINGSHENZHEN--兵聖奇陣

or copyscenetype == FUBEN_ZHOUTIAN--虛空幻境

or copyscenetype == FUBEN_HUANJING--天龍幻境

then -- 以上副本有獨立的死亡地點設定

return

end

else

--///////////////////////////////////////////////////////

--如果他有師門的副本任務則刪除,如少林的“塔林”

local missionIdTable = {1061,1091,1066,1081,1101,1071,1096,1086,1076}

for i, v in missionIdTable do

if IsHaveMission(sceneId,playerId,v) > 0 then

DelMission(sceneId, playerId, v)

break

end

end

--///////////////////////////////////////////////////////


--如果他有漕運任務

if IsHaveMission(sceneId,playerId,4021) > 0 then

CallScriptFunction( 311010, "OnPlayerEnterCaoyunScene", sceneId, playerId )

end

end


--PK值>4時,監獄中死亡則在監獄中復活

if sceneId == SCENE_PRISON and LuaFnGetHumanPKValue( sceneId, playerId ) > 4 then

SetPlayerDefaultReliveInfo( sceneId, playerId, "%10", -1, "0", SCENE_PRISON, 48, 30 )

return

end


if GetMenPai( sceneId, playerId) ~=9 then

SetPlayerDefaultReliveInfo( sceneId, playerId, "%10", -1, "0", x888888_g_defaultRelive_SceneID_1, 255, 261 );

else

SetPlayerDefaultReliveInfo( sceneId, playerId, "%100", -1, "0", x888888_g_defaultRelive_SceneID_2, 255, 261 );

end


-- 如果進入了華山論劍的場景,就設定這個人物的陣營號  hongyu

if sceneId == x888888_g_HS_PK_SceneId    then

CallScriptFunction((001233), "OnScenePlayerEnter",sceneId, playerId)

-- 在這裡檢測華山論劍的計時器是不是開著,如果沒有開就開啟,

-- 場景計時器的Id = 0

if CheckTimer(sceneId, 0) == 0  then

SetTimer(sceneId, playerId, 1230, "OnHuashanSceneTimer", 10000)

end

end

if sceneId == 411   then

if CheckTimer(sceneId, 0) == 0  then

SetTimer(sceneId, playerId, 891000, "OnSceneTimer", 10000)

end

  end

if LuaFnGetAvailableItemCount(sceneId, playerId, 40004478) >= 1   then

  DelItem(sceneId, playerId, 40004478, 10)  --過場景幹掉

  end

if sceneId == 317    then   --全國曬

if CheckTimer(sceneId, 0) == 0  then

SetTimer(sceneId, playerId, 600053, "OnSceneTimer", 5000)

end

CallScriptFunction((600053), "OnPlayerEnter",sceneId, playerId)

end


-- 如果進入競技場,第一進入競技場的人,開啟計時器

if sceneId == x888888_g_jingji_SceneId    then

CallScriptFunction((125020), "OnScenePlayerEnter",sceneId, playerId)

-- 在這裡檢測華山論劍的計時器是不是開著,如果沒有開就開啟,

-- 場景計時器的Id = 0

if CheckTimer(sceneId, 0) == 0  then

SetTimer(sceneId, playerId, 125020, "OnSceneTimer", 10000)

--InitSceneData(sceneId, playerId, 125020, "OnInitScene")

end

end

-- 第一個進入鏡湖場景的玩家,負責啟動鏡湖的計時器

if sceneId == x888888_g_Jinghu_SceneId   then

if CheckTimer(sceneId, 0) == 0  then

SetTimer(sceneId, playerId, 005116, "OnSceneTimer", 10000)

end

end


--第一個進入泡點場景的玩家,負責啟動新手集市的計時器

if sceneId == x888888_g_XinShou_SceneId then

if CheckTimer(sceneId, 0) == 0  then

SetTimer(sceneId, playerId, 898989, "OnSceneTimer",20000)

end

end


--第一個進入寒玉床場景的玩家,負責啟動寒玉床的計時器

if sceneId == x888888_g_HanYuBed_SceneId then

if CheckTimer(sceneId, 0) == 0  then

SetTimer(sceneId, playerId, 808072, "OnSceneTimer",30000)

end

end

    if sceneId == 441    then  --鳳凰古城

if CheckTimer(sceneId, 0) == 0  then

SetTimer(sceneId, playerId, 900053, "OnSceneTimer", 5000)

end

CallScriptFunction((900053), "OnPlayerEnter",sceneId, playerId)

end

if sceneId ==544 or sceneId ==545 or sceneId ==546 or sceneId ==581 or sceneId ==582 or sceneId ==583 or sceneId ==584 or sceneId ==585   then

if CheckTimer(sceneId, 0) == 0  then

   SetTimer(sceneId, playerId, 100012, "OnSceneTimer", 5000)  --100126

end

end

if sceneId ==505 or sceneId ==506 or sceneId ==507 or sceneId ==5 then

if CheckTimer(sceneId, 0) == 0  then

   SetTimer(sceneId, playerId, 891042, "OnSceneTimer", 5000)

end

end

if sceneId ==573 or sceneId ==574 or sceneId ==575 or sceneId ==496 or sceneId ==497 or sceneId ==498   then

if CheckTimer(sceneId, 0) == 0  then

   SetTimer(sceneId, playerId, 100126, "OnSceneTimer",10000)

end

end

--啊哈幫派時鐘

if sceneId == 191 then

if CheckTimer(sceneId, 0) == 0  then

SetTimer(sceneId, playerId, 900101, "OnSceneTimer",5000)

end

  CallScriptFunction((900101), "OnScenePlayerEnter",sceneId, playerId)

end

-- 玩家進入Pvp場景前,給個無敵

if 0 == isReconnect then

local nSafeLevel = LuaFnGetSceneSafeLevel(sceneId)

-- 玩家進入非安全場景,給個無敵BUFF

if nSafeLevel < 10000  then

if nSafeLevel == 10 then

LuaFnSendSpecificImpactToUnit(sceneId, playerId, playerId, playerId, 5927, 100 )

else

LuaFnSendSpecificImpactToUnit(sceneId, playerId, playerId, playerId, 54, 100 )

end

end

end


-- 更新打劫商人的資料

--CallScriptFunction( 311012, "UpdataDacoityData", sceneId, playerId )

-- BeginUICommand( sceneId )

-- UICommand_AddInt( sceneId, playerId )

-- EndUICommand( sceneId )

--DispatchUICommand( sceneId, playerId, 201404271 )

end


--判斷是否是幫會主力

function x888888_IsGuildVip( Guildpos  )

    if (   (Guildpos == GUILD_POSITION_CHIEFTAIN) 

    or (Guildpos == GUILD_POSITION_ASS_CHIEFTAIN)

    or (Guildpos == GUILD_POSITION_HR)

    or (Guildpos == GUILD_POSITION_INDUSTRY)

    or (Guildpos == GUILD_POSITION_AGRI)

    or (Guildpos == GUILD_POSITION_COM) 

    or (Guildpos == GUILD_POSITION_ELITE_MEMBER) 

   )then

        return 1;

end

return 0;

end



function x888888_OnSceneHumanDie( sceneId, selfId, killerId )

--玩家死亡後指令碼事件

sceneType = LuaFnGetSceneType(sceneId) ;

if sceneType == 1 then --場景型別是副本

copyscenescript = LuaFnGetCopySceneData_Param(sceneId,1) ; --取得指令碼號

CallScriptFunction( copyscenescript, "OnHumanDie", sceneId, selfId, killerId )

end

if IsHaveMission(sceneId,selfId,4021) > 0 then

--在此之前應該檢測是否PVP死亡

--如果在漕運時死亡

CallScriptFunction( 311010, "OnHumanDie", sceneId, selfId, killerId )

CallScriptFunction( 311012, "OnDacoity", sceneId, selfId, killerId )

end

if sceneId == 317    then 

CallScriptFunction((600053), "KillPlayer",sceneId, selfId, killerId)

end

-- 如果玩家是在 幫戰 被殺

if sceneId == 191    then

CallScriptFunction((900101), "OnSceneHumanDie",sceneId, selfId, killerId)

end

--if sceneId == 185 then

-- CallScriptFunction((002054), "OnDie",sceneId, selfId, killerId)

--end

-- 如果玩家現在是在華山論劍場景被殺,hongyu,

if sceneId == x888888_g_HS_PK_SceneId    then

CallScriptFunction((001233), "OnSceneHumanDie",sceneId, selfId, killerId)

end

-- 如果玩家是在 競技場 被殺

if sceneId == x888888_g_jingji_SceneId    then

CallScriptFunction((125020), "OnSceneHumanDie",sceneId, selfId, killerId)

end

if sceneId == 411   then  --單人PK活動

CallScriptFunction((891000), "OnSceneHumanDie",sceneId, selfId, killerId)

end

--幫會戰爭情況

if IsInGuildWar(sceneId, selfId, killerId) == 1 then

local Guildpos = GetGuildPos(sceneId, selfId)

if ( x888888_IsGuildVip(Guildpos)==1 ) then

local selfName = GetName(sceneId, selfId);

local guildName_self = LuaFnGetGuildName(sceneId, selfId);

local killerName = GetName(sceneId, killerId);

local guildName_killer = LuaFnGetGuildName(sceneId, killerId);

local sMessage = format("@*;SrvMsg;GLD:#W本幫主力#R%s#W在幫戰中浴血奮戰,不敵#G%s#W幫會的#R%s#W,為幫會英勇獻身!", selfName, guildName_killer ,killerName);

BroadMsgByChatPipe(sceneId, selfId, sMessage, 4); --6 是幫唄

sMessage = format("@*;SrvMsg;GLD:#R%s#W在幫戰中大展身手,成功擊殺#G%s#W幫會主力#R%s#W,捍衛了幫會的榮譽!", killerName, guildName_self, selfName);

BroadMsgByChatPipe(sceneId, killerId, sMessage, 4);

end

end

local tableScenId={3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,39,123,126,148,149,150,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,188,317,400,401,402,403,420,425,427,432,497,498,499,500,501,502,503,505,506,507,508,544,545,546,573,574,575,580,581,582,583,584,585}

    local TB =0 

    if getn(tableScenId) >0 then

    for i =1,getn(tableScenId) do

if sceneId  == tableScenId[i] then 

TB =1

  end

end

end

if TB ==1  then

local sMessage =""

local selfIDnEW=GetMissionData( sceneId, selfId,QUANQUSHAREN)

local selfName1 = GetName(sceneId, selfId);

local killerName1 = GetName(sceneId, killerId);   

local guildName_killer1 = LuaFnGetGuildName(sceneId, killerId); 

SetMissionData( sceneId, selfId, QUANQUSHAREN,0)

SetMissionData( sceneId, killerId, QUANQUSHAREN,GetMissionData( sceneId, killerId,QUANQUSHAREN)+1)

local selfName = GetName(sceneId, selfId);

local mun = GetMissionData( sceneId, killerId,QUANQUSHAREN)

local killerName = GetName(sceneId, killerId);   

local guildName_killer = LuaFnGetGuildName(sceneId, killerId); 

local guildName_self = LuaFnGetGuildName(sceneId, selfId);

local nTarSceneName = GetSceneName(sceneId)

local x,z = GetWorldPos(sceneId, killerId)

    x,z=floor(x),floor(z)

if selfIDnEW >=5  then 

       if guildName_killer1 ~="" then

    sMessage = format("#H%s#I幫派的#{_INFOUSR%s}#I面對已經連#623#G%d#I人的#{_INFOUSR%s}毫不畏懼,手起刀落將其斬於刀下,真乃吾輩之英雄也!",guildName_killer1,killerName1,selfIDnEW,selfName1)

     AddGlobalCountNews( sceneId, sMessage )

   else

    sMessage = format("#{_INFOUSR%s}#I面對已經連#623#G%d#I人的#{_INFOUSR%s}毫不畏懼,手起刀落將其斬於刀下,真乃吾輩之英雄也!",killerName1,selfIDnEW,selfName1)

     AddGlobalCountNews( sceneId, sMessage )

   end

end

if mun >=30 then

if guildName_killer ~="" and  guildName_self ~="" then

          sMessage = format("#H%s#I幫派的#R#{_INFOUSR%s}#I猶如天神附體,天下無敵,在#G%s#B[%s,%s]#I連#623#cFF0000%s#I人後又擊殺了#H%s#I幫派的#G#{_INFOUSR%s}#I誰敢前去取他項上人頭,為%s報仇雪恨!",guildName_killer,killerName,nTarSceneName,x,z,mun,guildName_self,selfName,selfName)

    AddGlobalCountNews( sceneId, sMessage ) 

        elseif guildName_killer ~="" and guildName_self =="" then 

sMessage = format("#H%s#I幫派的#R#{_INFOUSR%s}#I猶如天神附體,天下無敵,在#G%s#B[%s,%s]#I連#623#cFF0000%s#I人後又擊殺了#G#{_INFOUSR%s}#I誰敢前去取他項上人頭,為%s報仇雪恨!",guildName_killer,killerName,nTarSceneName,x,z,mun,selfName,selfName)

AddGlobalCountNews( sceneId, sMessage ) 

elseif guildName_self ~=""  and guildName_killer =="" then 

sMessage = format("#R#{_INFOUSR%s}#I猶如天神附體,天下無敵,在#G%s#B[%s,%s]#I連#623#cFF0000%s#I人後又擊殺了#H%s#I幫派的#G#{_INFOUSR%s}#I誰敢前去取他項上人頭,為%s報仇雪恨!",killerName,nTarSceneName,x,z,mun,guildName_self,selfName,selfName)

      AddGlobalCountNews( sceneId, sMessage );

else 

sMessage = format("#R#{_INFOUSR%s}#I猶如天神附體,天下無敵,在#G%s#B[%s,%s]#I連#623#cFF0000%s#I人後又擊殺了#G#{_INFOUSR%s}#I誰敢前去取他項上人頭,為%s報仇雪恨!",killerName,nTarSceneName,x,z,mun,selfName,selfName)

      AddGlobalCountNews( sceneId, sMessage );

    end

LuaFnSendSpecificImpactToUnit(sceneId, killerId, killerId, killerId,9631, 1000)

elseif mun >=20 then 

   if guildName_killer ~="" then 

   sMessage = format("#H%s#I幫派的#{_INFOUSR%s}#I猶如炎黃附體,舉世無雙,在#G%s#B[%s,%s]#I連#623#G%d#I人而毫髮無傷!",guildName_killer,killerName,nTarSceneName,x,z,mun)

      AddGlobalCountNews( sceneId, sMessage );

   else

    sMessage = format("#{_INFOUSR%s}#I猶如炎黃附體,舉世無雙,在#G%s#B[%s,%s]#I連#623#G%d#I人而毫髮無傷!",killerName,nTarSceneName,x,z,mun)

      AddGlobalCountNews( sceneId, sMessage );

   end

LuaFnSendSpecificImpactToUnit(sceneId, killerId, killerId, killerId,9630, 1000)

elseif mun >=10 then 

  if guildName_killer ~="" then 

  sMessage = format("#H%s#I幫派的#{_INFOUSR%s}#I猶如戰神附體,勇冠三軍,在#G%s#B[%s,%s]#I連#623#G%d#I人而毫髮無傷!",guildName_killer,killerName,nTarSceneName,x,z,mun)

   AddGlobalCountNews( sceneId, sMessage );

  else

  sMessage = format("#{_INFOUSR%s}#I猶如戰神附體,勇冠三軍,在#G%s#B[%s,%s]#I連#623#G%d#I人而毫髮無傷!",killerName,nTarSceneName,x,z,mun)

      AddGlobalCountNews( sceneId, sMessage );

  end

LuaFnSendSpecificImpactToUnit(sceneId, killerId, killerId, killerId,9629, 1000)

elseif mun >=5 then 

  if guildName_killer ~="" then 

  sMessage = format("#H%s#I幫派的#{_INFOUSR%s}#I猶如武聖附體,勢不可擋,在#G%s#B[%s,%s]#I連#623#G%d#I人而毫髮無傷!",guildName_killer,killerName,nTarSceneName,x,z,mun)

    AddGlobalCountNews( sceneId, sMessage );

      else

  sMessage = format("#{_INFOUSR%s}#I猶如武聖附體,勢不可擋,在#G%s#B[%s,%s]#I連#623#G%d#I人而毫髮無傷!",killerName,nTarSceneName,x,z,mun)

  AddGlobalCountNews( sceneId, sMessage ) 

      end

LuaFnSendSpecificImpactToUnit(sceneId, killerId, killerId, killerId,9628, 1000)

elseif mun >=2 then 

      if guildName_killer ~="" then 

  sMessage = format("#H%s#I幫派的#{_INFOUSR%s}#I猶如皇者附體,大殺特殺,在#G%s#B[%s,%s]#I連#623#G%d#I人而毫髮無傷!",guildName_killer,killerName,nTarSceneName,x,z,mun)

  AddGlobalCountNews( sceneId, sMessage ) 

      else

  sMessage = format("#{_INFOUSR%s}#I猶如皇者附體,大殺特殺,在#G%s#B[%s,%s]#I連#623#G%d#I人而毫髮無傷!",killerName,nTarSceneName,x,z,mun)

  AddGlobalCountNews( sceneId, sMessage ) 

  --BroadMsgByChatPipe(sceneId, killerId, tostring("#G"..killerName.."#P猶如皇者附體,大殺特殺,#G連殺"..mun.."人#P而毫髮無傷!"), 4);

      end

  --if LuaFnHaveImpactOfSpecificDataIndex(sceneId, killerId,197) ~= 1  then

  LuaFnSendSpecificImpactToUnit(sceneId, killerId, killerId, killerId,9627, 1000)

  --end

end

SetMissionData( sceneId, killerId, QUANQUSHAREN,GetMissionData( sceneId, killerId,QUANQUSHAREN)+1)

local mylevel =  GetMissionData(sceneId, killerId, QUANQUSHAREN)

CallScriptFunction( (888899), "SetDengji", sceneId, killerId,mylevel,3 )

end

end


--可以升級的事件處理函式

function x888888_OnCanLevelup(sceneId, objId)

local playerLevel = GetLevel(sceneId, objId)

if playerLevel >= 10 and playerLevel <= 14 then

LuaFnSendSystemMail(sceneId, GetName(sceneId, objId), "您可以開啟#gfff0f0人物介面(按Alt+c)#g000000之後,點選#gfff0f0介面右下方的升級按鈕#g000000即可提升您的人物等級,當然您也可以留著經驗到#gfff0f0門派的師傅處學習技能#g000000。")

end

end


function x888888_OnSceneHumanLevelUp( sceneId, objId, level )


if IsHaveMission(sceneId,objId,718) > 0 then

misIndex = GetMissionIndexByID(sceneId,objId,718)

SetMissionByIndex( sceneId, objId, misIndex, 1, level)

if level >= 10 then

SetMissionByIndex( sceneId, objId, misIndex, 0, 1)

end

end


--相應等級傳送郵件

if level > 1 then

local looptime = 1

local mailnum = x888888_g_MailNum[level][2]

if mailnum > 0 then

while looptime <= mailnum do

--PrintStr("#{LevelMail_"..level.."_"..looptime.."}")

LuaFnSendSystemMail( sceneId, GetName(sceneId,objId), "#{LevelMail_"..level.."_"..looptime.."}" )

looptime = looptime + 1

CallScriptFunction( (888899), "SetDengji", sceneId, objId,level,4 )

end

end

end

--徒弟升到45時候,出師設定出師標誌

if LuaFnHaveMaster( sceneId, objId ) ~= 0  and level == 45 then

SetMissionFlag(sceneId, objId, MF_ShiTu_ChuShi_Flag, 1)

end

--徒弟升級給師父抽獎的機會

if level == 40 or level == 50 then

--local stbegin = 7285; --10.12

local stbegin = 7304; --11.01

local stend = 7325; --11.22

local stprize = {[40]=40004432,[50]=40004433}

local strtip = {[40]="名師",[50]="特級名師"}

local curDayTime = GetDayTime()

local MasterGUID = LuaFnGetMasterGUID( sceneId, objId )

if curDayTime >= stbegin and curDayTime <= stend and MasterGUID ~= -1 then

if LuaFnHaveMaster( sceneId, objId ) ~= 0 then

local MasterName = LuaFnGetFriendName( sceneId, objId, MasterGUID )

--傳送一封普通郵件給師傅

LuaFnSendSystemMail( sceneId, MasterName, "你的徒弟"..GetName(sceneId,objId).."已經成功的升到了"..tostring(level).."級。現在天龍八部正在“新兵奪寶”活動期間,你可以去洛陽城龔彩麗[110,162]那裡參加一次"..strtip[level].."抽獎!" )

--傳送一封獎勵執行郵件給師傅

LuaFnSendScriptMail( sceneId, MasterName, MAIL_SHITUPRIZE, level, stprize[level], 1)

--傳送系統公告給全世界

local uname = format("#{_INFOUSR%s}",GetName(sceneId,objId))

local oname = format("#{_INFOUSR%s}",MasterName)

local str = format("%s#P經歷九九八十一難,終於順利升到#Y%d級#P。現在天龍八部正在“新兵奪寶”活動期間,作為其師父的%s#P獲得一次參加#Y%s#P抽獎的機會!",uname,level,oname,strtip[level])

BroadMsgByChatPipe(sceneId, objId, str, 4)

end

end

end


--2007聖誕元旦活動....喜從天降活動....

CallScriptFunction( 050022, "OnPlayerLevelUp", sceneId, objId )


--師徒總動員

CallScriptFunction( 806020, "OnPlayerLevelUp", sceneId, objId )

-- 給達到等級要求的玩家新增任務

-- [ QUFEI 2008-04-17 14:18 UPDATE BugID 33891 ]

x888888_OnAutoAcceptMission( sceneId, objId, level )

-- 給滿足完成條件的任務設定任務完成標誌

x888888_OnSetCompleteMission( sceneId, objId, level )

end


--玩家更換門派

function x888888_OnSceneHumanChangeMenpai( sceneId, objId, Menpai )

if IsHaveMission(sceneId,objId,719) > 0 then

misIndex = GetMissionIndexByID(sceneId,objId,719)

if( Menpai >= 0 and Menpai < 9 ) then

    SetMissionByIndex( sceneId, objId, misIndex, 1, 1)

    SetMissionByIndex( sceneId, objId, misIndex, 0, 1)

end

end

end


function x888888_OnSceneNotify( sceneId, destsceneId )

--sceneId 為副本入口所在場景ID, destsceneId為副本場景ID

--此函式響應呼叫表示副本場景已經初始化完成,可以傳送玩家了


destsceneType = LuaFnGetSceneType(destsceneId) ;


if destsceneType == 1 then --場景型別是副本


copyscenetype = LuaFnGetCopySceneData_Param(destsceneId,0) ;--取得副本號

copyscenescript = LuaFnGetCopySceneData_Param(destsceneId,1) ; --取得指令碼號


if copyscenetype==FUBEN_EXAMPLE then --例子

--例子不提供場景啟動事件

print("不能使用例子副本型別,例子副本型別不提供場景啟動事件")

elseif copyscenetype==FUBEN_EXAMPLE then --

CallScriptFunction( copyscenescript, "OnCopySceneReady", sceneId, destsceneId ) ;

elseif copyscenetype==FUBEN_MURENXIANG_7 then --7級木人巷副本

CallScriptFunction( copyscenescript, "OnCopySceneReady", sceneId, destsceneId ) ;

elseif copyscenetype==FUBEN_MURENXIANG_9 then --9級木人巷副本

CallScriptFunction( copyscenescript, "OnCopySceneReady", sceneId, destsceneId ) ;

elseif copyscenetype==FUBEN_MURENXIANG then --標準木人巷副本

CallScriptFunction( copyscenescript, "OnCopySceneReady", sceneId, destsceneId ) ;

elseif copyscenetype==FUBEN_SHUILAO then --水牢副本

CallScriptFunction( copyscenescript, "OnCopySceneReady", sceneId, destsceneId ) ;

elseif copyscenetype==FUBEN_ZHENGLONG then --蒸籠棋局副本

CallScriptFunction( copyscenescript, "OnCopySceneReady", sceneId, destsceneId ) ;

elseif copyscenetype==FUBEN_PVP_LEITAI then --擂臺副本

CallScriptFunction( copyscenescript, "OnCopySceneReady", sceneId, destsceneId ) ;

else

CallScriptFunction( copyscenescript, "OnCopySceneReady", sceneId, destsceneId ) ;

end

end

end


-- 問路

function x888888_AskTheWay( sceneId, selfId, sceneNum, x, y, tip )

Msg2Player( sceneId, selfId, "@*;flagNPC;" .. sceneNum .. ";" .. x .. ";" .. y .. ";" .. tip, MSG2PLAYER_PARA )

Msg2Player( sceneId, selfId, "@*;flashNPC;" .. sceneNum .. ";" .. x .. ";" .. y .. ";" .. tip, MSG2PLAYER_PARA )

end


-- 問路(座標)

function x888888_AskThePos( sceneId, selfId, sceneNum, x, y, tip )

Msg2Player( sceneId, selfId, "@*;flagPOS;" .. sceneNum .. ";" .. x .. ";" .. y .. ";" .. tip, MSG2PLAYER_PARA )

Msg2Player( sceneId, selfId, "@*;flashPOS;" .. sceneNum .. ";" .. x .. ";" .. y .. ";" .. tip, MSG2PLAYER_PARA )

end


-- 去掉問路標記

function x888888_DelSignpost( sceneId, selfId, sceneNum, npcName )

Msg2Player( sceneId, selfId, "@*;flagNPCdel;" .. sceneNum .. ";" .. npcName, MSG2PLAYER_PARA )

Msg2Player( sceneId, selfId, "@*;flashNPCdel;" .. sceneNum .. ";" .. npcName, MSG2PLAYER_PARA )

end


-- 播放音效,UICommandID = 1234

function x888888_PlaySoundEffect( sceneId, selfId, soundId )

BeginUICommand(sceneId)

UICommand_AddInt(sceneId, soundId)

EndUICommand(sceneId)

DispatchUICommand(sceneId,selfId, 1234)

end


--任務接受檢測

function x888888_OnAcceptMissionCheck( sceneId, selfId, missionScript )

if GetMissionCount(sceneId, selfId)>=20 then

BeginEvent(sceneId)

strText = "任務已滿!"

AddText(sceneId,strText);

EndEvent(sceneId)

DispatchMissionTips(sceneId,selfId)

return 0

end


return 1

end


--玩家角色時鐘事件

function x888888_OnScenePlayerTimer( sceneId, selfId, nowtime )

--如果有漕運任務

if IsHaveMission(sceneId,selfId,4021) > 0 then

CallScriptFunction( 311010, "OnPlayerCaoyunTimer", sceneId, selfId )

else

SetCharacterTimer( sceneId, selfId, 0 )

end

end


--玩家角色登陸游戲事件, 此事件會在玩家呼叫x888888_OnScenePlayerEnter事件之後呼叫

function x888888_OnScenePlayerLogin( sceneId, selfId, nowtime )

LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 5974, 600 )


CallScriptFunction( 888890, "OnDefaultEvent", sceneId, selfId )


-- 設定初始的Npc關係值

CallScriptFunction( 200099, "InitRelation", sceneId, selfId )

--在五一期間發郵件:五一領取招牌活動 --add by xindefeng

CallScriptFunction( 808090, "OnPlayerLogin", sceneId, selfId )

-- 五一活動,傳送郵件

CallScriptFunction( 808091, "OnPlayerLogin", sceneId, selfId )

-- 初始化客戶端登陸期的介面操作

CallScriptFunction( 870001, "UISystemOnLogin", sceneId, selfId )


-- 師徒總動員,傳送郵件

CallScriptFunction( 806020, "OnPlayerLogin", sceneId, selfId )

--離線經驗饋贈任務

CallScriptFunction( 500619, "CheckUnlineGift", sceneId, selfId )

--電話密保的郵件提示。策劃要求暫時關閉郵件提示 by hukai #38665

--CallScriptFunction( 210245, "SendMail", sceneId, selfId, nowtime )

-- 設定玩家學會“幫派收集”技能

if QueryHumanAbilityLevel(sceneId, selfId, 50) < 1 then

SetHumanAbilityLevel(sceneId, selfId, 50, 1);

end

-- 設定玩家學會幫戰中採礦技能

if QueryHumanAbilityLevel(sceneId, selfId, 51) < 1 then

SetHumanAbilityLevel(sceneId, selfId, 51, 1);

end

--和諧光環

CallScriptFunction( 808124, "OnPlayerLogin", sceneId, selfId )

--暗器提示郵件

CallScriptFunction( 332207, "NotifyMailOnLogin", sceneId, selfId )


x888888_AskDeleteMinorPasswordTime(sceneId, selfId) 

-- 愚人節活動,發通告

CallScriptFunction( 808079, "OnPlayerLogin", sceneId, selfId )

--SetMp( sceneId, selfId,1 ) --得到氣值

-- 天龍嘉年華

-- CallScriptFunction( 889055, "OnPlayerLogin", sceneId, selfId )

    if GetHp( sceneId, selfId )<=0 then

LuaFnSendSpecificImpactToUnit(sceneId,selfId,selfId, selfId, 9993, 0 )


end

LuaFnSendSpecificImpactToUnit(sceneId,selfId,selfId, selfId, 112, 500 )

   if GetCon( sceneId, selfId)  >= 199990 or GetMaxHp( sceneId, selfId )>=18000000 or GetMaxMp( sceneId, selfId ) >= 7000000 or GetHumanMaxVigor( sceneId, selfId ) >=1000 or GetHumanMaxEnergy( sceneId, selfId )>=1000 then

SetLevel( sceneId, selfId, 0)

BroadMsgByChatPipe( sceneId, selfId, "#B號外號外,玩家#G"..GetName(sceneId, selfId ).."#B是個SB來此服卡東西已被系統收押到小黑屋", 4 )

LuaFnSendSpecificImpactToUnit(sceneId,selfId,selfId, selfId, 41, 0 )

   end


if GetMenPai(sceneId, selfId) == 9 then

BeginUICommand( sceneId )

UICommand_AddInt( sceneId,selfId)

    UICommand_AddInt( sceneId, 1 )

EndUICommand( sceneId )

DispatchUICommand( sceneId, selfId, 20150630 )

else

--x888888_KKGG_rm( sceneId, selfId )

end


if QueryHumanAbilityLevel(sceneId, selfId, ABILITY_ZHUZAO) <1 then

SetHumanAbilityLevel(sceneId,selfId,ABILITY_ZHUZAO,1)

SetPrescription( sceneId, selfId, 419, 1 )

SetPrescription( sceneId, selfId, 420, 1 )

SetPrescription( sceneId, selfId, 421, 1 )

SetPrescription( sceneId, selfId, 422, 1 )

SetPrescription( sceneId, selfId, 423, 1 )  --這個是唐門武器

---------------------------------------------------------

SetPrescription( sceneId, selfId, 989, 1 )

SetPrescription( sceneId, selfId, 990, 1 )

SetPrescription( sceneId, selfId, 991, 1 )

SetPrescription( sceneId, selfId, 992, 1 )

SetPrescription( sceneId, selfId, 993, 1 )

SetPrescription( sceneId, selfId, 994, 1 )  --她慕容

SetPrescription( sceneId, selfId, 995, 1 )

SetPrescription( sceneId, selfId, 996, 1 )

SetPrescription( sceneId, selfId, 997, 1 )

SetPrescription( sceneId, selfId, 998, 1 )

SetPrescription( sceneId, selfId, 999, 1 )  --唐門

end










--合區一定使用到24:00記得關閉

--SetMissionData( sceneId, selfId, MD_PRISON_SHENYUAN_DAYTIME,0)



--AddMoney(sceneId, selfId, 5000000)

--SetLevel( sceneId, selfId, 100)

--ZengDian(sceneId,selfId,-1,1,900000000) -- 加贈點

--YuanBao(sceneId,selfId,targetId,1,1000000) -- 加元寶

--LuaFnSetHumanGoodBadValue( sceneId, selfId, 6000000 )

end




--玩家建立角色後第一次登陸游戲事件, 此事件會在玩家呼叫x888888_OnScenePlayerEnter事

--件之後、x888888_OnScenePlayerLogin事件之前呼叫

function x888888_OnScenePlayerFirstLogin( sceneId, selfId, nowtime )

local  PlayerName=GetName(sceneId,selfId)

local  PlayerSex=GetSex(sceneId,selfId)

if PlayerSex == 0 then

PlayerSex = "姑娘"

else

PlayerSex = "少俠"

end

LuaFnSendSystemMail( sceneId, GetName(sceneId,selfId), "#{DLYJ_081009_01}"..PlayerName..PlayerSex.."#{DLYJ_081009_02}" )

LuaFnSendSystemMail( sceneId, GetName(sceneId,selfId), "#e00f000小提示:#e000000#r#Y右上角的雷達視窗內有顯示當前您所在的座標。#Y滑鼠左鍵點選便可行走。#Y滑鼠右鍵按住左右移動,可以旋轉顯示視口。#Y滑鼠中鍵滾輪前後轉動,可以調節視口遠近。#GALT+HOME/END#Y可以變換視角。" )

--CallScriptFunction( 808065, "SendMail", sceneId, selfId )

LuaFnSendSpecificImpactToUnit(sceneId, selfId, selfId, selfId, 8000, 0)

if GetMissionFlag(sceneId, selfId, MF_GetQianKunDai)  < 1 then  --防卡標記

SetMissionFlag(sceneId, selfId, MF_GetQianKunDai, 1)

    --SetHumanMenpaiPoint(sceneId, selfId,5000000) -- 加贈點

    local ItemID ={10308600,10308601,10308600,10308601,10308600}

    local i=random(1,5)

local ItemID1 ={10124530,10124540,10124550,10124560,10124570,10124580}

    local i=random(1,6)

BeginAddItem(sceneId)

AddItem( sceneId, 10155001, 1 ) --飛蝗石

AddItem( sceneId,ItemID[i],1)  --隨機神器一把

AddItem( sceneId,ItemID1[i],1) --隨機神器一把

AddItem( sceneId,10553090,1) --新手裝備

AddItem( sceneId,10553091,1) --新手裝備

AddItem( sceneId,10553092,1) --新手裝備

AddItem( sceneId,10553093,1) --新手裝備

AddItem( sceneId,10553094,1) --新手裝備

AddItem( sceneId,10553095,1) --新手裝備

AddItem( sceneId,10553096,1) --新手裝備

AddItem( sceneId,10553097,1) --新手裝備

AddItem( sceneId,10553098,2) --新手裝備

AddItem( sceneId,10553099,2) --新手裝備

AddItem( sceneId, 10141030, 1 ) --行囊

AddItem( sceneId, 10141040, 1 ) --香囊

AddItem( sceneId, 30008014, 1 ) --通天靈丹

--AddItem( sceneId, 30008066, 3 )  --江湖邀請令 買花

    --AddItem( sceneId, 30509011, 1 )  --999玫瑰花

EndAddItem(sceneId,selfId)

AddItemListToHuman(sceneId,selfId)

else

SetLevel( sceneId, selfId, 0)   --修改角色等級

BroadMsgByChatPipe( sceneId, selfId, "#B號外號外,玩家#G"..GetName(sceneId, selfId ).."#B是個SB來此服卡元寶已被系統收押到小黑屋", 4 )

LuaFnSendSpecificImpactToUnit(sceneId,selfId,selfId, selfId, 41, 0 )

end

--增加領取幹坤袋標誌



AddMission( sceneId,selfId, 718, 210238, 0, 0, 0 )


SetMissionData( sceneId, selfId, MD_RELATION_QIANHONGYU, 500 ) -- 設定和錢宏宇的初始關係


--雙響炮提示郵件....

CallScriptFunction( 808075, "OnPlayerFirstLogin", sceneId, selfId )

end


-- 統一做一個檢查

function x888888_CheckSubmit( sceneId, selfId, missionId )

local bHave = IsHaveMission( sceneId, selfId, missionId )

local bHaveDone = IsMissionHaveDone( sceneId, selfId, missionId )


-- 沒有接

if bHave <= 0 then

return 0

end


-- 已經完成過

if bHaveDone >= 1 then

return 0

end


return 1

end


-- 場景中的角色開啟仇殺

function x888888_OnScenePlayerOpenRevenge(sceneId, openerGUID, targetGUID)

LuaFnSendMailToGUID(sceneId, openerGUID, "你已經開啟了對目標的仇殺")

LuaFnSendMailToGUID(sceneId, targetGUID, "行走江湖,莫惹事端,有人申請仇殺你,已經生效,一小時內還是注意安全為妙。")

return 1

end


-- 場景中的角色關閉仇殺

function x888888_OnScenePlayerCloseRevenge(sceneId, openerGUID, targetGUID)

LuaFnSendMailToGUID(sceneId, openerGUID, "你已經關閉了對目標的仇殺")

LuaFnSendMailToGUID(sceneId, targetGUID, "要仇殺你的人的怒意已經平息。")


return 1

end


function x888888_PlayBackSound( sceneId, selfId, soundId )

BeginUICommand(sceneId)

UICommand_AddInt(sceneId, soundId)

EndUICommand(sceneId)

DispatchUICommand(sceneId,selfId, 124)

end


function x888888_StopBackSound( sceneId, selfId, soundId )

BeginUICommand(sceneId)

UICommand_AddInt(sceneId, soundId)

EndUICommand(sceneId)

DispatchUICommand(sceneId,selfId, 125)

end


-- 一下是開放給策劃使用的用指令碼影響玩家的HP、MP、Vigor、VigorRegenerate、Energy、EnergyRegenerate屬性最大值

-- Hp最大值修正

function x888888_MaxHpRefix( sceneId, selfId )

  local nValue = 0

  local nAbilityID = 40 --影響HP最大值的生活技能的ID

  local nMulti = 1 --HP最大值得影響係數

  nValue = QueryHumanAbilityLevel(sceneId, selfId, nAbilityID) * nMulti;

  return nValue

end


-- Mp最大值修正

function x888888_MaxMpRefix( sceneId, selfId)

  local nValue = 0

  local nAbilityID = 41 --影響MP最大值的生活技能的ID

  local nMulti = 1 --MP最大值得影響係數

  nValue = QueryHumanAbilityLevel(sceneId, selfId, nAbilityID) * nMulti;

  return nValue

end

-- Vigor最大值修正

function x888888_MaxVigorRefix( sceneId, selfId)

  local nValue = 0

  local nAbilityID = 42 --影響Vigor最大值的生活技能的ID

  local nMulti = 1 --HP最大值得影響係數

  nValue = QueryHumanAbilityLevel(sceneId, selfId, nAbilityID) * nMulti;

  return nValue

end

-- VigorRegenerate值修正

function x888888_VigorRegenerateRefix( sceneId, selfId)

  local nValue

  local nAbilityID = 44 --影響VigorRegenerate值的生活技能的ID

  local nMulti = 1 --HP最大值得影響係數

  nValue = QueryHumanAbilityLevel(sceneId, selfId, nAbilityID) * nMulti;

  return nValue

end

-- Energy最大值修正

function x888888_MaxEnergyRefix( sceneId, selfId)

  local nValue

  local nAbilityID = 43 --影響Energy最大值的生活技能的ID

  local nMulti = 1 --Energy最大值得影響係數

  nValue = QueryHumanAbilityLevel(sceneId, selfId, nAbilityID) * nMulti;

  return nValue

end

-- EnergyRegenerate值修正

function x888888_EnergyRegenerateRefix( sceneId, selfId)

  local nValue

  local nAbilityID = 45 --影響EnergyRegenerate值的生活技能的ID

  local nMulti = 1 --HP最大值得影響係數

  nValue = QueryHumanAbilityLevel(sceneId, selfId, nAbilityID) * nMulti;

  return nValue

end


function x888888_OnPlayerPickupItemFromDropBox(sceneId, selfId, itemId, bagidx, bGem)

local playerName = GetName(sceneId, selfId)

local itemName = GetItemName(sceneId, itemId)

local transfer = GetBagItemTransfer(sceneId,selfId,bagidx)

-- 撿到龍珠的世界公告

if itemId == 30505136 or

itemId == 30505137 or

itemId == 30505138 or

itemId == 30505139 or

itemId == 30505140 or

itemId == 30505141 or

itemId == 30505142    then

CallScriptFunction( 808058, "PlayerPickUpLongZhu", sceneId, selfId, bagidx ) ;

end

--獲得太陽碎片公告....

if itemId == 30505120 then

CallScriptFunction( 210242, "PickupItem", sceneId, selfId, itemId, bagidx ) ;

end

--獲得峨眉技能

if itemId == 30308043 and sceneId == 25 then


local TeammateCount = GetTeamMemberCount( sceneId, selfId );

local sNameBroad = playerName;



local randMessage = random(3);

if randMessage == 1 then

    message = format("#{JinGang_00}#W#{_INFOUSR%s}#P#{JinGang_01}#W#{_INFOUSR%s}#P#{JinGang_02}#{_INFOMSG%s}。", sNameBroad, sNameBroad, transfer );

elseif randMessage == 2 then

message = format("#{JinGang_03}#W#{_INFOUSR%s}#P#{JinGang_04}#{_INFOMSG%s}#P#{JinGang_05}", sNameBroad, transfer );

else

message = format("#{JinGang_06}#W#{_INFOUSR%s}#P#{JinGang_07}#W#{_INFOUSR%s}#P#{JinGang_08}#{_INFOMSG%s}#P#{JinGang_09}", sNameBroad, sNameBroad, transfer );

end

BroadMsgByChatPipe(sceneId, selfId, message, 4);


return 0;

end

--獲得少林技能

if itemId == 30308045 and sceneId == 32 then


local TeammateCount = GetTeamMemberCount( sceneId, selfId );

local sNameBroad = playerName;


local randMessage = random(3);

if randMessage == 1 then

    message = format("#{JinGang_10}#W#{_INFOUSR%s}#P#{JinGang_11}#W#{_INFOUSR%s}#P#{JinGang_12}#{_INFOMSG%s}#P#{JinGang_13}", sNameBroad, sNameBroad, transfer );

elseif randMessage == 2 then

message = format("#{JinGang_14}#W#{_INFOUSR%s}#P#{JinGang_15}#W#{_INFOUSR%s}#P#{JinGang_16}#{_INFOMSG%s}#P#{JinGang_17}", sNameBroad, sNameBroad, transfer );

else

message = format("#{JinGang_18}#W#{_INFOUSR%s}#P#{JinGang_19}#{_INFOMSG%s}#P#{JinGang_20}", sNameBroad, transfer );

end

BroadMsgByChatPipe(sceneId, selfId, message, 4);

return 0;

end


--鏡湖千年草

if itemId == 40004414 then

local nCurTime = LuaFnGetCurrentTime()

local nItemBagIndex = GetBagPosByItemSn(sceneId, selfId, 40004414);

SetBagItemParam( sceneId, selfId, nItemBagIndex, 4, 2, nCurTime )

return 0;

end


--07聖誕元旦活動....

--聖誕守夜活動....洛陽雪人散落寶箱拾取公告....

local bSend = 0

if sceneId == 0 then

bSend = CallScriptFunction( 050023, "OnPlayerPickUpItemInLuoyang", sceneId, selfId, itemId, bagidx )

end

if bSend == 1 then

return

end


--寒玉床寶箱拾取公告....

if sceneId == x888888_g_HanYuBed_SceneId and bGem == 3 then

CallScriptFunction( 808072, "OnPlayerPickUpItemInHanYuBed", sceneId, selfId, itemId, bagidx )

end



--年獸得物品公告....

if sceneId == x888888_g_NianShou_SceneId then

CallScriptFunction( 050052, "OnPlayerPickUpItemInNianShou", sceneId, selfId, itemId, bagidx )

end

--聖獸山獲得野豬王蹤跡公告....

--[ QUFEI 2008-04-16 14:38 UPDATE BugID 31936 ]

if itemId == 40004429 then

CallScriptFunction( 808066, "OnPlayerPickUpItemInBoar", sceneId, selfId, itemId, bagidx ) ;

end

local str

if bGem == 1 then

local a = { "#W#{_INFOUSR%s}#I開啟寶箱時獲得一枚#W#{_INFOMSG%s}。",

"#W#{_INFOUSR%s}#I準備關上寶箱時在角落裡面發現了一枚#W#{_INFOMSG%s}。",

"#W#{_INFOUSR%s}#I一腳踢在寶箱上,掉出來一枚#W#{_INFOMSG%s}。"

}

local index = random(getn(a))

str = format(a[index], playerName, transfer)

BroadMsgByChatPipe(sceneId, selfId, str, 4)


elseif  bGem == 2 then


--當玩家獲得35級心法秘籍及65級武功秘籍,會在世界公告

local bFlag = 0;

--for i = 0, 8 do

-- if ( x888888_MenPaiBroadMsg[ i ].XinFa == itemId ) or ( x888888_MenPaiBroadMsg[ i ].MiJi == itemId ) then

-- bFlag = 1;

-- break;

-- end

--end


if bFlag > 0 then


local TeammateCount = GetTeamMemberCount( sceneId, selfId )

local sTeamLeaderName = playerName;

for i=0, TeammateCount-1 do

TeammateID = GetNearTeamMember( sceneId, selfId, i )

if LuaFnIsTeamLeader( sceneId, selfId ) then

sTeamLeaderName = GetName(sceneId, selfId);

break;

end

end


local mp = LuaFnGetCopySceneData_Param(sceneId, 11);

local mpName = x888888_MenPaiBroadMsg[mp].mp;


local message;


local randMessage = random(3);


if randMessage == 1 then

    message = format("#W#{_INFOUSR%s}#P#{DropItem_00}#G%s#P#{DropItem_01}#Y%s#P#{DropItem_02}#{_INFOMSG%s}#P#{DropItem_03}", sTeamLeaderName, mpName, mpName, transfer );

elseif randMessage == 2 then

message = format("#{DropItem_04}#G%s#P#{DropItem_05}#W#{_INFOUSR%s}#P#{DropItem_06}#{_INFOMSG%s}#P#{DropItem_07}", mpName, sTeamLeaderName, transfer );

else

message = format("#{DropItem_08}#G%s#P#{DropItem_09}#W#{_INFOUSR%s}#P#{DropItem_10}#{_INFOUSR%s}#P#{DropItem_11}#{_INFOMSG%s}#P#{DropItem_12}", mpName, sTeamLeaderName,sTeamLeaderName, transfer );

end

BroadMsgByChatPipe(sceneId, selfId, message, 4);

end


elseif bGem == 0 then


local a = { "#W#{_INFOUSR%s}#I在開啟寶箱的時候獲得#W#{_INFOMSG%s}。",

"#W#{_INFOUSR%s}#I在寶箱的角落裡面發現了一張破舊的#W#{_INFOMSG%s}。",

"#W#{_INFOUSR%s}#I把寶箱翻了過來,發現一張#W#{_INFOMSG%s}#I貼在寶箱底部。"

}

local index = random(getn(a))

str = format(a[index], playerName, transfer)

BroadMsgByChatPipe(sceneId, selfId, str, 4)

elseif bGem == 3 then

--技能書寶箱公告

local rnd = random( 3 )

local msg = nil

local fnd = 0

local lst =

{

30402012, 30402014, 30402016, 30402018, 30402020, 

30402025, 30402026, 30402029, 30402030, 30402033, 

30402034, 30402035, 30402036, 30402037, 30402038, 

30402039, 30402040, 30402041, 30402042, 30402043, 

30402044, 30402045, 30402046, 30402047, 30402048, 

30402049, 30402050, 30402051, 30402052, 30402053, 

30402054, 30402055, 30402056, 30402059, 30402060, 

30402061, 30402062, 30402063, 30402064, 30402065, 

30402066, 30402067, 30402068, 30402069, 30402070, 

30402072, 30402073, 30402074, 30402075, 30402076, 

30402077, 30402078, 30402079, 30402080, 30402081, 

30402082, 30402083, 30402084, 30402085, 30402086, 

30402087, 30402088, 30402089, 30402090,

}

for i = 1, getn( lst ) do

if lst[ i ] == itemId then

fnd = 1

break

end

end

if fnd == 1 then

if rnd == 1 then

    msg = format( "#W#{_INFOUSR%s}#I在開啟寶箱的時候獲得#W#{_INFOMSG%s}。",

    playerName, transfer )

elseif rnd == 2 then

msg = format( "#W#{_INFOUSR%s}#I在寶箱的角落裡面發現了一本破舊的#W#{_INFOMSG%s}。",

playerName, transfer )

else

msg = format( "#W#{_INFOUSR%s}#I把寶箱翻了過來,發現一本#W#{_INFOMSG%s}#I貼在寶箱底部。",

playerName, transfer )

end

BroadMsgByChatPipe( sceneId, selfId, msg, 4 )

return

end


end

-- 褚少微,2008.6.10。束河古鎮420,消滅霜影BOSS統計...

if sceneId == 420 then

CallScriptFunction( 808040, "OnPlayerPickUpItemFromShangyingBoss", sceneId, selfId, itemId, bagidx )

end

--黃金之鏈

if itemId == 40004453 then

CallScriptFunction( 050220, "PickupItem", sceneId, selfId, itemId, bagidx ) ;

end

--玄佛珠

if itemId == 40004454 then

CallScriptFunction( 050221, "PickupItem", sceneId, selfId, itemId, bagidx ) ;

end

--單人PK

if itemId == 40004478  and sceneId == 411 then --playerName

local nNowTime = LuaFnGetCurrentTime()

SetMissionData( sceneId, selfId, MD_RENWULIAN_EXCHANGEITEM,nNowTime)

    local message = format("#W#{_INFOUSR%s}#H在單人PK活動地圖拾取#{_INFOMSG%s}#P只要持續40分鐘即可獲得50RMB元寶", playerName, transfer );

BroadMsgByChatPipe(sceneId, selfId, message, 4);

end

end


--對任務可用性進行檢測

function x888888_Check_MissionAvailable(sceneId, playerId, missionId)

--//////////////////////////////////////////////////////////

--任務鏈可用性檢測

local renwulianMissionId = 1202

if missionId == renwulianMissionId then

if IsHaveMission(sceneId, playerId, renwulianMissionId) > 0 then

local MissionType = {wenhou=1, suoqu=2, fubenjiaoxun=3, fubenduowu=4, chongwu=5}

local misIndex = GetMissionIndexByID(sceneId, playerId, renwulianMissionId)

local missionType = GetMissionParam(sceneId, playerId, misIndex, 1)


local bAvailable = 1

if missionType == MissionType.wenhou then

local npcId = GetMissionParam(sceneId, playerId, misIndex, 5)

if 0 == CheckNpcAvailable(sceneId, playerId, npcId) then

MissionLog(sceneId, "error: x888888_Check_MissionAvailable..renwulian..wenhou..npcId=" .. tostring(npcId))

bAvailable = 0

end

elseif missionType == MissionType.suoqu then

local itemId = GetMissionParam(sceneId, playerId, misIndex, 5)

local npcId = GetMissionParam(sceneId, playerId, misIndex, 6)

if 0 == CheckNpcAvailable(sceneId, playerId, npcId) or

0 == CheckItemAvailable(sceneId, playerId, itemId) then

MissionLog(sceneId, "error: x888888_Check_MissionAvailable..renwulian..suoqu..npcId=" .. tostring(npcId)

.. ",itemId=" .. tostring(itemId))

bAvailable = 0

end

elseif missionType == MissionType.chongwu then

local npcId = GetMissionParam(sceneId, playerId, misIndex, 6)

if 0 == CheckNpcAvailable(sceneId, playerId, npcId) then

bAvailable = 0

MissionLog(sceneId, "error: x888888_Check_MissionAvailable..renwulian..chongwu..npcId=" .. tostring(npcId))

end

elseif missionType == MissionType.fubenjiaoxun then

local npcId = GetMissionParam(sceneId, playerId, misIndex, 5)

if 0 == CheckNpcAvailable(sceneId, playerId, npcId) then

MissionLog(sceneId, "error: x888888_Check_MissionAvailable..renwulian..fubenjiaoxun..npcId=" .. tostring(npcId))

bAvailable = 0

end

end

-- 如果不可用則刪除

if 0 == bAvailable then

DelMission(sceneId, playerId, renwulianMissionId)

end

end

end

--//////////////////////////////////////////////////////////


--Add other code ...

local xingxiuMissionId = 1095

if missionId == xingxiuMissionId then

if IsHaveMission(sceneId, playerId, xingxiuMissionId) > 0 then

local bAvailable = 1

local MissionType = {XunWu=1, SongXin=2, DingDianYinDao=3, FuBenZhanDou=4, BuZhuo=5, ShouJi=6, KaiGuang=7, otherMenpaiFuben=8,  killMonster=9}

local misIndex = GetMissionIndexByID(sceneId, playerId, xingxiuMissionId)

local missionType = GetMissionParam(sceneId, playerId, misIndex, 1)

if missionType == MissionType.XunWu then

local demandItemId = GetMissionParam(sceneId, playerId, misIndex, 5)

if demandItemId <= 0 then

MissionLog(sceneId, "error: x888888_Check_MissionAvailable..xingxiushimen.XunWu..demandItemId=" .. type(demandItemId))

bAvailable = 0

end

local itemId, itemName, itemDesc = GetItemInfoByItemId(demandItemId)

if itemName == nil or itemDesc == nil or itemId == nil then

MissionLog(sceneId, "error: x888888_Check_MissionAvailable..xingxiushimen.XunWu..itemName=" .. type(itemName)

.. ",itemDesc=" .. itemDesc .. ",itemId=" .. itemId)

bAvailable = 0

end

elseif missionType == MissionType.KaiGuang then

local demandItemId = GetMissionParam(sceneId, playerId, misIndex, 6)

if demandItemId <= 0 then

MissionLog(sceneId, "error: x888888_Check_MissionAvailable..xingxiushimen.KaiGuang..demandItemId=" .. type(demandItemId))

bAvailable = 0

end

local itemId, itemName, itemDesc = GetItemInfoByItemId(demandItemId)

if itemName == nil or itemDesc == nil or itemId == nil then

MissionLog(sceneId, "error: x888888_Check_MissionAvailable..xingxiushimen.KaiGuang..itemName=" .. type(itemName)

.. ",itemDesc=" .. itemDesc .. ",itemId=" .. itemId)

bAvailable = 0

end

elseif missionType == MissionType.ShouJi then

local demandItemId = GetMissionParam(sceneId, playerId, misIndex, 6)

if demandItemId <= 0 then

MissionLog(sceneId, "error: x888888_Check_MissionAvailable..xingxiushimen.ShouJi..demandItemId=" .. type(demandItemId))

bAvailable = 0

end

local itemId, itemName, itemDesc = GetItemInfoByItemId(demandItemId)

if itemName == nil or itemDesc == nil or itemId == nil then

MissionLog(sceneId, "error: x888888_Check_MissionAvailable..xingxiushimen.ShouJi..itemName=" .. type(itemName)

.. ",itemDesc=" .. itemDesc .. ",itemId=" .. itemId)

bAvailable = 0

end

end

if bAvailable == 0 then

DelMission(sceneId, playerId, xingxiuMissionId)

end

end

end


end


function x888888_OnAcceptCheck( sceneId, objId, level )


-- 任務是否已滿

if IsMissionFull( sceneId, objId ) == 1 then

return 0

end


local missioninfo = x888888_g_AutoAccept_MissionList[level]

--檢測等級

if not missioninfo then

return 0

end


--已經接過則不符合條件

if IsHaveMission( sceneId, objId, missioninfo.MissionId ) > 0 then

return 0

end


--已經做過則不符合條件

if IsMissionHaveDone(sceneId, objId, missioninfo.MissionId) > 0   then

return 0

end


--檢測前續任務

if missioninfo.PreMissionId > 0 then

if IsMissionHaveDone(sceneId, objId, missioninfo.PreMissionId) <= 0   then

return 0

end

end

return 1

end


function x888888_OnAutoAcceptMission( sceneId, objId, level )


-- 檢測任務接受條件

if x888888_OnAcceptCheck( sceneId, objId, level ) > 0 then

local missioninfo = x888888_g_AutoAccept_MissionList[level]


if missioninfo ~= nil then

local ret = AddMission( sceneId, objId, missioninfo.MissionId, missioninfo.MissionIndex, missioninfo.pKill, missioninfo.pArea, missioninfo.pItem ) -- kill、area、item

if ret == 1 and missioninfo.EventId ~= 0 then

SetMissionEvent( sceneId, objId, missioninfo.MissionId, missioninfo.EventId )

end

end

end

end


function x888888_OnCompleteCheck( sceneId, objId, level )


local missioninfo = x888888_g_FullLevel_MissionList[level]

--檢測等級

if not missioninfo then

return 0

end


if IsHaveMission( sceneId, objId, missioninfo.MissionId ) <= 0 then

return 0

end


-- 是否達到需求等級

local Playerlvl = LuaFnGetLevel( sceneId, objId )

if Playerlvl < missioninfo.LevelLimit then

return 0

end


local misIndex = GetMissionIndexByID(sceneId,objId,missioninfo.MissionId)


-- 檢測任務是否完成

if GetMissionParam(sceneId, objId, misIndex, missioninfo.CompleteIdx) <= 0 then

return 1

end

return 0

end


function x888888_OnSetCompleteMission( sceneId, objId, level )


-- 檢測任務完成條件

if x888888_OnCompleteCheck( sceneId, objId, level ) > 0 then

local missioninfo = x888888_g_FullLevel_MissionList[level]

if missioninfo ~= nil then


local misIndex = GetMissionIndexByID(sceneId,objId,missioninfo.MissionId)

SetMissionByIndex( sceneId, objId, misIndex, missioninfo.CompleteIdx, 1 )

SetMissionByIndex( sceneId, objId, misIndex, missioninfo.RecordIdx, 1 )

BeginEvent( sceneId )

AddText( sceneId, missioninfo.MsgStr )

EndEvent( sceneId )

DispatchMissionTips( sceneId, objId )

end

end


end


-- 更新玩家的資料,用於在指令碼里修改玩家資料,然後在Server程式裡用的情況

function x888888_UpdatePlayerData(sceneId, playerId)

-- 更新暗器(法寶)N倍經驗狀態

if HaveDarkEquiped(sceneId, playerId) ==1 then 

if IsDarkNeedLevelUpByNpcNow(sceneId, playerId) ==1 then 

if GetDarkLevel(sceneId, playerId) <= GetLevel(sceneId, playerId) then

DarkLevelUp(sceneId, playerId)

end

end

end

CallScriptFunction( 332207, "CalcDarkMultiExpRate", sceneId, playerId ) ;

end



-- 當玩家的暗器升級時會呼叫的函式

function x888888_OnDarkLevelUp(sceneId, playerId, levelaftlevel)

--顯示暗器升級特效

LuaFnSendSpecificImpactToUnit(sceneId, playerId, playerId, playerId, 32407, 0 )

--後續功能新增

end


function x888888_AskDeleteMinorPasswordTime(sceneId, playerId)

local lefttime = LuaFnGetPasswordDeleteRemainTime(sceneId, playerId)

if lefttime >= 0 then

LuaFnSendSystemMail( sceneId, GetName(sceneId,playerId), "#{SMTX_090309_1}"..tostring(lefttime).."#{SMTX_090309_2}" )

end

end




function x888888_KKGG_rm( sceneId, selfId )

    BeginUICommand( sceneId )

UICommand_AddString(sceneId,"#gFF0FA08月01日更新公告")

UICommand_AddString(sceneId,"#r#c0000FF本服長久公平公正,如有更好意見請聯絡客服QQ800181789#r#cff9900所有活動,副本按照官方時間分配...#r#c009933獨家開放全天馬賊系統,無限贈點地圖,無限刷金幣地圖....#r#c0000FF充值領取在元寶商店右下角兌換贈點,或者洛陽NPC253,249領取#r#e0080FF#g2E9AFE本服網站採用中文域名,瀏覽器中輸入 黑紙天龍.com 即可開啟本服網站")  --這個介面別操過480個字元

EndUICommand( sceneId )

DispatchUICommand( sceneId, selfId,20151024)

end

function x888888_DengLUjp(sceneId, selfId)

local str, str1,str2,str3=1,"","",""

str= LuaFnGetGUID( sceneId, selfId)-1010000001

str1=",01,08,"  --一月8號

--獎勵物品

str2="30008017,2,38000397,1,38000949,3,30309857,3,38000571,3,30900133,3,20310167,3,"

---蹴鞠啟用

str3="39900001,39900010,38000947,38000397,30900201,20310168,"

BeginUICommand( sceneId )

UICommand_AddString(sceneId,str..str1..str2..str3)

EndUICommand( sceneId )

DispatchUICommand( sceneId, selfId,2015060802)

end

有哪裡不對的大家討論下。

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/31553491/viewspace-2215570/,如需轉載,請註明出處,否則將追究法律責任。

相關文章