Page 1 of 1

Auto-Casting Shield of Maelin

Posted: Thu Aug 26, 2004 12:58 pm
by nitan
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

Posted: Thu Aug 26, 2004 1:43 pm
by aChallenged1
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.

Posted: Thu Aug 26, 2004 1:45 pm
by EQCat
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
}

Posted: Thu Aug 26, 2004 2:26 pm
by nitan
Thanks EQCat, very helpful...

Nitan