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"]}"]}
}
}