RA
action

[Encerrado] [AJUDA] Pokes iniciais

Por rauanv, 11 de mai. de 2013 em Tópicos Sem Resposta

otserver
poketibia
pokemon
pokes
ajuda
resolvido
11
1.6k
rauanvR
11 de maio de 2013 às 15:07

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 ]

RoksasR
11 de maio de 2013 às 15:19

Deve ter o código dos pokes iniciais, você tem? O script.

rauanvR
11 de maio de 2013 às 15:24

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 !!

RoksasR
11 de maio de 2013 às 15:29

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

rauanvR
11 de maio de 2013 às 15:36

é pra colocar em todos os baus esse uniqueID ?

 

 

 

 

 

______________

Não Deu certo

Editado Maio 11 por rauanv

RoksasR
11 de maio de 2013 às 15:50

Tem mais de um baú é? Tem que reiniciar o server cara!

Editado Maio 11 por Roksas

rauanvR
11 de maio de 2013 às 15:55

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

KarlKalvinK
12 de maio de 2013 às 05:16

 

 

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.

rauanvR
12 de maio de 2013 às 11:36

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

3 meses depois...
vital900V
04 de agosto de 2013 às 18:34

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.

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