Player Count

International

Moderator: Moderators

Message
Author
Niodan
Plain Yogurt
Plain Yogurt
Posts: 83
Joined: 03 Apr 2017, 00:19
Noob?: No

Player Count

#1 Post 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.

User avatar
fadreus
The Kore Devil
The Kore Devil
Posts: 708
Joined: 17 Nov 2017, 23:32
Noob?: No
Location: Genting Highland, Malaysia
Contact:

Re: Player Count

#2 Post by fadreus »

What are you trying to do? :?

iRO Supporter.
Read before you ask is the wisest thing human can do.
Unless you're a cat.
Image

Niodan
Plain Yogurt
Plain Yogurt
Posts: 83
Joined: 03 Apr 2017, 00:19
Noob?: No

Re: Player Count

#3 Post 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.

User avatar
fadreus
The Kore Devil
The Kore Devil
Posts: 708
Joined: 17 Nov 2017, 23:32
Noob?: No
Location: Genting Highland, Malaysia
Contact:

Re: Player Count

#4 Post 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.

iRO Supporter.
Read before you ask is the wisest thing human can do.
Unless you're a cat.
Image

Niodan
Plain Yogurt
Plain Yogurt
Posts: 83
Joined: 03 Apr 2017, 00:19
Noob?: No

Re: Player Count

#5 Post by Niodan »

the

$num = $.lastMatch1

does not work,
it gives <Blank>

c4c1n6kr3m1
The Way Of Human
The Way Of Human
Posts: 150
Joined: 24 Mar 2012, 04:13
Noob?: Yes

Re: Player Count

#6 Post by c4c1n6kr3m1 »

using old macro plugin

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

User avatar
fadreus
The Kore Devil
The Kore Devil
Posts: 708
Joined: 17 Nov 2017, 23:32
Noob?: No
Location: Genting Highland, Malaysia
Contact:

Re: Player Count

#7 Post 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..

iRO Supporter.
Read before you ask is the wisest thing human can do.
Unless you're a cat.
Image

Post Reply