#include "pws_nodropunique" #include "x2_inc_switches" #include "x2_inc_intweapon" void main() { CheckForNoDrop(); // Unacquire DISARM CODE BEGINS HERE object oItem = GetModuleItemLost(); object oPC = GetModuleItemLostBy(); string sItemGained = GetResRef(oItem); if (GetLocalInt(oItem, "kitem_error") == TRUE)return; if(GetIsPC(oPC)) { if(GetLocalInt(oItem, "recentunequip") == TRUE) { object nItem = CopyObject(oItem, GetLocation(oPC), oPC); DeleteLocalInt(nItem, "recentunequip"); DestroyObject(oItem); int iGoldB4 = GetLocalInt(oPC, "currentgold"); int iGoldNow = GetGold(oPC); if(iGoldNow > iGoldB4 && nItem != OBJECT_INVALID) { AssignCommand(oPC, TakeGoldFromCreature(iGoldNow - iGoldB4, oPC, TRUE)); } } } if (GetIsPC(oPC)) { if (GetStringLeft(sItemGained, 9) == "kelobject") { DestroyObject(oItem); } } }