Page 1 of 1

[EventMacro]Doesn't automacro have var state condition?

Posted: 24 May 2018, 21:37
by forbbs
In normal macro,it works.

Code: Select all

automacro mymacro {
    var myvar > 20
    call {
          log mymacro triggers
    }
}
Does eventMacro support it ?

Re: [EventMacro]Doesn't automacro have var state condition?

Posted: 25 May 2018, 08:50
by fadreus
Depends on what you need? I guess.. :?

Re: [EventMacro]Doesn't automacro have var state condition?

Posted: 02 Jun 2018, 21:18
by forbbs
I would like do some state control logic using var condition.
like that

Code: Select all

automacro assistme {
	party /^w([\d+])\+(stop|.*)/
	hp > 10%
	sp > 5%
	timeout 2
	priority 0
	call {
		lock assistmetimer
		$followbuf = 1
		$followlast = @config (followTarget)
		$followst = @config (follow)
		release assistmedo
		release assistmetimer
	}	
}

automacro assistmetimer {
	var followbuf >= 1
	timeout 3
	priority 0
	exclusive 1
	call {
		$followbuf++
		if ($followbuf >= 5) {
			$followbuf = 0
.....
		}
	}
}

automacro assistmedo {
	var followbuf >= 1
	console / Found the master/
	timeout 4
	priority 1
	call {
		pause 0.5
		$followbuf = 0
......
		release assistmedo
	}
}