Postado Setembro 25, 2015 10 anos script: 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 TFs 1.x Alguém? REP nas respostas
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.