Welcome to PenUltima Online. Click to login or register.

Functions:

FindSubstance( container, objtype, amount, makeinuse := 0 )
Parameters:
Name Type
container Container reference
objtype Integer objtype to find
amount Integer
makeinuse Integer (0/1)
Explanation
Search the given container for items of objtype in an amount equal or greater than the amount given (stackables can return greater than #).
If makeinuse is set to 1, then the items will be reserved.
Return values
If sufficient # of items have been found, those found (and possibly reserved) will be returned in an array.
Errors
"Invalid parameter type"
"That is not a container"
"Amount cannot be negative"
"Not enough of that substance in container"
Related
Container