Handy cursed Item script
Posted: Wed Nov 23, 2011 2:33 am
This is a script you can put on an item to make it cursed. It's a pretty simple script to understand. I have added comments to it to help you understand everything. If you would like to use the script as is you can remove the commented information.
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");
}