I don't get any errors, but nothing seems to happen. I'm not sure if my variables are incorrect, my Sub's, or just somewhere in my syntax, but I can't seem to put a finger on it.
Code: Select all
|- spelltrain.mac
|- by Drumstix42
|- 5-22-2004
|----------------------------------------------------
|- Useage:
|- /macro spelltrain <"SpellNameHere">
|- Example:
|- /macro spelltrain "Spirit of Wolf"
|- Requires SpellCast.inc
|- /endmac to stop :P
#include SPELLCAST.inc
/declare iManaMedPct int outer
/declare iManaFullPct int outer
/declare iGemNum int outer
|-- CHANGE TO PERSONAL LIKING ---
/varset iManaMedPct 20 |% mana to start medding at
/varset iManaFullPct 98 |% mana to start casting again
/varset iGemNum 1 |Gem number to mem spell to to train (1-8)
|-- DONE CHANGING STUFF ---
Sub Main
/if (!${Defined[Param0]}) {
/echo You must define a spell!
/echo Useage: /macro spelltrain <"SpellNameHere">
/endmacro
} else {
/echo Training Spell: ${Param0}
/call Training
}
/return
Sub Training
/if (!${Me.Standing}) /stand
/if (!${Target.ID}) /target myself
:MainLoop
/if (${Me.PctMana}>${iManaMedPct}) {
/call cast ${Param0} gem${iGemNum}
/goto :MainLoop
} else {
/echo Low on Mana - Medding until ${iManaFullPct}% mana
/call Medding
}
/return
Sub Medding
:MedLoop
/if (${Me.PctMana}<${iManaFullPct}) {
/echo Medding...
/if (${Me.Standing}) /sit
/delay 7s
/goto :MedLoop
} else {
/echo Done medding.
/call Training
}
/return



