--[[ º¸½º »óÀ§¹öÀü - Çï°¡ 9Data/Here/World/FineScript.txt ÇÊ¿ä 9Data/Hero/Script/BH_Helga.txt ÇÊ¿ä ]] -- Çï°¡ ÀϾ¶§ ½ºÅ³»ç¿ë(ÀϾ´Â µ¿ÀÛ ¾Ö´Ï) -- ½ºÅ©¸³Æ®ÀÇ ¸®ÅÏ°ª ReturnAI = {} ReturnAI.END = 1 -- Return_AI_END = 1;// -- ¸ðµç AI·çƾ ³¡ ReturnAI.CPP = 2 -- Return_AI_CPP = 2;// -- ·ç¾Æ·Î ÀϺΠó¸®ÇÑ ÈÄ cppÀÇ AI·çƾ µ¹¸² --[[ TODO Ç÷¹À̾ Àü¸êÇÏ¿© Ÿ°ÙÀ» ÀÒ¾úÀ»¶§, Çï°¡ÀÇ DuringReturn2Regen()·çƾ¿¡ ÀÇÇØ °­È­¹öÇÁ°¡ ´çÀå »ç¶óÁü - 󸮹æ¾È ÇÊ¿ä ]] HelgaIndex = "BH_Helga" KarasianIndex = {} KarasianIndex[1] = "BH_KaraTemplerAC" KarasianIndex[2] = "BH_KaraTemplerMR" BijouIndex = "BH_HelgaBall" HelgaReadyAbstate = "StaBH_Helga_Idle01" -- ÃÖÃÊ Çï°¡°¡ ¿õÅ©¸®°í ÀÖ´Â »óÅÂÀÌ»ó HelgaBuffByBijou = "StaBH_HelgaAPU01" -- ºñÁê¿¡ ÀÇÇØ Çï°¡¿¡ °É¸®´Â Áߺ¹¹öÇÁ HelgaBufByKarasian = "StaBH_HelgaDRT01" -- Ä«¶ó»ç¾È¿¡ ÀÇÇØ Çï°¡¿¡ °É¸®´Â µ¥¹ÌÁö¹Ý»ç¹öÇÁ BijouBuffByKarasian = "StaHelgaBall" -- Ä«¶ó½Ã¾ÈÀÌ ºñÁê¿¡ °Å´Â ¹öÇÁ(ºñÁê°¡ ºû³ªµµ·Ï) KarasianSelfBuff = "StaBH_KaraTempler_None" -- Ä«¶ó½Ã¾ÈÀÌ ºñÁê¿¡ ¿¡³ÊÁö¸¦ ½î´Â ¸ð½À HelgaRaiseSkill = "BH_Helga_Skill_N_None" -- Çï°¡°¡ ÀϾ¶§ÀÇ ¾Ö´Ï¸ÞÀÌ¼Ç KarasianRegenSec = 60 -- ºñÁê¿Í Ä«¶ó½Ã¾ÈµéÀÌ ¼­ÀÖÀ» Àå¼Ò ¸®½ºÆ® BijouLoc = {} KarasianLocate = {} -- ù° ±×·ì BijouLoc[1] = {} BijouLoc[1].X = 2483 BijouLoc[1].Y = 870 BijouLoc[1].D = 0 KarasianLocate[ 1] = {} KarasianLocate[ 1].X = 2539 KarasianLocate[ 1].Y = 852 KarasianLocate[ 1].D = -89 KarasianLocate[ 2] = {} KarasianLocate[ 2].X = 2442 KarasianLocate[ 2].Y = 833 KarasianLocate[ 2].D = 38 KarasianLocate[ 3] = {} KarasianLocate[ 3].X = 2477 KarasianLocate[ 3].Y = 929 KarasianLocate[ 3].D = 165 -- µÑ°±×·ì BijouLoc[2] = {} BijouLoc[2].X = 681 BijouLoc[2].Y = 879 BijouLoc[2].D = 0 KarasianLocate[ 4] = {} KarasianLocate[ 4].X = 733 KarasianLocate[ 4].Y = 852 KarasianLocate[ 4].D = -76 KarasianLocate[ 5] = {} KarasianLocate[ 5].X = 635 KarasianLocate[ 5].Y = 849 KarasianLocate[ 5].D = 50 KarasianLocate[ 6] = {} KarasianLocate[ 6].X = 677 KarasianLocate[ 6].Y = 935 KarasianLocate[ 6].D = -172 -- ¼¼Â°±×·ì BijouLoc[3] = {} BijouLoc[3].X = 2503 BijouLoc[3].Y = 2290 BijouLoc[3].D = 0 KarasianLocate[ 7] = {} KarasianLocate[ 7].X = 2556 KarasianLocate[ 7].Y = 2268 KarasianLocate[ 7].D = -79 KarasianLocate[ 8] = {} KarasianLocate[ 8].X = 2457 KarasianLocate[ 8].Y = 2251 KarasianLocate[ 8].D = 52 KarasianLocate[ 9] = {} KarasianLocate[ 9].X = 2507 KarasianLocate[ 9].Y = 2345 KarasianLocate[ 9].D = -177 -- ³×°±×·ì BijouLoc[4] = {} BijouLoc[4].X = 670 BijouLoc[4].Y = 2275 BijouLoc[4].D = 0 KarasianLocate[10] = {} KarasianLocate[10].X = 725 KarasianLocate[10].Y = 2247 KarasianLocate[10].D = -75 KarasianLocate[11] = {} KarasianLocate[11].X = 621 KarasianLocate[11].Y = 2244 KarasianLocate[11].D = 41 KarasianLocate[12] = {} KarasianLocate[12].X = 667 KarasianLocate[12].Y = 2329 KarasianLocate[12].D = 177 ---------------------------------------------------------------------- -- Mantis 8164 -- º¸¹°»óÀÚ ¼Òȯ Á¤º¸ BH_HelgaBox = { { Index = "BH_Helga_X", ItemDropMobIndex = "BH_Helga_O", x = 1605, y = 1638, Radius = 1032 }, { Index = "BH_Helga_X", ItemDropMobIndex = "BH_Helga_O_02", x = 1605, y = 1638, Radius = 1032 }, } ---------------------------------------------------------------------- MemBlock = {} HelgaHandle = 0 function ViewHandle() cExecCheck "ViewHandle" local Var = MemBlock[HelgaHandle] local x, y = cObjectLocate(Var.Handle) cDebugLog("Helga : " .. Var.Handle .. '(' .. x .. ',' .. y .. ')') for b = 1, 4 do local BVar = Var.BijouInfo[b] local x, y = cObjectLocate(BVar.Handle) cDebugLog(" Bijou : " .. BVar.Handle .. '(' .. x .. ',' .. y .. ')') for k = 1, 3 do local KVar = BVar.KarasianInfo[k] local x, y = cObjectLocate(KVar.Handle) cDebugLog(" Karasian : " .. KVar.Handle .. '(' .. x .. ',' .. y .. ')') end end end --[[ function MainRoutine(Handle, MapIndex) -- Ä«¶ó½Ã¾È¿¡¼­ È£ÃâµÈ °æ¿ì cExecCheck "MainRoutine" if MobID == Karasian1ID or MobID == Karasian2ID then Karasian_Main(Handle, MobID, MapIndex) return ReturnAI.END elseif MobID == BijouID then -- ºñÁê¿¡¼­ È£ÃâµÈ °æ¿ì Bijou_Main(Handle, MobID, MapIndex) return ReturnAI.END elseif MobID == HelgaID then -- º¸½º(Çï°¡)¿¡¼­ È£ÃâµÈ °æ¿ì return Helga_Main(Handle, MobID, MapIndex) end return ReturnAI.END end ]] --------------------------------------------------------------------- ------------------------ Common Part --------------------------- --------------------------------------------------------------------- function Common_Nothing() -- Áö¿ï°Í cExecCheck "Common_Nothing" return ReturnAI.END -- ¸ðµç AI·çƾ ³¡ end function Common_Wait(Var) -- Var.Wait.Second±îÁö ±â´Ù¸° ÈÄ StepFuncÀ» WaitFunctionÀ¸·Î ¼¼Æà cExecCheck "Common_Wait" -- ----cDebugLog("Common_Wait " .. Var.Me) -- °ø¿ëÀ̹ǷΠÇï°¡, ºñÁê, Ä«¶ó½Ã¾È µîÀÇ Var¿¡ Wait.Second, Wait.NextFunc, StepFunc°¡ ÀÖ¾î¾ß ÇÔ if cCurSec() >= Var.Wait.Second then Var.StepFunc = Var.Wait.NextFunc end return Var.Wait.Rtn end function Common_RemoveTreasure(MapIndex) cExecCheck "Common_RemoveTreasure" cDebugLog "Common_RemoveTreasure" cRegenGroupActiv("BH_Helga", "BH_HelgaBox", 0) -- »óÀÚ°¡ ³ª¿ÀÁö ¾Êµµ·Ï(¼¼¹ø° Àμö¸¦ »ý·«Çϰųª 1À̸é activ) -- cVanishAll(MapIndex, "BH_Helga_O") -- cVanishAll(MapIndex, "BH_Helga_O_02") cVanishAll(MapIndex, "BH_Helga_X") end --------------------------------------------------------------------- -------------------------- Helga Part ---------------------------- --------------------------------------------------------------------- function BH_Helga(Handle, MapIndex) cExecCheck "BH_Helga" -- ----cDebugLog "Helga_Main" local Var = MemBlock[Handle] if cIsObjectDead(Handle) == nil and Var == nil then HelgaHandle = Handle if MapIndex ~= "BH_Helga" then -- ¸ÊÀÌ À߸øµÇ¾úÀ½ cAIScriptSet(Handle) -- AI½ºÅ©¸³Æ® Á¦°Å return ReturnAI.END end -- Çï°¡°¡ óÀ½ ¸®Á¨µÇ¾úÀ» ¶§ ÀÚ½ÅÀÇ ¸Þ¸ð¸® ÃʱâÈ­ -- ¹Ø¿¡¼­ Çï°¡°¡ Á×¾úÀ»¶§ ¸Þ¸ð¸® ÇØÁ¦ÇÏ´Â ºÎºÐÀÌ Àֱ⿡, -- °è¼Ó ÇÒ´ç°ú ÇØÁ¦µÇ´Â °ÍÀ» ¸·±â À§ÇØ Á×¾ú´ÂÁö(cIsObjectDead)µµ È®ÀÎ ------cDebugLog("Helga Initialize") MemBlock[Handle] = {} Var = MemBlock[Handle] Var.Me = "Helga" -- µð¹ö±ë½Ã »ç¿ëÇϱâ À§ÇØ Var.Handle = Handle Var.MapIndex = MapIndex Var.BuffCharge = 0 -- ÀÌ °ªÀÌ 40ÀÌ µÇ¸é ¹öÇÁ ÃæÀü Var.TargetLostSec = 0 -- Ÿ°ÙÀ» ÀÒÀº ÈÄ ÀÏÁ¤ ½Ã°£ ÈÄ ÀüÅõ¸¦ ³¡³»±â À§ÇØ(´ÙÀ½ Ÿ°Ù ã´Â ½Ã°£) cSetAbstate(Var.Handle, HelgaReadyAbstate, 1, 2000000000) cSetAbstate(Var.Handle, "StaImmortal", 1, 2000000000) Var.StepFunc = Helga_BijouRegen -- ´ÙÀ½ ·çƾ¿¡¼­ ºñÁê ¸®Á¨ end if cIsObjectDead(Handle) ~= nil then if Var ~= nil then -----cDebugLog "Helga Dead" -- Åõ¸íÀΰ£ ¼Òȯ - º¸¹°»óÀÚ Á¦¾î¿ë local InvisibleHandle = cMobRegen_Obj("InvisibleMan", Handle) if InvisibleHandle ~= nil then -- º¸¹°»óÀÚ Á¦¾î¿ë ½ºÅ©¸³Æ® ¼³Á¤ cAIScriptSet(InvisibleHandle, Handle) MemBlock[InvisibleHandle] = {} MemBlock[InvisibleHandle].Handle = InvisibleHandle MemBlock[InvisibleHandle].MapIndex = MapIndex MemBlock[InvisibleHandle].StepFunc = Invisible_Init end -- Çï°¡°¡ Á×¾úÀ» ¶§ -- ¸ðµç ºñÁê, Ä«¶ó½Ã¾Èµé Á×ÀÓ -- ´ÙÀ½ Çï°¡°¡ ¸®Á¨µÉ¶§ ´Ù½Ã óÀ½ºÎÅÍ ½ÃÀÛ for b = 1, 4 do local BijouInfo = Var.BijouInfo[b] if BijouInfo ~= nil then -- ºñÁê¿¡ ÇÒ´çµÈ Ä«¶ó½Ã¾È Á×ÀÓ for k = 1, 3 do local KaraInfo = BijouInfo.KarasianInfo[k] if KaraInfo ~= nil then cNPCVanish(KaraInfo.Handle) -- Ä«¶ó½Ã¾È¿¡ ÇÒ´çµÈ ¸Þ¸ð¸® »èÁ¦ -- °°Àº ¸Þ¸ð¸®°¡ Var.BijouInfo.KaraInfo¿¡µµ ÀÖÀ¸¹Ç·Î ¿©±â¼­´Â ½ÇÁ¦·Î ¸Þ¸ð¸®»èÁ¦ ¾ÈµÊ MemBlock[KaraInfo.Handle] = nil end end cNPCVanish(BijouInfo.Handle) -- ºñÁê¿¡ ÇÒ´çµÈ ¸Þ¸ð¸® »èÁ¦(À̶§ Bijou.KarasianInfoµµ ÇØÁ¦µÊ) -- °°Àº ¸Þ¸ð¸®°¡ Var.BijouInfo¿¡µµ ÀÖÀ¸¹Ç·Î ¿©±â¼­´Â ½ÇÁ¦·Î ¸Þ¸ð¸®»èÁ¦ ¾ÈµÊ MemBlock[BijouInfo.Handle] = nil end end -- Çï°¡¿¡ ÇÒ´çµÈ ¸Þ¸ð¸® »èÁ¦(À̶§ Var.BijouInfoµµ ÇØÁ¦µÊ) MemBlock[Var.Handle] = nil Var = nil end return ReturnAI.END end return Var.StepFunc(Var) end function Helga_BijouRegen(Var) -- ºñÁê ¸®Á¨½ÃÅ´ cExecCheck "Helga_BijouRegen" ----cDebugLog("Bijou Regen from " .. Var.Handle) Var.BijouInfo = {} for b = 1, 4 do local BijouHandle = cMobRegen_XY(Var.MapIndex, BijouIndex, BijouLoc[b].X, BijouLoc[b].Y, BijouLoc[b].D) cDebugLog("Bijou Regen : " .. BijouHandle) local BijouInfo = {} MemBlock[BijouHandle] = BijouInfo -- Çڵ鿡 ¸ÂÃß¾î ¸Þ¸ð¸®ºí·° ¸¸µê Var.BijouInfo[b] = BijouInfo BijouInfo.Me = "Bijou" -- µð¹ö±ë½Ã »ç¿ëÇϱâ À§ÇØ BijouInfo.Handle = BijouHandle BijouInfo.HelgaInfo = Var BijouInfo.MapIndex = Var.MapIndex BijouInfo.KarasianOffset = b * 3 - 2 -- ÀÌ ºñÁê¿¡ ÇÒ´çµÈ Ä«¶ó½Ã¾ÈµéÀÇ ½½·Ô¹øÈ£ °è»ê -- º£À̽º°¡ 1À̹ǷΠÁ¶±Ý °è»ê½Ä º¹ÀâÇÔ -- ºñÁê 1 -> Ä«¶ó½Ã¾È 1, 2, 3 -- ºñÁê 2 -> Ä«¶ó½Ã¾È 4, 5, 6 -- ºñÁê 3 -> Ä«¶ó½Ã¾È 7, 8, 9 -- ºñÁê 4 -> Ä«¶ó½Ã¾È 10, 11, 12 cAIScriptSet(BijouHandle, Var.Handle) -- ºñÁêÀÇ AI½ºÅ©¸³Æ®¸¦ Var.Handle(Çï°¡)ÀÇ AI½ºÅ©¸³Æ®·Î ¼¼Æà BijouInfo.StepFunc = Bijou_KarasianRegen -- ºñÁêÀÇ ´ÙÀ½ ¾×¼ÇÀº Ä«¶ó½Ã¾È ¸¸Áñ±â end Var.StepFunc = Helga_TreasureVanish return ReturnAI.END end function Helga_TreasureVanish(Var) cExecCheck "Helga_TreasureVanish" cDebugLog "Helga_TreasureVanish" Common_RemoveTreasure(Var.MapIndex) -- 10ÃÊ¿¡ Çѹø¾¿ »óÀÚ Áö¿ò(´Ù¸¥ ¹®Á¦·Î »óÀÚ°¡ ³ªÅ¸³¯Áö...) Var.Wait = {} Var.Wait.Second = cCurSec() + 10 Var.Wait.NextFunc = Helga_TreasureVanish Var.Wait.Rtn = ReturnAI.END Var.StepFunc = Common_Wait cDebugLog("Common_Wait - Helga_TreasureVanish") -- Çï°¡ ÇÇ ´Ù½Ã ä¿ò local HP, MaxHP = cObjectHP(Var.Handle) cSetNPCParam(Var.Handle, "HP", MaxHP) end function Helga_Awake(Var) -- Ä«¶ó½Ã¾Èµé¿¡ ÀÇÇØ ±ú¾î³­ ÈÄ Ã³¸® cExecCheck "Helga_Awake" ----cDebugLog("Awake - Skill Blast") -- ±ú¾î³ª±â À§ÇÑ ½ºÅ³ ¹ßµ¿ cResetAbstate(Var.Handle, HelgaReadyAbstate)-- °ø°Ý¹ÞÁö ¾Ê±â À§ÇÑ ¹«Àû»óÅÂÀÌ»ó ÇØÁ¦ cResetAbstate(Var.Handle, "StaImmortal") -- °ø°Ý¹ÞÁö ¾Ê±â À§ÇÑ ¹«Àû»óÅÂÀÌ»ó ÇØÁ¦ ------cDebugLog("Awake - Skill Blast") -- ±ú¾î³ª±â À§ÇÑ ½ºÅ³ ¹ßµ¿ cNPCSkillUse(Var.Handle, Var.Handle, HelgaRaiseSkill) -- ÀϾ´Â ¾Ö´Ï¸ÞÀÌ¼Ç -- ½ºÅ³¹ßµ¿À» À§ÇØ 3ÃÊ°£ ´ë±â ÈÄ Helga_AttackÀ¸·Î ¹Ù²Þ(ÇÔ¼ö Common_Wait ÂüÁ¶) Var.Wait = {} Var.Wait.Second = cCurSec() + 3 Var.Wait.NextFunc = Helga_PreAttack -- °ø°ÝÇϱâ Àü Áغñ Var.Wait.Rtn = ReturnAI.END Var.StepFunc = Common_Wait cDebugLog("Common_Wait - Helga_Awake") Var.BuffCharge = 0 -- ÀÌ °ªÀº Bijou_BuffToHelga()¿¡¼­ ÃæÀü, 40ÀÌ µÇ¸é ¹öÇÁ ÃæÀü return ReturnAI.END end function Helga_PreAttack(Var) cExecCheck "Helga_PreAttack" Var.TargetLostSec = cCurSec() -- Áö±Ý Ÿ°ÙÀ» ÀÒ¾úÀ½ Var.StepFunc = Helga_Attack ----cDebugLog("Helga_PreAttack " .. Var.TargetLostSec) end function Helga_Attack(Var) cExecCheck "Helga_Attack" if LastWrite ~= cCurSec() then cDebugLog("Helga_Attack " .. Var.TargetLostSec .. " " .. cCurSec()) LastWrite = cCurSec() end -- Çï°¡¿¡ ¹öÇÎ if Var.BuffCharge >= 240 then ----cDebugLog("HelgaBuff") if cTargetHandle(Var.Handle) ~= nil then cMessage(Var.Handle, "BH_Helga_Buff") cSetAbstate(Var.Handle, HelgaBuffByBijou, 1, 200000000) end Var.BuffCharge = Var.BuffCharge - 240 end local TargetHandle = cTargetHandle(Var.Handle) if TargetHandle ~= nil and cObjectType(TargetHandle) == 2 then -- Ÿ°ÙÀÌ ÀÖ°í Ç÷¹À̾î¸é (SHINEOBJECT_PLAYER == 2) Var.TargetLostSec = cCurSec() elseif Var.TargetLostSec + 10 < cCurSec() then -- ÀûÀÌ »ç¶óÁøÁö 10ÃÊ ÈÄ cResetAbstate(Var.Handle, KarasianSelfBuff) -- °­È­¹öÇÁ Á¦°Å cResetAbstate(Var.Handle, HelgaBuffByBijou) -- °­È­¹öÇÁ Á¦°Å Var.BuffCharge = 0 -- ÀÌ °ªÀÌ 40ÀÌ µÇ¸é ¹öÇÁ ÃæÀü -- Ÿ°Ù Àü¸ê½Ã ¸ðµç ºñÁê, Ä«¶ó½Ã¾È »èÁ¦ for b = 1, 4 do cNPCVanish(Var.BijouInfo[b].Handle) for k = 1, 3 do cNPCVanish(Var.BijouInfo[b].KarasianInfo[k].Handle) end end MemBlock = {} -->¸ðµç ¸Þ¸ð¸® »èÁ¦ - óÀ½ºÎÅÍ ´Ù½Ã ½ÃÀÛ end return ReturnAI.CPP -- ÀÌÈÄ Çï°¡´Â CPPÀÇ AI·çƾ Àû¿ë(Çï°¡ÀÇ Á×À½ üũ´Â Helga_Main¿¡¼­) end -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- function Helga_AllBijouStepFunc(Var, func) -- ¸ðµç ºñÁêµéÀÇ StepFunc¸¦ ÀÏ°ýÀûÀ¸·Î ¹Ù²Þ cExecCheck "Helga_AllBijouStepFunc" ----cDebugLog("Helga_AllBijouStepFunc") for b = 1, 4 do ----cDebugLog(" " .. Var.BijouInfo[b].Me) Var.BijouInfo[b].StepFunc = func end end function Helga_AllKarasianStepFunc(Var, func) -- ¸ðµç Ä«¶ó½Ã¾ÈµéÀÇ StepFunc¸¦ ÀÏ°ýÀûÀ¸·Î ¹Ù²Þ cExecCheck "Helga_AllKarasianStepFunc" ----cDebugLog("Helga_AllKarasianStepFunc") for b = 1, 4 do for k = 1, 3 do ----cDebugLog(" " .. Var.BijouInfo[b].KarasianInfo[k].Me) Var.BijouInfo[b].KarasianInfo[k].StepFunc = func end end end --------------------------------------------------------------------- ------------------------- Bijou Part --------------------------- --------------------------------------------------------------------- function BH_HelgaBall(Handle, MapIndex) cExecCheck "BH_HelgaBall" -- ----cDebugLog "Bijou_Main" local Var = MemBlock[Handle] -- ÇÚµéÀ» ±â¹ÝÀ¸·Î ¸Þ¸ð¸®ºí·° ãÀ½ if Var == nil then ----cDebugLog("Bijou Handle Error:" .. Handle) return end Var.StepFunc(Var) end function Bijou_KarasianRegen(Var) -- Ä«¶ó½Ã¾ÈÀ» ¸®Á¨ÇÏ´Â ÇÔ¼ö cExecCheck "Bijou_KarasianRegen" ----cDebugLog "Bijou_KarasianRegen" -- ÀüÅõÁß Ä«¶ó½Ã¾ÈµéÀÌ Àü¸êÇßÀ»¶§µµ ¸®Á¨ÇØ¾ß ÇϹǷΠµ¶¸³µÈ ÇÔ¼ö·Î »ç¿æ Bijou_SummonKarasian(Var, Karasian_WaitInvader) -- ÀÌ ºñÁê¿¡ ÇÒ´çµÈ ½½·ÔÀÇ Ä«¶ó½Ã¾ÈµéÀ» ¸®Á¨½ÃÅ°°í ±×µéÀÌ Karasian_WaitInvaderÇൿÀ» Çϵµ·Ï ¼³Á¤ Var.StepFunc = Common_Nothing -- ¾Æ¹«°Íµµ ¾ÈÇÔ(¿ª½Ã Ä«¶ó½Ã¾Èµé¿¡ ÀÇÇØ ±ú¾î³²) end function Bijou_BuffToHelga(Var) -- ÀüÅõ ½ÃÀÛ ÈÄ Ä«¶ó½Ã¾È¿¡°Ô ¹öÇÎ cExecCheck "Bijou_BuffToHelga" --cDebugLog("Bijou[" .. Var.Handle .. "] Buff To Helga") -- ¼¼ Ä«¶ó½Ã¾ÈµéÀÌ ¸ðµÎ Á¸ÀçÇÏ´ÂÁö È®ÀÎ local karanum = 0 for k = 1, 3 do if cIsObjectDead(Var.KarasianInfo[k].Handle) == nil then -- »ì¾ÆÀÖÀ¸¸é karanum Áõ°¡ karanum = karanum + 1 end end if karanum > 0 then -- Çϳª¶óµµ ³²¾Æ ÀÖÀ¸¸é local HelgaInfo = Var.HelgaInfo -- ¹öÇΰªÀÌ Çï°¡ÀÇ Å×ÀÌºí¿¡ ÀÖÀ¸¹Ç·Î HelgaInfo.BuffCharge = HelgaInfo.BuffCharge + 1 -- ÀÌ °ªÀÌ 40ÀÌ µÇ¸é ¹öÇÁ ÃæÀü(ºñÁê 4°³ÀÏ °æ¿ì 10ÃÊ) --cDebugLog("Bijou_BuffToHelga : Buffing " .. HelgaInfo.BuffCharge) -- 1ÃÊ¿¡ Çѹø¾¿ ¹öÇÁÇϱâ À§ÇØ Var.Wait = {} Var.Wait.Second = cCurSec() + 1 Var.Wait.NextFunc = Bijou_BuffToHelga Var.Wait.Rtn = ReturnAI.END Var.StepFunc = Common_Wait --cDebugLog("Common_Wait - Bijou_BuffToHelga") else -- 60ÃÊÈÄ ´Ù½Ã ¸®Á¨½ÃÅ´ --cDebugLog("Bijou_BuffToHelga : Regen " .. Var.Handle) -- 60ÃÊ ÈÄ Ä«¶ó½Ã¾ÈµéÀ» ´Ù½Ã ¸®Á¨½ÃÅ°±â À§ÇØ Var.Wait = {} Var.Wait.Second = cCurSec() + KarasianRegenSec Var.Wait.NextFunc = Bijou_KarasianReRegen Var.Wait.Rtn = ReturnAI.END Var.StepFunc = Common_Wait --cDebugLog("Common_Wait - Bijou_BuffToHelga") end end function Bijou_KarasianReRegen(Var) cExecCheck "Bijou_KarasianReRegen" --cDebugLog("Bijou_KarasianReRegen " .. Var.Handle) Bijou_SummonKarasian(Var, Karasian_BuffToBijou) -- ÀÌ ºñÁê¿¡ ÇÒ´çµÈ Ä«¶ó½Ã¾ÈµéÀ» ¸®Á¨½ÃÅ°°í Karasian_BuffToBijouÈ°µ¿À» Çϵµ·Ï ¼¼Æà Var.StepFunc = Bijou_WaitBuffing -- Ä«¶ó½Ã¾ÈµéÀÌ »ý±â±â Àü¿¡ °è¼Ó ¸®Á¨ °¡´ÉÇϹǷΠ¹öÇÁ°¡ »ý±æ ¶§±îÁö ´ë±â end function Bijou_WaitBuffing(Var) cExecCheck "Bijou_WaitBuffing" --cDebugLog("Bijou_WaitBuffing " .. Var.Handle) if cAbstateRestTime(Var.Handle, BijouBuffByKarasian) ~= nil then -- ³²Àº½Ã°£ ¸®ÅÏ, nilÀÌ¸é »óÅÂÀÌ»ó ¾øÀ½ Var.StepFunc = Bijou_BuffToHelga end end -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- function Bijou_SummonKarasian(Var, Func) cExecCheck "Bijou_SummonKarasian" ----cDebugLog("Karasian Regen from " .. Var.Handle) -- Ä«¶ó½Ã¾ÈµéÀÇ ±âÁ¸ ¸Þ¸ð¸® ÇØÁ¦Çϱâ À§ÇØ if Var.KarasianInfo ~= nil then for k = 1, 3 do local OldKarahnd = Var.KarasianInfo[k].Handle MemBlock[OldKarahnd] = nil -- ¸Þ¸ð¸®´Â Var.KarasianInfo¿¡µµ ÇÒ´çµÇ¾î ÀÖÀ¸¹Ç·Î ¿©±â¼­´Â ¸Þ¸ð¸®ÇØÁ¦ ¾ÈµÊ end end Var.KarasianInfo = {} -- ¿©±â¼­ ½ÇÁ¦ ¸Þ¸ð¸®ÇØÁ¦ local type = cRandomInt(1, 2) for k = 1, 3 do local slot = Var.KarasianOffset + k - 1 local locate = KarasianLocate[slot] local KHnd = cMobRegen_XY(Var.MapIndex, KarasianIndex[type], locate.X, locate.Y, locate.D) ----cDebugLog("Karasian Regen : " .. KHnd) local KInfo = {} MemBlock[KHnd] = KInfo Var.KarasianInfo[k] = KInfo KInfo.Me = "Karasian" KInfo.Handle = KHnd KInfo.BijouInfo = Var KInfo.StepFunc = Func cAIScriptSet(KHnd, Var.Handle) -- Ä«¶ó½Ã¾ÈÀÇ AI½ºÅ©¸³Æ®¸¦ Var.Handle(ºñÁê)ÀÇ AI½ºÅ©¸³Æ®·Î ¼¼Æà cSetAbstate(KHnd, KarasianSelfBuff, 1, 2000000000) end end --------------------------------------------------------------------- ----------------------- Karasian Part -------------------------- --------------------------------------------------------------------- function BH_KaraTemplerAC(Handle, MapIndex) return Karasian_Main(Handle, MapIndex) end function BH_KaraTemplerMR(Handle, MapIndex) return Karasian_Main(Handle, MapIndex) end function Karasian_Main(Handle, MapIndex) cExecCheck "Karasian_Main" local Var = MemBlock[Handle] if Var == nil then ----cDebugLog("Karasian Handle Error:" .. Handle) return end Var.StepFunc(Var) return ReturnAI.END end function Karasian_WaitInvader(Var) cExecCheck "Karasian_WaitInvader" ------cDebugLog("Karasian_WaitInvader") -- ÀÚ½ÅÀÌ ÇÇÇظ¦ ÀÔÀ» ¶§±îÁö if cIsObjectDead(Var.Handle) ~= nil or cTargetHandle(Var.Handle) ~= nil then ------cDebugLog("Warn") Var.StepFunc = Karasian_Warning1 -- ÁÖÀ§¿¡ °æ°í¸¦ ¿Ã¸² end end function Karasian_Warning1(Var) cExecCheck "Karasian_Warning1" ----cDebugLog("Karasian_Warning1") if cIsObjectDead(Var.Handle) ~= nil then Karasian_BattleStart(Var) else Helga_AllKarasianStepFunc(Var.BijouInfo.HelgaInfo, Common_Nothing) cNPCChat(Var.Handle, "BH_Helga_Alert") Var.Wait = {} Var.Wait.Second = cCurSec() + 2 Var.Wait.NextFunc = Karasian_Warning2 Var.Wait.Rtn = ReturnAI.END Var.StepFunc = Common_Wait cDebugLog("Common_Wait - Karasian_Warning1") end end function Karasian_Warning2(Var) cExecCheck "Karasian_Warning2" ------cDebugLog("Karasian_Warning2") cNPCChat(Var.Handle, "BH_Helga_Wake") Karasian_BattleStart(Var) end function Karasian_BuffToBijou(Var) cExecCheck "Karasian_BuffToBijou" Var.Wait = {} Var.Wait.Second = cCurSec() + 1 Var.Wait.NextFunc = Karasian_BuffToBijou2 Var.Wait.Rtn = ReturnAI.END Var.StepFunc = Common_Wait --cDebugLog("Common_Wait - Karasian_BuffToBijou") end function Karasian_BuffToBijou2(Var) cExecCheck "Karasian_BuffToBijou2" if cIsObjectDead(Var.Handle) == nil then cSetAbstate(Var.BijouInfo.Handle, BijouBuffByKarasian, 1, 1500) cSetAbstate(Var.BijouInfo.HelgaInfo.Handle, HelgaBufByKarasian, 1, 1500) ----cDebugLog("Karasian[" .. Var.Handle .. "] Buff Bijou[" .. Var.BijouInfo.Handle .. "] at " .. cCurSec()) end Var.StepFunc = Karasian_BuffToBijou end -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- function Karasian_BattleStart(Var) cExecCheck "Karasian_BattleStart" ----cDebugLog "Karasian_BattleStart" Var.BijouInfo.HelgaInfo.StepFunc = Helga_Awake ----cDebugLog "Karasian_BattleStart 1" Helga_AllKarasianStepFunc(Var.BijouInfo.HelgaInfo, Karasian_BuffToBijou) ----cDebugLog "Karasian_BattleStart 2" Helga_AllBijouStepFunc(Var.BijouInfo.HelgaInfo, Bijou_WaitBuffing) ----cDebugLog "Karasian_BattleStart 3" end ------------------------------------------------------------------------- ----------------------- InvisibleMan Part -------------------------- ------------------------------------------------------------------------- -- º¸¹°»óÀÚ Á¦¾î¿ë ¿ÀºêÁ§Æ® function InvisibleMan(Handle, MapIndex) cExecCheck "InvisibleMan" local Var = MemBlock[Handle] if Var == nil then ----cDebugLog("InvisibleMan Handle Error:" .. Handle) return end Var.StepFunc(Var) return ReturnAI.END end function Invisible_Init(Var) cExecCheck "Invisible_Init" cDebugLog "Invisible_Init" ---------------------------------------------------------------------- -- Mantis 8164 -- ¡Ø º¸¹°»óÁ¦ ¼Òȯ ¹× ¾ÆÀÌÅÛµå¶ø±×·ì ¸ó½ºÅÍ ¼ÂÆà for i = 1, #BH_HelgaBox do local BoxHandle = cMobRegen_Circle( Var["MapIndex"], BH_HelgaBox[i]["Index"], BH_HelgaBox[i]["x"], BH_HelgaBox[i]["y"], BH_HelgaBox[i]["Radius"] ) if BoxHandle ~= nil then cSetItemDropMobID( BoxHandle, BH_HelgaBox[i]["ItemDropMobIndex"] ) end end ---------------------------------------------------------------------- cGroupRegen("BH_Helga", "BH_HelgaBox") -- »óÀÚ°¡ ³ª¿Àµµ·Ï Var.Wait = {} Var.Wait.Second = cCurSec() + 60 Var.Wait.NextFunc = Invisible_AllVanish Var.Wait.Rtn = ReturnAI.END Var.StepFunc = Common_Wait cDebugLog("Common_Wait - Invisible_Init") end function Invisible_AllVanish(Var) cExecCheck "Invisible_AllVanish" cDebugLog "Invisible_AllVanish" Common_RemoveTreasure(Var.MapIndex) cNPCVanish(Var.Handle) Var.StepFunc = Common_Nothing end