caspa Posted January 15, 2013 Group: Members Topic Count: 194 Topics Per Day: 0.04 Content Count: 499 Reputation: 3 Joined: 03/11/12 Last Seen: September 18, 2023 Share Posted January 15, 2013 is there a getmapuser for monster? like i summon a 20 poring and i killed 19 in poring_w01, but there is still 1 poring on the map so i cant use the npc yet i have to kill that 1 monster before using the npc? is there something like that? Quote Link to comment Share on other sites More sharing options...
Euphy Posted January 16, 2013 Group: Members Topic Count: 72 Topics Per Day: 0.02 Content Count: 2997 Reputation: 1132 Joined: 05/27/12 Last Seen: June 1, 2017 Share Posted January 16, 2013 prontera,150,150,0 script #sample 100,{ // Spawn 20 Porings if none are on the map. if (mobcount("prontera","#sample::OnMyMobDead") == 0) monster "prontera",150,150,"Poring",1002,20,"#sample::OnMyMobDead"; end; OnMyMobDead: // Label is needed to be able to count the monsters. end; } Quote Link to comment Share on other sites More sharing options...
Capuche Posted January 15, 2013 Group: Developer Topic Count: 10 Topics Per Day: 0.00 Content Count: 2407 Reputation: 616 Joined: 07/05/12 Last Seen: March 20 Share Posted January 15, 2013 is there a getmapuser for monster? Yes there is. In trunk/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. Quote Link to comment Share on other sites More sharing options...
caspa Posted January 16, 2013 Group: Members Topic Count: 194 Topics Per Day: 0.04 Content Count: 499 Reputation: 3 Joined: 03/11/12 Last Seen: September 18, 2023 Author Share Posted January 16, 2013 capuche can you possibly make me a simple script where the set-up is if i click the npc it will summon 20 poring then i have to kill the 20 monster before i can click on it again if there is still 1 monster on poring_w01 i cant click the npc? please? Quote Link to comment Share on other sites More sharing options...
Question
caspa
is there a getmapuser for monster? like i summon a 20 poring and i killed 19 in poring_w01, but there is still 1 poring on the map so i cant use the npc yet i have to kill that 1 monster before using the npc? is there something like that?
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.