GetItemCursedFlag

From NWN Lexicon
Revision as of 01:28, 26 August 2012 by Dood (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search



GetItemCursedFlag(object)

Checks if an item is cursed

int GetItemCursedFlag(
    object oItem
);

Parameters

oItem

Item to determine if is cursed


Description

Returns TRUE if the item is cursed and cannot be dropped.



Remarks

See SetItemCursedFlag() for more information about what exactly this flag will do for an item.


Version

1.62

Example

// We are going to destroy everything in the dying PC's
// inventory, except, of course, the things that can't be dropped!

void main()
{
     // Get the dead PC
     object oPC = GetLastPlayerDied();

     // Evil module! We destroy all items except:
     // * Plot items
     // * Undroppable (cursed flag) items
     object oItem = GetFirstItemInInventory(oPC);
     while(GetIsObjectValid(oItem))
     {
          // Destroy it if not undroppable
          if(!GetPlotFlag(oItem) &&
             !GetItemCursedFlag(oItem))
          {
               DestroyObject(oItem);
          }
          oItem = GetNextItemInInventory(oPC);
     }
}

See Also

functions: 

SetItemCursedFlag



 author: Lilac Soul, editor: Jasperre, additional contributor(s): Jasperre