Help section from before the user variable changes that broke all macros
Moderator: MacroQuest Developers
-
Mckorr
- Developer

- Posts: 2326
- Joined: Fri Oct 18, 2002 1:16 pm
- Location: Texas
Post
by Mckorr » Fri May 23, 2003 2:14 pm
Working on an autoattack macro. What I want to do is check to see if I have a shield equipped, and if I do the Bash. What I have:
Code: Select all
/if n $char(held,shield)>0 /if n $char(ability,"Bash")>0 /doability "Bash"
Will this work?
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 » Fri May 23, 2003 2:56 pm
In answer to my own question... nope :)
MQ2: Think of it as Evolution in action.
-
fwiggles
- a hill giant

- Posts: 161
- Joined: Mon Jun 17, 2002 8:29 pm
Post
by fwiggles » Fri May 23, 2003 3:33 pm
what my friend did (because he is a pally) he just checked to see if he was holding something in secondary and if he was he would bash
[color=red]Latest survey shows that 3 out of 4 people make up 75% of the world's population.[/color]
-
Mckorr
- Developer

- Posts: 2326
- Joined: Fri Oct 18, 2002 1:16 pm
- Location: Texas
Post
by Mckorr » Fri May 23, 2003 5:06 pm
Tried that too... and messed up the code so bad I crashed to desktop :) Gimme a hint on how to check for an item in that slot, I'm lost.
MQ2: Think of it as Evolution in action.
-
fwiggles
- a hill giant

- Posts: 161
- Joined: Mon Jun 17, 2002 8:29 pm
Post
by fwiggles » Fri May 23, 2003 5:47 pm
Code: Select all
/if $equip(Secondary)==FALSE /goto :nobash
/if n $char(ability,"Bash")>0 /doability "Bash"
:nobash
that is what he had, i'm not sure if this uses the clsmain offset of not tho...it's been a while i think since he has used it
[color=red]Latest survey shows that 3 out of 4 people make up 75% of the world's population.[/color]
-
Mckorr
- Developer

- Posts: 2326
- Joined: Fri Oct 18, 2002 1:16 pm
- Location: Texas
Post
by Mckorr » Fri May 23, 2003 6:18 pm
Thanks, I'll give it a try.
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 » Fri May 23, 2003 6:41 pm
Nope, doesn't work. Must require one of those offsets we don't have or something. Thanks anyway. I just put in a filter for the No Shield message. Weak fix, but it works.
MQ2: Think of it as Evolution in action.
-
Jay
- a lesser mummy

- Posts: 59
- Joined: Tue Jan 28, 2003 11:37 am
Post
by Jay » Sat May 24, 2003 1:28 am
Put a var in the script command line.
/macro autokill.mac 1
1 = shield =)
-
Mckorr
- Developer

- Posts: 2326
- Joined: Fri Oct 18, 2002 1:16 pm
- Location: Texas
Post
by Mckorr » Sat May 24, 2003 8:07 am
I was hoping for something a little more elegant :) Actually the filter thing is fine, since I've been playing long enough to know I need a shield equipped.
MQ2: Think of it as Evolution in action.