Me.Inventory[]:Equip and Epics


Am I the only one that is having or had issues with this?

I have a weapon that could normally be equipped in either the Primary Hand or Secondary Hand but I put an offhand epic on it. Now I can't get the :Equip method to work.

Results in the following error:
Designer error: default equipslot for item is restricted for that item.

edited to add:

Fixed it with the following:
VGExecute /wear \"${weapon}\" secondaryhand
Still doesn't fix the :Equip method but provides a working solution.
Last edited:


The Maestro
Staff member
What is the exact thing you're typing to try and equip it with :Equip? It appears that it doesn't allow for a 'default', so you'd need to specify the slot. I'm just curious how you're doing it when specifying the slot. The examples you gave were generic and not specific to what you're actually doing.


I've tried it on three different toons with three different weapons, all with different names.

The issue seems to be when an Either Hand weapon has an epic augment in it that is Secondary Hand only that the :Equip method won't work. So, for instance, on my one of my toons the following code results in that error that I posted:
Me.Inventory[Finch's Axe of Trickery +3]:Equip[Secondary Hand]
Either Hand weapons with an epic augment that is for the Primary Hand only seem to work just fine.

I don't have a Ranged item with an epic augment so I haven't tested that but I have tested Secondary Hand shields and focus for healers, casters and melee with epics and they can use the :Equip method just fine.

If I had known about using the escape character before " then I would have posted this under bugs instead of tutorials as I guessed I was using VGExecute incorrectly which turned out to be true.


Script Author: VGA
I have written a quick routine that will un-equip your weapons and then re-equip them. It shows how I do it which when tested will work even when there is serious lag.

Note: You must use quotation marks around the item because some items has comma's (such as Yanvil, Greatstaff of the Ages)

function EquipItems()
	;; Our variables used
	variable string LastPrimary = None
	variable string LastSecondary = None
	variable string LastTwoHands = None

	;; Now save what is equipted to our variables
	if ${Me.Inventory[CurrentEquipSlot,Primary Hand](exists)}
		LastPrimary:Set["${Me.Inventory[CurrentEquipSlot,Primary Hand]}"]
	if ${Me.Inventory[CurrentEquipSlot,Secondary Hand](exists)}
		LastSecondary:Set["${Me.Inventory[CurrentEquipSlot,Secondary Hand]}"]
	if ${Me.Inventory[CurrentEquipSlot,Two Hands](exists)}
		LastTwoHands:Set["${Me.Inventory[CurrentEquipSlot,Two Hands]}"]

	;; Display our vairiables
	echo LastPrimary=${LastPrimary}
	echo LastSecondary=${LastSecondary}
	echo LastTwoHands=${LastTwoHands}

	;; Remove all items from the weapon slots
	if ${Me.Inventory[CurrentEquipSlot,"Two Hands"](exists)}
		Me.Inventory[CurrentEquipSlot,"Two Hands"]:Unequip
	if ${Me.Inventory[CurrentEquipSlot,"Primary Hand"](exists)}
		Me.Inventory[CurrentEquipSlot,"Primary Hand"]:Unequip
	if ${Me.Inventory[CurrentEquipSlot,"Secondary Hand"](exists)}
		Me.Inventory[CurrentEquipSlot,"Secondary Hand"]:Unequip

	;; Wait long enough till all weapon slots are empty	
	wait 50 !${Me.Inventory[CurrentEquipSlot,"Primary Hand"](exists)} && !${Me.Inventory[CurrentEquipSlot,"Secondary Hand"](exists)} && !${Me.Inventory[CurrentEquipSlot,"Two Hands"](exists)}

	;; Now, requip all our saved weapons
	if !${LastPrimary.Equal[None]} && !${LastPrimary.Equal["${Me.Inventory[CurrentEquipSlot,"Primary Hand"]}"]}
		VGExecute /wear \"${LastPrimary}\" primaryhand
		wait 50 ${LastPrimary.Equal["${Me.Inventory[CurrentEquipSlot,"Primary Hand"]}"]} 			
	if !${LastSecondary.Equal[None]} && !${LastSecondary.Equal["${Me.Inventory[CurrentEquipSlot,"Secondary Hand"]}"]}
		VGExecute /wear \"${LastSecondary}\" secondaryhand
		wait 50 ${LastSecondary.Equal["${Me.Inventory[CurrentEquipSlot,"Secondary Hand"]}"]}
	if !${LastTwoHands.Equal[None]} && !${LastTwoHands.Equal["${Me.Inventory[CurrentEquipSlot,"Two Hands"]}"]}
		VGExecute /wear \"${LastTwoHands}\"
		wait 50 ${LastTwoHands.Equal["${Me.Inventory[CurrentEquipSlot,"Two Hands"]}"]} 	


The Maestro
Staff member
When I posted before, I just assumed you had looked up the "Equip" method; however, it appears that was not the case. The "Equip" method of the item datatype does not accept the 'slot' as a parameter. If you look back to when it was added to ISXVG in the patch notes:
November 5, 2006 -- By Amadeus
* Added the following MEMBER to the 'item' datatype:
  1. Index                       (int type)
* Added the following METHODS to the 'item' datatype:
  1. Delete
[COLOR=#ffff00]  2. Equip      (equips without prompting for "no drop on equip" confirmation)[/COLOR]
[COLOR=#ffff00]     Equip[NDC] (asks for confirmation on "no drop on equip" item)[/COLOR]
"Equip", as it exists in ISXVG, only allows for equipping to the default slot. The ability to choose a slot will need to be submitted as a feature request. (If you do submit it as a feature request, then please include the information at the top of this thread as reference on how you do it with /wear.)


Sorry, mate. Could have sworn I saw an :Equip[slot] somewhere but I guess it wasn't anywhere official.

Top Bottom