I can see now that you obviously play on Ages of Despair, which is also my stomping grounds.
Regarding the Equipment, here is the way I handle it:
I create a subroutine for each equipment location. I use a pile of aliases to set the item for each location. Here is the related script subroutines:
Sub Set_Item_LHand (thename, theoutput, thewildcards)
World.SetVariable "Item_LHand", CStr(thewildcards(1))
World.Note "L.Hand: " & World.GetVariable("Item_LHand")
End Sub
Sub Set_Item_RHand (thename, theoutput, thewildcards)
World.SetVariable "Item_RHand", CStr(thewildcards(1))
World.Note "R.Hand: " & World.GetVariable("Item_RHand")
End Sub
Sub Set_Item_Head (thename, theoutput, thewildcards)
World.SetVariable "Item_Head", CStr(thewildcards(1))
World.Note " Head: " & World.GetVariable("Item_Head")
End Sub
Sub Set_Item_Neck (thename, theoutput, thewildcards)
World.SetVariable "Item_Neck", CStr(thewildcards(1))
World.Note " Neck: " & World.GetVariable("Item_Neck")
End Sub
Sub Set_Item_Arms (thename, theoutput, thewildcards)
World.SetVariable "Item_Arms", CStr(thewildcards(1))
World.Note " Arms: " & World.GetVariable("Item_Arms")
End Sub
Sub Set_Item_Hands (thename, theoutput, thewildcards)
World.SetVariable "Item_Hands", CStr(thewildcards(1))
World.Note " Hands: " & World.GetVariable("Item_Hands")
End Sub
Sub Set_Item_Cloak (thename, theoutput, thewildcards)
World.SetVariable "Item_Cloak", CStr(thewildcards(1))
World.Note " Cloak: " & World.GetVariable("Item_Cloak")
End Sub
Sub Set_Item_Torso (thename, theoutput, thewildcards)
World.SetVariable "Item_Torso", CStr(thewildcards(1))
World.Note " Torso: " & World.GetVariable("Item_Torso")
End Sub
Sub Set_Item_Belt (thename, theoutput, thewildcards)
World.SetVariable "Item_Belt", CStr(thewildcards(1))
World.Note " Belt: " & World.GetVariable("Item_Belt")
End Sub
Sub Set_Item_Legs (thename, theoutput, thewildcards)
World.SetVariable "Item_Legs", CStr(thewildcards(1))
World.Note " Legs: " & World.GetVariable("Item_Legs")
End Sub
Sub Set_Item_Feet (thename, theoutput, thewildcards)
World.SetVariable "Item_Feet", CStr(thewildcards(1))
World.Note " Feet: " & World.GetVariable("Item_Feet")
End Sub
Sub Set_Item_LRing (thename, theoutput, thewildcards)
World.SetVariable "Item_LRing", CStr(thewildcards(1))
World.Note "L.Ring: " & World.GetVariable("Item_LRing")
End Sub
Sub Set_Item_RRing (thename, theoutput, thewildcards)
World.SetVariable "Item_RRing", CStr(thewildcards(1))
World.Note "R.Ring: " & World.GetVariable("Item_RRing")
End Sub
Sub Set_Item_Shield (thename, theoutput, thewildcards)
World.SetVariable "Item_Shield", CStr(thewildcards(1))
World.Note "Shield: " & World.GetVariable("Item_Shield")
End Sub
...A lot of repetitiveness, but it works. The aliases I created look like this:
Alias : Sethands *
Send : <nothing>
Label : Set_Hands
Script: Set_Item_Hands
I have one alias for each equipment slot. If I change an item of equipment, I use the related alias to set the variable for that item. I always try to use the most discriptive equipment name possible, but in some cases, the EQ can not be handled by it's full name. That is an issue for the MUD, there is nothing that can be done with the client to work around the problem.
Here are some additional aliases I use related to EQ:
Alias :won
Expand Variables: CHECKED
Send:
---
wield @Item_LHand in left hand
wield @Item_RHand
wear @Item_Head
wear @Item_Neck
wear @Item_Arms
wear @Item_Hands
wear @Item_Cloak
wear @Item_Torso
wear @Item_Belt
wear @Item_Legs
wear @Item_Feet
wear @Item_LRing
wear @Item_RRing
wear @Item_Shield
eq
---
Of course, don't include the "---" lines in the send section. This alias is particularly useful if you die (and get UNequiped). I also use it after my "gall" alias which gets all from my chests.
Another example:
Alias : parry
Expand Variables: CHECKED
Send:
---
unwield @Item_Lhand
parry on
wield @Item_Lhand in left hand
---
As you can see, once the EQ item has been established using the 'set' aliases, you don't need to go and modify your other aliases/triggers whenever you start wearing a new item. One last script and alias routine:
' ------------------------------------------------------------
' DISPLAY INVENTORY
' ------------------------------------------------------------
Sub Display_Inventory (thename, theoutput, thewildcards)
World.Note "L.Hand: " & World.GetVariable("Item_LHand")
World.Note "R.Hand: " & World.GetVariable("Item_RHand")
World.Note " Head: " & World.GetVariable("Item_Head")
World.Note " Neck: " & World.GetVariable("Item_Neck")
World.Note " Arms: " & World.GetVariable("Item_Arms")
World.Note " Hands: " & World.GetVariable("Item_Hands")
World.Note " Cloak: " & World.GetVariable("Item_Cloak")
World.Note " Torso: " & World.GetVariable("Item_Torso")
World.Note " Belt: " & World.GetVariable("Item_Belt")
World.Note " Legs: " & World.GetVariable("Item_Legs")
World.Note " Feet: " & World.GetVariable("Item_Feet")
World.Note "L.Ring: " & World.GetVariable("Item_LRing")
World.Note "R.Ring: " & World.GetVariable("Item_RRing")
World.Note "Shield: " & World.GetVariable("Item_Shield")
End Sub
Alias : dinv
Send : <nothing>
Label : Call_Display_Inventory
Script: Display_Inventory
I use that to confirm that my items are configured properly in my MUSHclient script.
Note: I don't check to see if an EQ location is marked as "None" or empty. The script works well enough for me as is... You can add to it to make it foolproof if you wish.
Note: If you have multiple EQ sets, you would probably have to create another whole set of script subroutines and aliase to handle secondary (and beyond) sets. I haven't had the need, or I surely would have done so myself. :)
I'm not saying this is the best way, but it's work I've already done, so feel free to borrow it. |