BrunooMaciell 84 Postado Abril 26, 2013 Share Postado Abril 26, 2013 Vim aqui pra pedir uma coisa se possivel !! eu queria por tp por bau. Script local starterpokes = { ["Cyndaquil"] = {x = 951, y = 389, z = 7}, ["Charmander"] = {x = 953, y = 389, z = 7}, ["Totodile"] = {x = 956, y = 389, z = 7}, ["Squirtle"] = {x = 958, y = 389, z = 7}, ["Chikorita"] = {x = 961, y = 389, z = 7}, ["Bulbasaur"] = {x = 963, y = 389, z = 7}, } local btype = "normal" function onUse(cid, item, frompos, item2, topos) if getPlayerLevel(cid) > 5 then return true end local pokemon = "" for a, b in pairs (starterpokes) do if isPosEqualPos(topos, b) then pokemon = a end end if pokemon == "" then return true end if getPlayerStorageValue(cid, 9658754) ~= 1 then sendMsgToPlayer(cid, 27, "Talk to the Prof. Robert to choose your beginner city first!") return true end --alterado v1.9 \/ doPlayerSendTextMessage(cid, 27, "You got your first pokemon! You also received some pokeballs to help you in your way.") doPlayerSendTextMessage(cid, 27, "Don't forget to use your pokedex on every undiscovered pokemon!") addPokeToPlayer(cid, pokemon, 0, nil, btype, true) doPlayerAddItem(cid, 2392, 10) doPlayerAddItem(cid, 2152, 10) doPlayerAddItem(cid, 12344, 10) doSendMagicEffect(getThingPos(cid), 29) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) doSendMagicEffect(getThingPos(cid), 27) doSendMagicEffect(getThingPos(cid), 29) return TRUE end Obs: como todo mundo sabe o pda tem o system de npc e ele ta bugado e eu queria entao troca e por tp em bau sem precisa escolher npc so ir la escolhe seu pokemon clica no bau pronto ja e teleportado !! Rep+ Link para o comentário https://xtibia.com/forum/topic/213080-encerrado-pedido-tp-bau/ Compartilhar em outros sites More sharing options...
Roksas 846 Postado Abril 26, 2013 Share Postado Abril 26, 2013 (editado) Qual a posição que vai ser teleportado? Troca por isso: local city_tp = {x = 500, y = 400, z = 7} -- Position tp local starterpokes = { ["Cyndaquil"] = {x = 951, y = 389, z = 7}, ["Charmander"] = {x = 953, y = 389, z = 7}, ["Totodile"] = {x = 956, y = 389, z = 7}, ["Squirtle"] = {x = 958, y = 389, z = 7}, ["Chikorita"] = {x = 961, y = 389, z = 7}, ["Bulbasaur"] = {x = 963, y = 389, z = 7}, } local btype = "normal" function onUse(cid, item, frompos, item2, topos) if getPlayerLevel(cid) > 5 then return true end local pokemon = "" for a, b in pairs (starterpokes) do if isPosEqualPos(topos, b) then pokemon = a end end if pokemon == "" then return true end if getPlayerStorageValue(cid, 9658754) ~= 1 then sendMsgToPlayer(cid, 27, "Talk to the Prof. Robert to choose your beginner city first!") return true end --alterado v1.9 \/ doPlayerSendTextMessage(cid, 27, "You got your first pokemon! You also received some pokeballs to help you in your way.") doPlayerSendTextMessage(cid, 27, "Don't forget to use your pokedex on every undiscovered pokemon!") addPokeToPlayer(cid, pokemon, 0, nil, btype, true) doPlayerAddItem(cid, 2392, 10) doPlayerAddItem(cid, 2152, 10) doPlayerAddItem(cid, 12344, 10) doSendMagicEffect(getThingPos(cid), 29) doTeleportThing(cid, city_tp) doSendMagicEffect(getThingPos(cid), 27) doSendMagicEffect(getThingPos(cid), 29) return TRUE end A primeira linha você coloca as coordenadas pra ond vai ser teleportado. Editado Abril 26, 2013 por Roksas Link para o comentário https://xtibia.com/forum/topic/213080-encerrado-pedido-tp-bau/#findComment-1511019 Compartilhar em outros sites More sharing options...
BrunooMaciell 84 Postado Abril 26, 2013 Autor Share Postado Abril 26, 2013 vou testa aqui ^^ Erro [26/04/2013 13:33:52] [Error - Action Interface] [26/04/2013 13:33:52] data/actions/scripts/starter.lua:onUse [26/04/2013 13:33:52] Description: [26/04/2013 13:33:52] attempt to index a nil value [26/04/2013 13:33:52] stack traceback: [26/04/2013 13:33:52] [C]: in function 'doTeleportThing' [26/04/2013 13:33:52] data/actions/scripts/starter.lua:35: in function <data/actions/scripts/starter.lua:12> Link para o comentário https://xtibia.com/forum/topic/213080-encerrado-pedido-tp-bau/#findComment-1511032 Compartilhar em outros sites More sharing options...
Roksas 846 Postado Abril 26, 2013 Share Postado Abril 26, 2013 Mals, errei rsrs. Editei meu post vê la. Link para o comentário https://xtibia.com/forum/topic/213080-encerrado-pedido-tp-bau/#findComment-1511052 Compartilhar em outros sites More sharing options...
BrunooMaciell 84 Postado Abril 26, 2013 Autor Share Postado Abril 26, 2013 Duvida Sanada !! Rep+ Link para o comentário https://xtibia.com/forum/topic/213080-encerrado-pedido-tp-bau/#findComment-1511065 Compartilhar em outros sites More sharing options...
Roksas 846 Postado Abril 26, 2013 Share Postado Abril 26, 2013 Tópico movido para a seção de dúvidas e pedidos resolvidos. Link para o comentário https://xtibia.com/forum/topic/213080-encerrado-pedido-tp-bau/#findComment-1511068 Compartilhar em outros sites More sharing options...
Stigal 584 Postado Abril 21, 2018 Share Postado Abril 21, 2018 A questão neste tópico de suporte foi encerrada por falta de respostas. Este tópico está fechado e foi movido para Suporte - Tópicos Sem Resposta. + Caso a dúvida não tenha sido resolvida você poderá criar outro tópico solicitando ajuda. * Lembre-se que é permitido dar UP no tópico a cada 24 horas para assim o destacar e manter movimentado. Link para o comentário https://xtibia.com/forum/topic/213080-encerrado-pedido-tp-bau/#findComment-1734254 Compartilhar em outros sites More sharing options...
Posts Recomendados