Need help with a macro you are writing? Ask here!
Moderator: MacroQuest Developers
-
TAGBOT
- orc pawn

- Posts: 17
- Joined: Fri Apr 09, 2004 12:27 pm
Post
by TAGBOT » Sat May 01, 2004 3:50 pm
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
-
Lax
- We're not worthy!

- Posts: 3524
- Joined: Thu Oct 17, 2002 1:01 pm
- Location: ISBoxer
-
Contact:
Post
by Lax » Sat May 01, 2004 3:57 pm
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

-
LordGiddion
- a snow griffon

- Posts: 352
- Joined: Sat Sep 13, 2003 6:12 pm
-
Contact:
Post
by LordGiddion » Tue May 04, 2004 7:25 am
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.
-
Lax
- We're not worthy!

- Posts: 3524
- Joined: Thu Oct 17, 2002 1:01 pm
- Location: ISBoxer
-
Contact:
Post
by Lax » Tue May 04, 2004 10:41 am
you know every event has a parameter right?
Code: Select all
Sub Event_MyCustomEvent
/mqlog ${Param0}
/return
Sub Event_MyCustomEvent(SomeParam)
/mqlog ${SomeParam}
/return
-
LordGiddion
- a snow griffon

- Posts: 352
- Joined: Sat Sep 13, 2003 6:12 pm
-
Contact:
Post
by LordGiddion » Tue May 04, 2004 3:12 pm
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.
-
TAGBOT
- orc pawn

- Posts: 17
- Joined: Fri Apr 09, 2004 12:27 pm
Post
by TAGBOT » Thu May 13, 2004 5:40 pm
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.
-
ml2517
- a grimling bloodguard

- Posts: 1216
- Joined: Wed Nov 12, 2003 1:12 am
Post
by ml2517 » Thu May 13, 2004 5:47 pm
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=
-
Lax
- We're not worthy!

- Posts: 3524
- Joined: Thu Oct 17, 2002 1:01 pm
- Location: ISBoxer
-
Contact:
Post
by Lax » Thu May 13, 2004 5:56 pm
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.