Checking for Status

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

Moderator: Moderators

Jonathandp08
Noob
Noob
Posts: 13
Joined: 13 Jun 2008, 23:00
Noob?: Yes

Checking for Status

#1 Post by Jonathandp08 »

Hello. I'm having a trouble with a macro for status.

I've made a macro for endow so in case it doesn't have endow calls for it.

Code: Select all

automacro wind_weapon {
	map 
	status not #<-- My endow
	exclusive 1
	timeout 30
	delay 5
	call {
		do #bla bla endow
	}
}
Problem is, if the char relogs there is a delay before getting the status of the char so even if the char has the endow this delay after login makes the macro to trigger. So, I was thinking after the delay I can make an "IF" statement to ask if it has the endow.

Code: Select all

automacro wind_weapon {
	map 
	status not #<-- My endow
	exclusive 1
	timeout 30
	delay 5
	call {
		if ($.status = /.*Earth Weapon.*/)  goto end #for example
		
		:end
	}
}
Problem is that the regex doesn't work. How can I make it work? or is there an easier way to check character status after a delay?.
$.status gets every status of the character so in case it has blessing or another status it will get "Blessing,Stun,Fire Weapon"
ever_boy_
Developers
Developers
Posts: 308
Joined: 06 Jul 2012, 13:44
Noob?: No

Re: Checking for Status

#2 Post by ever_boy_ »

Code: Select all

automacro wind_weapon {
   map 
   status not #<-- My endow
inventory "AN ITEM WHICH YOU ALWAYS CARRY WITH YOU" > 0
   exclusive 1
   timeout 30
   delay 5
   call {
      do #bla bla endow
   }
}