Auto-Casting Shield of Maelin

Need help with a macro you are writing? Ask here!

Moderator: MacroQuest Developers

nitan
orc pawn
orc pawn
Posts: 15
Joined: Fri Aug 20, 2004 9:41 pm

Auto-Casting Shield of Maelin

Post by nitan » Thu Aug 26, 2004 12:58 pm

Here is a lil macro I wrote to auto cast shield of maelin, the only issue I see with it is if you have shammy buff fo7, it will send on in a loop try to cast the spell. Does anyone know of a way to make a if statement check for 2 condition, ie. ony try to cast shield if no shield or no fo7.

Here is my code, I used EQBot_Man code for reference.

|===========|
| Shield of Maelin |
|===========|

/declare tempspell string local
/varset tempspell ${Me.Gem[5]}
:memspell5
/if (${Me.Buff["Shield of Maelin"].Duration}<5) {
/echo Casting Shield of Maelin
/memspell 5 "Shield of Maelin"
/if (!${String[${Me.Gem[5]}].Find["Shield of Maelin"]}>0) /goto

:memspell5
:notready5
/if (!${Me.SpellReady["Shield of Maelin"]}) {
/goto :notready5
} else {
/stand
/keypress esc
/keypress esc
/keypress esc
/cast "Shield of Maelin"
/delay 6s
/memspell 5 "${tempspell}"
/delay 5s
/stand
}
}
/if (!${Me.Buff["Shield of Maelin"].Duration}<5) /goto :memspell
/return


Thanks for any help.

Nitan

User avatar
aChallenged1
a grimling bloodguard
a grimling bloodguard
Posts: 1804
Joined: Mon Jun 28, 2004 10:12 pm

Post by aChallenged1 » Thu Aug 26, 2004 1:43 pm

See those pretty boxes above the text entry window? Now, do you see the one marked Code? Great, use it next time. Click once before you paste in your code and again after you finish. It will look something like this...

Code: Select all

This is where code belongs, within a the code brackets so that everything gets the right indentations and is easy to pick out from anything else that is typed around it.
Fuck writing MQ2 macros. Go with IS scripts; IS Rules!

EQCat
orc pawn
orc pawn
Posts: 29
Joined: Thu Aug 26, 2004 1:16 am

Post by EQCat » Thu Aug 26, 2004 1:45 pm

You should be able to use

Code: Select all


/if (${Me.Buff["Focus of Seven"].Duration} == NULL) {  
    /if (${Me.Buff["Shield of Maelin"].Duration}<5)  {
         cast it etc
   }
}
So if you don't have focus it will check duration on sheild and recast if less than 5 ticks left

Guess for a one line /if you could use

Code: Select all

/if ((${Me.Buff["Focus of Seven"].Duration} == NULL)) && ((${Me.Buff["Shield of Maelin"].Duration}<5) ) {
   dostuff
}

nitan
orc pawn
orc pawn
Posts: 15
Joined: Fri Aug 20, 2004 9:41 pm

Post by nitan » Thu Aug 26, 2004 2:26 pm

Thanks EQCat, very helpful...

Nitan