Jump to content
Kovu

When boss dead maze close

Recommended Posts

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}

 


FORO EN ESPAÑOL :)

 

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

M9CMV7K.png

 

 

Share this post


Link to post
Share on other sites

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

 


FORO EN ESPAÑOL :)

 

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

M9CMV7K.png

 

 

Share this post


Link to post
Share on other sites
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 by Faller

Share this post


Link to post
Share on other sites

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 

 


FORO EN ESPAÑOL :)

 

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

M9CMV7K.png

 

 

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...