Functions
Function List
registerLuaCommand
Register a new Lua command
Parameters
registerData
registerLuaCommand(registerData)addDailyOfferPurchased
Adds a daily offer purchased.
Parameters
userIDitemID
addDailyOfferPurchased(userID, itemID)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)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)createRedeemCode
Creates a redeem code dynamically. Returns the code string or empty string on failure.
Parameters
redeemData
createRedeemCode(redeemData)getActiveDailyOffers
Returns the active daily offers.
getActiveDailyOffers()getActiveWorlds
Returns a table of all currently loaded (active) worlds.
getActiveWorlds()getAllPlayers
Returns a list of all players who have ever logged in.
getAllPlayers()getAmount
Returns the amount.
getAmount()getBlessingInfo
Returns the information/description of a blessing by its ID.
Parameters
blessing_id
getBlessingInfo(blessing_id)getBlessingName
Returns the name of a blessing by its ID.
Parameters
blessing_id
getBlessingName(blessing_id)getBlessingRarity
Returns the rarity of a blessing by its ID.
Parameters
blessing_id
getBlessingRarity(blessing_id)getCategory
Returns the category of the item.
getCategory()getCurrentDailyEventDescription
Returns the current daily event's description.
getCurrentDailyEventDescription()getCurrentEventDescription
Returns the current event's description.
getCurrentEventDescription()getCurrentRoleDayDescription
Returns the current role day's description.
getCurrentRoleDayDescription()getCurrentServerDailyEvent
Returns the current server's daily event.
getCurrentServerDailyEvent()getDescription
Returns the description.
getDescription()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)getEnumItem
Gets an item by its enum name (e.g., "ITEM_DIRT"). Returns an item object.
Parameters
enumName
getEnumItem(enumName)getEventOffers
Returns the event offers.
getEventOffers()getExpireTime
Returns the Expire Time.
getExpireTime()getHighestPriorityRole
Returns the role object with the highest priority.
getHighestPriorityRole()getIOTMItem
Returns the IOTM item.
getIOTMItem()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()getItemsDescription
Returns the items description.
getItemsDescription()getJimDailyQuest
Returns the Jim Daily Quest object. Contains jimDaily.firstItemID, jimDaily.firstItemCount, etc.
getJimDailyQuest()getMaxLevel
Returns the maximum player level configured on the server.
getMaxLevel()getNewsBanner
Returns the news banner.
getNewsBanner()getNewsBannerDimensions
Returns the news banner dimensions.
getNewsBannerDimensions()getPlayer
Returns the player object for a given user ID, if they are online.
Parameters
userID
getPlayer(userID)getPlayerByName
Returns the player object for a given name, if they are online.
Parameters
name
getPlayerByName(name)getPrice
Returns the price of the item.
getPrice()getRealGTItemsCount
Returns the real GT items count.
getRealGTItemsCount()getRequiredEvent
Returns the required event.
getRequiredEvent()getRoles
Returns a table containing all server roles.
getRoles()getServerCurrentEvent
Returns the ID of the current server-wide event.
getServerCurrentEvent()getServerID
Returns server ID.
getServerID()getServerName
Returns the server name.
getServerName()getServerPlayers
Returns a table of all online players on the server.
getServerPlayers()getStoreItems
Returns the store items.
getStoreItems()getTexture
Returns the texture.
getTexture()getTexturePosX
Returns the texture position X.
getTexturePosX()getTexturePosY
Returns the texture position Y.
getTexturePosY()getTitle
Returns the title.
getTitle()getTodaysDate
Returns the Date.
getTodaysDate()getTodaysEvents
Returns the Event of that day.
getTodaysEvents()getTopPlayerByBalance
Returns the top player by balance.
getTopPlayerByBalance()getTopWorldByVisitors
Returns the top world by visitors.
getTopWorldByVisitors()hideWorldMenuDefaultSpecialWorlds
Pass 1 to hide default worlds like LOCKE, 0 to show.
Parameters
hide
hideWorldMenuDefaultSpecialWorlds(hide)loadDataFromServer
Loads a previously saved Lua table from the server.
Parameters
key
loadDataFromServer(key)loadStringFromServer
Loads a string value from the server.
Parameters
key
loadStringFromServer(key)onPurchaseItem
Firing the purchase item event.
Parameters
playeritembool
onPurchaseItem(player, item, bool)onPurchaseItemReq
Firing the purchase item request event.
Parameters
playeritemID
onPurchaseItemReq(player, itemID)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)registerLuaEvent
Registers a custom server-wide event.
Parameters
eventData
registerLuaEvent(eventData)registerLuaPlaymod
Registers the Lua playmod.
Parameters
PLAYMODDATA
registerLuaPlaymod(PLAYMODDATA)reloadScripts
Reloads all Lua scripts.
reloadScripts()removeWorldMenuWorld
Removes a world from the main menu list.
Parameters
worldID
removeWorldMenuWorld(worldID)saveDataToServer
Saves a Lua table to the server with a specific key.
Parameters
keydataTable
saveDataToServer(key, dataTable)saveStringToServer
Saves a string value to the server.
Parameters
keyvalue
saveStringToServer(key, value)setBroadcastWorld
Sets the global broadcast world for all players.
Parameters
worldName
setBroadcastWorld(worldName)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)worldExists
Checks if a world with the given name already exists on the server.
Parameters
name
worldExists(name)