Swapping our Snare weapon
Posted: Sat Oct 02, 2004 11:49 pm
Keep getting variable not found errors with this one. Not sure where I went wrong, but it's solution has escaped me. Tried using bool with TRUE & FALSE and int with 1 & 0 . But it just hates me. When the snare message event gets read, it opens up the bags and acts like it's swapping the weapons out but the snare hammer just stays put even after it's snared or immune to it (I'm sure this is an after effect of the variable problem I'm having).
Off to grab a beer or 6. My head hurts.
Code: Select all
/declare SnareIt int outer
/varset SnareIt 0
#Event Snared "#*#has been ensnared#*#"
#Event Immune "#*#immune to change#*#"
Sub MAIN
:Loop
/if (!${Me.Combat}) /varset SnareIt 0
/if (${Me.Combat}) {
/if (!${SnareIt}) /call LoadSnare
/doevents Snared
/doevents Immune
/if (!${Me.Buff[Speed of Salik].ID} && !${Me.Buff[Celestial Tranquility].ID} && !${Me.Buff[Speed of Vallon].ID} && !${Me.Buff[Vallon's Quickening].ID} && !${Me.Buff[Strenth of Tunare].ID}) /cast item "Celestial Fists"
/if (${Me.AbilityReady["Flying Kick"]}>0) /doability "Flying Kick"
/if (${Me.AbilityReady["Disarm"]}>0) /doability "Disarm"
}
/goto :Loop
/return
Sub LoadSnare
/if (${Me.Inventory[mainhand].Name.Equal[Anklesmasher]}) {
/return
} Else {
/if (!${Window[InventoryWindow].Open}) /keypress inventory
/if (!${Window[pack1].Open}) /itemnotify pack1 rightmouseup
:wait0
/if (!${Window[pack1].Open}) /goto :wait0
:wait1
/itemnotify ${FindItem["Anklesmasher"].InvSlot} leftmouseup
/if (!${String[${Cursor.Name}].Find["Anklesmasher"]}) /goto :wait1
/itemnotify mainhand leftmouseup
/delay 2
/autoinv
/delay 1
/if (${Window[pack1].Open}) /itemnotify pack1 rightmouseup
/if (${Window[InventoryWindow].Open}) /keypress inventory
}
/return
Sub LoadNormal
/if (!${Window[InventoryWindow].Open}) /keypress inventory
/if (!${Window[pack1].Open}) /itemnotify pack1 rightmouseup
:wait0
/if (!${Window[pack1].Open}) /goto :wait0
:wait1
/itemnotify ${FindItem["Slave's Hidden Orb"].InvSlot} leftmouseup
/if (!${String[${Cursor.Name}].Find["Slave's Hidden Orb"]}) /goto :wait1
/itemnotify mainhand leftmouseup
/delay 2
/autoinv
/delay 1
/itemnotify pack1 rightmouseup
/if (${Window[InventoryWindow].Open}) /keypress inventory
/return
Sub Event_Snared
/popup ${Target.CleanName} Snared.
/varset SnareIt 1
/call LoadNormal
/return
Sub Event_Immune
/popup ${Target.CleanName} IMMUNE TO SNARE!!
/varset SnareIt 1
/call LoadNormal
/return