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

Player Count
http://forums.openkore.com/viewtopic.php?f=16&t=212822
Page 1 of 1

Author:  Niodan [ 21 Nov 2018, 20:18 ]
Post subject:  Player Count

For example you input "pl" in the openkore that gives you a rough detail of the surrounding player name and how many of them
is there a way that the openkore can simply output a number instead of everything?
say you input a commant and that gives you a number 6 which means there are 6 people around you.

Author:  fadreus [ 21 Nov 2018, 23:02 ]
Post subject:  Re: Player Count

What are you trying to do? :?

Author:  Niodan [ 22 Nov 2018, 02:34 ]
Post subject:  Re: Player Count

Trying to make the openkore DO a command when it detects the surrounding players are over a certain number.
Macro is fine too.

Author:  fadreus [ 22 Nov 2018, 03:30 ]
Post subject:  Re: Player Count

If you interested in making your own condition with eval regexp, you can refer here
viewtopic.php?f=33&t=16741

But if you don't like complicated stuff like me, can just do like this:

Code:

automacro CheckPlayers {
   player /(.*?)/
   run-once 1
   call {
      release PlayerCount
      do pl
   }
}

automacro PlayerCount {
   console /Total players: (.*?)/
   run-once 1
   call {
      $num = $.lastMatch1
      if ($num > (Your number) goto doSomething
      
      :end
      release CheckPlayers
      stop

      :doSomething
      do <command>
      goto end
   }
}



Well, that's the rough idea.

Author:  Niodan [ 22 Nov 2018, 04:41 ]
Post subject:  Re: Player Count

the

$num = $.lastMatch1

does not work,
it gives <Blank>

Author:  c4c1n6kr3m1 [ 22 Nov 2018, 05:09 ]
Post subject:  Re: Player Count

using old macro plugin

eval $::playersList->size() >= 5

Author:  fadreus [ 22 Nov 2018, 06:48 ]
Post subject:  Re: Player Count

Of course it doesn't work.
Told ya it's just the rough idea. XD
I just wrote that quickly, I dun even check/test it.
I'm not good yet in regexp, too lazy to test.
But it's blank prolly because before number there is a space.
Welp, creamy worm already gave the regexp..
Hahaha..

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