Concussion pants swap
Posted: Sat Aug 27, 2005 4:12 am
New feature added, see comments.
I wrote this because Maelin's pants cast concussion mana-free and faster than the actual spell does. The script runs fast and is designed to be immune to lag. Let know if you like it, or you think it sucks!
I wrote this because Maelin's pants cast concussion mana-free and faster than the actual spell does. The script runs fast and is designed to be immune to lag. Let know if you like it, or you think it sucks!
Code: Select all
|Concussion.mac by Horseshoecrabs
|Useage: This Macro requires Maelin's Pants of Lore
|
|This macro will grab your Maelin's Pants from inventory for those of us not
|wearing them, cast them once, and puts them away.
#event StopRoutine "You must be standing to cast a spell."
#event StopRoutine "Your spell is interrupted."
Sub Main(int ConcussionCounter)
/declare slotlegs int outer
/declare baglegs int outer
/declare legcasts int outer
/declare IncrementalWait int outer
/declare ConcPants outer
/declare MyCounter int outer
/varset ConcPants Maelin's Leggings of Lore
/call UnloadCursor
/varset legcasts 0
/varset baglegs ${FindItem[${ConcPants}].InvSlot.Pack}
/if (!${Window[${baglegs}].Open}) /itemnotify ${InvSlot[${baglegs}]} rightmouseup
:loop
/if (!${Cursor.ID}) {
/itemnotify ${FindItem[${ConcPants}].InvSlot} leftmouseup
/varcalc IncrementalWait ${IncrementalWait}+1
/delay ${IncrementalWait}
/goto :loop
}
/varset IncrementalWait 0
/itemnotify legs leftmouseup
/itemnotify ${InvSlot[${baglegs}]} rightmouseup
/For MyCounter 1 to ${ConcussionCounter}
/cast item "${ConcPants}"
/call CastWait
/Next MyCounter
/itemnotify legs leftmouseup
/call UnloadCursor
/endmac
Sub CastWait
:Casting
/delay 1
/if (${Me.Casting.ID}) /goto :Casting
/return
Sub UnloadCursor
:loop
/autoinv
/delay ${IncrementalWait}
/if (${Cursor.ID}) {
/varcalc IncrementalWait ${IncrementalWait}+1
/goto :loop
}
/varset IncrementalWait 0
/return
Sub Event_StopRoutine
/doevents flush
:TryAgain1
/if (!${Me.Inventory[Legs].Name.Equal[${ConcPants}]}) /itemnotify legs leftmouseup
/if (!${Me.Inventory[Legs].Name.Equal[${ConcPants}]}) /goto :TryAgain1
/call UnloadCursor
/if (${AlreadyMounted}==0) /dism
/endmac
/return