wikutag
SoulBound 8.6 100% custom
Hello
Im currently using tfs 1.0
I get this error from the last man standing event it doesnt broadcast
heres where i got it from :https://otland.net/threads/last-man-standing-event-tfs-1-x-1-0-1-1.224516/
Line 30 and heres the whole thing
Im currently using tfs 1.0
I get this error from the last man standing event it doesnt broadcast
heres where i got it from :https://otland.net/threads/last-man-standing-event-tfs-1-x-1-0-1-1.224516/
Code:
Game.broadcastMessage(string.format('Last Man Standing Event has started and waiting for players to join! Min %s/%s.', lmsConfigTable.minPlayers, lmsConfigTable.maxPlayers), MESSAGE_STATUS_WARNING)
Code:
dofile('data/lmsLib.lua')
local function sendReminderLMSEvent()
Game.broadcastMessage(string.format('Last Man Standing Event has started and waiting for players to join! Min %s/%s.', lmsConfigTable.minPlayers, lmsConfigTable.maxPlayers), MESSAGE_STATUS_WARNING)
end
function onThink(interval, lastExecution)
if #Game.getPlayers() < lmsConfigTable.minPlayers then --Min players is not online, we stop event from executing
return true
end
if not Game.getStorageValue(lmsStatesTable.EVENT_STATE_STORAGE) then
Game.setStorageValue(lmsStatesTable.EVENT_STATE_STORAGE, lmsStatesTable.EVENT_STATE_CLOSED)
end
if Game.getStorageValue(lmsStatesTable.EVENT_STATE_STORAGE) ~= lmsStatesTable.EVENT_STATE_CLOSED then
return true
end
local teleportTile = Tile(lmsTeleportTable.createTeleportPosition):getItemById(lmsTeleportTable.teleportId)
if not teleportTile then
local teleport = Game.createItem(lmsTeleportTable.teleportId, 1, lmsTeleportTable.createTeleportPosition)
if teleport then
teleport:setAttribute(ITEM_ATTRIBUTE_UNIQUEID, lmsTeleportTable.teleportUid)
end
end
Game.setStorageValue(lmsStatesTable.EVENT_STATE_STORAGE, lmsStatesTable.EVENT_STATE_INIT)
Game.setStorageValue(lmsConfigTable.joinedCountStorage, 0)
Game.broadcastMessage(string.format('Last Man Standing Event has started and waiting for players to join! Min %s/%s.', lmsConfigTable.minPlayers, lmsConfigTable.maxPlayers), MESSAGE_STATUS_WARNING)
addEvent(startLMSEvent, lmsConfigTable.waitingMinutes * 60 * 1000)
addEvent(sendReminderLMSEvent, (lmsConfigTable.waitingMinutes / 2) * 60 * 1000)
return true
end
Last edited: