GetPCItemLastUnequipped

From NWN Lexicon

Contents

[edit] GetPCItemLastUnequipped()

Returns the last unequipped item

[edit] Description

Use this to get the item last unequipped by a player character in OnPlayerUnEquipItem..



[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: 

GetPCItemLastUnequippedBy

events: 

OnPlayerUnEquipItem Event



 author: Lilac Soul
 

Personal tools
Categories