Jump to content
  • 0
Sign in to follow this  
deviruzy

Announcing mvp's death and an NPC that tells you if certain mvp is dead or alive

Question

 Good day.

 I was wondering if it's possible to announce certain mvp mob's death and making an NPC that tells you if certain MVP mob is dead or alive. I was thinking of NPCkillevent but I didn't know how to go on with it. So, I must be little off manner and ask, would you please give me a sample? just one mvp mob will do. I can work with the rest of them and I should, I cannot ask more than that. I was thinking of something like this:

 

 1. Announcing part

if(getmonsterid(1038)) in map "moc_pryd04" announce "" + strcharinfo(0) + " has killed "+getmonsterid(1038)+",0;

 

2. NPC that gives MVP info

map,x,y script mvp brifing npc#,{

 mes ""mvp name","map name","show X if dead / show O if alive"";

 mes "Osiris,pyramid 4th floor,O";

 close;

}

 

 

I really don't know how to do this. If you can give me a sample I can add all the other mvps by myself, so please. Thank you.

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

1.

 

<header>

 

 

OnNPCKillEvent:	switch(killedrid)	{		case 1086: announce "" + strcharinfo(0) + " has killed "+getmonsterinfo(1086,MOB_NAME)+",0;	end;		case 1039: announce "" + strcharinfo(0) + " has killed "+getmonsterinfo(1039,MOB_NAME)+",0;	end;		default: end;	}	end; 

 

2.

you may spawn them with a specific label and use this script command:

 

 

---------------------------------------
 
*mobcount("<map name>","<event label>")
 
This function will count all the monsters on the specified map that have a 
given event label and return the number or 0 if it can't find any. 
Naturally, only monsters spawned with 'monster' and 'areamonster' script 
commands can have non-empty event label.
If you pass this function an empty string for the event label, it will 
return the total count of monster without event label, including 
permanently spawning monsters.
With the dynamic mobs system enabled, where mobs are not kept in memory 
for maps with no actual people playing on them, this will return a 0 for 
any such map.
If the event label is given as "all", all monsters will be counted, 
regardless of having any event label attached.
 
If the map name is given as "this", the map the invoking character is on 
will be used. If the map is not found, or the invoker is not a character 
while the map is "this", it will return -1.
 
---------------------------------------

 

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
Answer this question...

×   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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

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