Postado Abril 11, 2015 10 anos Queria que alguém passasse esse script para a versão antiga. local config = { {fromPos = Position(32953, 32072, 7), toPos = Position(32963, 32081, 7), townId = 1}, {fromPos = Position(32364, 32231, 7), toPos = Position(32374, 32243, 7), townId = 2}, {fromPos = Position(32642, 31921, 11), toPos = Position(32656, 31929, 11), townId = 3}, {fromPos = Position(32356, 31775, 7), toPos = Position(32364, 31787, 7), townId = 4}, {fromPos = Position(32718, 31628, 7), toPos = Position(32736, 31639, 7), townId = 5}, {fromPos = Position(32313, 32818, 7), toPos = Position(32322, 32830, 7), townId = 7}, {fromPos = Position(32590, 32740, 7), toPos = Position(32600, 32750, 7), townId = 8}, {fromPos = Position(33188, 32844, 8), toPos = Position(33201, 32857, 8), townId = 9}, {fromPos = Position(33210, 32450, 1), toPos = Position(33217, 32457, 1), townId = 10}, {fromPos = Position(33208, 31803, 8), toPos = Position(33225, 31819, 8), townId = 11}, {fromPos = Position(32207, 31127, 7), toPos = Position(32218, 31138, 7), townId = 12}, {fromPos = Position(32785, 31274, 7), toPos = Position(32789, 31279, 7), townId = 13}, {fromPos = Position(33018, 31514, 11), toPos = Position(33032, 31531, 11), townId = 14}, {fromPos = Position(33442, 31312, 9), toPos = Position(33454, 31326, 9), townId = 28}, {fromPos = Position(33510, 32360, 6), toPos = Position(33516, 32366, 6), townId = 29} } function onUse(player, item, fromPosition, target, toPosition, isHotkey) local playerPos, isInTemple, temple, townId = player:getPosition(), false for i = 1, #config do temple = config if isInRange(playerPos, temple.fromPos, temple.toPos) then if Tile(playerPos):hasFlag(TILESTATE_PROTECTIONZONE) then isInTemple, townId = true, temple.townId break end end end if not isInTemple then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'Try to move more to the center of a temple to use the spiritual energy for a teleport.') return true end player:setStorageValue(Storage.AdventurersGuild.Stone, townId) playerPos:sendMagicEffect(CONST_ME_TELEPORT) local destination = Position(32210, 32300, 6) player:teleportTo(destination) destination:sendMagicEffect(CONST_ME_TELEPORT) return true end
Postado Abril 11, 2015 10 anos tenta ai: local config = { {fromPos = {x = 32953, y = 32072, z = 7}, toPos = {x = 32963 y =, 32081, z = 7}, townId = 1}, {fromPos = {x = 32364, y = 32231, z = 7}, toPos = {x = 32374, y = 32243, z = 7}, townId = 2}, {fromPos = {x = 32642, y = 31921, z = 11}, toPos = {x = 32656, y = 31929, z = 11}, townId = 3}, {fromPos = {x = 32356, y = 31775, z = 7}, toPos = {x = 32364, y = 31787, z = 7}, townId = 4}, {fromPos = {x = 32718, y = 31628, z = 7}, toPos = {x = 32736, y = 31639, z = 7}, townId = 5}, {fromPos = {x = 32313, y = 32818, z = 7}, toPos = {x = 32322, y = 32830, z = 7}, townId = 7}, {fromPos = {x = 32590, y = 32740, z = 7}, toPos = {x = 32600, y = 32750, z = 7}, townId = 8}, {fromPos = {x = 33188, y = 32844, z = 8}, toPos = {x = 33201, y = 32857, z = 8}, townId = 9}, {fromPos = {x = 33210, y = 32450, z = 1}, toPos = {x = 33217, y = 32457, z = 1}, townId = 10}, {fromPos = {x = 33208, y = 31803, z = 8}, toPos = {x = 33225, y = 31819, z = 8}, townId = 11}, {fromPos = {x = 32207, y = 31127, z = 7}, toPos = {x = 32218, y = 31138, z = 7}, townId = 12}, {fromPos = {x = 32785, y = 31274, z = 7}, toPos = {x = 32789, y = 31279, z = 7}, townId = 13}, {fromPos = {x = 33018, y = 31514, z = 11}, toPos = {x = 33032, y = 31531, z = 11}, townId = 14}, {fromPos = {x = 33442, y = 31312, z = 9}, toPos = {x = 33454, y = 31326, z = 9}, townId = 28}, {fromPos = {x = 33510, y = 32360, z = 6}, toPos = {x = 33516, y = 32366, z = 6}, townId = 29} } function onUse(cid, item, fromPosition, itemEx, toPosition) local playerPos, isInTemple, temple, townId = getCreaturePosition(cid), false for i = 1, #config do temple = config[i] if isInRange(playerPos, temple.fromPos, temple.toPos) then if getTilePzInfo(playerPos) then isInTemple, townId = true, temple.townId break end end end if not isInTemple then doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, 'Try to move more to the center of a temple to use the spiritual energy for a teleport.') return true end setPlayerStorageValue(cid, Storage.AdventurersGuild.Stone, townId) doSendMagicEffect(playerPos, CONST_ME_TELEPORT) local destination = {x = 32210, 32300, 6) doTeleportThing(cid, destination) doSendMagicEffect(destination, CONST_ME_TELEPORT) return true end Editado Abril 11, 2015 10 anos por fireelement (veja o histórico de edições)
Postado Abril 12, 2015 10 anos Está dando erro Poste o erro pra ele analisar, ou vc quer q ele adivinhe ? '-'
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.