More curious if I have the syntax correct, I haven't run the macro yet, Im having macro woes after compile. More curious if I am understanding the new syntax for macros. I have some other old macros that I need to convert.
Code: Select all
| Spell Practice by m0nk
| Revised by bob_the_builder
| /macro castgest gem#
| castgem.mac 10/11/03
#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 (GemNumber)
/if n $strlen("@GemNumber")<=0 {
/echo Usage: /macro castgem gem#
/endmacro
}
/declare Gem1 global
/varset Gem1 @GemNumber
/stand
/call Loop
/return
Sub Loop
:Loop
/doevents
/if n $char(gem,"@Gem1")<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
/delay 2s
/return
Sub Event_Recovered
/delay 5s
/return
Sub Event_BusyCast
/delay 5s
/return
EDIT - updated macro
By the way, i added
Code: Select all
/varset Gem1 @GemNumber 
