# World Container Management

Before using World Container API, you need to create a World Container API Management object as follows:

local WorldContainer = class.WorldContainer.new()

The specific function name and description are as follows:

Serial number Function name Description
1 addFurnace(...) Add Furnace
2 removeFurnace(...) Remove Furnace
3 checkFurnace(...) Check if it is a Furnace
4 getFurnaceHeatPercent(...) Get the Furnace heat percentage
5 getFurnaceMeltPercent(...) Get the melting percentage of the Furnace
6 addStorageBox(...) Add storage box
7 removeStorageBox(...) Remove storage box
8 checkStorage(...) Check if it is a storage box
9 clearStorageBox(...) Clear storage box
10 checkStorageEmptyGrid(...) Check the number of empty grids in storage box. When the item ID is passed in, check if the storage box is empty and if the item in the box
11 setStorageItem(...) Set storage item
12 getStorageItem(...) Get storage item ID
13 addStorageItem(...) Add items to the storage box
14 removeStorageItemByID(...) Remove storage box item by ID
15 removeStorageItemByIndex(...) Remove storage box item by index
16 addItemToContainer(...) Add container items to storage box
17 removeContainerItemByID(...) Remove container items from storage box
18 clearContainer(...) Clear the stirage box at the specified location

# addFurnace

  • Parameters and types:
  • Return value and types:
  • The main role of this method: Add Furnace
  • The specific use cases are as follows:
local result = WorldContainer:addFurnace(x, y, z)

# removeFurnace

  • Parameters and types:
  • Return value and types:
  • The main role of this method: Remove Furnace
  • The specific use cases are as follows:
local result = WorldContainer:removeFurnace(x, y, z)

# checkFurnace

  • Parameters and types:
  • Return value and types:
  • The main role of this method: Check if it is a Furnace
  • The specific use cases are as follows:
local result = WorldContainer:checkFurnace(x, y, z)

# getFurnaceHeatPercent

  • Parameters and types:
  • Return value and types:
  • The main role of this method: Get the Furnace heat percentage
  • The specific use cases are as follows:
local result = WorldContainer:getFurnaceHeatPercent(x, y, z)

# getFurnaceMeltPercent

  • Parameters and types:
  • Return value and types:
  • The main role of this method: Get the melting percentage of the Furnace
  • The specific use cases are as follows:
local result = WorldContainer:getFurnaceMeltPercent(x, y, z)

# addStorageBox

  • Parameters and types:
  • Return value and types:
  • The main role of this method: Add storage box
  • The specific use cases are as follows:
local result = WorldContainer:addStorageBox(x, y, z)

# removeStorageBox

  • Parameters and types:
  • Return value and types:
  • The main role of this method: Remove storage box
  • The specific use cases are as follows:
local result = WorldContainer:removeStorageBox(x, y, z)

# checkStorage

  • Parameters and types:
  • Return value and types:
  • The main role of this method: Check if it is a storage box
  • The specific use cases are as follows:
local result = WorldContainer:checkStorage(x, y, z)

# clearStorageBox

  • Parameters and types:
  • Return value and types:
  • The main role of this method: Clear storage box
  • The specific use cases are as follows:
local result = WorldContainer:clearStorageBox(x, y, z)

# checkStorageEmptyGrid

  • Parameters and types:
  • Return value and types:
  • The main role of this method: Check the number of empty grids in storage box. When the item ID is passed in, check if the storage box is empty and if the item in the box
  • The specific use cases are as follows:
local result = WorldContainer:checkStorageEmptyGrid(x, y, z, itemid)

# setStorageItem

local result = WorldContainer:setStorageItem(x, y, z, offset, itemid, num)

# getStorageItem

  • Parameters and types:
  • Return value and types:
  • The main role of this method: Get storage item ID
  • The specific use cases are as follows:
local result = WorldContainer:getStorageItem(x, y, z, offset)

# addStorageItem

  • Parameters and types:
  • Return value and types:
  • The main role of this method: Add items to the storage box
  • The specific use cases are as follows:
local result = WorldContainer:addStorageItem(x, y, z, itemid, num)

# removeStorageItemByID

  • Parameters and types:
  • Return value and types:
  • The main role of this method: Remove storage box item by ID
  • The specific use cases are as follows:
local result = WorldContainer:removeStorageItemByID(x, y, z, itemid, num)

# removeStorageItemByIndex

  • Parameters and types:
    • x,y,z:numberStorage box location
    • offset:numberStorage box grid index, starting from 0
    • num:numberItem number
  • Return value and types:
  • The main role of this method: Remove storage box item by index
  • The specific use cases are as follows:
local result = WorldContainer:removeStorageItemByIndex(x, y, z, offset, num)

# addItemToContainer

  • Parameters and types:
  • Return value and types:
  • The main role of this method: Add container items to storage box
  • The specific use cases are as follows:
local result = WorldContainer:addItemToContainer(x, y, z, itemid, num)

# removeContainerItemByID

  • Parameters and types:
  • Return value and types:
  • The main role of this method: Remove container items from storage box
  • The specific use cases are as follows:
local result = WorldContainer:removeContainerItemByID(x, y, z, itemid, num)

# clearContainer

  • Parameters and types:
  • Return value and types:
  • The main role of this method: Clear the stirage box at the specified location
  • The specific use cases are as follows:
local result = WorldContainer:clearContainer(x, y, z)
Last Update: 11/22/2019, 2:31:59 PM