Kovu 10 Report post Posted November 9, 2017 hi guys i am trying to do a check when boss is dead a team win the maze but my script dont work look it i need help pliis if CheckMonsterDead ( EW.Conf.VBoss[1] ) == 1 then if CRY[19]==0 then local Notice_all = "BOSS VILLAIN DEFEAT" Notice ( Notice_all ) CRY[19]=1 end end if CRY[19]==1 then if HELLCLOSETIME==300 then MapCopyNotice ( map ,"Å®Éñ£ºÃ»Ïëµ½ÄãÃÇÕæµÄ¿ÉÒÔ×öµ½ÕâÒ»²½£¬ÎÒÀ뿪ÊÀ½çʱÁôϵÄÔ¹Äî»ã¼¯³ÉÎҵķÖÉí£¬¸øÈËÀà´øÀ´ÁËÌ«¶àµÄÍ´¿à£¬¶øÎÒÓÖÎÞÄÜΪÁ¦£¬Ö»Äܽ«Ëü·âÓ¡ÔÚµØÓüÉî´¦£¬ÆÚ´ýÓÐÒ»Ìì¿ÉÒÔÓÐһȺÕæÕýµÄÓÂÊ¿½«ÎÒ½â·Å£¡") MapCopyNotice ( map ,"Å®Éñ£º½ñÌ죬ÎÒÖÕÓÚ¿ÉÒÔÕæÕýµÄ½âÍÑÁË£¬ÆÚ´ý×ÅÄãÃǽñºóµÄ³É³¤£¬Ï£Íû£¬ÔÚÎÒ¹éÀ´µÄʱºò£¬ÄãÃÇÄܸøÎÒ¸ü¶àµÄ¾ªÏ²£¡") MapCopyNotice ( map ,"Å®Éñ£º¶ÔÁË£¬ÓÉÓÚÎÒ·ÖÉíµÄËÀÍö£¬ÕâÀïºÜ¿ì¾Í»á±ÀÀ££¬ÓÂÊ¿£¬¸Ï¿ìÀ뿪ÕâÀï°É£¡") HELLCLOSETIME = HELLCLOSETIME - 240 end local closetime = HELLCLOSETIME for i = 1 , MAXNOTICE , 1 do if closetime == NOTICETIME[i] then local Notice_all = "¾¯¸æ£¬¾àÀëÓÀºãµØÓü±ÀÀ£»¹ÓÐ"..closetime.."Ã룡£¡Çë¸÷λÓÂÊ¿¸Ï¿ì×öºÃ±ÜÄÑ×¼±¸" MapCopyNotice ( map_copy , Notice_all ) end end HELLCLOSETIME = HELLCLOSETIME-1 if HELLCLOSETIME == 0 then HELLCLOSETIME = 300 CRY[19]=0 CloseMapEntry ( "eternalwar" ) CloseMapCopy ( "eternalwar" ) DealAllActivePlayerInMap(map_copy,"ALL_moveV") end end and this is function "ALL_moveV" function ALL_moveV(role) local character = TurnToCha(role) --½«Ö¸Õëת»»Îª½ÇÉ« if GetChaSideID(character) == 2 then MoveCity(role, "Argent City") --GIVE TEAM 1 REWARDS HERE elseif GetChaSideID(character) == 1 then MoveCity(role, "Argent City") --GIVE TEAM 2 REWARDS HERE end end the last thing Boss variable: EW.Conf.VBoss[1] = {ID = 1353, PosX = 284, PosY = 524} EW.Conf.HBoss[1] = {ID = 1346, PosX = 275, PosY = 99} Quote FORO EN ESPAÑOL :) ---------------------------------------------------------------------------- Share this post Link to post Share on other sites
Kovu 10 Report post Posted November 9, 2017 i try too this code but nothing if CheckMonsterDead (EW.Conf.HBoss) == 1 then CloseMapEntry ( "eternalwar" ) DealAllActivePlayerInMap(map_copy,"ALL_moveH") local Notice_all = "The Villains Faction have Won the Eternal War!" Notice ( Notice_all ) end Quote FORO EN ESPAÑOL :) ---------------------------------------------------------------------------- Share this post Link to post Share on other sites
Faller 93 Report post Posted November 10, 2017 (edited) 22 hours ago, nectrouler said: i try too this code but nothing if CheckMonsterDead (EW.Conf.HBoss) == 1 then CloseMapEntry ( "eternalwar" ) DealAllActivePlayerInMap(map_copy,"ALL_moveH") local Notice_all = "The Villains Faction have Won the Eternal War!" Notice ( Notice_all ) end Hello! I've just made a script for you, but I didn't test! Although it should work with no issues. Place this inside your GetExp_PKM function: Quote local BossID = 1 if GetChaID(dead) == BossID then CloseMap(GetChaMapCopy(atk), GetChaMapName(atk)) end function CloseMap(map_copy, map) DealAllChaInCopy(map_copy, "MoveCity", "") ClearAllSubMapCha(map_copy) ClearAllSubMapMonster(map_copy) CloseMapCopy(map) end ##EDIT Corrected a typo in the script (I accidentaly called "role" instead of "atk") ## The given script will do the following: When the monster with ID 1 dies, it will close the map the player is right now (+ teleport everyone out) and kill all the monsters inside. In case the given script doesn't work, please let me know, I didn't test it. I hope it helps you out, good luck! Edited November 10, 2017 by Faller Quote Share this post Link to post Share on other sites
Kovu 10 Report post Posted November 10, 2017 dont work Quote FORO EN ESPAÑOL :) ---------------------------------------------------------------------------- Share this post Link to post Share on other sites
Kovu 10 Report post Posted November 10, 2017 i think the IDs in this map it is diferent to get can you check on script that i up no ? Quote FORO EN ESPAÑOL :) ---------------------------------------------------------------------------- Share this post Link to post Share on other sites
Faller 93 Report post Posted November 12, 2017 Hello, Can you send a screenshot of how you've configurated the script? Thanks! Quote Share this post Link to post Share on other sites
Dan 184 Report post Posted November 12, 2017 I think Hell Map has some more things to configure if you are doing Abb maps. Quote Share this post Link to post Share on other sites
Kovu 10 Report post Posted November 13, 2017 faller where i put this code ?? and why have "" after "Argent City", function CloseMap(map_copy, map) DealAllChaInCopy(map_copy, "MoveCity", "") ClearAllSubMapCha(map_copy) ClearAllSubMapMonster(map_copy) CloseMapCopy(map) end Quote FORO EN ESPAÑOL :) ---------------------------------------------------------------------------- Share this post Link to post Share on other sites
Faller 93 Report post Posted November 14, 2017 On 13/11/2017 at 5:25 AM, nectrouler said: faller where i put this code ?? and why have "" after "Argent City", function CloseMap(map_copy, map) DealAllChaInCopy(map_copy, "MoveCity", "") ClearAllSubMapCha(map_copy) ClearAllSubMapMonster(map_copy) CloseMapCopy(map) end In the file exp_and_level.lua, inside the function: function GetExp_PKM( dead , atk ) "" = Teleport to saved spawn area, you can change it to "Argent City" if you'd like Quote Share this post Link to post Share on other sites