Jump to content
  • 0
Takizuki

Show NPC once monster killed?

Question

Guys, can i know how to make an NPC show as soon as all Monster are killed on specific map?

Edited by pxl028

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

 

// EVENT NPC ======================================================prontera,137,167,3	script	Kill Event	63,{	monster "prontera",0,0,"Poring",PORING,10,"Kill Event::OnPoringKilled";	OnPoringKilled:	if (!mobcount("prontera","Kill Event::OnPoringKilled")){		enablenpc "PrizeGiver";	}	end;}location	script	PrizeGiver	64,{//script for itemOnInit:disablenpc "PrizeGiver";end;} 

 

By Show the NPC, I think you mean by enabling the npc.. Sorry. I misunderstood your question.

Share this post


Link to post
Share on other sites
  • 0

IF mobs are spawn by label, i.e

 

monster "prontera",0,0,"Poring",PORING,10,"NPCNAME::OnPoringKilled"; 

you can do following

 

OnPoringKilled:if (!mobcount("prontera","NPCNAME::OnPoringKilled")){//All mobs dead, do something.}

 

else you have to initiate a timer(as follows):

OnTimer60000:    //Checks Every 1 minute    if (!mobcount("prontera","all")){        //Do Something, All monsters is prontera is dead.    }OnInit:    initnpctimer;    end;

Share this post


Link to post
Share on other sites
  • 0

thanks for your reply Dastgir but sorry im noob in scripting...

 

hmm... PrizeGiver::OnPoringKilled ??

 

is this correct sample?

 

// EVENT NPC ======================================================prontera,137,167,3	script	Kill Event	63,{	monster "prontera",0,0,"Poring",PORING,10,"PrizeGiver::OnPoringKilled";	OnPoringKilled:	if (!mobcount("prontera","PrizeGiver::OnPoringKilled")){	//All mobs dead, do something. <-- what's this for??	}}// PRIZE GIVER NPC ======================================================location	script	PrizeGiver	64,{	script for item}
Edited by pxl028

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.