Difference between revisions of "GetItemCount"

275 bytes added ,  15:07, 10 June 2006
Also accepts References as ObjectID...
imported>Slserpent
imported>JOG
(Also accepts References as ObjectID...)
Line 1: Line 1:
Returns the number of ObjectID in the actor's inventory. It also works for containers.
'''Syntax:'''
'''Syntax:'''
   GetItemCount ObjectID
   GetItemCount ObjectID




Returns the number of ObjectID in the actor's inventory. It also works for containers.
'''Examples:'''
 
if (GetItemCount Gold001 <= 0)
  disable
endif
 
Ref MyItem
Short count
set MyItem to ArenaAkaviriLongSword
if player.GetItemCount MyItem > 0
  message "Hail, owner of the Akaviri Longsword"
endif
 
'''Notes:'''  
 
*You can use a reference variable as ObjectID.  
 
 


<pre>
==See Also==
if (GetItemCount Gold001 <= 0)
[[RemoveItem]]
  disable
endif
</pre>


[[AddItem]]
[[Category: Functions]]
[[Category: Functions]]
[[Category: Object Functions]]
[[Category: Object Functions]]
[[Category: Condition Functions]]
[[Category: Condition Functions]]
Anonymous user