Page 1 of 1
Player Count
Posted: 21 Nov 2018, 20:18
by Niodan
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.
Re: Player Count
Posted: 21 Nov 2018, 23:02
by fadreus
What are you trying to do?
Re: Player Count
Posted: 22 Nov 2018, 02:34
by Niodan
Trying to make the openkore DO a command when it detects the surrounding players are over a certain number.
Macro is fine too.
Re: Player Count
Posted: 22 Nov 2018, 03:30
by fadreus
If you interested in making your own condition with eval regexp, you can refer here
http://forums.openkore.com/viewtopic.php?f=33&t=16741
But if you don't like complicated stuff like me, can just do like this:
Code: Select all
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.
Re: Player Count
Posted: 22 Nov 2018, 04:41
by Niodan
the
$num = $.lastMatch1
does not work,
it gives <Blank>
Re: Player Count
Posted: 22 Nov 2018, 05:09
by c4c1n6kr3m1
using old macro plugin
eval $::playersList->size() >= 5
Re: Player Count
Posted: 22 Nov 2018, 06:48
by fadreus
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..