Welcome to PenUltima Online. Click to login or register.

Functions:

CreateItemInInventory( container, objtype, amount := 1 )
Parameters:
Name Type
container Container reference
objtype Integer objtype for item to be created, OR String ObjtypeName, OR GetItemDescriptor struct.
amount size of stack to be created. Default = 1
Explanation
Creates a stack of items in the specified container. As usual, objtype must be valid and amount must be 1..60000.
Note: Will call the container's canInsert and onInsert scripts.
Return values
Item reference or Error
Errors
"A parameter was invalid"
"That is not a container" if container.isa(POLCLASS_CONTAINER) == false
"That container is full" if weight would be > 65535, or if would exceed maximum # of items
"Failed to create that item type"
"Could not insert item into container." if canInsert script returns false
Related
Container
Item
Related Configs
itemdesc.cfg