GetItemCount

Revision as of 05:15, 28 June 2006 by imported>Khadir (Documenting actor functions ... + wikifying)

Template:ActorFunction Syntax:

[ActorID|ContainerID.]GetItemCount ObjectID

Examples:

if (GetItemCount Gold001 <= 0)
  disable
endif
Ref MyItem
Short count

set MyItem to ArenaAkaviriLongSword
if player.GetItemCount MyItem == 0
  player.additem MyItem 1
endif

Returns the number of ObjectID in the actor's inventory. It also works for containers.

Notes

  • You can use a reference variable as ObjectID.


See Also

AddItem

RemoveItem