GetPCItemLastUnequipped

From NWN Lexicon
Jump to: navigation, search

GetPCItemLastUnequipped()

Returns the last unequipped item

Description

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



Version

1.61

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));
   }
}

See Also

functions: 

GetPCItemLastUnequippedBy

events: 

OnPlayerUnEquipItem Event



 author: Lilac Soul