void main() { object oObject = GetEnteringObject(); if (GetIsObjectValid(oObject)) { object oLeft = GetItemInSlot(INVENTORY_SLOT_LEFTHAND, oObject); object oRight = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND, oObject); if (GetIsObjectValid(oLeft)) AssignCommand(oObject, ActionUnequipItem(oLeft)); if (GetIsObjectValid(oRight)) AssignCommand(oObject, ActionUnequipItem(oRight)); } }