matheusata55 0 Postado Julho 4, 2015 Share Postado Julho 4, 2015 Galera, quando vou entrar no teleport da warzone, aparece uma mensagem dizendo que nao posso entra naquele teleport, no caso é necessario ter uma missao, como faço pra nao precisar ter missao pra passar no teleport? O arquivo que faz surgir essa mensagem é esse. local destination = {[4121] = {position = Position(32801, 31766, 9), storageValue = 1, needCrystal = true},[3220] = {position = Position(32627, 31863, 11), storageValue = 1, needCrystal = true},[3128] = {position = Position(32840, 32062, 13), storageValue = 14},[3129] = {position = Position(32635, 31954, 10), storageValue = 14},[3130] = {position = Position(32704, 32036, 11), storageValue = 15},[3131] = {position = Position(32643, 31938, 10), storageValue = 15},[3132] = {position = Position(32826, 32054, 9), storageValue = 15}, -- Gnomebase Alpha[3133] = {position = Position(32636, 31973, 10), storageValue = 15}, -- City[3134] = {position = Position(32799, 32145, 9), storageValue = 16}, -- Golems[3135] = {position = Position(32841, 32109, 9), storageValue = 16}, -- Gnomebase Alpha[3136] = {position = Position(32744, 32086, 13), storageValue = 16},[3137] = {position = Position(32819, 32099, 9), storageValue = 16},[35669] = {position = Position(32826, 32056, 9), storageValue = 1}, -- leave warzone 3[3215] = {position = Position(32369, 32241, 7), storageValue = 1, needCrystal = true},[3216] = {position = Position(32212, 31133, 7), storageValue = 1, needCrystal = true},[3217] = {position = Position(32317, 32825, 7), storageValue = 1, needCrystal = true},[3218] = {position = Position(33213, 32454, 1), storageValue = 1, needCrystal = true},[3219] = {position = Position(33217, 31814, 8), storageValue = 1, needCrystal = true}}function onStepIn(creature, item, position, fromPosition)local player = creature:getPlayer()if not player thenreturnendlocal teleportCrystal = destination[item.actionid]if not teleportCrystal thenreturnendif player:getStorageValue(Storage.BigfootBurden.QuestLine) >= teleportCrystal.storageValue thenif not teleportCrystal.needCrystal or player:removeItem(18457, 1) thenplayer:getPosition():sendMagicEffect(CONST_ME_TELEPORT)player:teleportTo(teleportCrystal.position)player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)elseplayer:teleportTo(fromPosition)player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'You need a teleport crystal to use this device.')endreturn trueend-- There is no destination with storageValue == 2, should this check for storage?if teleportCrystal.storageValue == 2 thenplayer:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'You have no idea on how to use this device. Xelvar in Kazordoon might tell you more about it.')elseplayer:teleportTo(fromPosition)player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'Sorry, you don\'t have access to use this teleport!')endreturn trueend @up Link para o comentário Compartilhar em outros sites More sharing options...
Bruno 535 Postado Julho 4, 2015 Share Postado Julho 4, 2015 Fiz uma gambiarra kkkkk local destination = { [4121] = {position = Position(32801, 31766, 9), storageValue = 1, needCrystal = true}, [3220] = {position = Position(32627, 31863, 11), storageValue = 1, needCrystal = true}, [3128] = {position = Position(32840, 32062, 13), storageValue = 14, needCrystal = false}, [3129] = {position = Position(32635, 31954, 10), storageValue = 14, needCrystal = false}, [3130] = {position = Position(32704, 32036, 11), storageValue = 15, needCrystal = false}, [3131] = {position = Position(32643, 31938, 10), storageValue = 15, needCrystal = false}, [3132] = {position = Position(32826, 32054, 9), storageValue = 15, needCrystal = false}, -- Gnomebase Alpha [3133] = {position = Position(32636, 31973, 10), storageValue = 15, needCrystal = false}, -- City [3134] = {position = Position(32799, 32145, 9), storageValue = 16, needCrystal = false}, -- Golems [3135] = {position = Position(32841, 32109, 9), storageValue = 16, needCrystal = false}, -- Gnomebase Alpha [3136] = {position = Position(32744, 32086, 13), storageValue = 16, needCrystal = false}, [3137] = {position = Position(32819, 32099, 9), storageValue = 16, needCrystal = false}, [35669] = {position = Position(32826, 32056, 9), storageValue = 1, needCrystal = false}, -- leave warzone 3 [3215] = {position = Position(32369, 32241, 7), storageValue = 1, needCrystal = true}, [3216] = {position = Position(32212, 31133, 7), storageValue = 1, needCrystal = true}, [3217] = {position = Position(32317, 32825, 7), storageValue = 1, needCrystal = true}, [3218] = {position = Position(33213, 32454, 1), storageValue = 1, needCrystal = true}, [3219] = {position = Position(33217, 31814, 8), storageValue = 1, needCrystal = true} } function onStepIn(creature, item, position, fromPosition) local player = creature:getPlayer() if not player then return end local teleportCrystal = destination[item.actionid] if not teleportCrystal then return end if not teleportCrystal.needCrystal or player:removeItem(18457, 1) then player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) player:teleportTo(teleportCrystal.position) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) return true else player:teleportTo(fromPosition) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'You need a teleport crystal to use this device.') end return true end Link para o comentário Compartilhar em outros sites More sharing options...
matheusata55 0 Postado Julho 4, 2015 Autor Share Postado Julho 4, 2015 Fiz uma gambiarra kkkkk local destination = { [4121] = {position = Position(32801, 31766, 9), storageValue = 1, needCrystal = true}, [3220] = {position = Position(32627, 31863, 11), storageValue = 1, needCrystal = true}, [3128] = {position = Position(32840, 32062, 13), storageValue = 14, needCrystal = false}, [3129] = {position = Position(32635, 31954, 10), storageValue = 14, needCrystal = false}, [3130] = {position = Position(32704, 32036, 11), storageValue = 15, needCrystal = false}, [3131] = {position = Position(32643, 31938, 10), storageValue = 15, needCrystal = false}, [3132] = {position = Position(32826, 32054, 9), storageValue = 15, needCrystal = false}, -- Gnomebase Alpha [3133] = {position = Position(32636, 31973, 10), storageValue = 15, needCrystal = false}, -- City [3134] = {position = Position(32799, 32145, 9), storageValue = 16, needCrystal = false}, -- Golems [3135] = {position = Position(32841, 32109, 9), storageValue = 16, needCrystal = false}, -- Gnomebase Alpha [3136] = {position = Position(32744, 32086, 13), storageValue = 16, needCrystal = false}, [3137] = {position = Position(32819, 32099, 9), storageValue = 16, needCrystal = false}, [35669] = {position = Position(32826, 32056, 9), storageValue = 1, needCrystal = false}, -- leave warzone 3 [3215] = {position = Position(32369, 32241, 7), storageValue = 1, needCrystal = true}, [3216] = {position = Position(32212, 31133, 7), storageValue = 1, needCrystal = true}, [3217] = {position = Position(32317, 32825, 7), storageValue = 1, needCrystal = true}, [3218] = {position = Position(33213, 32454, 1), storageValue = 1, needCrystal = true}, [3219] = {position = Position(33217, 31814, 8), storageValue = 1, needCrystal = true} } function onStepIn(creature, item, position, fromPosition) local player = creature:getPlayer() if not player then return end local teleportCrystal = destination[item.actionid] if not teleportCrystal then return end if not teleportCrystal.needCrystal or player:removeItem(18457, 1) then player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) player:teleportTo(teleportCrystal.position) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) return true else player:teleportTo(fromPosition) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'You need a teleport crystal to use this device.') end return true end está acontecendo a mesma coisa porem nao aparece a mensagem.. Link para o comentário Compartilhar em outros sites More sharing options...
Bruno 535 Postado Julho 5, 2015 Share Postado Julho 5, 2015 está acontecendo a mesma coisa porem nao aparece a mensagem.. Não faz sentido, tirei a validação por storage, agora ele só verifica se precisa de crystal... Agora tirei até da configuração a variável: local destination = { [4121] = {position = Position(32801, 31766, 9), needCrystal = true}, [3220] = {position = Position(32627, 31863, 11), needCrystal = true}, [3128] = {position = Position(32840, 32062, 13), needCrystal = false}, [3129] = {position = Position(32635, 31954, 10), needCrystal = false}, [3130] = {position = Position(32704, 32036, 11), needCrystal = false}, [3131] = {position = Position(32643, 31938, 10), needCrystal = false}, [3132] = {position = Position(32826, 32054, 9), needCrystal = false}, -- Gnomebase Alpha [3133] = {position = Position(32636, 31973, 10), needCrystal = false}, -- City [3134] = {position = Position(32799, 32145, 9), needCrystal = false}, -- Golems [3135] = {position = Position(32841, 32109, 9), needCrystal = false}, -- Gnomebase Alpha [3136] = {position = Position(32744, 32086, 13), needCrystal = false}, [3137] = {position = Position(32819, 32099, 9), needCrystal = false}, [35669] = {position = Position(32826, 32056, 9), needCrystal = false}, -- leave warzone 3 [3215] = {position = Position(32369, 32241, 7), needCrystal = true}, [3216] = {position = Position(32212, 31133, 7), needCrystal = true}, [3217] = {position = Position(32317, 32825, 7), needCrystal = true}, [3218] = {position = Position(33213, 32454, 1), needCrystal = true}, [3219] = {position = Position(33217, 31814, 8), needCrystal = true} } function onStepIn(creature, item, position, fromPosition) local player = creature:getPlayer() if not player then return end local teleportCrystal = destination[item.actionid] if not teleportCrystal then return end if not teleportCrystal.needCrystal or player:removeItem(18457, 1) then player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) player:teleportTo(teleportCrystal.position) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) return true else player:teleportTo(fromPosition) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'You need a teleport crystal to use this device.') end return true end Link para o comentário Compartilhar em outros sites More sharing options...
Bruno 535 Postado Agosto 3, 2015 Share Postado Agosto 3, 2015 O tópico foi fechado e movido para lixeira por estar inativo a mais de 10 dias. Caso seja preciso reabrir o mesmo, favor entrar em contato com a equipe. Link para o comentário Compartilhar em outros sites More sharing options...
Posts Recomendados