Difference between revisions of "GetItemCount"

347 bytes added ,  10:05, 20 June 2008
m
Added Search Terms
imported>JOG
(Also accepts References as ObjectID...)
imported>Vswe
m (Added Search Terms)
 
(9 intermediate revisions by 5 users not shown)
Line 1: Line 1:
Returns the number of ObjectID in the actor's inventory. It also works for containers.
<!-- Begin Search Terms
 
Get
 
Item
 
Count
End Search Terms -->
'''Syntax:'''
'''Syntax:'''
  GetItemCount ObjectID
[''ActorID''|''ContainerID''.]GetItemCount ''ObjectID''
 
 
'''Examples:'''
'''Examples:'''
  if (GetItemCount Gold001 <= 0)
  if (GetItemCount Gold001 <= 0)
   disable
   disable
Line 17: Line 15:
   
   
  set MyItem to ArenaAkaviriLongSword
  set MyItem to ArenaAkaviriLongSword
  if player.GetItemCount MyItem > 0
  if player.GetItemCount MyItem == 0
   message "Hail, owner of the Akaviri Longsword"
   player.additem MyItem 1
  endif
  endif
   
   
Returns the number of ObjectID in the actor's inventory. It also works for containers.


'''Notes:'''
==Notes==


*You can use a reference variable as ObjectID.  
*You can use a reference variable as ObjectID.  
Line 29: Line 28:


==See Also==
==See Also==
[[AddItem]]
[[RemoveItem]]
[[RemoveItem]]


[[AddItem]]
[[Category: Functions]]
[[Category: Functions]]
[[Category: Object Functions]]
[[Category:Functions (CS)]]
[[Category: Functions (CS 1.0)]]
[[Category:Actor Functions]]
[[Category:Actor Functions (CS 1.0)]]
[[Category: Condition Functions]]
[[Category: Condition Functions]]
[[Category: Condition Functions (CS 1.0)]]
[[Category: Inventory Functions]]
[[Category: Inventory Functions (CS 1.0)]]
<!-- Begin Search Terms
Get
Item
Count
End Search Terms -->
Anonymous user