DE

[Encerrado] Ajuda Com Starter.lua

Por Denuvo, 24 de abr. de 2013 em Tópicos Sem Resposta

resolvido
script
8
1.3k
DenuvoD
24 de abril de 2013 às 23:15

Eae caras sussa? então galera tô com um problema aqui no meu starter.lua..

é o seguinte toda vez que escolho um poke inicial ele faz quase tudo certo, da o poke e teleportar

o char certinho, só que está havendo algun bug, que o poke não fica na bag ele vai para o deposit

e diz que eu tenho 6 pokes na bag.. sendo que não tem nenhum.. esse é o problema. quem me ajudar do rep+

 

Erro na distro:

 

 

 

 

[24/04/2013 23:06:02] [Error - Action Interface]

[24/04/2013 23:06:02] data/actions/scripts/starter.lua:onUse

[24/04/2013 23:06:02] Description:

[24/04/2013 23:06:02] (luaDoTransformItem) Item not found

 

 

 

Starter.lua:

 

 

 

 

local starterpokes = {

["Weedle"] = {x = 41, y = 71, z = 7},

["Rattata"] = {x = 45, y = 71, z = 7},

["Caterpie"] = {x = 53, y = 71, z = 7},

["Bellsprout"] = {x = 55, y = 71, z = 7},

["Ledyba"] = {x = 47, y = 71, z = 7},

["Sunkern"] = {x = 51, y = 71, z = 7},

["Pidgey"] = {x = 43, y = 71, z = 7},

["Sentret"] = {x = 57, y = 71, z = 7},

}

 

local btype = "normal"

local newtown = {x = 730, y = 1281, z = 6} -- 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, "Está Vazio!")

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, "Parabéns, Você Tem Seu Primeiro Pokémon. Boa Sorte Em Sua Jornada!")

doPlayerSendTextMessage(cid, 27, "Seu Pokémon Foi Enviado Para Seu Depot!")

doPlayerSendTextMessage(cid, 27, "Não se esqueça de usar a sua Pokedex em todos os pokemon desconhecidos!")

 

addPokeToPlayer(cid, pokemon, 0, nil, btype, true)

doPlayerAddLevel(cid, 1)

setPlayerStorageValue(cid, 9289, 1)

 

doSendMagicEffect(getThingPos(cid), 29)

doTeleportThing(cid, newtown)

doSendMagicEffect(getThingPos(cid), 27)

doSendMagicEffect(getThingPos(cid), 29)

 

 

return true

end

 

 

GabrieltxuG
24 de abril de 2013 às 23:56

Tenta usar esse fera!

 

 

local starterpokes = {

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

["Rattata"] = {x = 51, y = 70, z = 7},

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

["Bellsprout"] = {x = 43, y = 70, z = 7},

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

["Sunkern"] = {x = 47, y = 70, z = 7},

["Pidgey"] = {x = 55, 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

 

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

doSendMagicEffect(getThingPos(cid), 29)

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

doSendMagicEffect(getThingPos(cid), 27)

doSendMagicEffect(getThingPos(cid), 29)

return TRUE

end

 

DenuvoD
25 de abril de 2013 às 22:36

bom esse ai ele tem que falar com o NPC e tbm não move o cara quando abre o bau :s

26 de abril de 2013 às 20:34

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

 

poe o position na primeira linha

firewereF
26 de abril de 2013 às 21:50

qual eo seerve base

Editado Abril 26 por firewere

DenuvoD
27 de abril de 2013 às 10:30

bom eu coloquei para criar e escolher pelo site mesmo.. mais como o danielzikazs

tento ajudar como eu especifiquei o problema vo te dá rep+.

 

Duvida Sanada Reportado Para Que Movam!

SkyLighS
27 de abril de 2013 às 11:25

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.