MA

[Encerrado] Erro Starter. pda 1.9

Por MauricioPC, 19 de abr. de 2013 em Tópicos Sem Resposta

resolvido
13
1.3k
MauricioPCM
19 de abril de 2013 às 16:39

É o seguinte... meu starter do pda 1.9 está dando um bug de teleport, ou seja qndo eu pego meu primeiro pokemon ele vem só que nao teleporta para a city do player... que seria o templo (Saffron)...

 

ai vai meu starter...

 

local starterpokes = {

["Charmander"] = {x = 53, y = 70, z = 7},

["Bulbasaur"] = {x = 45, y = 70, z = 7},

["Squirtle"] = {x = 49, y = 70, 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

 

 

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, 2394, 10)

doPlayerAddLevel(cid, 20)

doPlayAddItem(cid, 2160, 2)

 

doSendMagicEffect(getThingPos(cid), 29)

doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))

doSendMagicEffect(getThingPos(cid), 27)

doSendMagicEffect(getThingPos(cid), 29)

 

 

return TRUE

end

 

StyloMaldosoS
19 de abril de 2013 às 16:55

taloco,forum bugado da poha,bye

Editado Abril 19 por StyloMaldoso

RoksasR
19 de abril de 2013 às 17:01

Tenta assim amigão:

 

 

local starterpokes = {
["Charmander"] = {x = 53, y = 70, z = 7},
["Bulbasaur"] = {x = 45, y = 70, z = 7},
["Squirtle"] = {x = 49, y = 70, 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


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, 2394, 10)
doPlayerAddLevel(cid, 20)
doPlayAddItem(cid, 2160, 2)

doSendMagicEffect(getThingPos(cid), 29)
doPlayerSetTown(cid, getTownId("Saffron"))
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
doSendMagicEffect(getThingPos(cid), 27)
doSendMagicEffect(getThingPos(cid), 29)


return TRUE
end

 

Editado Abril 19 por Roksas

StyloMaldosoS
19 de abril de 2013 às 17:15

Tenta assim amigão:

 

 

local starterpokes = {
["Charmander"] = {x = 53, y = 70, z = 7},
["Bulbasaur"] = {x = 45, y = 70, z = 7},
["Squirtle"] = {x = 49, y = 70, 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


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, 2394, 10)
doPlayerAddLevel(cid, 20)
doPlayAddItem(cid, 2160, 2)

doSendMagicEffect(getThingPos(cid), 29)
doPlayerSetTown(cid, getTownId("Saffron"))
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
doSendMagicEffect(getThingPos(cid), 27)
doSendMagicEffect(getThingPos(cid), 29)


return TRUE
end

 

pq tu deu rep - em min?

eu tinha arrumado o script e tinha postado ali mais tava ficando bugado, n ta vendo "EDITADO" ALI ? vo fala nada, equipe não vé e chega dando rep..é oq da decha 'crianças' ter o poder de da rep - :]

RoksasR
19 de abril de 2013 às 17:19

taloco,forum bugado da poha,bye

 

Mais crianças são as que se estressam e acabam chingando desnecessáriamente :D

StyloMaldosoS
19 de abril de 2013 às 17:20

Apartir que você não presta anteção doque você faz, mereçe ter respeito nenhum (:

firewereF
19 de abril de 2013 às 18:43

nossa cara onde achou este script esta aonde ??

MauricioPCM
19 de abril de 2013 às 23:15

@Roksas não deu certo ele continua sem teleportar e posso pegar qntos pokes eu quiser =/

RoksasR
20 de abril de 2013 às 09:31

Faça assim então:

 

 

local starterpokes = {

["Charmander"] = {x = 53, y = 70, z = 7},

["Bulbasaur"] = {x = 45, y = 70, z = 7},

["Squirtle"] = {x = 49, y = 70, z = 7},

}

 

local btype = "normal"

local newtown = {x = 500, y = 400, z = 7} -- Position to teleport!

 

function onUse(cid, item, frompos, item2, topos)

 

if getPlayerLevel(cid) > 5 then

return true

end

 

if getPlayerStorageValue(cid, 9289) > -1 then

doPlayerSendTextMessage(cid, 27, "I'ts empty!")

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

 

 

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, 2394, 10)

doPlayerAddLevel(cid, 20)

doPlayAddItem(cid, 2160, 2)

setPlayerStorageValue(cid, 9289, 1)

 

doSendMagicEffect(getThingPos(cid), 29)

doTeleportThing(cid, newtown)

doSendMagicEffect(getThingPos(cid), 27)

doSendMagicEffect(getThingPos(cid), 29)

 

 

return true

end

 

 

Em vermelho coloca as coordenadas de algum templo, saffron, cerulean, oque quiser!

MauricioPCM
20 de abril de 2013 às 23:20

@Roksas vlw por ter ajudado :)

 

 

Podem fechar o tópico :)

RoksasR
21 de abril de 2013 às 10:14

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

RoksasR
21 de abril de 2013 às 10:14

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.