Software:Universal Client
Version Number:
________________________________________________________________________
Location
________________________________________________________________________
Description:
Event( "&command","change")
{
*changeinventory %player% +10 brain power
$amountAdded = sysAddToInventory( "brain power" )
*updateinventory %player%
}
________________________________________________________________________
Steps to Replicate:
This only gives 1 brain power.
typing it in the world chat box gives 10.
And this doesn't work if the sysAddToInventory line isn't used, of which it only reports '1'
Maybe further explanation on how these work together is all that's needed.
*changeinventory item amount issue
- morbydvisns
- Posts: 1889
- Joined: Sun Jan 30, 2005 12:51 am
- morbydvisns
- Posts: 1889
- Joined: Sun Jan 30, 2005 12:51 am
okeys, sysAddToInventory can now (server 0.66.0) accept an extra param for the quantity to add. The return value from the call is the number of the item actually added.
(Note that you don't need an *updateinventory call after using sysAddToInventory - the change is replicated out immediately to the targeted user. *updateinventory is only needed after *changeinventory which is intended to allow you to add multiple items to a player in a slightly more optimal way).
(Note that you don't need an *updateinventory call after using sysAddToInventory - the change is replicated out immediately to the targeted user. *updateinventory is only needed after *changeinventory which is intended to allow you to add multiple items to a player in a slightly more optimal way).