Postado Abril 5, 2018 7 anos local config = { requiredLevel = 1, daily = true, centerRazzagornRoomPosition = Position(33423, 32466, 14), playerPositions = { Position(33388, 32457, 14) }, newPositions = { Position(33417, 32467, 14), Position(33417, 32467, 14), Position(33417, 32467, 14), Position(33417, 32467, 14), Position(33417, 32467, 14) }, RazzagornPositions = { Position(33425, 32466, 14) } } function onUse(player, item, fromPosition, target, toPosition, isHotkey) if item.itemid == 9825 then local storePlayers, playerTile = {} for i = 1, #config.playerPositions do playerTile = Tile(config.playerPositions[i]):getTopCreature() if not playerTile or not playerTile:isPlayer() then player:sendTextMessage(MESSAGE_STATUS_SMALL, "You need 5 players.") return true end if playerTile:getLevel() < config.requiredLevel then player:sendTextMessage(MESSAGE_STATUS_SMALL, "All the players need to be level ".. config.requiredLevel .." or higher.") return true end storePlayers[#storePlayers + 1] = playerTile end local specs, spec = Game.getSpectators(config.centerRazzagornRoomPosition, false, false, 22, 22, 22, 22) for i = 1, #specs do spec = specs[i] if spec:isPlayer() then player:sendTextMessage(MESSAGE_STATUS_SMALL, "A team is already inside the quest room.") return true end spec:remove() end for i = 1, #config.RazzagornPositions do Game.createMonster("Razzagorn", config.RazzagornPositions[i]) end local players for i = 1, #storePlayers do players = storePlayers[i] config.playerPositions[i]:sendMagicEffect(CONST_ME_POFF) players:teleportTo(config.newPositions[i]) config.newPositions[i]:sendMagicEffect(CONST_ME_ENERGYAREA) players:setDirection(DIRECTION_EAST) end elseif item.itemid == 9825 then if config.daily then player:sendTextMessage(MESSAGE_STATUS_SMALL, Game.getReturnMessage(RETURNVALUE_NOTPOSSIBLE)) return true end end item:transform(item.itemid == 9826 and 9825 or 9826) return true end Alguem me ajuda colocar um cooldown de 48 horas nesse script
Postado Abril 5, 2018 7 anos local config = { time = 120 -- em segundos requiredLevel = 1, daily = true, centerRazzagornRoomPosition = Position(33423, 32466, 14), playerPositions = { Position(33388, 32457, 14) }, newPositions = { Position(33417, 32467, 14), Position(33417, 32467, 14), Position(33417, 32467, 14), Position(33417, 32467, 14), Position(33417, 32467, 14) }, RazzagornPositions = { Position(33425, 32466, 14) } } function onUse(player, item, fromPosition, target, toPosition, isHotkey) if item.itemid == 9825 then if getGlobalStorageValue(56789) == 1 then return player:sendTextMessage(MESSAGE_STATUS_SMALL, "You can not access this quest, please wait ...") end local storePlayers, playerTile = {} for i = 1, #config.playerPositions do playerTile = Tile(config.playerPositions[i]):getTopCreature() if not playerTile or not playerTile:isPlayer() then player:sendTextMessage(MESSAGE_STATUS_SMALL, "You need 5 players.") return true end if playerTile:getLevel() < config.requiredLevel then player:sendTextMessage(MESSAGE_STATUS_SMALL, "All the players need to be level ".. config.requiredLevel .." or higher.") return true end storePlayers[#storePlayers + 1] = playerTile end local specs, spec = Game.getSpectators(config.centerRazzagornRoomPosition, false, false, 22, 22, 22, 22) for i = 1, #specs do spec = specs[i] if spec:isPlayer() then player:sendTextMessage(MESSAGE_STATUS_SMALL, "A team is already inside the quest room.") return true end spec:remove() end for i = 1, #config.RazzagornPositions do Game.createMonster("Razzagorn", config.RazzagornPositions[i]) end local players setGlobalStorageValue(56789,1) addEvent(setGlobalStorageValue,config.time*1000,56789,0) for i = 1, #storePlayers do players = storePlayers[i] config.playerPositions[i]:sendMagicEffect(CONST_ME_POFF) players:teleportTo(config.newPositions[i]) config.newPositions[i]:sendMagicEffect(CONST_ME_ENERGYAREA) players:setDirection(DIRECTION_EAST) end elseif item.itemid == 9825 then if config.daily then player:sendTextMessage(MESSAGE_STATUS_SMALL, Game.getReturnMessage(RETURNVALUE_NOTPOSSIBLE)) return true end end item:transform(item.itemid == 9826 and 9825 or 9826) return true end Te ajudei ?? Que tal fazer uma contribuição ?
Postado Abril 5, 2018 7 anos 8 horas atrás, JofreCorreia disse: Alguem me ajuda colocar um cooldown de 48 horas nesse script Como assim? Cooldown na alavanca ou nos players que acessaram a quest?
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.