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









info
Grupo: Conde
Registrado: 30/04/11
Posts: 658
Reputação: +71
Gênero: Masculino
Char no Tibia: ExTibiano
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