BR

[Encerrado] (Pedido) Tp Bau

Por BrunooMaciell, 26 de abr. de 2013 em Tópicos Sem Resposta

pedido - poketibia
resolvido
script
7
765
BrunooMaciellB
26 de abril de 2013 às 12:10

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+

RoksasR
26 de abril de 2013 às 12:49

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 por Roksas

BrunooMaciellB
26 de abril de 2013 às 13:37

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>

 

RoksasR
26 de abril de 2013 às 13:42

Mals, errei rsrs. Editei meu post vê la.

BrunooMaciellB
26 de abril de 2013 às 14:27

Duvida Sanada !!

 

Rep+

RoksasR
26 de abril de 2013 às 14:33

Tópico movido para a seção de dúvidas e pedidos resolvidos.

5 anos depois...
StigalS
21 de abril de 2018 às 02:45
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.