-------------------------------------------------------------------------------- -- DummyProcess -------------------------------------------------------------------------------- function DummyProcess( Var ) cExecCheck "DummyProcess" --DebugLog("³¡") return end -------------------------------------------------------------------------------- -- InitDungeon -------------------------------------------------------------------------------- -- ´øÀü ÃʱâÈ­ function InitDungeon( Var ) cExecCheck "InitDungeon" if Var == nil then return end -- ÀνºÅϽº ´øÀü ½ÃÀÛ Àü¿¡ Ç÷¹À̾îÀÇ Ã¹ ·Î±×ÀÎÀ» ±â´Ù¸°´Ù. if Var["bPlayerMapLogin"] == nil then if Var["InitialSec"] + WAIT_PLAYER_MAP_LOGIN_SEC_MAX <= cCurrentSecond() then --GoToFail( Var ) Var["StepFunc"] = ReturnToHome return end return end if Var["InitDungeon"] == nil then --DebugLog( "Start InitDungeon" ) Var["InitDungeon"] = {} -- ´ë±â½Ã°£ ¼³Á¤ Var["InitDungeon"]["WaitSecDuringInit"] = Var["CurSec"] + DelayTime["AfterInit"] Var["InitDungeon"]["DialogTime"] = Var["InitDungeon"]["WaitSecDuringInit"] Var["InitDungeon"]["DialogStep"] = 1 end -- ´ë±â ÈÄ ´ë»çó¸® ´Ü°è·Î if Var["InitDungeon"]["WaitSecDuringInit"] > Var["CurSec"] then return end -- ´ë»çó¸® if Var["InitDungeon"]["DialogTime"] ~= nil then if Var["InitDungeon"]["DialogTime"] > Var["CurSec"] then return else local CurMsg = ChatInfo["InitDungeon"] local DialogStep = Var["InitDungeon"]["DialogStep"] local MaxDialogStep = #ChatInfo["InitDungeon"] if DialogStep <= MaxDialogStep then cScriptMessage( Var["MapIndex"], CurMsg[DialogStep]["Index"] ) Var["InitDungeon"]["DialogTime"] = Var["CurSec"] + DelayTime["GapDialog"] Var["InitDungeon"]["DialogStep"] = DialogStep + 1 return end if Var["InitDungeon"]["DialogStep"] > MaxDialogStep then Var["InitDungeon"]["DialogTime"] = nil Var["InitDungeon"]["DialogStep"] = nil Var["InitDungeon"]["NextStepWaitTime"] = Var["CurSec"] + DelayTime["WaitKingCrabProcess"] end end end if Var["InitDungeon"]["NextStepWaitTime"] ~= nil then if Var["InitDungeon"]["NextStepWaitTime"] > Var["CurSec"] then return end Var["StepFunc"] = KingCrabProcess Var["InitDungeon"] = nil --DebugLog( "End InitDungeon" ) return end end -------------------------------------------------------------------------------- -- KingCrabProcess -------------------------------------------------------------------------------- function KingCrabProcess( Var ) cExecCheck "KingCrabProcess" if Var == nil then ErrorLog("KingCrabProcess:: Var == nil" ) --GoToFail( Var ) Var["StepFunc"] = ReturnToHome return end ----------------------------------------------------------------- -- KingCrabProcess : Å·Å©·¦ ¸®Á¨Ã³¸® ----------------------------------------------------------------- if Var["KingCrabProcess"] == nil then Var["KingCrabProcess"] = {} --DebugLog("===KingCrabProcess=========================") --DebugLog("Å·Å©·¦ ÇÁ·Î¼¼½º Å×ÀÌºí »ý¼º") local RegenInfo = RegenInfoTable["KingCrab"] local Handle = INVALID_HANDLE -- ¸Ê¿¡ ÀÖ´Â ¸ðµç À¯ÀúÀÇ ÇÚµé ¹Þ¾Æ¿Â´Ù local TargetHandleList = { cGetPlayerList(Var["MapIndex"]) } local RegenX, RegenY = RegenInfo["RegenX"], RegenInfo["RegenY"] -- ¸Ê¿¡ 1¸í ÀÌ»óÀÇ À¯Àú°¡ ÀÖÀ» °æ¿ì, ±× Áß ÇѸíÀÇ À§Ä¡·Î ¸®Á¨ÇÑ´Ù. -- ¸Ê¿¡ À¯Àú°¡ ¾øÀ» °æ¿ì, RegenInfoTable["KingCrab"]¿¡ ¼¼ÆÃµÈ À§Ä¡·Î ¸®Á¨ÇÑ´Ù. if TargetHandleList ~= nil then local TargetUser = cRandomInt( 1, #TargetHandleList ) if TargetHandleList[TargetUser] ~= nil then RegenX, RegenY = cObjectLocate( TargetHandleList[TargetUser] ) end end Handle = cMobRegen_XY( Var["MapIndex"], RegenInfo["MobIndex"], RegenX + 5, RegenY, RegenInfo["Dir"] ) if Handle == nil then ErrorLog("Å·Å©·¦ »ý¼º ½ÇÆÐ") Var["StepFunc"] = ReturnToHome --GoToFail( Var ) return else --DebugLog("Å·Å©·¦ Çڵ鰪Àº : "..Handle) end -- ´ë»çó¸® local CurMsg = ChatInfo["KingCrabProcess"]["AfterBossRegen"] if CurMsg ~= nil then -- ÀÀ? ¿ØÁö ¶¥ÀÌ Èçµé¸®´Â°Å °°Áö ¾Ê¾Æ¿ä? cScriptMessage( Var["MapIndex"], CurMsg["Index"] ) end Var["KingCrabProcess"]["Handle"] = Handle Var[Handle] = {} Var[Handle]["IsProgressSpecialSkill"] = false return end if Var["KingCrabProcess"] ~= nil then local Handle = Var["KingCrabProcess"]["Handle"] ----------------------------------------------------------------- -- KingCrabProcess : ´ÙÀ½ ´Ü°è·Î ³Ñ¾î°¥ ½Ã°£ÀÎÁö üũ ----------------------------------------------------------------- -- ´ÙÀ½ ´Ü°è·Î ³Ñ¾î°¥ ½Ã°£ÀÌ ¾Æ´Ï¸é if Var["KingCrabProcess"]["NextStepWaitTime"] ~= nil then if Var["KingCrabProcess"]["NextStepWaitTime"] > Var["CurSec"] then --DebugLog("´ÙÀ½´Ü°è ³Ñ¾î°¡±â ´ë±âÁß...") return end Var["KingCrabProcess"] = nil Var[Handle] = nil Var["StepFunc"] = KingSlimeProcess --DebugLog("´ÙÀ½ ½ºÅÜ ¼³Á¤ : KingSlimeProcess") return end ----------------------------------------------------------------- -- KingCrabProcess : Å·Å©·¦ Á×¾ú´ÂÁö üũ ----------------------------------------------------------------- if cIsObjectDead( Handle ) == 1 then --DebugLog("Å·Å©·¦ Á×¾ú±º!") if cAIScriptSet( Handle ) == nil then ErrorLog( "KingCrabProcess : ½ºÅ©¸³Æ® ÃʱâÈ­ ½ÇÆÐ" ) end -- ´ë»ç ó¸® local CurMsg = ChatInfo["KingCrabProcess"]["AfterBossDead"] if CurMsg ~= nil then -- ÇؾȰ¡¿¡ ÀÖ´Â ÀϹÝÀûÀÎ Å·Å©·¦°ú´Â ¹º°¡ ºÐÀ§±â°¡ ´Ù¸¥µ¥¿ä? cScriptMessage( Var["MapIndex"], CurMsg["Index"] ) end -- º¸»ó Áö±Þ if RewardItemInfo["KingCrabProcess"] ~= nil then --DebugLog("KingCrabProcess º¸»óÁö±Þ ´ë±âÁß") local CurReward = RewardItemInfo["KingCrabProcess"] local RewardList = { cGetPlayerList(Var["MapIndex"]) } --DebugLog("RewardList °³¼ö : "..#RewardList ) -- ¸Ê¿¡ ÀÖ´Â À¯Àú Áß, ÇöÀç Á×Áö ¾ÊÀº À¯Àúµé¿¡°Ô º¸»óÀ» Áö±ÞÇÑ´Ù. for i = 1, #RewardList do if cIsObjectDead( RewardList[i] ) == nil then cRewardItem( RewardList[i], CurReward["Index"], CurReward["Num"] ) end end end Var["KingCrabProcess"]["NextStepWaitTime"] = Var["CurSec"] + DelayTime["WaitKingSlimeProcess"] return end ----------------------------------------------------------------- -- KingCrabProcess : Å·Å©·¦ ½ºÅ³ üũ ----------------------------------------------------------------- if Var[Handle]["IsProgressSpecialSkill"] == false then local CurTime = Var["CurSec"] local CurMySkill, EndTime = cGetCurrentSkillInfo( Var["KingCrabProcess"]["Handle"] ) -- ÇöÀç ½ºÅ³µ¥ÀÌÅÍ¿¡ ÀÖ´Â ½ºÅ³ »ç¿ëÁßÀÌ ¾Æ´Ñ°æ¿ì, üũÇÒ ÇÊ¿ä¾øÀ¸¹Ç·Î Á¾·á if CurMySkill == nil then --DebugLog("½ºÅ³»ç¿ëÁ߾ƴÔ") return end -- ÀÌ¹Ì ½ºÅ³ ¾´ ½Ã°£ Áö³µÀ¸¸é, Àǹ̾ø´Â endtime °ªÀ̹ǷΠreturn if EndTime == nil then --DebugLog("½Ã°£ == nil") return end -- ÀÌ¹Ì ½ºÅ³ ¾´ ½Ã°£ Áö³µÀ¸¸é, Àǹ̾ø´Â endtime °ªÀ̹ǷΠreturn if EndTime < CurTime then return end -- EndTime È®ÀÎÇϱâ, -- ÇöÀç EndTimeÀÌ 0À¸·Î µé¾î¿À´Â °æ¿ì´Â, -- ½ºÅ³Àº »ç¿ëÁßÀε¥ ¸÷ai°¡ attack »óÅ°¡ ¾Æ´Ï¶ó¼­, ºÎ¸ðŬ·¡½º¸®ÅÏ°ª ¹Þ¾Æ¿À±â¶§¹® --DebugLog("µåµð¾î ½ºÅ³À»»ç¿ëÇϳª¿ä!") --[[ DebugLog("---------------------------") DebugLog("KingCrabProcess : CurTime : "..CurTime ) DebugLog("KingCrabProcess : CurMySkill : "..CurMySkill) DebugLog("KingCrabProcess : EndTime : "..EndTime) DebugLog("---------------------------") --]] ----------------------------------------------------------------- -- ¡Ú ½ºÅ³ÀÌ ÈÙÀ©µåÀÎ °æ¿ì ----------------------------------------------------------------- if CurMySkill == SkillInfo_KingCrab["KC_WhirlWind"]["SkillIndex"] then --DebugLog("KC_WhirlWind »ç¿ëÁß") Var["KingCrabProcess"]["SkillStartTime"] = CurTime Var["KingCrabProcess"]["SkillWorkTime"] = EndTime Var["KingCrabProcess"]["SkillEndTime"] = EndTime + SkillInfo_KingCrab["KC_WhirlWind"]["SkillKeepTime"] --[[ DebugLog("ÇöÀç½Ã°£Àº : " ..Var["CurSec"] ) DebugLog("½ºÅ³ ½ÃÀÛÇÑ ½Ã°£Àº : " ..Var["KingCrabProcess"]["SkillStartTime"] ) DebugLog("½ºÅ³³¡ ¿¹Á¤½Ã°£Àº : " ..Var["KingCrabProcess"]["SkillWorkTime"] ) --]] -- ½ºÅ©¸³Æ® ºÎÂø******************************************* if cSetAIScript ( MainLuaScriptPath, Handle ) ~= nil then if cAIScriptFunc( Handle, "Entrance", "KC_WhirlWind" ) == nil then ErrorLog("½ºÅ©¸³Æ® ºÎÂø ½ÇÆÐ") return end end -- ½ºÅ³ ó¸® ÁßÀ̹ǷΠVar[Handle]["IsProgressSpecialSkill"] = true return end ----------------------------------------------------------------- -- ¡Ú ½ºÅ³ÀÌ ¼ÒȯÀÎ °æ¿ì ----------------------------------------------------------------- if CurMySkill == SkillInfo_KingCrab["KC_SummonBubble"]["SkillIndex"] then DebugLog("KC_SummonBubble »ç¿ëÁß") Var["KingCrabProcess"]["SkillStartTime"] = CurTime Var["KingCrabProcess"]["SkillWorkTime"] = CurTime + SkillInfo_KingCrab["KC_SummonBubble"]["SummonStartDelay"] Var["KingCrabProcess"]["SkillEndTime"] = EndTime --[[ DebugLog("ÇöÀç½Ã°£Àº : " ..Var["CurSec"] ) DebugLog("½ºÅ³ ½ÃÀÛÇÑ ½Ã°£Àº : " ..Var["KingCrabProcess"]["SkillStartTime"] ) DebugLog("½ºÅ³Ã³¸®¿¹Á¤½Ã°£Àº : " ..Var["KingCrabProcess"]["SkillWorkTime"] ) DebugLog("½ºÅ³³¡ ¿¹Á¤½Ã°£Àº : " ..Var["KingCrabProcess"]["SkillEndTime"] ) --]] -- ½ºÅ©¸³Æ® ºÎÂø******************************************* if cSetAIScript ( MainLuaScriptPath, Handle ) ~= nil then if cAIScriptFunc( Handle, "Entrance", "KC_SummonBubble" ) == nil then ErrorLog("½ºÅ©¸³Æ® ºÎÂø ½ÇÆÐ") return end end Var[Handle]["IsProgressSpecialSkill"] = true return end end end end -------------------------------------------------------------------------------- -- KingSlimeProcess -------------------------------------------------------------------------------- function KingSlimeProcess( Var ) cExecCheck "KingSlimeProcess" if Var == nil then ErrorLog("KingSlimeProcess:: Var == nil" ) --GoToFail( Var ) Var["StepFunc"] = ReturnToHome return end ----------------------------------------------------------------- -- KingSlimeProcess : Var["KingSlimeProcess"] Å×À̺í ÃʱâÈ­ÀÛ¾÷ ----------------------------------------------------------------- if Var["KingSlimeProcess"] == nil then Var["KingSlimeProcess"] = {} --DebugLog("===KingSlimeProcess=========================") --DebugLog("Å·½½¶óÀÓ ÇÁ·Î¼¼½º Å×ÀÌºí »ý¼º") local RegenInfo = RegenInfoTable["KingSlime"] local Handle = INVALID_HANDLE -- ¸Ê¿¡ ÀÖ´Â ¸ðµç À¯ÀúÀÇ ÇÚµé ¹Þ¾Æ¿Â´Ù local TargetHandleList = { cGetPlayerList(Var["MapIndex"]) } local RegenX, RegenY = RegenInfo["RegenX"], RegenInfo["RegenY"] -- ¸Ê¿¡ 1¸í ÀÌ»óÀÇ À¯Àú°¡ ÀÖÀ» °æ¿ì, ±× Áß ÇѸíÀÇ À§Ä¡·Î ¸®Á¨ÇÑ´Ù. -- ¸Ê¿¡ À¯Àú°¡ ¾øÀ» °æ¿ì, RegenInfoTable["KingCrab"]¿¡ ¼¼ÆÃµÈ À§Ä¡·Î ¸®Á¨ÇÑ´Ù. if TargetHandleList ~= nil then local TargetUser = cRandomInt( 1, #TargetHandleList ) if TargetHandleList[TargetUser] ~= nil then RegenX, RegenY = cObjectLocate( TargetHandleList[TargetUser] ) end end Handle = cMobRegen_XY( Var["MapIndex"], RegenInfo["MobIndex"], RegenX + 5, RegenY, RegenInfo["Dir"] ) if Handle == nil then ErrorLog("Å·½½¶óÀÓ »ý¼º ½ÇÆÐ") Var["StepFunc"] = ReturnToHome --GoToFail( Var ) return else DebugLog("Å·½½¶óÀÓ Çڵ鰪Àº : "..Handle) end -- ¸÷ ¸®Á¨µÇÀÚ¸¶ÀÚ hide»óÅÂÀÌ»ó °É¾îÁÜ! cSetAbstate( Handle, "StaHide", 1, 10000 ) Var["KingSlimeProcess"]["Handle"] = Handle Var[Handle] = {} Var[Handle]["IsProgressSpecialSkill"] = false -- ´ë»çó¸® local CurMsg = ChatInfo["KingSlimeProcess"]["AfterBossRegen"] if CurMsg ~= nil then -- ÀÀ? ¹Ù´Ú¿¡ Àú ±×¸²ÀÚ´Â ¹¹ÁÒ? cScriptMessage( Var["MapIndex"], CurMsg["Index"] ) end local target = cObjectFind( Handle, 1000, ObjectType["Player"], "so_ObjectType" ) if cSkillBlast( Handle, target, SkillInfo_KingSlime["KS_ShowUp"]["SkillIndex"] ) == nil then ErrorLog("Å·½½¶óÀÓ ¸®Á¨ÈÄ ÃÖÃʳ«ÇÏ ½ºÅ³ »ç¿ë½ÇÆÐ") end return end ----------------------------------------------------------------- -- KingSlimeProcess : Var["KingSlimeProcess"] Å×À̺í ÃʱâÈ­ ÈÄ ÀÛ¾÷ ----------------------------------------------------------------- if Var["KingSlimeProcess"] ~= nil then local Handle = Var["KingSlimeProcess"]["Handle"] ----------------------------------------------------------------- -- KingSlimeProcess : ´ÙÀ½ ´Ü°è·Î ³Ñ¾î°¥ ½Ã°£ÀÎÁö üũ ----------------------------------------------------------------- -- ´ÙÀ½ ´Ü°è·Î ³Ñ¾î°¥ ½Ã°£ÀÌ ¾Æ´Ï¸é if Var["KingSlimeProcess"]["NextStepWaitTime"] ~= nil then if Var["KingSlimeProcess"]["NextStepWaitTime"] > Var["CurSec"] then --DebugLog("´ÙÀ½´Ü°è ³Ñ¾î°¡±â ´ë±âÁß...") return end Var["KingSlimeProcess"] = nil Var[Handle] = nil Var["StepFunc"] = MiniDragonProcess --DebugLog("´ÙÀ½ ½ºÅÜ ¼³Á¤ : MiniDragonProcess") return end ----------------------------------------------------------------- -- KingSlimeProcess : Å·½½¶óÀÓ Á×¾ú´ÂÁö üũ ----------------------------------------------------------------- if cIsObjectDead( Handle ) == 1 then --DebugLog("Å·½½¶óÀÓ Á×¾ú±º!") if cAIScriptSet( Handle ) == nil then ErrorLog( "KingSlimeProcess : ½ºÅ©¸³Æ® ÃʱâÈ­ ½ÇÆÐ" ) end -- ´ë»ç ó¸® local CurMsg = ChatInfo["KingSlimeProcess"]["AfterBossDead"] if CurMsg ~= nil then -- È®½ÇÈ÷ ¿¹Àü¿¡ ÀÖ´ø ÇؾȰ¡ ¸ó½ºÅ͵éÇÏ°í ¹º°¡ ´Þ¶óÁ³¾î¿ä. ´Ùµé Á¶½ÉÇϼ¼¿ä. cScriptMessage( Var["MapIndex"], CurMsg["Index"] ) end -- º¸»ó Áö±Þ if RewardItemInfo["KingSlimeProcess"] ~= nil then --DebugLog("KingSlimeProcess º¸»óÁö±Þ ´ë±âÁß") local CurReward = RewardItemInfo["KingSlimeProcess"] local RewardList = { cGetPlayerList(Var["MapIndex"]) } --DebugLog("RewardList °³¼ö : "..#RewardList ) -- ¸Ê¿¡ ÀÖ´Â À¯Àú Áß, ÇöÀç Á×Áö ¾ÊÀº À¯Àúµé¿¡°Ô º¸»óÀ» Áö±ÞÇÑ´Ù. for i = 1, #RewardList do if cIsObjectDead( RewardList[i] ) == nil then cRewardItem( RewardList[i], CurReward["Index"], CurReward["Num"] ) end end end -- ´ÙÀ½ ½ºÅܽ𣠼¼Æà Var["KingSlimeProcess"]["NextStepWaitTime"] = Var["CurSec"] + DelayTime["WaitMiniDragonProcess"] return end ----------------------------------------------------------------- -- KingSlimeProcess : Å·½½¶óÀÓ ½ºÅ³ ó¸® üũ ----------------------------------------------------------------- if Var[Handle]["IsProgressSpecialSkill"] == false then local CurTime = Var["CurSec"] local CurMySkill, EndTime = cGetCurrentSkillInfo( Handle ) -- ÇöÀç ½ºÅ³µ¥ÀÌÅÍ¿¡ ÀÖ´Â ½ºÅ³ »ç¿ëÁßÀÌ ¾Æ´Ñ°æ¿ì, üũÇÒ ÇÊ¿ä¾øÀ¸¹Ç·Î Á¾·á if CurMySkill == nil then --DebugLog("½ºÅ³»ç¿ëÁ߾ƴÔ") return end -- ÀÌ¹Ì ½ºÅ³ ¾´ ½Ã°£ Áö³µÀ¸¸é, Àǹ̾ø´Â endtime °ªÀ̹ǷΠreturn if EndTime == nil then --DebugLog("½Ã°£ == nil") return end -- ÀÌ¹Ì ½ºÅ³ ¾´ ½Ã°£ Áö³µÀ¸¸é, Àǹ̾ø´Â endtime °ªÀ̹ǷΠreturn if EndTime < CurTime then return end -- EndTime È®ÀÎÇϱâ, --[[ DebugLog("µåµð¾î ½ºÅ³À»»ç¿ëÇϳª¿ä!") DebugLog("---------------------------") DebugLog("CurTime : "..CurTime ) DebugLog("CurMySkill : "..CurMySkill) DebugLog("EndTime : "..EndTime) --]] ----------------------------------------------------------------- -- ¡Ú ½ºÅ³ÀÌ ÃÖÃʳ«ÇÏÀÎ °æ¿ì( ¸®Á¨ÈÄ ¹Ù·Î ¾²´Â ½ºÅ³ ) ----------------------------------------------------------------- if CurMySkill == SkillInfo_KingSlime["KS_ShowUp"]["SkillIndex"] then Var["KingSlimeProcess"]["SkillStartTime"] = CurTime Var["KingSlimeProcess"]["SkillEndTime"] = EndTime --[[ DebugLog("ÇöÀç½Ã°£Àº : " ..Var["CurSec"] ) DebugLog("½ºÅ³ ½ÃÀÛÇÑ ½Ã°£Àº : " ..Var["KingSlimeProcess"]["SkillStartTime"] ) DebugLog("½ºÅ³³¡ ¿¹Á¤½Ã°£Àº : " ..Var["KingSlimeProcess"]["SkillEndTime"] ) --]] -- ½ºÅ©¸³Æ® ºÎÂø******************************************* if cSetAIScript ( MainLuaScriptPath, Handle ) ~= nil then if cAIScriptFunc( Handle, "Entrance", "KS_ShowUp" ) == nil then ErrorLog("½ºÅ©¸³Æ® ºÎÂø ½ÇÆÐ") return end end Var[Handle]["IsProgressSpecialSkill"] = true return end ----------------------------------------------------------------- -- ¡Ú ½ºÅ³ÀÌ °­¸²ÀÎ °æ¿ì ----------------------------------------------------------------- if CurMySkill == SkillInfo_KingSlime["KS_Warp"]["SkillIndex"] then Var["KingSlimeProcess"]["SkillStartTime"] = CurTime Var["KingSlimeProcess"]["SkillWorkTime"] = CurTime + SkillInfo_KingSlime["KS_Warp"]["NotTargetStartDelay"] Var["KingSlimeProcess"]["SkillEndTime"] = EndTime --[[ DebugLog("ÇöÀç½Ã°£Àº : " ..Var["CurSec"] ) DebugLog("½ºÅ³ ½ÃÀÛÇÑ ½Ã°£Àº : " ..Var["KingSlimeProcess"]["SkillStartTime"] ) DebugLog("½ºÅ³³¡ ¿¹Á¤½Ã°£Àº : " ..Var["KingSlimeProcess"]["SkillEndTime"] ) --]] -- ½ºÅ©¸³Æ® ºÎÂø******************************************* if cSetAIScript ( MainLuaScriptPath, Handle ) ~= nil then if cAIScriptFunc( Handle, "Entrance", "KS_Warp" ) == nil then ErrorLog("½ºÅ©¸³Æ® ºÎÂø ½ÇÆÐ") return end end Var[Handle]["IsProgressSpecialSkill"] = true return end ----------------------------------------------------------------- -- ¡Ú ½ºÅ³ÀÌ ¼ÒȯÀÎ °æ¿ì ----------------------------------------------------------------- if CurMySkill == SkillInfo_KingSlime["KS_BombSlimePiece"]["SkillIndex_Lump"] or CurMySkill == SkillInfo_KingSlime["KS_BombSlimePiece"]["SkillIndex_Ice"] or CurMySkill == SkillInfo_KingSlime["KS_BombSlimePiece"]["SkillIndex_All"] then --DebugLog("KS_BombSlimePiece ¼Òȯ »ç¿ëÁß") Var["KingSlimeProcess"]["SkillStartTime"] = CurTime Var["KingSlimeProcess"]["SkillWorkTime"] = CurTime + SkillInfo_KingSlime["KS_BombSlimePiece"]["SummonStartDelay"] Var["KingSlimeProcess"]["SkillEndTime"] = EndTime Var["KingSlimeProcess"]["CurSkillIndex"] = CurMySkill --[[ DebugLog("ÇöÀç »ç¿ëÇÑ ½ºÅ³À妽º : " ..Var["KingSlimeProcess"]["CurSkillIndex"] ) DebugLog("ÇöÀç½Ã°£Àº : " ..Var["CurSec"] ) DebugLog("½ºÅ³ ½ÃÀÛÇÑ ½Ã°£Àº : " ..Var["KingSlimeProcess"]["SkillStartTime"] ) DebugLog("½ºÅ³Ã³¸®¿¹Á¤½Ã°£Àº : " ..Var["KingSlimeProcess"]["SkillWorkTime"] ) DebugLog("½ºÅ³³¡ ¿¹Á¤½Ã°£Àº : " ..Var["KingSlimeProcess"]["SkillEndTime"] ) --]] -- ½ºÅ©¸³Æ® ºÎÂø******************************************* if cSetAIScript ( MainLuaScriptPath, Handle ) ~= nil then if cAIScriptFunc( Handle, "Entrance", "KS_BombSlimePiece" ) == nil then ErrorLog("½ºÅ©¸³Æ® ºÎÂø ½ÇÆÐ") return end end Var[Handle]["IsProgressSpecialSkill"] = true return end end end end -------------------------------------------------------------------------------- -- MiniDragonProcess -------------------------------------------------------------------------------- function MiniDragonProcess( Var ) cExecCheck "MiniDragonProcess" if Var == nil then ErrorLog("MiniDragonProcess:: Var == nil" ) Var["StepFunc"] = ReturnToHome --GoToFail( Var ) return end ----------------------------------------------------------------- -- MiniDragonProcess : ¹Ì´Ïµå·¡°ï ¸®Á¨Ã³¸® ----------------------------------------------------------------- if Var["MiniDragonProcess"] == nil then Var["MiniDragonProcess"] = {} --DebugLog("===MiniDragonProcess=========================") --DebugLog("¹Ì´Ïµå·¡°ï ÇÁ·Î¼¼½º Å×ÀÌºí »ý¼º") local RegenInfo = RegenInfoTable["MiniDragon"] local Handle = INVALID_HANDLE -- ¸Ê¿¡ ÀÖ´Â ¸ðµç À¯ÀúÀÇ ÇÚµé ¹Þ¾Æ¿Â´Ù local TargetHandleList = { cGetPlayerList(Var["MapIndex"]) } local RegenX, RegenY = RegenInfo["RegenX"], RegenInfo["RegenY"] -- ¸Ê¿¡ 1¸í ÀÌ»óÀÇ À¯Àú°¡ ÀÖÀ» °æ¿ì, ±× Áß ÇѸíÀÇ À§Ä¡·Î ¸®Á¨ÇÑ´Ù. -- ¸Ê¿¡ À¯Àú°¡ ¾øÀ» °æ¿ì, RegenInfoTable["KingCrab"]¿¡ ¼¼ÆÃµÈ À§Ä¡·Î ¸®Á¨ÇÑ´Ù. if TargetHandleList ~= nil then local TargetUser = cRandomInt( 1, #TargetHandleList ) if TargetHandleList[TargetUser] ~= nil then RegenX, RegenY = cObjectLocate( TargetHandleList[TargetUser] ) end end Handle = cMobRegen_XY( Var["MapIndex"], RegenInfo["MobIndex"], RegenX + 5, RegenY, RegenInfo["Dir"] ) if Handle == nil then ErrorLog("¹Ì´Ïµå·¡°ï »ý¼º ½ÇÆÐ") Var["StepFunc"] = ReturnToHome --GoToFail( Var ) return else --DebugLog("¹Ì´Ïµå·¡°ï Çڵ鰪Àº : "..Handle) end -- ¸÷ ¸®Á¨µÇÀÚ¸¶ÀÚ hide»óÅÂÀÌ»ó °É¾îÁÜ! cSetAbstate( Handle, "StaHide", 1, 10000 ) Var["MiniDragonProcess"]["Handle"] = Handle -- ¸÷ ¸®Á¨ÇÑ Çڵ鰪 Var[Handle] = {} Var[Handle]["IsProgressSpecialSkill"] = false -- ¹Ì´Ïµå·¡°ï ±ÙóÀÇ À¯Àú¿¡°Ô ½ºÅ³ »ç¿ëÇÑ´Ù. local target = cObjectFind( Handle, 1000, ObjectType["Player"], "so_ObjectType" ) if cSkillBlast( Handle, target, SkillInfo_MiniDragon["MD_ShowUp"]["SkillIndex"] ) == nil then ErrorLog("¹Ì´Ïµå·¡°ï, ¸®Á¨ÈÄ Âø·ú ½ºÅ³ »ç¿ë½ÇÆÐ") else --DebugLog("¹Ì´Ïµå·¡°ï, ¸®Á¨ÈÄ Âø·ú ½ºÅ³ ¼º°øÇßÀ½") end return end if Var["MiniDragonProcess"] ~= nil then local Handle = Var["MiniDragonProcess"]["Handle"] ----------------------------------------------------------------- -- MiniDragonProcess : ´ÙÀ½ ´Ü°è·Î ³Ñ¾î°¥ ½Ã°£ÀÎÁö üũ ----------------------------------------------------------------- -- ´ÙÀ½ ´Ü°è·Î ³Ñ¾î°¥ ½Ã°£ÀÌ ¾Æ´Ï¸é if Var["MiniDragonProcess"]["NextStepWaitTime"] ~= nil then if Var["MiniDragonProcess"]["NextStepWaitTime"] > Var["CurSec"] then --DebugLog("´ÙÀ½´Ü°è ³Ñ¾î°¡±â ´ë±âÁß...") return end -- DebugLog("¹Ìµå Á×ÀÎ ½Ã°£.."..Var["MiniDragonProcess"]["BossDeadTime"]) -- DebugLog("¸ñÇ¥½Ã°£.."..Var["InitialSec"] + LimitTime["ForBonusStage"]) if Var["MiniDragonProcess"]["BossDeadTime"] < Var["InitialSec"] + LimitTime["ForBonusStage"] then Var["StepFunc"] = BonusStageProcess --DebugLog("½Ã°£¾È¿¡ ÇØÄ¡¿ö¼­ º¸³Ê½º½ºÅ×ÀÌÁö ½ÇÇà") else Var["StepFunc"] = ReturnToHome --DebugLog("½Ã°£¾È¿¡ ¸øÇÔ, ¸®ÅÏÅõȨ") end Var["MiniDragonProcess"] = nil Var[Handle] = nil return end ----------------------------------------------------------------- -- MiniDragonProcess : ¹Ì´Ïµå·¡°ï Á×¾ú´ÂÁö üũ ----------------------------------------------------------------- if cIsObjectDead( Handle ) == 1 then --DebugLog("¹Ì´Ïµå·¡°ï Á×¾ú±º!") if cAIScriptSet( Handle ) == nil then DebugLog( "MiniDragonProcess : ½ºÅ©¸³Æ® ÃʱâÈ­ ½ÇÆÐ" ) end -- ¹Ì´Ïµå·¡°ï ÇØÄ¡¿î ½Ã°£ ÀúÀå Var["MiniDragonProcess"]["BossDeadTime"] = Var["CurSec"] -- º¸»ó Áö±Þ if RewardItemInfo["MiniDragonProcess"] ~= nil then --DebugLog("MiniDragonProcess º¸»óÁö±Þ ´ë±âÁß") local CurReward = RewardItemInfo["MiniDragonProcess"] local RewardList = { cGetPlayerList(Var["MapIndex"]) } --DebugLog("RewardList °³¼ö : "..#RewardList ) -- ¸Ê¿¡ ÀÖ´Â À¯Àú Áß, ÇöÀç Á×Áö ¾ÊÀº À¯Àúµé¿¡°Ô º¸»óÀ» Áö±ÞÇÑ´Ù. for i = 1, #RewardList do if cIsObjectDead( RewardList[i] ) == nil then cRewardItem( RewardList[i], CurReward["Index"], CurReward["Num"] ) end end end -- ´ÙÀ½ ½ºÅܽ𣠼¼Æà Var["MiniDragonProcess"]["NextStepWaitTime"] = Var["CurSec"] + DelayTime["WaitAfterMiniDragonProcess"] return end end ----------------------------------------------------------------- -- MiniDragonProcess : ¹Ì´Ïµå·¡°ï ½ºÅ³ ó¸® üũ ----------------------------------------------------------------- local Handle = Var["MiniDragonProcess"]["Handle"] if Var[Handle]["IsProgressSpecialSkill"] == false then -- DebugLog("---------------------------") -- DebugLog("cGetCurrentSkillInfo È£Ãâ") local CurTime = Var["CurSec"] local CurMySkill, EndTime = cGetCurrentSkillInfo( Handle ) -- ÇöÀç ½ºÅ³µ¥ÀÌÅÍ¿¡ ÀÖ´Â ½ºÅ³ »ç¿ëÁßÀÌ ¾Æ´Ñ°æ¿ì, üũÇÒ ÇÊ¿ä¾øÀ¸¹Ç·Î Á¾·á if CurMySkill == nil then --DebugLog("½ºÅ³»ç¿ëÁ߾ƴÔ") return end -- ÀÌ¹Ì ½ºÅ³ ¾´ ½Ã°£ Áö³µÀ¸¸é, Àǹ̾ø´Â endtime °ªÀ̹ǷΠreturn if EndTime == nil then --DebugLog("½Ã°£ == nil") return end -- ÀÌ¹Ì ½ºÅ³ ¾´ ½Ã°£ Áö³µÀ¸¸é, Àǹ̾ø´Â endtime °ªÀ̹ǷΠreturn if EndTime < CurTime then --[[ DebugLog("½ºÅ³ ÀÌ¹Ì »ç¿ë³¡") DebugLog("---------------------------") DebugLog("CurTime : "..CurTime ) DebugLog("CurMySkill : "..CurMySkill) DebugLog("EndTime : "..EndTime) --]] return end --DebugLog("µåµð¾î ½ºÅ³À»»ç¿ëÇϳª¿ä!") --[[ DebugLog("---------------------------") DebugLog("CurTime : "..CurTime ) DebugLog("CurMySkill : "..CurMySkill) DebugLog("EndTime : "..EndTime) --]] ----------------------------------------------------------------- -- ¡Ú ½ºÅ³ÀÌ ¸®Á¨ ÈÄ Âø·úÀÎ °æ¿ì ----------------------------------------------------------------- if CurMySkill == SkillInfo_MiniDragon["MD_ShowUp"]["SkillIndex"] then --DebugLog("¹Ì´Ïµå·¡°ï_¸®Á¨ÈÄ Âø·ú") Var["MiniDragonProcess"]["SkillStartTime"] = CurTime Var["MiniDragonProcess"]["SkillEndTime"] = EndTime --[[ DebugLog("ÇöÀç½Ã°£Àº : " ..Var["CurSec"] ) DebugLog("½ºÅ³ ½ÃÀÛÇÑ ½Ã°£Àº : " ..Var["MiniDragonProcess"]["SkillStartTime"] ) DebugLog("½ºÅ³ ¾Ö´Ï ³¡ ½Ã°£Àº : " ..Var["MiniDragonProcess"]["SkillEndTime"] ) --]] -- ½ºÅ©¸³Æ® ºÎÂø******************************************* if cSetAIScript ( MainLuaScriptPath, Handle ) ~= nil then if cAIScriptFunc( Handle, "Entrance", "MD_ShowUp" ) == nil then ErrorLog("MD_ShowUp ½ºÅ©¸³Æ® ºÎÂø ½ÇÆÐ") return end end Var[Handle]["IsProgressSpecialSkill"] = true return end ----------------------------------------------------------------- -- ¡Ú ½ºÅ³ÀÌ ¼ÒȯÀÎ °æ¿ì ----------------------------------------------------------------- if CurMySkill == SkillInfo_MiniDragon["MD_SummonSoul"]["SkillIndex_Fire"] or CurMySkill == SkillInfo_MiniDragon["MD_SummonSoul"]["SkillIndex_Ice"] or CurMySkill == SkillInfo_MiniDragon["MD_SummonSoul"]["SkillIndex_All"] then Var["MiniDragonProcess"]["SkillStartTime"] = CurTime Var["MiniDragonProcess"]["SkillWorkTime"] = CurTime + SkillInfo_MiniDragon["MD_SummonSoul"]["SummonStartDelay"] Var["MiniDragonProcess"]["SkillEndTime"] = EndTime Var["MiniDragonProcess"]["CurSkillIndex"] = CurMySkill --[[ DebugLog("ÇöÀç »ç¿ëÇÑ ½ºÅ³À妽º : " ..Var["MiniDragonProcess"]["CurSkillIndex"] ) DebugLog("ÇöÀç½Ã°£Àº : " ..Var["CurSec"] ) DebugLog("½ºÅ³ ½ÃÀÛÇÑ ½Ã°£Àº : " ..Var["MiniDragonProcess"]["SkillStartTime"] ) DebugLog("½ºÅ³Ã³¸®¿¹Á¤½Ã°£Àº : " ..Var["MiniDragonProcess"]["SkillWorkTime"] ) DebugLog("½ºÅ³¾Ö´Ï³¡ ½Ã°£Àº : " ..Var["MiniDragonProcess"]["SkillEndTime"] ) --]] -- ½ºÅ©¸³Æ® ºÎÂø******************************************* if cSetAIScript ( MainLuaScriptPath, Handle ) ~= nil then if cAIScriptFunc( Handle, "Entrance", "MD_SummonSoul" ) == nil then ErrorLog("MD_SummonSoul ½ºÅ©¸³Æ® ºÎÂø ½ÇÆÐ") return end end Var[Handle]["IsProgressSpecialSkill"] = true return end end return end -------------------------------------------------------------------------------- -- BonusStage -------------------------------------------------------------------------------- function BonusStageProcess( Var ) cExecCheck "BonusStageProcess" --DebugLog("===BonusStageProcess=========================") if Var == nil then ErrorLog("BonusStageProcess:: Var == nil") Var["StepFunc"] = ReturnToHome --GoToFail( Var ) return end ----------------------------------------------------------------- -- BonusStageProcess : º¸³Ê½º¸÷ ¸®Á¨Ã³¸® ----------------------------------------------------------------- if Var["BonusStageProcess"] == nil then Var["BonusStageProcess"] = {} --DebugLog("===BonusStageProcess=========================") --DebugLog("BonusStageProcess ÇÁ·Î¼¼½º Å×ÀÌºí »ý¼º") local RegenInfo = RegenInfoTable["BonusMob"] local Handle = cMobRegen_XY( Var["MapIndex"], RegenInfo["MobIndex"], RegenInfo["RegenX"], RegenInfo["RegenY"], RegenInfo["Dir"] ) if Handle == nil then ErrorLog("º¸³Ê½º¸÷ »ý¼º ½ÇÆÐ") --GoToFail( Var ) Var["StepFunc"] = ReturnToHome return else --DebugLog("º¸³Ê½º¸÷ Çڵ鰪Àº : "..Handle) end Var["BonusStageProcess"]["Handle"] = Handle -- ´ë»çó¸® local CurMsg = ChatInfo["BonusStageProcess"]["AfterBossRegen"] cScriptMessage( Var["MapIndex"], CurMsg["Index"] ) return end ----------------------------------------------------------------- -- BonusStageProcess : º¸³Ê½º¸÷ Á×¾ú´ÂÁö üũ ----------------------------------------------------------------- if Var["BonusStageProcess"] ~= nil then local Handle = Var["BonusStageProcess"]["Handle"] ----------------------------------------------------------------- -- BonusStageProcess : ´ÙÀ½ ´Ü°è·Î ³Ñ¾î°¥ ½Ã°£ÀÎÁö üũ ----------------------------------------------------------------- -- ´ÙÀ½ ´Ü°è·Î ³Ñ¾î°¥ ½Ã°£ÀÌ ¾Æ´Ï¸é if Var["BonusStageProcess"]["NextStepWaitTime"] ~= nil then if Var["BonusStageProcess"]["NextStepWaitTime"] > Var["CurSec"] then --DebugLog("´ÙÀ½´Ü°è ³Ñ¾î°¡±â ´ë±âÁß...") return end Var["BonusStageProcess"] = nil Var["StepFunc"] = ReturnToHome --DebugLog("´ÙÀ½ ½ºÅÜ ¼³Á¤ : ReturnToHome") return end ----------------------------------------------------------------- -- BonusStageProcess : º¸³Ê½º¸÷ Á×¾ú´ÂÁö üũ ----------------------------------------------------------------- if cIsObjectDead( Handle ) == 1 then --DebugLog("º¸³Ê½º¸÷ Á×¾ú±º!") -- º¸»ó Áö±Þ if RewardItemInfo["BonusStageProcess"] ~= nil then --DebugLog("BonusStageProcess º¸»óÁö±Þ ´ë±âÁß") local CurReward = RewardItemInfo["BonusStageProcess"] local RewardList = { cGetPlayerList(Var["MapIndex"]) } --DebugLog("RewardList °³¼ö : "..#RewardList ) for i = 1, #RewardList do -- ¿©±â¼­ ´Ù½Ã 󸮸¦ ÇØÁà¾ßµÇ³ª? Á×Àº¾Öµé »©´Â°Å ¸»¾ß, cRewardItem( RewardList[i], CurReward["Index"], CurReward["Num"] ) end end Var["BonusStageProcess"]["NextStepWaitTime"] = Var["CurSec"] + DelayTime["WaitReturnToHome"] return end end end -------------------------------------------------------------------------------- -- ReturnToHome -------------------------------------------------------------------------------- -- ±Íȯ function ReturnToHome( Var ) cExecCheck "ReturnToHome" if Var == nil then ErrorLog("ReturnToHome:: Var == nil" ) --GoToFail( Var ) return end if Var["ReturnToHome"] == nil then DebugLog( "Start ReturnToHome" ) Var["ReturnToHome"] = {} -- ¸ðµç ¸ó½ºÅÍ »èÁ¦ cMobSuicide( Var["MapIndex"] ) -- ÀÔ±¸ÂÊ Ãⱸ°ÔÀÌÆ® »ý¼º local RegenExitGate = RegenInfoTable["ExitGate"] local nExitGateHandle = cDoorBuild( Var["MapIndex"], RegenExitGate["MobIndex"], RegenExitGate["RegenX"], RegenExitGate["RegenY"], RegenExitGate["Dir"], RegenExitGate["Scale"] ) if nExitGateHandle ~= nil then if cSetAIScript ( MainLuaScriptPath, nExitGateHandle ) == nil then ErrorLog( "InitDungeon::cSetAIScript ( MainLuaScriptPath, nExitGateHandle ) == nil" ) end if cAIScriptFunc( nExitGateHandle, "NPCClick", "Click_ExitGate" ) == nil then ErrorLog( "InitDungeon::cAIScriptFunc( nExitGateHandle, \"NPCClick\", \"Click_ExitGate\" ) == nil" ) end end -- ´ë»çó¸® local CurMsg = ChatInfo["ReturnToHome"] cScriptMessage( Var["MapIndex"], CurMsg["Index"] ) end Var["StepFunc"] = DummyProcess Var["ReturnToHome"] = nil DebugLog( "End ReturnToHome" ) return end