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

- Posts: 27
- Joined: Sun Apr 25, 2004 9:36 pm
Post
by Still_a_newb » Sat May 15, 2004 8:14 pm
Code: Select all
/if ((!${Me.Buff[Khura's Focusing].ID}) &&
/if (!${Me.Buff[Focus of Soul].ID}) &&
/if (!${Me.Buff[Focus of the Seventh].ID}) &&
/if (!${Me.Buff[Spiritual Vigor].ID}) &&
/if (!${Me.Buff[Shield of Maelin].ID}) {
/if (${String[${Me.State}].Equal[SIT]}) {
/stand
/delay 1s
}
}
/echo Casting Shield of Maelin
/call cast "Shield of Maelin"
/doevents
[code]
It is part of my Sub Buffcheck that is supposed to cast Shield of Maelin if I do not have it...... But, I wanted to add something so that it will ignore the fact that I do not have it if I have those buffs above, common ones that I know do stack over it.... how can I alter that chunk to make it do what i want. The way I have it atm, MQ can't find a comand to execute it...
-
Lax
- We're not worthy!

- Posts: 3524
- Joined: Thu Oct 17, 2002 1:01 pm
- Location: ISBoxer
-
Contact:
Post
by Lax » Sat May 15, 2004 8:33 pm
Mostly you just need to use /if the right way. You're effectively making it try to execute the "&&" COMMAND a bunch... which isnt a command. If you want to use &&, you do it IN the conditions and you do not use another /if. Then you have to do your cast INSIDE the braces instead of after all the ifs are processed
Code: Select all
/if ((!${Me.Buff[Khura's Focusing].ID} && !${Me.Buff[Focus of Soul].ID} && !${Me.Buff[Focus of the Seventh].ID} && ${Me.Buff[Spiritual Vigor].ID} && !${Me.Buff[Shield of Maelin].ID}) {
/if (${String[${Me.State}].Equal[SIT]}) {
/stand
/delay 1s
}
/echo Casting Shield of Maelin
/call cast "Shield of Maelin"
}
I left out the /doevents because its not relevant to what you're doing here, but you would place it after the last brace. I'd also suggest you dont need a full second after /stand, but thats up to you
-
Still_a_newb
- orc pawn

- Posts: 27
- Joined: Sun Apr 25, 2004 9:36 pm
Post
by Still_a_newb » Sat May 15, 2004 8:39 pm
Code: Select all
/if ((!${Me.Buff[Khura's Focusing].ID} && !${Me.Buff[Focus of Soul].ID} && !${Me.Buff[Focus of the Seventh].ID} && ${Me.Buff[Spiritual Vigor].ID} && !${Me.Buff[Shield of Maelin].ID}) {
/if (${String[${Me.State}].Equal[SIT]}) {
/stand
/delay 1s
}
/echo Casting Shield of Maelin
/call cast "Shield of Maelin"
}
/doevents
still failed to parse /if command what is the problem?
-
ieatacid
- Developer

- Posts: 2727
- Joined: Wed Sep 03, 2003 7:44 pm
Post
by ieatacid » Sat May 15, 2004 9:06 pm
Take out the parenthesis marked in red.
Code: Select all
/if ([color=red]([/color]!${Me.Buff[Khura's Focusing].ID} && !${Me.Buff[Focus of Soul].ID} && !${Me.Buff[Focus of the Seventh].ID} && ${Me.Buff[Spiritual Vigor].ID} && !${Me.Buff[Shield of Maelin].ID}) {
/if (${String[${Me.State}].Equal[SIT]}) {
/stand
/delay 1s
}
/echo Casting Shield of Maelin
/call cast "Shield of Maelin"
}
/doevents
-
Drumstix42
- a grimling bloodguard

- Posts: 808
- Joined: Mon May 03, 2004 4:25 pm
Post
by Drumstix42 » Sat May 15, 2004 11:18 pm
This is a nice little basis of self-buff checking, which was acctually a small idea I thought of as well. Though I'd like to complete a somewhat complete list, or at least a common-buff check list for certain classes.
-
Azum
- a hill giant

- Posts: 229
- Joined: Wed Jun 04, 2003 5:04 am
Post
by Azum » Sun May 16, 2004 3:44 am
Uh, why do you care about Spiritual Vigor? It stacks with Shield of Maelin.
Code: Select all
:shieldofmaelin
/for j 1 to 15 step 1
/if (${Me.Buff[${j}].ID}>0) {
/if (${Me.Buff[${j}].Name.Find["focus"]}) /return
}
/next j
/if (!${Me.Buff["Shield of Maelin"].ID} && !${Me.Casting.ID} && !${Me.Moving}) {
/echo Casting Shield of Maelin
/call Cast "Shield of Maelin" ${maelingem}
}
-
Marze
- a lesser mummy

- Posts: 60
- Joined: Wed Apr 14, 2004 12:08 pm
Post
by Marze » Sun May 16, 2004 6:05 pm
Yeah. Replace Spiritual Vigor with Talisman of Kragg, which BSTs get at 62.