Handy cursed Item script
This scripting forum is to discuss scripting and for those needing help scripting to get help from others.

Moderators: Mermut, rdjparadis

Post Reply
User avatar
Winterhawk99
Posts: 1629
Joined: Thu Oct 08, 2009 12:00 am
ctp: Yes
nwnihof: Yes
Location: Pa.
Contact:

Handy cursed Item script

Post by Winterhawk99 »

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");
  }
CTP team member
http://www.harvestmoonconsortium.com
Chief cook and bottle washer for Harvest Moon

Post Reply