Game
Game.createContainer
Returns a Container userdata
Game.createContainer(itemId, size[, position])
itemId
Required
Type: Integer
Description: The item ID to create a new container as. Item must not be stackable, usable, movable, pickupable, depot, splash, or door.
size
Required
Type: Integer
Description: Size of the container.
position
Optional
Type: Position
Default: nil
Description: Position to add the container to. When defaulted to nil, the container is considered virtual and has no reference in-game.
Game.createItem
Returns an Item userdata
Game.createItem(itemId[, count[, position]])
itemId
Required
Type: Integer
Description: The item ID to create.
count
Optional
Type: Integer
Default: 1
Description: Stack count of the item.
position
Optional
Type: Position
Default: nil
Description: Position to add the item to. When defaulted to nil, the item is considered virtual and has no reference in-game.
Game.createMonster
Returns a Monster userdata
Game.createMonster(monsterName, position[, extended = false[, force = false]])
monsterName
Required
Type: String
Description: Name of the monster (registered in monsters.xml) to create.
position
Required
Type: Position
Description: Position at which the monster will be created at.
extended
Optional
Type: Boolean
Default: false
Description: Will try to spawn monster within 2sqm instead of 1sqm if the specified position is unavailable.
force
Optional
Type: Boolean
Default: false
Description: Forces the monster to spawn on the specified position regardless if the tile is blocked or not.
Last updated