New feature for automacro 'player':Implemented set variables

All about the macro plugin can be found in this forum. This forum is intended for the macro plugin only.

Moderator: Moderators

Kaspy
Halfway to Eternity
Halfway to Eternity
Posts: 398
Joined: 08 Jun 2012, 15:42
Noob?: No
Location: Brazil

New feature for automacro 'player':Implemented set variables

#1 Post by Kaspy »

Implemented in revision 8484
  • $.lastPlayerName - name of the last player that triggered the automacro.
  • $.lastPlayerPos - triggered player position. '''Ex''': x, y map_name
  • $.lastPlayerLevel - level of the last player that triggered the automacro.
  • $.lastPlayerJob - job of the last player that triggered the automacro.
Image
inv
Plain Yogurt
Plain Yogurt
Posts: 58
Joined: 18 Sep 2009, 01:28
Noob?: Yes

Re: New feature for automacro 'player':Implemented set variables

#2 Post by inv »

Can you give an example how to use $.lastPlayerName?
Dark Airnel
Been there done that!
Been there done that!
Posts: 133
Joined: 09 Oct 2009, 01:43
Noob?: No

Re: New feature for automacro 'player':Implemented set variables

#3 Post by Dark Airnel »

Code: Select all

automacro namename {
player /(.*)/
timeout 3
call {
log I saw $.lastPlayerName at $.lastPlayerPos
}
}
This should give you something like:

macro log I saw PlayerName at 100 100 mapname

Strange though, I never had any value when using $.lastPlayerName
inv
Plain Yogurt
Plain Yogurt
Posts: 58
Joined: 18 Sep 2009, 01:28
Noob?: Yes

Re: New feature for automacro 'player':Implemented set variables

#4 Post by inv »

Any value, as in no name comes out in the log? If so, me too, actually it doesn't seem to work at all.