// hos_unequip void fnRemoveChange(string sID,int nApp,object oPC) { // remove appearance change and reputation adjustments object oWP=GetWaypointByTag(sID+"_RESOURCES"); object oCr; SetCreatureAppearanceType(oPC,nApp); if (sID!=GetLocalString(oPC,"sTeamID")) { // adjust reputation oCr=CreateObject(OBJECT_TYPE_CREATURE,sID+"0",GetLocation(oWP)); AdjustReputation(oPC,oCr,-100); } // adjust reputation } // fnRemoveChange() void main() { object oPC=GetPCItemLastUnequippedBy(); object oItem=GetPCItemLastUnequipped(); string sTag=GetTag(oItem); int nC; if (GetLocalInt(oPC,"bShiftNoEquip")) { // see if unequipping something that cannot be unequipped while shifted if (GetLocalInt(oItem,"bShiftOK")) { // cannot unequip this SendMessageToPC(oPC,"You cannot unequip that while shifted."); int nBT=GetBaseItemType(oItem); int nSlot=-1; if (nBT==BASE_ITEM_CLUB) { // melee weapon if (GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,oPC)==OBJECT_INVALID) nSlot=INVENTORY_SLOT_RIGHTHAND; else { nSlot=INVENTORY_SLOT_LEFTHAND; } } // melee weapon else if (nBT==BASE_ITEM_HELMET) { // helmet nSlot=INVENTORY_SLOT_HEAD; } // helmet else if (nBT==BASE_ITEM_BELT) { // belt nSlot=INVENTORY_SLOT_BELT; } // belt else if (nBT==BASE_ITEM_ARMOR) { // chest nBT=INVENTORY_SLOT_CHEST; } // chest if (nSlot>-1) { // reequip AssignCommand(oPC,ClearAllActions(TRUE)); if (GetItemInSlot(nSlot,oPC)!=OBJECT_INVALID) AssignCommand(oPC,ActionUnequipItem(GetItemInSlot(nSlot,oPC))); AssignCommand(oPC,ActionEquipItem(oItem,nSlot)); } // reequip return; } // cannot unequip this } // see if unequipping something that cannot be unequipped while shifted if (sTag=="rts_it_op6"||sTag=="rts_it_op7"||sTag=="rts_it_op8"||sTag=="rts_it_op9") { // infiltrator cloak removed nC=GetLocalInt(oPC,"nMyAppearance"); sTag=GetStringRight(sTag,1); if (sTag=="6") fnRemoveChange("UNC",nC,oPC); else if (sTag=="7") fnRemoveChange("UND",nC,oPC); else if (sTag=="8") fnRemoveChange("SPID",nC,oPC); else if (sTag=="9") fnRemoveChange("DWF",nC,oPC); } // infiltrator cloak removed else if (sTag=="rts_it_op10") { // tried to unequip soul leech AssignCommand(oPC,ClearAllActions(TRUE)); if(GetItemInSlot(INVENTORY_SLOT_RIGHTRING,oPC)!=OBJECT_INVALID) { AssignCommand(oPC,ActionUnequipItem(GetItemInSlot(INVENTORY_SLOT_RIGHTRING,oPC))); AssignCommand(oPC,ActionEquipItem(oItem,INVENTORY_SLOT_RIGHTRING)); } else { AssignCommand(oPC,ClearAllActions(TRUE)); AssignCommand(oPC,ActionEquipItem(oItem,INVENTORY_SLOT_RIGHTRING)); } } // tried to unequip soul leech else if (sTag=="rts_it_op18") { // unequip spell reflector shield DeleteLocalString(oPC,"sWAZOOONSPELLCASTAT"); } // unequip spell reflector shield ExecuteScript("hos_acp",oPC); }