Count number of visible players/monsters

For everything NOT server specific support. Do NOT ask for connectivity help here!.

Moderator: Moderators

Message
Author
mttd
Noob
Noob
Posts: 2
Joined: 12 Aug 2017, 13:22
Noob?: Yes

Count number of visible players/monsters

#1 Post by mttd »

Hello,

I'm trying to modify the tele-search v2 plugin so it counts the number of players visible at the moment so that I can make it ignore the timeout and teleport immediately in case there are too many players around and no monsters, which will save time on very crowded maps.

I've seen some scripts using the varible $playersList but I've tried to used it with no success, for instance like this:

for my $player (@$playersList) {
$player->{name}
}


Anyone knows how to get the list of visible players/monsters?

mttd
Noob
Noob
Posts: 2
Joined: 12 Aug 2017, 13:22
Noob?: Yes

Re: Count number of visible players/monsters

#2 Post by mttd »

Ok nevermind I figured it out, the player list is in @$playersList and the monster list in @$monstersList

Mortimal
Developers
Developers
Posts: 389
Joined: 01 Nov 2008, 15:31
Noob?: No

Re: Count number of visible players/monsters

#3 Post by Mortimal »

u can contribute your changes here or on github
Please use pin function for uploading your file contents!

Post Reply