Openkore.com

OpenKore Forums
It is currently 11 Dec 2018, 06:54

All times are UTC - 5 hours [ DST ]





Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Player Count
PostPosted: 21 Nov 2018, 20:18 
Offline
Plain Yogurt
Plain Yogurt

Joined: 03 Apr 2017, 00:19
Posts: 53
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.


Top
 Profile  
 
 Post subject: Re: Player Count
PostPosted: 21 Nov 2018, 23:02 
Offline
OpenKore Monk
OpenKore Monk
User avatar

Joined: 17 Nov 2017, 23:32
Posts: 483
Location: Genting Highland, Malaysia
What are you trying to do? :?

_________________

I'll not give answer. I'll just showing you the way to find it
Wiki & Google are your best allies. If you're lazy to read I won't bother answering
Image


Top
 Profile  
 
 Post subject: Re: Player Count
PostPosted: 22 Nov 2018, 02:34 
Offline
Plain Yogurt
Plain Yogurt

Joined: 03 Apr 2017, 00:19
Posts: 53
Trying to make the openkore DO a command when it detects the surrounding players are over a certain number.
Macro is fine too.


Top
 Profile  
 
 Post subject: Re: Player Count
PostPosted: 22 Nov 2018, 03:30 
Offline
OpenKore Monk
OpenKore Monk
User avatar

Joined: 17 Nov 2017, 23:32
Posts: 483
Location: Genting Highland, Malaysia
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.

_________________

I'll not give answer. I'll just showing you the way to find it
Wiki & Google are your best allies. If you're lazy to read I won't bother answering
Image


Top
 Profile  
 
 Post subject: Re: Player Count
PostPosted: 22 Nov 2018, 04:41 
Offline
Plain Yogurt
Plain Yogurt

Joined: 03 Apr 2017, 00:19
Posts: 53
the

$num = $.lastMatch1

does not work,
it gives <Blank>


Top
 Profile  
 
 Post subject: Re: Player Count
PostPosted: 22 Nov 2018, 05:09 
Offline
Been there done that!
Been there done that!

Joined: 24 Mar 2012, 04:13
Posts: 129
using old macro plugin

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


Top
 Profile  
 
 Post subject: Re: Player Count
PostPosted: 22 Nov 2018, 06:48 
Offline
OpenKore Monk
OpenKore Monk
User avatar

Joined: 17 Nov 2017, 23:32
Posts: 483
Location: Genting Highland, Malaysia
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..

_________________

I'll not give answer. I'll just showing you the way to find it
Wiki & Google are your best allies. If you're lazy to read I won't bother answering
Image


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group