Page 1 of 1

How do i get this to work?

Posted: Sat May 15, 2004 8:14 pm
by Still_a_newb

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...

Posted: Sat May 15, 2004 8:33 pm
by Lax
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

Posted: Sat May 15, 2004 8:39 pm
by Still_a_newb

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?

Posted: Sat May 15, 2004 9:06 pm
by ieatacid
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 

Posted: Sat May 15, 2004 11:18 pm
by Drumstix42
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.

Posted: Sun May 16, 2004 3:44 am
by Azum
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}
}

Posted: Sun May 16, 2004 6:05 pm
by Marze
Yeah. Replace Spiritual Vigor with Talisman of Kragg, which BSTs get at 62.

Posted: Mon May 17, 2004 1:19 pm
by Still_a_newb
Thanks all.