Code: Select all
| castgem.mac 10/11/03
| Spell Practice by m0nk
| Revised by Bio_War and Spectre
| /macro castgem #
#turbo
#Event NoMana "Insufficient Mana to cast this spell"
#Event Sitting "You must be standing to cast a spell."
#Event Recovered "You haven't recovered yet..."
#Event BusyCast "You can't use that command while casting..."
Sub Main
/if $defined(@Param0)<1 {
/echo Usage: /macro castgem #
/endmacro
}
/declare Gem1 global
/declare Gem2 global
/varset Gem1 @Param0
/varset Gem2 "$char(gem,@Gem1)"
/stand
/call Loop
/return
Sub Loop
:Loop
/doevents
/if n $char(gem,"@Gem2")<0 /goto :Loop
:CheckCursor
/delay 0s
/if $cursor()==TRUE {
|/click left auto
/autoinv
/delay 1s
/goto :CheckCursor
}
/cast @Gem1
/goto :Loop
/return
Sub Event_NoMana
/sit off
/sit on
:Med
/delay 30s
/if n $char(mana,pct)<90 /goto :Med
/stand
/return
Sub Event_Sitting
/stand

