Postado Maio 4, 2018 7 anos local config = { requiredLevel = 100, daily = false, playerPositions = { Position(33010, 31660, 14), Position(33010, 31661, 14), Position(33010, 31662, 14), Position(33010, 31663, 14), Position(33010, 31664, 14) }, newPositions = { Position(32974, 31670, 14), Position(32975, 31670, 14), Position(32976, 31670, 14), Position(32977, 31670, 14), Position(32978, 31670, 14) }, BossPositions = { Position(32977, 31658, 14) } } local check, hours, storage = true, 24, 574984 function onUse(player, item, fromPosition, target, toPosition, isHotkey) if item.itemid == 1946 then local storePlayers, playerTile = {} for i = 1, #config.playerPositions do playerTile = Tile(config.playerPositions):getTopCreature() if playerTile and not playerTile:isPlayer() then -- pra n ir summon 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 if check and playerTile:getStorageValue(storage) - os.time() > 0 then player:sendCancelMessage("The chest is empty, come back tomorrow for a new reward.") return true end storePlayers[#storePlayers + 1] = playerTile end for i = 1, #config.BossPositions do Game.createMonster("The Time Guardian", config.BossPositions) end local players for i = 1, #storePlayers do players = storePlayers config.playerPositions:sendMagicEffect(CONST_ME_POFF) players:teleportTo(config.newPositions) players:setStorageValue(storage, os.time()+hours*3600) config.newPositions:sendMagicEffect(CONST_ME_ENERGYAREA) players:setDirection(DIRECTION_EAST) end elseif item.itemid == 1945 then if config.daily then player:sendTextMessage(MESSAGE_STATUS_SMALL, Game.getReturnMessage(RETURNVALUE_NOTPOSSIBLE)) return true end end item:transform(item.itemid == 1946 and 1945 or 1946) return true end [*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*] DISCORD: vodkart#6090
Postado Maio 4, 2018 7 anos Autor Agora apareceu um erro [Warning - Event::checkScript] Can not load script: scripts/hallsofhope/lever.lua data/actions/scripts/hallsofhope/lever.lua:62: unexpected symbol near char(239)
Postado Maio 4, 2018 7 anos 1 hora atrás, Obito disse: Agora apareceu um erro [Warning - Event::checkScript] Can not load script: scripts/hallsofhope/lever.lua data/actions/scripts/hallsofhope/lever.lua:62: unexpected symbol near char(239) que estranho, como se tivesse caracteres especiais dentro do código... tenta assim: local config = { requiredLevel = 100, daily = false, playerPositions = { Position(33010, 31660, 14), Position(33010, 31661, 14), Position(33010, 31662, 14), Position(33010, 31663, 14), Position(33010, 31664, 14) }, newPositions = { Position(32974, 31670, 14), Position(32975, 31670, 14), Position(32976, 31670, 14), Position(32977, 31670, 14), Position(32978, 31670, 14) }, BossPositions = { Position(32977, 31658, 14) } } local check, hours, storage = true, 24, 574984 function onUse(player, item, fromPosition, target, toPosition, isHotkey) if item.itemid == 1946 then local storePlayers, playerTile = {} for i = 1, #config.playerPositions do playerTile = Tile(config.playerPositions):getTopCreature() if playerTile and not playerTile:isPlayer() then -- pra n ir summon 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 if check and playerTile:getStorageValue(storage) >= os.time() then player:sendTextMessage(MESSAGE_STATUS_SMALL, "The chest is empty, come back tomorrow for a new reward.") return true end storePlayers[#storePlayers + 1] = playerTile end for i = 1, #config.BossPositions do Game.createMonster("The Time Guardian", config.BossPositions) end local players for i = 1, #storePlayers do players = storePlayers config.playerPositions:sendMagicEffect(CONST_ME_POFF) players:teleportTo(config.newPositions) players:setStorageValue(storage, os.time()+hours*3600) config.newPositions:sendMagicEffect(CONST_ME_ENERGYAREA) players:setDirection(DIRECTION_EAST) end elseif item.itemid == 1945 then if config.daily then player:sendTextMessage(MESSAGE_STATUS_SMALL, Game.getReturnMessage(RETURNVALUE_NOTPOSSIBLE)) return true end end item:transform(item.itemid == 1946 and 1945 or 1946) return true end [*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*] DISCORD: vodkart#6090
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.