Functions
Function List
getItem
Returns the global item data object for a given item ID.
Parameters
itemID
getItem(itemID)getItemsCount
Returns the total number of items loaded in the server.
getItemsCount()getPlayerByName
Returns the player object for a given name, if they are online.
Parameters
name
getPlayerByName(name)getPlayer
Returns the player object for a given user ID, if they are online.
Parameters
userID
getPlayer(userID)getServerCurrentEvent
Returns the ID of the current server-wide event.
getServerCurrentEvent()reloadScripts
Reloads all Lua scripts.
reloadScripts()getServerName
Returns the server name.
getServerName()addWorldMenuWorld
Adds a world to the main menu world list. Priority 1 is before special worlds, 0 is after.
Parameters
worldIDdisplayNamecolorpriority
addWorldMenuWorld(worldID, displayName, color, priority)removeWorldMenuWorld
Removes a world from the main menu list.
Parameters
worldID
removeWorldMenuWorld(worldID)hideWorldMenuDefaultSpecialWorlds
Pass 1 to hide default worlds like LOCKE, 0 to show.
Parameters
hide
hideWorldMenuDefaultSpecialWorlds(hide)getServerPlayers
Returns a table of all online players on the server.
getServerPlayers()loadDataFromServer
Loads a previously saved Lua table from the server.
Parameters
key
loadDataFromServer(key)saveDataToServer
Saves a Lua table to the server with a specific key.
Parameters
keydataTable
saveDataToServer(key, dataTable)loadStringFromServer
Loads a string value from the server.
Parameters
key
loadStringFromServer(key)saveStringToServer
Saves a string value to the server.
Parameters
keyvalue
saveStringToServer(key, value)getAllPlayers
Returns a list of all players who have ever logged in.
getAllPlayers()getMaxLevel
Returns the maximum player level configured on the server.
getMaxLevel()registerLuaEvent
Registers a custom server-wide event.
Parameters
eventData
registerLuaEvent(eventData)addSidebarButton
Adds a button to the player's sidebar UI using a JSON string.
Parameters
buttonJson
addSidebarButton(buttonJson)addSocialPortalButton
Adds a button to the social portal.
Parameters
buttonDefcallback
addSocialPortalButton(buttonDef, callback)getTopPlayerByBalance
Returns the top player by balance.
getTopPlayerByBalance()getTopWorldByVisitors
Returns the top world by visitors.
getTopWorldByVisitors()getActiveWorlds
Returns a table of all currently loaded (active) worlds.
getActiveWorlds()parseText
Converts a pipe-delimited string (e.g., "key|value") into a table. Example: local data = parseText("name|John"); print(data["name"]).
Parameters
text
parseText(text)setGemEvent
Starts a server-wide gem event. A multiplier of 0 or 1 stops the event.
Parameters
multiplier
setGemEvent(multiplier)setXPEvent
Starts a server-wide XP event. A multiplier of 0 or 1 stops the event.
Parameters
multiplier
setXPEvent(multiplier)getRequiredEvent
Returns the required event.
getRequiredEvent()getCurrentServerDailyEvent
Returns the current server's daily event.
getCurrentServerDailyEvent()getTitle
Returns the title.
getTitle()getAmount
Returns the amount.
getAmount()getIOTMItem
Returns the IOTM item.
getIOTMItem()getPrice
Returns the price of the item.
getPrice()addDailyOfferPurchased
Adds a daily offer purchased.
Parameters
userIDitemID
addDailyOfferPurchased(userID, itemID)getCategory
Returns the category of the item.
getCategory()getRealGTItemsCount
Returns the real GT items count.
getRealGTItemsCount()getTexture
Returns the texture.
getTexture()getEventOffers
Returns the event offers.
getEventOffers()getActiveDailyOffers
Returns the active daily offers.
getActiveDailyOffers()onPurchaseItem
Firing the purchase item event.
Parameters
playeritembool
onPurchaseItem(player, item, bool)getDescription
Returns the description.
getDescription()getItemsDescription
Returns the items description.
getItemsDescription()getTexturePosX
Returns the texture position X.
getTexturePosX()getTexturePosY
Returns the texture position Y.
getTexturePosY()onPurchaseItemReq
Firing the purchase item request event.
Parameters
playeritemID
onPurchaseItemReq(player, itemID)getStoreItems
Returns the store items.
getStoreItems()registerLuaPlaymod
Registers the Lua playmod.
Parameters
PLAYMODDATA
registerLuaPlaymod(PLAYMODDATA)getExpireTime
Returns the Expire Time.
getExpireTime()getNewsBanner
Returns the news banner.
getNewsBanner()getNewsBannerDimensions
Returns the news banner dimensions.
getNewsBannerDimensions()getTodaysDate
Returns the Date.
getTodaysDate()getTodaysEvents
Returns the Event of that day.
getTodaysEvents()getCurrentEventDescription
Returns the current event's description.
getCurrentEventDescription()getCurrentDailyEventDescription
Returns the current daily event's description.
getCurrentDailyEventDescription()getCurrentRoleDayDescription
Returns the current role day's description.
getCurrentRoleDayDescription()getServerID
Returns server ID.
getServerID()worldExists
Checks if a world with the given name already exists on the server.
Parameters
name
worldExists(name)getBlessingName
Returns the name of a blessing by its ID.
Parameters
blessing_id
getBlessingName(blessing_id)getBlessingInfo
Returns the information/description of a blessing by its ID.
Parameters
blessing_id
getBlessingInfo(blessing_id)getBlessingRarity
Returns the rarity of a blessing by its ID.
Parameters
blessing_id
getBlessingRarity(blessing_id)setBroadcastWorld
Sets the global broadcast world for all players.
Parameters
worldName
setBroadcastWorld(worldName)getRoles
Returns a table containing all server roles.
getRoles()getHighestPriorityRole
Returns the role object with the highest priority.
getHighestPriorityRole()getEcoQuantity
Returns the total count of an item in the economy (players + worlds).
Parameters
itemID
getEcoQuantity(itemID)getEcoQuantityPlayers
Returns the total count of an item held by players.
Parameters
itemID
getEcoQuantityPlayers(itemID)getEcoQuantityWorlds
Returns the total count of an item placed or stored in worlds.
Parameters
itemID
getEcoQuantityWorlds(itemID)createRedeemCode
Creates a redeem code dynamically. Returns the code string or empty string on failure.
Parameters
redeemData
createRedeemCode(redeemData)getJimDailyQuest
Returns the Jim Daily Quest object. Contains jimDaily.firstItemID, jimDaily.firstItemCount, etc.
getJimDailyQuest()deleteAccount
Invalidates user data, effectively deleting the account. Owned worlds/items will show "ERROR" as owner.
Parameters
userID
deleteAccount(userID)deleteWorld
Invalidates world data, effectively deleting the world.
Parameters
worldID
deleteWorld(worldID)getServerDefaultPort
Returns the default port the server is running on.
getServerDefaultPort()registerLuaDailyEvent
Register Custom Daily Event
Parameters
DailyEventData
registerLuaDailyEvent(DailyEventData)registerLuaCommand
Register a new Lua command
Parameters
CommandData
registerLuaCommand(CommandData)require
Loads / Import a Lua module
Parameters
moduleName
require(moduleName)