or
Spell_routines.inc ***
Which ever you prefer to use
Once you reach your max skill level the macro will end.
*** It only casts what you have memmed ***
Code: Select all
| trainspell.mac
| Written by Fuergrissa V2.0
#Define ArcaneMax 235
#include spellcast.inc
|#include spell_routines.inc
Sub Main
/declare ArcaneLevel int outer
/declare SpellName string outer
/declare GemNumber int outer
/declare WhatSkill string outer
/declare Maxxed int outer
/varcalc ArcaneLevel ${Me.Level}*5+5
/echo Your Spell Cap is ${ArcaneLevel}
/if (${ArcaneLevel}>ArcaneMax) /varset ArcaneLevel ArcaneMax
/echo Your Current Spell Cap is ${ArcaneLevel}
/varset GemNumber 0
/varset Maxxed 0
/varset SpellName ""
/varset WhatSkill ""
:TrainingLoop
/if (${Me.PctMana}<10) /goto :SitDown
/if (${Cursor.ID}) /autoinv
/goto :CastSpell
:SitDown
/echo Mana at ${Me.PctMana}% Medding till over 98%
:MedLoop
/if (${Me.State.Equal[STAND]}) /sit
/if (${Me.PctMana}>98) /goto :FullMana
/goto :MedLoop
/return
:FullMana
/echo Mana at ${Me.PctMana}% Starting Casting Again.
/if (${Me.State.Equal[SIT]}) /stand
:CastSpell
/Varcalc GemNumber ${GemNumber}+1
/if (${GemNumber}>8) /varset GemNumber 1
/varset SpellName ${Me.Gem[${GemNumber}]}
/if (!${Me.Gem[${SpellName}]}) /goto :TrainingLoop
/goto :TestSkill
:StartCasting
/target myself
/echo Casting ${SpellName} from GemSlot ${GemNumber} of Type ${Spell[${SpellName}].Skill} (${Me.Skill[${Spell[${SpellName}].Skill}]})
/varset Maxxed 0
/call cast "${SpellName}"
/goto :TrainingLoop
/return
:TestSkill
/if (${Me.Skill[${Spell[${SpellName}].Skill}]}==${ArcaneLevel}) /goto :TooHigh
/goto :StartCasting
/return
:TooHigh
/varset WhatSkill ${Spell[${SpellName}].Skill}
/varcalc Maxxed ${Maxxed}+1
/echo You cannot Increase ${WhatSkill} anymore.
/if (${Maxxed}==8) /goto :Finished
/goto :TrainingLoop
/return
:Finished
/echo Ending
/endmacro



