Help section from before the user variable changes that broke all macros
Moderator: MacroQuest Developers
-
wassup
- Official Guardian and Writer of TFM

- Posts: 1487
- Joined: Sat Oct 26, 2002 5:15 pm
Post
by wassup » Tue Jun 03, 2003 12:25 am
I just want the wizard to cast a single spell when I say something in group or by giving a tell. Is anyone experienced with writing macro's like this?
What I want it to do:
1. Wizard targets me
2. Wizards casts an AE spell on me.
That's it, nothing else. I want it to cast the spell whenever I send the tell or in group command.
I suppose I could go searching thru the posts, but I don't think this macro would be all that long.
Also, I will be using both characters on a single computer. Is it possible for both clients to use a single instance of MQ running on the same machine?
-
Mckorr
- Developer

- Posts: 2326
- Joined: Fri Oct 18, 2002 1:16 pm
- Location: Texas
Post
by Mckorr » Tue Jun 03, 2003 7:41 am
It's strange. Multiple EQs using the same MQ works for some people, not for others. Best I can tell you is give it a shot and find out.
You're wizard algorithm is fairly simple. Take a look at one of the bot macros for triggering...someone just posted a warrior pet bot that should be useful.
Algorithm:
1) Wizard receives tell.
2) /sit off
3) /target yourname
4) /cast AEGemNumber
5) /delay cast time of spell
6) /sit on
7) loop back to 1
Expand on this. You need a couple extra commands in there. The wizard should be able to receive and respond to commands to follow you around, or even check the range to you and automatically stand and follow if you get too far away. That way the wiz becomes automatic artillery for you.
lol Call it "artillery.mac".
If I've got a bit of time today I'll see about putting this together for you.
MQ2: Think of it as Evolution in action.
-
Mckorr
- Developer

- Posts: 2326
- Joined: Fri Oct 18, 2002 1:16 pm
- Location: Texas
Post
by Mckorr » Tue Jun 03, 2003 8:14 am
Not tested, but give this a shot:
Code: Select all
| artillery.mac
| some code shamelessly stolen from codwarrior's petwarrior.mac
| change names in #defines below to match character being supported and name of wizard
| put AE spell in 3rd gem slot... 'cause that's where I keep mine
|
| Wizard will use AE spell on caller, responding to "/tell Wizard Fire"
#chat tell
#define Owner yourname
#define Wizard wizname
Sub Main
:MainLoop
/doevents
/delay 1 s
/goto :MainLoop
/return
Sub Event_Chat
/if $p1=="Owner" {
/if $arg(1,"$p2")==Fire {
/sit off
/target $p1
/reply Incoming - Danger Close!
/cast 3
/delay 10s
/sit on
}
/if $p1!="owner" /tell Owner Wizard has a private tell.
/return
Edit: Forgot the spell refresh delay. Put a /delay command right after the cast command. Delay should equal the number of seconds it takes to cast plus the number of seconds it takes the spell to refresh. I'm putting in 10s as a place holder, you'll have to adjust this for the spell you are using.
MQ2: Think of it as Evolution in action.
-
wassup
- Official Guardian and Writer of TFM

- Posts: 1487
- Joined: Sat Oct 26, 2002 5:15 pm
Post
by wassup » Tue Jun 03, 2003 11:33 am
I haven't had the time to look at a simple bot and was not sure how the chat worked.
This should give me a good start :)
-
Mckorr
- Developer

- Posts: 2326
- Joined: Fri Oct 18, 2002 1:16 pm
- Location: Texas
Post
by Mckorr » Tue Jun 03, 2003 1:45 pm
I'm not sure how the chat works either, I stole that from codewarrior :) But at least I give him credit...
MQ2: Think of it as Evolution in action.
-
wassup
- Official Guardian and Writer of TFM

- Posts: 1487
- Joined: Sat Oct 26, 2002 5:15 pm
Post
by wassup » Thu Jun 05, 2003 4:26 am
I took what McKorr posted and fixed it up.
Works quite well and does exactly what I want it to do.
Code: Select all
| artillery.mac
| some code shamelessly stolen from codwarrior's petwarrior.mac
| change names in #defines below to match character being supported and name of wizard
| put AE spells in 1st and 2nd gem slot.
|
| Wizard will use AE spell on caller, responding to "/tell wizard Nuke"
#chat tell
#define owner Ownername
#define wizard Wizardname
Sub Main
:MainLoop
/doevents
/delay 1 s
/goto :MainLoop
/return
Sub Event_Chat
/if $p1==owner {
/if $arg(1,"$p2")==Nuke {
/sit off
/target $p1
/reply Casting AE nukes on your location now.....
/cast 1
/delay 9s
/cast 2
/delay 9s
/sit on
}
/if $arg(1,"$p2")==Follow {
/sit off
/target $p1
/reply I am following you $target(name)
/follow
}
/if $arg(1,"$p2")==Evac {
/sit off
/reply Get close to me $p1, we're outta here!
/cast 8
}
} else /tell owner wizard has a private tell.
/return
Thanks again for the starter macro McKorr!
-
Mckorr
- Developer

- Posts: 2326
- Joined: Fri Oct 18, 2002 1:16 pm
- Location: Texas
Post
by Mckorr » Thu Jun 05, 2003 9:10 am
Looks good, except I think your first delay has a typo in it. You have
and it should be
MQ2: Think of it as Evolution in action.
-
wassup
- Official Guardian and Writer of TFM

- Posts: 1487
- Joined: Sat Oct 26, 2002 5:15 pm
Post
by wassup » Thu Jun 05, 2003 11:53 am
Wierd... that 1 s didn't seem to affect the macro at all, but I did correct it anyway.
Thanks again for the nudge McKorr :).