Jump to content
  • 0

like countitem but for monsters on map?


HristDead

Question


  • Group:  Members
  • Topic Count:  66
  • Topics Per Day:  0.02
  • Content Count:  167
  • Reputation:   2
  • Joined:  08/01/12
  • Last Seen:  

Hi rA.

I had a request. Here is what im looking for:

Just like how countitem directs you to another window, how can i make it so (when the player talks to the npc) when there are for example > 9 porings in a map, it also directs you to another window?

Example:

(If porings in prontera is 9 or up)

Mes "npc":

Mes "there are still atleast 10 porings on this map. Talk to me after you killed them";

Close;

Something like that.

Thanks in advance!!

Link to comment
Share on other sites

1 answer to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  382
  • Reputation:   38
  • Joined:  01/17/12
  • Last Seen:  

From doc/script_commands.txt:

*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.
  • Upvote 1
Link to comment
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.   Paste as plain text instead

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