Deve ter o código dos pokes iniciais, você tem? O script.
- Fórum
- OTServ
- Suporte
- Tópicos Sem Resposta
- [Encerrado] [AJUDA] Pokes iniciais
[Encerrado] [AJUDA] Pokes iniciais
Por rauanv, 11 de mai. de 2013 em Tópicos Sem Resposta
info
Grupo: Herói
Registrado: 14/12/10
Posts: 3.6k
Reputação: +846
Gênero: Masculino

O que ta no starter.lua é isso
local starterpokes = {
["Bulbasaur"] = {x = 45, y = 70, z = 7},
["Charmander"] = {x = 43, y = 70, z = 7},
["Squirtle"] = {x = 47, y = 70, z = 7},
["Chikorita"] = {x = 51, y = 70, z = 7}, --alterado 2.7 -soh pegue se for usar o mapa do stigal!-
["Totodile"] = {x = 53, y = 70, z = 7},
["Cyndaquil"] = {x = 49, y = 70, z = 7},
}
local level = 5
local extrastr = 1.5
local btype = "normal"
function onUse(cid, item, frompos, item2, topos)
if getPlayerLevel(cid) > 10 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
local gender = getRandomGenderByName(pokemon)
local mypoke = getPokemonStatus(pokemon)
if not mypoke then return true end
local offense = mypoke.off * level * extrastr
local defense = mypoke.def * level * extrastr
local speed = mypoke.agi * level * extrastr
local vit = mypoke.vit * level * extrastr
local spatk = mypoke.spatk * level * extrastr
local happy = 180
local leveltable = getPokemonExperienceTable(pokemon)
doPlayerAddItem(cid, 2394, 10)
local item = doCreateItemEx(2219)
doItemSetAttribute(item, "poke", pokemon)
doItemSetAttribute(item, "hp", 1)
doItemSetAttribute(item, "level", level)
doItemSetAttribute(item, "exp", leveltable[level])
doItemSetAttribute(item, "nextlevelexp", leveltable[level+1] - leveltable[level])
doItemSetAttribute(item, "offense", offense)
doItemSetAttribute(item, "defense", defense)
doItemSetAttribute(item, "speed", speed)
doItemSetAttribute(item, "vitality", vit)
doItemSetAttribute(item, "specialattack", spatk)
doItemSetAttribute(item, "happy", happy)
doItemSetAttribute(item, "gender", gender)
doItemSetAttribute(item, "description", "Contains a "..pokemon..".")
doItemSetAttribute(item, "fakedesc", "Contains a "..pokemon..".")
doItemSetAttribute(item, "unique", getCreatureName(cid)) --alterado v2.6
doPlayerAddItemEx(cid, item, true)
doTransformItem(item, pokeballs[btype].on)
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!")
doSendMagicEffect(getThingPos(cid), 29)
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
doSendMagicEffect(getThingPos(cid), 27)
doSendMagicEffect(getThingPos(cid), 29)
return TRUE
end
E ja tentei procurar id dos pokemons para tentar colocar no bau pelo remeres, mas nao achei !!
info
Grupo: Herói
Registrado: 14/12/10
Posts: 3.6k
Reputação: +846
Gênero: Masculino

Abre o actions.xml com o bloco de notas e cole isso dentro:
<action uniqueid="15309" event="script" value="starter.lua"/>
Aí no map editor, você põe UNIQUE ID 15309 no baú.
é pra colocar em todos os baus esse uniqueID ?
______________
Não Deu certo
Editado Maio 11 por rauanv
info
Grupo: Herói
Registrado: 14/12/10
Posts: 3.6k
Reputação: +846
Gênero: Masculino

Tem mais de um baú é? Tem que reiniciar o server cara!
Editado Maio 11 por Roksas
Tem po kkk são os baus iniciais
Charmander
Squirtle
Bulbasaur
Chikorita
Cyndaquil
Totodile
Vou reiniciar, mudar o config.lua de novo, e ver se deu certo !
Mano, não deu certo, eu exclui a pasta toda, arrumei o config.lua, e os baus ainda estão vazios
Editado Maio 11 por rauanv
info
Grupo: Visconde
Registrado: 07/02/12
Posts: 427
Reputação: +112

local starterpokes = {
["Bulbasaur"] = {x = 45, y = 70, z = 7},
["Charmander"] = {x = 43, y = 70, z = 7},
["Squirtle"] = {x = 47, y = 70, z = 7},
["Chikorita"] = {x = 51, y = 70, z = 7}, --alterado 2.7 -soh pegue se for usar o mapa do stigal!-
["Totodile"] = {x = 53, y = 70, z = 7},
["Cyndaquil"] = {x = 49, y = 70, z = 7},
}
local level = 5
local extrastr = 1.5
local btype = "normal"
function onUse(cid, item, frompos, item2, topos)
if getPlayerLevel(cid) > 10 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
local gender = getRandomGenderByName(pokemon)
local mypoke = getPokemonStatus(pokemon)
if not mypoke then return true end
local offense = mypoke.off * level * extrastr
local defense = mypoke.def * level * extrastr
local speed = mypoke.agi * level * extrastr
local vit = mypoke.vit * level * extrastr
local spatk = mypoke.spatk * level * extrastr
local happy = 180
local leveltable = getPokemonExperienceTable(pokemon)
doPlayerAddItem(cid, 2394, 10)
local item = doCreateItemEx(2219)
doItemSetAttribute(item, "poke", pokemon)
doItemSetAttribute(item, "hp", 1)
doItemSetAttribute(item, "level", level)
doItemSetAttribute(item, "exp", leveltable[level])
doItemSetAttribute(item, "nextlevelexp", leveltable[level+1] - leveltable[level])
doItemSetAttribute(item, "offense", offense)
doItemSetAttribute(item, "defense", defense)
doItemSetAttribute(item, "speed", speed)
doItemSetAttribute(item, "vitality", vit)
doItemSetAttribute(item, "specialattack", spatk)
doItemSetAttribute(item, "happy", happy)
doItemSetAttribute(item, "gender", gender)
doItemSetAttribute(item, "description", "Contains a "..pokemon..".")
doItemSetAttribute(item, "fakedesc", "Contains a "..pokemon..".")
doItemSetAttribute(item, "unique", getCreatureName(cid)) --alterado v2.6
doPlayerAddItemEx(cid, item, true)
doTransformItem(item, pokeballs[btype].on)
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!")
doSendMagicEffect(getThingPos(cid), 29)
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
doSendMagicEffect(getThingPos(cid), 27)
doSendMagicEffect(getThingPos(cid), 29)
return TRUE
end
Explicação dos script, você deve estar configurando errado, e no seu mapa também.
Em Vermelho - seria o nome do pokémon que o player ia ganhar.
Em Azul - Ali é o local do baú onde está no mapa por exemplo o baú está na cordenada x: 1052 y: 1052 z: 7 então teria que alterar ali. as cordenadas.
Não mano, eu fiz exatamente isso ! primeiro o nome, depois as coordenadas !
Eu troquei meu server para o do gabrieltxu 3.0
E ainda esta com esse problema, sendo que, as coordenadas do starter.lua, são as mesmas no Rme
info
Grupo: Grão-Duque
Registrado: 28/07/11
Posts: 3.5k
Reputação: +570
Gênero: Masculino
Char no Tibia: Transloko

Tópico movido para a seção de dúvidas e pedidos resolvidos.
Tópico movido para a seção de dúvidas e pedidos resolvidos.
info
Grupo: Herói
Registrado: 28/11/10
Posts: 3.4k
Reputação: +585
Gênero: Masculino

+ 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.




info
Grupo: Campones
Registrado: 15/11/11
Posts: 20
Reputação: +1
Bom galera, eu criei um ot aqui, mas to com um problema [claro, se não, eu não estaria pedindo ajuda]
mas então, quando cria a acc, e vai tentar pegar os pokes iniciais, os baus estão vazios !!
Alguem pode me ajudar ? ja estou a horas procurando alguma solução, e não acho nada !
[PDA by : bolz V2]
[desculpa pela falta de informação, primeira vez aqui kk ]