Code: Select all
// PC is the object that the item was on
object oPC = GetPCItemLastUnequippedBy();
// the object here is the cursed Item when adding something to script you have to define it
object oItem = GetPCItemLastUnequipped();
// if this integer is on the item and if it is equal to yes or 1 then run the if assigned command within
the brackets
int nEquip = GetItemCursedFlag(oItem);
if (nEquip == TRUE)
{
// you re-equip the item to the righthand slot of the pc and send a server message to them that the item
// is cursed and cannot be removed The slot can be changed if a different inventory slot is needed
AssignCommand(oPC, ActionEquipItem(oItem, INVENTORY_SLOT_RIGHTHAND));
SendMessageToPC(oPC, "That item is cursed and cannot be removed");
}