Page 1 of 1
Triggers
Posted: Sat May 01, 2004 3:50 pm
by TAGBOT
I remember back in my MUD days, we had programs like Zmud for macros. The macros where triggered using variables and text. Is that possible with MQ2, what is the correct syntax for it. Would this be possible:
#event rageon ${Target.CleanName} "has become ENRAGED."
Thanks
Posted: Sat May 01, 2004 3:57 pm
by Lax
do a custom event with "has become ENRAGED." and name it so it knows what sub to go to, then in the sub you get the chat line given to you as a parameter...
i know its not quite what you want, but its the only thing you get right now

Posted: Sat May 01, 2004 11:12 pm
by Jerle69
You see a good example of an event-driven macro here:
http://macroquest2.com/phpBB2/viewtopic.php?t=6794
It's for fishing, but you could use it as a template and modify as you need for your triggers.
Posted: Tue May 04, 2004 7:25 am
by LordGiddion
Lax I had an idea today that may be counter intuitive but seeing as Macros run so fast now it may make some sense. How about a #chat ALL - basically then EVERY line coming through will fire the sub Chat_Event and can be anylized in code.
Posted: Tue May 04, 2004 10:41 am
by Lax
you know every event has a parameter right?
Code: Select all
Sub Event_MyCustomEvent
/mqlog ${Param0}
/return
Sub Event_MyCustomEvent(SomeParam)
/mqlog ${SomeParam}
/return
Posted: Tue May 04, 2004 3:12 pm
by LordGiddion
I do know that lax, use em all over the place in Genbot, was just suggesting it might make sense to have an option to have EVERY chat line fire a macro event. Probably a stupid idea and will lead to some ugly macro's but I figure it makes sense to be an option.
Posted: Thu May 13, 2004 5:40 pm
by TAGBOT
Using the new event system is there a way to use a variable in the event.
#event rageon "${Target.CleanName} has become ENRAGED." or using "#1# has become ENRAGED." ? I am just totally confused, but trying to learn this. Seems everytime I start to learn it, it gets changed for the better.
Posted: Thu May 13, 2004 5:47 pm
by ml2517
TAGBOT wrote:Using the new event system is there a way to use a variable in the event.
#event rageon "${Target.CleanName} has become ENRAGED." or using "#1# has become ENRAGED." ? I am just totally confused, but trying to learn this. Seems everytime I start to learn it, it gets changed for the better.
http://macroquest2.com/phpBB2/viewtopic ... highlight=
Posted: Thu May 13, 2004 5:56 pm
by Lax
what he said. The easy answer is
#event rageon "|${Target.CleanName}| has become ENRAGED."
Variable portions of the event matching text are enclosed in either || or ##. The ## is to grab text from the incoming message. The || basically does a printf when checking for matches. Anyway, for the full explanation read what ml2517 linked.