GetPCItemLastUnequippedBy

From NWN Lexicon

Contents

[edit] GetPCItemLastUnequippedBy()

Get the PC who last unequipped an item

[edit] Description

Use this to get the player character who last unequipped an item in OnPlayerUnEquipItem..



[edit] Remarks

Can be used to make cursed items truly cursed, in the sense that they can't even be unequipped.


[edit] Version

1.61

[edit] Example

//PC can't take off this amulet. Ever *evil grin*
void main()
{
object oPC=GetPCItemLastUnequippedBy();
 
object oItem=GetPCItemLastUnequipped();
 
if (GetTag(oItem)=="cursed_amulet")
   {
   AssignCommand(oPC, ActionEquipItem(oItem, INVENTORY_SLOT_NECK));
   }
}

[edit] See Also

functions: 

GetPCItemLastUnequipped

events: 

OnPlayerUnEquipItem Event



 author: Lilac Soul
 

Personal tools
Categories