Openkore.com
http://forums.openkore.com/

Count number of visible players/monsters
http://forums.openkore.com/viewtopic.php?f=10&t=212213
Page 1 of 1

Author:  mttd [ 12 Aug 2017, 13:32 ]
Post subject:  Count number of visible players/monsters

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?

Author:  mttd [ 12 Aug 2017, 14:08 ]
Post subject:  Re: Count number of visible players/monsters

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

Author:  Mortimal [ 13 Aug 2017, 09:35 ]
Post subject:  Re: Count number of visible players/monsters

u can contribute your changes here or on github

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/