Ir para conteúdo
  • Cadastre-se

Posts Recomendados

E ai geral suave?

Primeiro poste, mais vir aki passar um script que o budamunky  não entendeu, seguindo o post dele http://www.tibiaking.com/forum/topic/35631-pokedex-mod/

Mais vamos la. Eu nao sei oque ele quis fazer foi isso mais o meu server nao estava pegando a dex quando clica no player. entao peguei o mods dele e refis o meu e deu certo.

Vamos passos!!

va a pasta: \data\lib\pokedex system.lua 

 

Você coloca isso tudo lah:

local skills = specialabilities                                         --alterado v2.9 \/ TUDO!!

function doAddPokemonInDexList(cid, poke)
if getPlayerInfoAboutPokemon(cid, poke).dex then return true end
	local a = newpokedex[poke]                                              
	local b = getPlayerStorageValue(cid, a.storage)
	setPlayerStorageValue(cid, a.storage, b.." dex,")
end

function getPokemonEvolutionDescription(name, next)
	local kev = poevo[name]
	local stt = {}
	if isInArray(specialevo, name) then
       if name == "Poliwhirl" then
          if next then
             return "\nPoliwrath or Politoed, requires level 65."
          end   
          table.insert(stt, "Evolve Stone: Water Stone and Punch Stone or Water Stone and King's Rock\n\n")
          table.insert(stt, "Evolutions:\nPoliwrath, requires level 65.\nPolitoed, requires level 65.")
       elseif name == "Gloom" then
          if next then
             return "\nVileplume or Bellossom, requires level 50."
          end
          table.insert(stt, "Evolve Stone: Leaf Stone and Venom Stone or Leaf Stone and Sun Stone\n\n")
          table.insert(stt, "Evolutions:\nVileplume, requires level 50.\nBellossom, requires level 50.")
       elseif name == "Slowpoke" then
          if next then
             return "\nSlowbro, requires level 45.\nSlowking, requires level 100."
          end
          table.insert(stt, "Evolve Stone: Enigma Stone or King's Rock\n\n")
          table.insert(stt, "Evolutions:\nSlowbro, requires level 45.\nSlowking, requires level 100.")
       elseif name == "Eevee" then
          if next then
             return "\nVaporeon, requires level 55.\nJolteon, requires level 55.\nFlareon, requires level 55.\nUmbreon, requires level 55.\nEspeon, requires level 55."
          end
          table.insert(stt, "Evolve Stone: Water Stone or Thunder Stone or Fire Stone or Darkness Stone or Enigma Stone\n\n")
          table.insert(stt, "Evolutions:\nVaporeon, requires level 55.\nJolteon, requires level 55.\nFlareon, requires level 55.\nUmbreon, requires level 55.\nEspeon, requires level 55.")
       elseif name == "Tyrogue" then
          if next then
             return "\nHitmonlee, requires level 60.\nHitmonchan, requires level 60.\nHitmontop, requires level 60."
          end
          table.insert(stt, "Evolve Stone: Punch Stone\n\n")   
          table.insert(stt, "Evolutions:\nHitmonlee, requires level 60.\nHitmonchan, requires level 60.\nHitmontop, requires level 60.")
       end
    elseif kev then
       if next then
          table.insert(stt, "\n"..kev.evolution..", requires level "..kev.level..".")
          return table.concat(stt)
       end
       local id = tonumber(kev.stoneid)
       local id2 = tonumber(kev.stoneid2)
       local stone = ""
       if tonumber(kev.count) == 2 then
          stone = doConvertStoneIdToString(id).." (2x)"
       else
          stone = id2 == 0 and doConvertStoneIdToString(id) or doConvertStoneIdToString(id).." and "..doConvertStoneIdToString(id2)
       end
       table.insert(stt, "Evolve Stone: "..stone.."\n\n")
       table.insert(stt, "Evolutions:\n"..kev.evolution..", requeris level "..kev.level..".")
       table.insert(stt, getPokemonEvolutionDescription(kev.evolution, true))
    else
        if not next then
           table.insert(stt, "Evolutions:\nIt doen't evolve." )
        end
    end   
return table.concat(stt)
end

local function getMoveDexDescr(cid, name, number)
	local x = movestable[name]
	if not x then return "" end
	
	local z = "\n"
	local tables = {x.move1, x.move2, x.move3, x.move4, x.move5, x.move6, x.move7, x.move8, x.move9, x.move10, x.move11, x.move12}
	local y = tables[number]
	if not y then return "" end
	
if getTableMove(cid, y.name) == "" then
   print(""..y.name.." faltando")
   return "unknown error"
end
local txt = ""..z..""..y.name.." - m"..number.." - level "..y.level.." - "..(y.t) 
return txt
end   
                                                                                                                                 --alterado v2.8
local skillcheck = {"fly", "ride", "surf", "teleport", "rock smash", "cut", "dig", "light", "blink", "control mind", "transform", "levitate_fly"}
local passivas = {
["Electricity"] = {"Electabuzz", "Shiny Electabuzz", "Elekid", tpw = "electric"},
["Lava Counter"] = {"Magmar", "Magby", tpw = "fire"},
["Counter Helix"] = {"Scyther", "Shiny Scyther", tpw = "bug"},
["Giroball"] = {"Pineco", "Forretress", tpw = "steel"},
["Counter Claw"] = {"Scizor", tpw = "bug"},
["Counter Spin"] = {"Hitmontop", "Shiny Hitmontop", tpw = "fighting"},
["Demon Kicker"] = {"Hitmonlee", "Shiny Hitmonlee", tpw = "fighting"},
["Demon Puncher"] = {"Hitmonchan", "Shiny Hitmonchan", tpw = "unknow"},               --alterado v2.6
["Stunning Confusion"] = {"Psyduck", "Golduck", "Wobbuffet", tpw = "psychic"},
["Groundshock"] = {"Kangaskhan", tpw = "normal"},
["Electric Charge"] = {"Pikachu", "Raichu", "Shiny Raichu", tpw = "electric"},
["Melody"] = {"Wigglytuff", tpw = "normal"},
["Dragon Fury"] = {"Dratini", "Dragonair", "Dragonite", "Shiny Dratini", "Shiny Dragonair", "Shiny Dragonite", tpw = "dragon"},
["Fury"] = {"Persian", "Raticate", "Shiny Raticate", tpw = "normal"},
["Mega Drain"] = {"Oddish", "Gloom", "Vileplume", "Kabuto", "Kabutops", "Parasect", "Tangela", "Shiny Vileplume", "Shiny Tangela", tpw = "grass"},
["Spores Reaction"] = {"Oddish", "Gloom", "Vileplume", "Shiny Vileplume", tpw = "grass"},
["Amnesia"] = {"Wooper", "Quagsire", "Swinub", "Piloswine", tpw = "psychic"},
["Zen Mind"] = {"Slowking", tpw = "psychic"}, 
["Mirror Coat"] = {"Wobbuffet", tpw = "psychic"},
["Lifesteal"] = {"Crobat", tpw = "normal"},
["Evasion"] = {"Scyther", "Scizor", "Hitmonlee", "Hitmonchan", "Hitmontop", "Tyrogue", "Shiny Scyther", "Shiny Hitmonchan", "Shiny Hitmonlee", "Shiny Hitmontop", "Ledian", "Ledyba", "Sneasel", tpw = "normal"},
["Foresight"] = {"Machamp", "Shiny Hitmonchan", "Shiny Hitmonlee", "Shiny Hitmontop", "Hitmontop", "Hitmonlee", "Hitmonchan", tpw = "fighting"},
["Levitate"] = {"Gengar", "Haunter", "Gastly", "Misdreavus", "Weezing", "Koffing", "Unown", "Shiny Gengar", tpw = "ghost"},
}


function doShowPokedexRegistration(cid, pokemon, ball)
local item2 = pokemon
local virtual = false
   if type(pokemon) == "string" then
      virtual = true
   end
local myball = ball
local name = virtual and pokemon or getCreatureName(item2.uid)

local v = fotos[name]
local stt = {}
table.insert(stt, "Name: "..name.."\n")

if pokes[name].type2 and pokes[name].type2 ~= "no type" then
   table.insert(stt, "Type: "..pokes[name].type.."/"..pokes[name].type2.."")
else
    table.insert(stt, "Type: "..pokes[name].type.."")
end

if virtual then
   table.insert(stt, "\nLevel Base: "..pokes[name].level.."\n")
else
   table.insert(stt, "\nRequired level: "..getPokemonLevel(item2.uid).."\n")
end

if showStatusInDex then
if virtual then                
   table.insert(stt, "\nStatus:\n")
   local status = getPokemonStatus(name, pokes[name].level)
   table.insert(stt, "•Offense: "..status.offense.."\n•Defense: "..status.defense.."\n•Agility: "..status.agility.."\n•Sp. Attack: "..status.specialattack.."\n•Vitality: "..status.vitality.."\n")
else
   table.insert(stt, "\nStatus:\n")
   local status = getPokemonStatus(name, getPokemonLevel(item2.uid) + getPokemonBoost(item2.uid))
   table.insert(stt, "•Offense: "..status.offense.."\n•Defense: "..status.defense.."\n•Agility: "..status.agility.."\n•Sp. Attack: "..status.specialattack.."\n•Vitality: "..status.vitality.."\n")
end
end 

table.insert(stt, "\n"..getPokemonEvolutionDescription(name).."\n")

table.insert(stt, "\nMoves:")

if name == "Ditto" then
   if virtual then
      table.insert(stt, "\nIt doesn't use any moves until transformed.")
   elseif getPlayerStorageValue(item2.uid, 1010) == "Ditto" or getPlayerStorageValue(item2.uid, 1010) == -1 then
      table.insert(stt, "\nIt doesn't use any moves until transformed.")
   else
      for a = 1, 15 do
         table.insert(stt, getMoveDexDescr(item2.uid, getPlayerStorageValue(item2.uid, 1010), a).."")
      end
   end
else
   for a = 1, 15 do
      table.insert(stt, getMoveDexDescr(item2.uid, name, a).."")
   end
end

for e, f in pairs(passivas) do
   if isInArray(passivas[e], name) then
      local tpw = passivas[e].tpw
      if name == "Pineco" and passivas[e] == "Giroball" then
         tpw = "bug"
      end
      table.insert(stt, "\n"..e.." - passive - "..tpw.."")
   end
end
            
table.insert(stt, "\n\nAbility:\n") 
local abilityNONE = true                   
			
for b, c in pairs(skills) do
   if isInArray(skillcheck, b) then
      if isInArray(c, name) then
         table.insert(stt, (b == "levitate_fly" and "Levitate" or doCorrectString(b)).."\n")
         abilityNONE = false
      end
   end
end
if abilityNONE then
   table.insert(stt, "None")
end
		
if string.len(table.concat(stt)) > 8192 then
   print("Erro ao fazer Informação pokedex com pokemon chamado "..name..".\n   Registro de Pokedex tem mais de 8192 letras (it has "..string.len(stt).." letras), foi bloqueada para evitar erro fatal.")
   doPlayerSendCancel(cid, "Ocorreu um erro, ele foi enviado para o administrador do servidor.") 
return true
end	

doShowTextDialog(cid, v, table.concat(stt))
end

salve e feche.

depois vai na pasta:data\actions\scripts\pokedex.lua

e cola isso tudo lah:

local rate = 20

function onUse(cid, item, fromPos, item2, toPos)
 
if not isCreature(item2.uid) then
return true
end

local poke = getCreatureName(item2.uid)

	if isMonster(item2.uid) then
       local this = newpokedex[getCreatureName(item2.uid)]
	   local leveltable = getPokemonExperienceTable(getCreatureName(item2.uid)) 
	   local myball = 0
	   if isSummon(item2.uid) then
	      myball = getPlayerSlotItem(getCreatureMaster(item2.uid), 8)
       end

       if not getPlayerInfoAboutPokemon(cid, poke).dex then
          local exp = this.level * rate
          doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você desbloqueou"..getCreatureName(item2.uid).." em sua pokedex!")
          doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você ganhou "..exp.." pontos de experiência.")
          doSendMagicEffect(getThingPos(cid), 210)
          doPlayerAddExperience(cid, exp)
          doAddPokemonInDexList(cid, poke)
       else
          doShowPokedexRegistration(cid, item2, myball, leveltable)
       end
    return true
    end

if not isPlayer(item2.uid) then return true end
                                                  --alterado v2.7 \/\/
	local kanto = 0
	local johto = 0

	for i = 1, #oldpokedex do
		if getPlayerInfoAboutPokemon(item2.uid, oldpokedex[i][1]).dex then
		   if i <= 151 then
              kanto = kanto+1
           elseif i >= 209 then
              johto = johto+1
           end
		end
	end   
	local player = getRecorderPlayer(toPos, cid)

	if cid == player then
	    doPlayerSendTextMessage(cid, 27, "Você desbloqueou "..kanto.." kanto's e "..johto.." johto's pokémons até agora.") 
		doPlayerSetVocation(cid, 9)
        openChannelDialog(cid)

	end

return true
end


salve e fecha.

agora vai na pasta :\data\lib\some functions.lua

e localiza isso "function getRecorderPlayer" cola isso no lugar :

 
function getRecorderPlayer(pos, cid)
local ret = 0
if cid and getThingPos(cid).x == pos.x and getThingPos(cid).y == pos.y then
return cid
end
local s = {}
s.x = pos.x
s.y = pos.y
s.z = pos.z
for a = 0, 255 do
s.stackpos = a
local b = getTileThingByPos(s).uid
if b > 1 and isPlayer(b) and getCreatureOutfit(b).lookType ~= 814 then
ret = b
end
end
return ret
end

salve e fecha.

a Pokedex deve ficar assim.

24pay37.jpg

 

 

agora sou vou tentar colocar um * para poques que ja demos catch.

Espero que fique bom ao entendimento de todos.

 

Site em contrucao:pokecyan.esy.es.

Link para o post
Compartilhar em outros sites
  • 3 weeks later...

Parabens... Rep +

Mas você poderia explicar como adicionar pokemons novos à pokedex!

Grande abraço.

Nb3SnA.gifRnGIf3.gifYIEW9W.gif

 

Ajudei ? Foda-se

Não ajudei ? Rep -

Link para o post
Compartilhar em outros sites
  • 3 years later...
Em 29/11/2014 em 11:47, Kibbutz disse:

E ai geral suave?

Primeiro poste, mais vir aki passar um script que o budamunky  não entendeu, seguindo o post dele http://www.tibiaking.com/forum/topic/35631-pokedex-mod/

Mais vamos la. Eu nao sei oque ele quis fazer foi isso mais o meu server nao estava pegando a dex quando clica no player. entao peguei o mods dele e refis o meu e deu certo.

Vamos passos!!

va a pasta: \data\lib\pokedex system.lua 

 

Você coloca isso tudo lah:


local skills = specialabilities                                         --alterado v2.9 \/ TUDO!!

function doAddPokemonInDexList(cid, poke)
if getPlayerInfoAboutPokemon(cid, poke).dex then return true end
	local a = newpokedex[poke]                                              
	local b = getPlayerStorageValue(cid, a.storage)
	setPlayerStorageValue(cid, a.storage, b.." dex,")
end

function getPokemonEvolutionDescription(name, next)
	local kev = poevo[name]
	local stt = {}
	if isInArray(specialevo, name) then
       if name == "Poliwhirl" then
          if next then
             return "\nPoliwrath or Politoed, requires level 65."
          end   
          table.insert(stt, "Evolve Stone: Water Stone and Punch Stone or Water Stone and King's Rock\n\n")
          table.insert(stt, "Evolutions:\nPoliwrath, requires level 65.\nPolitoed, requires level 65.")
       elseif name == "Gloom" then
          if next then
             return "\nVileplume or Bellossom, requires level 50."
          end
          table.insert(stt, "Evolve Stone: Leaf Stone and Venom Stone or Leaf Stone and Sun Stone\n\n")
          table.insert(stt, "Evolutions:\nVileplume, requires level 50.\nBellossom, requires level 50.")
       elseif name == "Slowpoke" then
          if next then
             return "\nSlowbro, requires level 45.\nSlowking, requires level 100."
          end
          table.insert(stt, "Evolve Stone: Enigma Stone or King's Rock\n\n")
          table.insert(stt, "Evolutions:\nSlowbro, requires level 45.\nSlowking, requires level 100.")
       elseif name == "Eevee" then
          if next then
             return "\nVaporeon, requires level 55.\nJolteon, requires level 55.\nFlareon, requires level 55.\nUmbreon, requires level 55.\nEspeon, requires level 55."
          end
          table.insert(stt, "Evolve Stone: Water Stone or Thunder Stone or Fire Stone or Darkness Stone or Enigma Stone\n\n")
          table.insert(stt, "Evolutions:\nVaporeon, requires level 55.\nJolteon, requires level 55.\nFlareon, requires level 55.\nUmbreon, requires level 55.\nEspeon, requires level 55.")
       elseif name == "Tyrogue" then
          if next then
             return "\nHitmonlee, requires level 60.\nHitmonchan, requires level 60.\nHitmontop, requires level 60."
          end
          table.insert(stt, "Evolve Stone: Punch Stone\n\n")   
          table.insert(stt, "Evolutions:\nHitmonlee, requires level 60.\nHitmonchan, requires level 60.\nHitmontop, requires level 60.")
       end
    elseif kev then
       if next then
          table.insert(stt, "\n"..kev.evolution..", requires level "..kev.level..".")
          return table.concat(stt)
       end
       local id = tonumber(kev.stoneid)
       local id2 = tonumber(kev.stoneid2)
       local stone = ""
       if tonumber(kev.count) == 2 then
          stone = doConvertStoneIdToString(id).." (2x)"
       else
          stone = id2 == 0 and doConvertStoneIdToString(id) or doConvertStoneIdToString(id).." and "..doConvertStoneIdToString(id2)
       end
       table.insert(stt, "Evolve Stone: "..stone.."\n\n")
       table.insert(stt, "Evolutions:\n"..kev.evolution..", requeris level "..kev.level..".")
       table.insert(stt, getPokemonEvolutionDescription(kev.evolution, true))
    else
        if not next then
           table.insert(stt, "Evolutions:\nIt doen't evolve." )
        end
    end   
return table.concat(stt)
end

local function getMoveDexDescr(cid, name, number)
	local x = movestable[name]
	if not x then return "" end
	
	local z = "\n"
	local tables = {x.move1, x.move2, x.move3, x.move4, x.move5, x.move6, x.move7, x.move8, x.move9, x.move10, x.move11, x.move12}
	local y = tables[number]
	if not y then return "" end
	
if getTableMove(cid, y.name) == "" then
   print(""..y.name.." faltando")
   return "unknown error"
end
local txt = ""..z..""..y.name.." - m"..number.." - level "..y.level.." - "..(y.t) 
return txt
end   
                                                                                                                                 --alterado v2.8
local skillcheck = {"fly", "ride", "surf", "teleport", "rock smash", "cut", "dig", "light", "blink", "control mind", "transform", "levitate_fly"}
local passivas = {
["Electricity"] = {"Electabuzz", "Shiny Electabuzz", "Elekid", tpw = "electric"},
["Lava Counter"] = {"Magmar", "Magby", tpw = "fire"},
["Counter Helix"] = {"Scyther", "Shiny Scyther", tpw = "bug"},
["Giroball"] = {"Pineco", "Forretress", tpw = "steel"},
["Counter Claw"] = {"Scizor", tpw = "bug"},
["Counter Spin"] = {"Hitmontop", "Shiny Hitmontop", tpw = "fighting"},
["Demon Kicker"] = {"Hitmonlee", "Shiny Hitmonlee", tpw = "fighting"},
["Demon Puncher"] = {"Hitmonchan", "Shiny Hitmonchan", tpw = "unknow"},               --alterado v2.6
["Stunning Confusion"] = {"Psyduck", "Golduck", "Wobbuffet", tpw = "psychic"},
["Groundshock"] = {"Kangaskhan", tpw = "normal"},
["Electric Charge"] = {"Pikachu", "Raichu", "Shiny Raichu", tpw = "electric"},
["Melody"] = {"Wigglytuff", tpw = "normal"},
["Dragon Fury"] = {"Dratini", "Dragonair", "Dragonite", "Shiny Dratini", "Shiny Dragonair", "Shiny Dragonite", tpw = "dragon"},
["Fury"] = {"Persian", "Raticate", "Shiny Raticate", tpw = "normal"},
["Mega Drain"] = {"Oddish", "Gloom", "Vileplume", "Kabuto", "Kabutops", "Parasect", "Tangela", "Shiny Vileplume", "Shiny Tangela", tpw = "grass"},
["Spores Reaction"] = {"Oddish", "Gloom", "Vileplume", "Shiny Vileplume", tpw = "grass"},
["Amnesia"] = {"Wooper", "Quagsire", "Swinub", "Piloswine", tpw = "psychic"},
["Zen Mind"] = {"Slowking", tpw = "psychic"}, 
["Mirror Coat"] = {"Wobbuffet", tpw = "psychic"},
["Lifesteal"] = {"Crobat", tpw = "normal"},
["Evasion"] = {"Scyther", "Scizor", "Hitmonlee", "Hitmonchan", "Hitmontop", "Tyrogue", "Shiny Scyther", "Shiny Hitmonchan", "Shiny Hitmonlee", "Shiny Hitmontop", "Ledian", "Ledyba", "Sneasel", tpw = "normal"},
["Foresight"] = {"Machamp", "Shiny Hitmonchan", "Shiny Hitmonlee", "Shiny Hitmontop", "Hitmontop", "Hitmonlee", "Hitmonchan", tpw = "fighting"},
["Levitate"] = {"Gengar", "Haunter", "Gastly", "Misdreavus", "Weezing", "Koffing", "Unown", "Shiny Gengar", tpw = "ghost"},
}


function doShowPokedexRegistration(cid, pokemon, ball)
local item2 = pokemon
local virtual = false
   if type(pokemon) == "string" then
      virtual = true
   end
local myball = ball
local name = virtual and pokemon or getCreatureName(item2.uid)

local v = fotos[name]
local stt = {}
table.insert(stt, "Name: "..name.."\n")

if pokes[name].type2 and pokes[name].type2 ~= "no type" then
   table.insert(stt, "Type: "..pokes[name].type.."/"..pokes[name].type2.."")
else
    table.insert(stt, "Type: "..pokes[name].type.."")
end

if virtual then
   table.insert(stt, "\nLevel Base: "..pokes[name].level.."\n")
else
   table.insert(stt, "\nRequired level: "..getPokemonLevel(item2.uid).."\n")
end

if showStatusInDex then
if virtual then                
   table.insert(stt, "\nStatus:\n")
   local status = getPokemonStatus(name, pokes[name].level)
   table.insert(stt, "•Offense: "..status.offense.."\n•Defense: "..status.defense.."\n•Agility: "..status.agility.."\n•Sp. Attack: "..status.specialattack.."\n•Vitality: "..status.vitality.."\n")
else
   table.insert(stt, "\nStatus:\n")
   local status = getPokemonStatus(name, getPokemonLevel(item2.uid) + getPokemonBoost(item2.uid))
   table.insert(stt, "•Offense: "..status.offense.."\n•Defense: "..status.defense.."\n•Agility: "..status.agility.."\n•Sp. Attack: "..status.specialattack.."\n•Vitality: "..status.vitality.."\n")
end
end 

table.insert(stt, "\n"..getPokemonEvolutionDescription(name).."\n")

table.insert(stt, "\nMoves:")

if name == "Ditto" then
   if virtual then
      table.insert(stt, "\nIt doesn't use any moves until transformed.")
   elseif getPlayerStorageValue(item2.uid, 1010) == "Ditto" or getPlayerStorageValue(item2.uid, 1010) == -1 then
      table.insert(stt, "\nIt doesn't use any moves until transformed.")
   else
      for a = 1, 15 do
         table.insert(stt, getMoveDexDescr(item2.uid, getPlayerStorageValue(item2.uid, 1010), a).."")
      end
   end
else
   for a = 1, 15 do
      table.insert(stt, getMoveDexDescr(item2.uid, name, a).."")
   end
end

for e, f in pairs(passivas) do
   if isInArray(passivas[e], name) then
      local tpw = passivas[e].tpw
      if name == "Pineco" and passivas[e] == "Giroball" then
         tpw = "bug"
      end
      table.insert(stt, "\n"..e.." - passive - "..tpw.."")
   end
end
            
table.insert(stt, "\n\nAbility:\n") 
local abilityNONE = true                   
			
for b, c in pairs(skills) do
   if isInArray(skillcheck, b) then
      if isInArray(c, name) then
         table.insert(stt, (b == "levitate_fly" and "Levitate" or doCorrectString(b)).."\n")
         abilityNONE = false
      end
   end
end
if abilityNONE then
   table.insert(stt, "None")
end
		
if string.len(table.concat(stt)) > 8192 then
   print("Erro ao fazer Informação pokedex com pokemon chamado "..name..".\n   Registro de Pokedex tem mais de 8192 letras (it has "..string.len(stt).." letras), foi bloqueada para evitar erro fatal.")
   doPlayerSendCancel(cid, "Ocorreu um erro, ele foi enviado para o administrador do servidor.") 
return true
end	

doShowTextDialog(cid, v, table.concat(stt))
end

salve e feche.

depois vai na pasta:data\actions\scripts\pokedex.lua

e cola isso tudo lah:


local rate = 20

function onUse(cid, item, fromPos, item2, toPos)
 
if not isCreature(item2.uid) then
return true
end

local poke = getCreatureName(item2.uid)

	if isMonster(item2.uid) then
       local this = newpokedex[getCreatureName(item2.uid)]
	   local leveltable = getPokemonExperienceTable(getCreatureName(item2.uid)) 
	   local myball = 0
	   if isSummon(item2.uid) then
	      myball = getPlayerSlotItem(getCreatureMaster(item2.uid), 8)
       end

       if not getPlayerInfoAboutPokemon(cid, poke).dex then
          local exp = this.level * rate
          doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você desbloqueou"..getCreatureName(item2.uid).." em sua pokedex!")
          doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você ganhou "..exp.." pontos de experiência.")
          doSendMagicEffect(getThingPos(cid), 210)
          doPlayerAddExperience(cid, exp)
          doAddPokemonInDexList(cid, poke)
       else
          doShowPokedexRegistration(cid, item2, myball, leveltable)
       end
    return true
    end

if not isPlayer(item2.uid) then return true end
                                                  --alterado v2.7 \/\/
	local kanto = 0
	local johto = 0

	for i = 1, #oldpokedex do
		if getPlayerInfoAboutPokemon(item2.uid, oldpokedex[i][1]).dex then
		   if i <= 151 then
              kanto = kanto+1
           elseif i >= 209 then
              johto = johto+1
           end
		end
	end   
	local player = getRecorderPlayer(toPos, cid)

	if cid == player then
	    doPlayerSendTextMessage(cid, 27, "Você desbloqueou "..kanto.." kanto's e "..johto.." johto's pokémons até agora.") 
		doPlayerSetVocation(cid, 9)
        openChannelDialog(cid)

	end

return true
end

salve e fecha.

agora vai na pasta :\data\lib\some functions.lua

e localiza isso "function getRecorderPlayer" cola isso no lugar :



 
function getRecorderPlayer(pos, cid)
local ret = 0
if cid and getThingPos(cid).x == pos.x and getThingPos(cid).y == pos.y then
return cid
end
local s = {}
s.x = pos.x
s.y = pos.y
s.z = pos.z
for a = 0, 255 do
s.stackpos = a
local b = getTileThingByPos(s).uid
if b > 1 and isPlayer(b) and getCreatureOutfit(b).lookType ~= 814 then
ret = b
end
end
return ret
end

salve e fecha.

a Pokedex deve ficar assim.

24pay37.jpg

 

 

agora sou vou tentar colocar um * para poques que ja demos catch.

Espero que fique bom ao entendimento de todos.

 

Site em contrucao:pokecyan.esy.es.

amigo eu dei dex  mais da esse erro
image.thumb.png.da5c36e9300939cc55af4650277853bf.png

image.thumb.png.d479d86227564ae25382c08eaa64f2d9.png

Link para o post
Compartilhar em outros sites

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

  • Conteúdo Similar

    • Por deivaoo
      Eai galera, blz?
       
      Bom, vim trazer pra vcs a versão 1.0 do mod de pokedex que eu desenvolvi mês passado visando aprendizado no mundo de OTC, com o objetivo também de mostrar que o otclient é flexível suficiente para se fazer muitas coisas sem a necessidade das sources tanto do servidor quanto do client...
       
      Para aqueles que não conhecem, vejam o Show Off desse trabalho. 
      Eu fiz essa versão com o objetivo de não fazer alterações no servidor... Ou seja, tem apenas edições no OTC.
       
       
      Atualizações:
       
      1. Adicionado um pack com 276 imagens de pokemons (16,1MB);
      2. Pokemons shiny tem a exibição da imagem de pokemons normais (para alterar, basta remover
      a linha 75 do arquivo game_pokedex.lua, na pasta modules/game_pokedex de seu client);
      3. Pokedex fecha ao se deslogar do char com ela aberta [créditos a @Soulviling pela ideia];
       
       
      Bom, sem mais delongas;
       
       
      Instalação fácil:
       
      Passo 1. Faça o download do arquivo RAR (download no final do tópico);
      Passo 2. Copie a pasta modules pro seu client;
      Passo 3. "Deseja substituir?" [X]Sim  [  ]Não
      Passo 4. Só vai até o passo 3;
       
      Bom, segue uma imagem ATUALIZADA

       
      Download e Scan
    • Por K4yk
      Fala galera, beleza ? 
       
       
      Esse é meu primeiro tópico no fórum e venho trazer a vocês a versão 1.0 do mod de pokedex desenvolvido pelo david0703 no tópico : http://www.tibiaking.com/forum/topic/56524-mod-pokedex-window-para-base-pda-v10/
      Eu adicionei novas imagens de pokémons que estavam faltando e fiz um simples recolor.
       
       
      Atualizações : 
       
      - Adicionada Imagens da 1,2,3 geração completas e junto um background editável para novas imagens;
      - Lembrando que pokémons shinys tem a mesma imagem que as do pokémons normais ( Para alterar, basta remover a linha 75 do arquivo game_pokedex.lua, na pasta modules/game_pokedex de seu client ) dito no tópico do david0703;
      - Novo recolor ( cor ) da pokedex;
       
       
      Como instalar :
       
      1 - Fazer o Download do arquivo .rar no final do tópico;
      2 - Copie a pasta modules pro seu client;
      3 - Substitua os arquivos;
       
      Segue uma imagem atualizada da pokedex : 
       

       
       
       
       
      Download : 
      Opção 1 (Dropbox) : https://www.dropbox.com/s/89vshj7oplx2xpt/modules.rar?dl=0
      Opção 2 (Google Drive) : https://drive.google.com/open?id=0B20tGF1vePLLUGxZZ0o3bzljSmM
      Opção 3 (4Shared) : http://www.4shared.com/rar/28Z3A-bece/modules.html?
      Opção 4 (Mediafire) : http://www.mediafire.com/download/fe366mxgr4ctmaf/modules.rar
      Opção 5 (Sendspace) : https://www.sendspace.com/file/8f6kyz
       
      Scan : 
      Dropbox: https://www.virustotal.com/pt/url/f8bf595b2881615777ac3ea27181d81dadc9457158d14818b8ec1f6393f60df3/analysis/1464223801/
      Google Drive: https://www.virustotal.com/pt/url/12752f92323aae975c0a59ccd9c4854fe3118a0cee7178231e25c7ba38f1fbe8/analysis/1464223450/
      4Shared: https://www.virustotal.com/pt/url/0e6a5bb535b01eda4433c760cca295d85488318f705b025d6ed5559a744e6eb3/analysis/1464223772/
      Mediafire: https://www.virustotal.com/pt/url/fab687cb595a04b29175decb3c06200190d79d8da99d362e6e7d58305b6ffa2f/analysis/1464224350/
      Sendspace: https://www.virustotal.com/pt/url/dfa7a05d8df51422a5b06f0a055d897ac3105ad38a835ccef382236fb987ff16/analysis/1464224097/
       
      Caso um Link esteja quebrado tente outros, se todos estiverem quebrados avise !
       
       
       
       
                                                        AJUDEI ? REP +  
       
    • Por Luzetti
      Galera, eu tava vendo uns fóruns ai e tipo, muitos a maior parte é poketibia, e o que me lembrei em poketibia tem a pokedex, entao fiquei pensando...porque nao criar um item de informação para tibia...seria assim mais ou menos.
       
      Acho que seria interessante e "inovador"

    • Por tioj
      Bom galera eu estava tentando arrumar a dex do pda porque quando você tenta adicionar novos pokes de outras gerações eles simplesmente não apareciam na dex ou no comando /dex, bom com essas gambiarras modificações que eu fiz está dando certo e não vejo nenhum erro (até agora).
       
      bom vamos as scripts:
       
      data>actions>scripts>pokedex.lua
       
      substitua todo o arquivo por esse:


        agora vá em data>creaturescripts>scripts>newpokedex.lua   e substitua tudu por esse:  
        e essa é quando o player da dex em si mostrando o total de pokes descobertos e seus catchs (catch é mostrado pelo simbolo (.) do lado do nome do poke)  
        ah é claro a newpokedex e oldpokedex do configuration.lua, não se esqueçam de adicionar as storages certinho em!  
      bom se aparecer alguma mensagem assim na distro 'Sheer Cold Faltando' você deve adicionar o move (sheer cold) no arquivo moves.lua da pasta lib   Bom é isso galera, não sou scripter tudo que sei aprendiz lendo elas e tentando algumas coisas, se tiver algum erro ou duvida perguntem que eu irei tentar dar suporte o máximo possível e é claro no  meu limite de conhecimento das scripts. Bjundao pra todos e bom uso
    • Por charlie brown JR
      Alguem ae q entende sobre scipt poderia ajuda é q minha poke dex n esta mostrando o lvl nesscesario para usar o pokemon
      so mostra o st (stage) do pokemon
       
       
      O Scipt:
       
       
       
      local skills = specialabilities
      function doAddPokemonInDexList(cid, poke)
       if getPlayerInfoAboutPokemon(cid, poke).dex then return true end
       local a = newpokedex[poke]
       local b = getPlayerStorageValue(cid, a.storage)
       setPlayerStorageValue(cid, a.storage, b.." dex,")
      end
      function getPokemonEvolutionDescription(name, blank)
       local kev = poevo[name]
       local stt = ""
       local sss = "  "--blank and "      " or "  "
       if isInArray(specialevo, name) then
        if name == "Poliwhirl" then
         stt = stt.."\n"..sss.."~ Evolves to Poliwrath starting at\n    "..sss.."level 36."
         stt = stt.."\n"..sss.."~ Evolves to Politoed using\n    "..sss.."a water stone and a king's rock."
        elseif name == "Gloom" then
         stt = stt.."\n"..sss.."~ Evolves to Vileplume using\n    "..sss.."a leaf stone and a venom stone."
         stt = stt.."\n"..sss.."~ Evolves to Bellosom using\n    "..sss.."a leaf stone and a sun stone."
        elseif name == "Slowpoke" then
         stt = stt.."\n"..sss.."~ Evolves to Slowbro starting at\n    "..sss.."level 28."
         stt = stt.."\n"..sss.."~ Evolves to Slowking using\n    "..sss.."a king's rock."
        elseif name == "Tyrogue" then
         stt = stt.."\n"..sss.."• Evolves starting at level 20 to:"
         stt = stt.."\n"..sss.."     ~ Hitmonlee if offense is higher\n"..sss.."         than defense."
         stt = stt.."\n"..sss.."     ~ Hitmonchan if defense is higher\n"..sss.."         than offense."
         stt = stt.."\n"..sss.."     ~ Hitmontop if defense is equal to\n"..sss.."         offense."
        elseif name == "Eevee" then
         stt = stt.."\n"..sss.."~ Evolves to Flareon using\n    "..sss.."a fire stone."
         stt = stt.."\n"..sss.."~ Evolves to Vaporeon using\n    "..sss.."a water stone."
         stt = stt.."\n"..sss.."~ Evolves to Jolteon using\n    "..sss.."a thunder stone."
         stt = stt.."\n"..sss.."~ Evolves to Espeon when\n    "..sss.."leveled up very happy during\n    "..sss.."daytime."
         stt = stt.."\n"..sss.."~ Evolves to Umbreon when\n    "..sss.."leveled up very happy during\n    "..sss.."nighttime."
                  elseif name == "Shiny Eevee" then
         stt = stt.."\n"..sss.."~ Evolves to Shiny Flareon using\n    "..sss.."a shining fire stone."
         stt = stt.."\n"..sss.."~ Evolves to Shiny Vaporeon using\n    "..sss.."a shining water stone."
         stt = stt.."\n"..sss.."~ Evolves to Shiny Jolteon using\n    "..sss.."a shining thunder stone."
                  elseif name == "Shiny Gloom" then
         stt = stt.."\n"..sss.."~ Evolves to Shiny Vileplume using\n    "..sss.."a shining leaf stone and a shining venom stone."
                  elseif name == "Shiny Slowpoke" then
         stt = stt.."\n"..sss.."~ Evolves to Shiny Slowbro starting at\n    "..sss.."level 28."
                  elseif name == "Shiny Poliwhirl" then
              stt = stt.."\n"..sss.."~ Evolves to Shiny Poliwrath starting at\n    "..sss.."level 36."
        end
       elseif kev then
        stt = stt.."\n"..sss.."• Evolves to "..kev.evolution..""
        if kev.level >= 7 then
         stt = stt.." starting at\n   "..sss.."level "..kev.level.."."
        elseif kev.count >= 1 then
         stt = stt.." using\n"
         local id = tonumber(kev.stoneid)
         local id2 = tonumber(kev.stoneid2)
         if id > 1 then
          local info = getItemInfo(id)
          local a = kev.count == 1 and info.article or kev.count
          local s = kev.count == 1 and "" or "s"
          stt = stt.."   "..sss..""..a.." "..info.name..""..s..""
         end
         if id2 > 1 then
          local info2 = getItemInfo(id2)
          local b = kev.count == 1 and info2.article or kev.count
          stt = stt.." and "..b.." "..info2.name..""
         end
         stt = stt.."."
        else
         stt = stt.." when it\n   "..sss.."levels up very happy."
        end
        stt = stt..""..getPokemonEvolutionDescription(kev.evolution, true)..""
       elseif not blank then
        stt = stt.."\n   It doesn't evolve."
       end
      return stt
      end
      local skillcheck = {"fly", "ride", "surf", "teleport", "rock smash", "cut", "dig", "light", "blink", "ghostwalk", "headbutt"}
      local skilldescr = {
      ["fly"] = "   • Fly:\n     #You can mount this pokemon and fly with it to reach other places through the sky (use order on yourself)",
      ["ghostwalk"] = "   • Ghost Walk:\n     #This pokemon can walk through walls and unpassable terrain. This pokemon is also invulnerable to physical attacks.",
      ["ride"] = "   • Ride:\n     #You can mount this pokemon to move faster on land (use order on yourself)",
      ["rock smash"] = "   • Rock Smash:\n     #This pokemon is able to break smashable rocks (use order on the rock)",
      ["cut"] = "   • Cut:\n     #This pokemon is able to cut cuttable bushes (use order on the bush)",
      ["dig"] = "   • Dig:\n     #This pokemon is able to dig holes and make them exploitable (use order on a closed hole)",
      ["light"] = "   • Flash:\n     #This pokemon is able to illuminate a place (use order on the pokemon)",
      ["blink"] = "   • Blink:\n     #This pokemon can teleport itself to another place (use order on the desired place)",
      ["teleport"] = "   • Teleport:\n     #This pokemon can teleport itself and it's trainer to another city (type either h\" or /h)",
      ["surf"] = "   • Surf:\n     #You can mount this pokemon and swim with it (just walk on the water)",
      ["headbutt"] = "   • Headbutt:\n     #You can use the Pokemon with this ability Headbutt",
      }
      local function doCheckMoveTarget(table)
       if not table then return true end
       if table.target == 1 then
        return "Yes ("..table.dist.. " max. range)."
       else
        return "No."
       end
      end
      local function getMoveDexDescr(name, number)
       local x = movestable[name]
       local y = {}
       local z = "\n"
       if number == 1 and x.move1 then
        y = x.move1
        z = ""
       elseif number == 2 and x.move2 then
        y = x.move2
       elseif number == 3 and x.move3 then
        y = x.move3
       elseif number == 4 and x.move4 then
        y = x.move4
       elseif number == 5 and x.move5 then
        y = x.move5
       elseif number == 6 and x.move6 then
        y = x.move6
       elseif number == 7 and x.move7 then
        y = x.move7
       elseif number == 8 and x.move8 then
        y = x.move8
       elseif number == 9 and x.move9 then
        y = x.move9
       elseif number == 10 and x.move10 then
        y = x.move10
       elseif number == 11 and x.move11 then
        y = x.move11
       elseif number == 12 and x.move12 then
        y = x.move12
       elseif number == 13 and x.move13 then
        y = x.move13
       elseif number == 14 and x.move14 then
        y = x.move14
       elseif number == 15 and x.move15 then
        y = x.move15
       else
        return ""
       end
      if not movesinfo[y.name] then
      print(""..y.name.." faltando")
      return "unknown error"
      end
      local txt = ""..z.."\n • "..y.name.." (move "..number.." / m"..number.."):\n #Required level: "..y.level.."\n #Type: "..movesinfo[y.name].t.."\n #Cooldown: "..y.cd.." seconds.\n #Needs target: "..doCheckMoveTarget(y)..""
      return txt
      end
      --#Required level: "..y.level.."\n     
      function doShowPokedexRegistration(cid, pokemon, ball, table)
        local item2 = pokemon
        local virtual = false
         if type(pokemon) == "string" then
          virtual = true
         end
        local myball = ball
        local name = virtual and pokemon or getCreatureName(item2.uid)
        local leveltable = table
         local v = fotos[name]
         local stt = ""
         stt = "-General:\n  It's named "..name.." "
         if pokes[name].type2 and pokes[name].type2 ~= "no type" then
          stt = stt.."("..pokes[name].type.."/"..pokes[name].type2..")."
         else
          stt = stt.."("..pokes[name].type..")."
         end
         if virtual then
          stt = stt.."\n"
         else
          if isSummon(item2.uid) then
           stt = stt.."\n  It belongs to "..getCreatureName(getCreatureMaster(item2.uid)).."."
           if getItemAttribute(myball.uid, "nick") then
            stt = stt.."\n  It's nickname is: "..getItemAttribute(myball.uid, "nick").."."
           end
          end
          stt = stt.."\n\n-Status:\n"
          stt = stt.."  • Level: "..getLevel(item2.uid)..""
          if isSummon(item2.uid) then
           local boost = getItemAttribute(myball.uid, "boost")
           if boost then
            stt = stt.." +"..boost.."\n"
           else
            stt = stt.."\n"
           end
           local boff = getItemAttribute(myball.uid, "boffense") and " + "..math.floor(getItemAttribute(myball.uid, "boffense")).." trans. bonus" or ""
           local bdef = getItemAttribute(myball.uid, "bdefense") and " + "..math.floor(getItemAttribute(myball.uid, "bdefense")).." trans. bonus" or ""
           local bagi = getItemAttribute(myball.uid, "bagility") and " + "..math.floor(getItemAttribute(myball.uid, "bagility")).." trans. bonus" or ""
           local bspa = getItemAttribute(myball.uid, "bsattack") and " + "..math.floor(getItemAttribute(myball.uid, "bsattack")).." trans. bonus" or ""
           stt = stt.."  • Vitality: "..math.floor(getItemAttribute(myball.uid, "vitality")).."\n"
           stt = stt.."  • Offense: "..math.floor(getItemAttribute(myball.uid, "offense"))..""..boff.."\n"
           stt = stt.."  • Defense: "..math.floor(getItemAttribute(myball.uid, "defense"))..""..bdef.."\n"
           stt = stt.."  • Spc. Atk.: "..math.floor(getItemAttribute(myball.uid, "specialattack"))..""..bspa.."\n"
           stt = stt.."  • Agility: "..math.floor(getItemAttribute(myball.uid, "speed"))..""..bagi.."\n"
          else
           stt = stt.."\n"
           stt = stt.."  • Vitality: "..getVitality(item2.uid).."\n"
           stt = stt.."  • Offense: "..getOffense(item2.uid).."\n"
           stt = stt.."  • Defense: "..getDefense(item2.uid).."\n"
           stt = stt.."  • Spc. Atk.: "..getSpecialAttack(item2.uid).."\n"
           stt = stt.."  • Agility: "..getSpeed(item2.uid).."\n"
          end
          if isSummon(item2.uid) then
           local myexp = getItemAttribute(myball.uid, "exp")
           local nlexp = getItemAttribute(myball.uid, "nextlevelexp")
           local expdesselevel = myexp - leveltable[getLevel(item2.uid)]
           local faltadesselevel = myexp + nlexp - leveltable[getItemAttribute(myball.uid, "level")]
           local percent = math.floor(expdesselevel / faltadesselevel * 100)
           if getPokemonLevel(item2.uid) == 100 then
            stt = stt.."  • Experience: "..leveltable[100].." (max)\n"
           else
            local exptext = ""..myexp.." / "..(myexp + nlexp).." ("..percent.."%)"
            local art = "Experience"
            if string.len(exptext) > 22 then
             art = "Exp."
            end
            stt = stt.."  • "..art..": "..exptext.."\n"
            stt = stt.."  • Exp. to level up: "..getItemAttribute(getPlayerSlotItem(getCreatureMaster(item2.uid), 8).uid, "nextlevelexp").."\n"
           end
          end
         end
         stt = stt.."\n-Evolutions:"
          stt = stt..""..getPokemonEvolutionDescription(name).."\n"
         stt = stt.."\n-Moves and attacks:"
         if name == "Ditto" then
          if virtual then
           stt = stt.."\n   It doesn't use any moves until\n   transformed."
          elseif getPlayerStorageValue(item2.uid, 1010) == "Ditto" then
           stt = stt.."\n   It doesn't use any moves until\n   transformed."
          else
           for a = 1, 15 do
            stt = stt..""..getMoveDexDescr(getPlayerStorageValue(item2.uid, 1010), a)..""
            end
          end
         else
          for a = 1, 15 do
           stt = stt..""..getMoveDexDescr(name, a)..""
           end
         end
         local totalab = 0
         local abtexts = ""
         local skipline = ""
         for b = 1, #skillcheck do
          if isInArray(skills[skillcheck], name) then
           abtexts = abtexts..""..skipline..""..skilldescr[skillcheck]..""
           totalab = totalab + 1
           skipline = "\n \n"
          end
         end
         if totalab == 0 then
          if name == "Ditto" then
           stt = stt.."\n\n-Special abilities:\n   • Transform:\n     #Ditto can transform into any other species of pokémon for 2 minutes with 40 seconds cooldown (use order on any pokemon)"
          else
           stt = stt.."\n\n-Special abilities:\n    none."
          end
         else
          stt = stt.."\n\n-Special abilities:\n"..abtexts..""
         end
        
        if string.len(stt) > 8192 then
         print("Error while making pokedex info with pokemon named "..name..".\n   Pokedex registration has more than 8192 letters (it has "..string.len(stt).." letters), it has been blocked to prevent fatal error.")
         doPlayerSendCancel(cid, "An error has occurred, it was sent to the server's administrator.")
        return true
        end 
        doShowTextDialog(cid, v, stt)
      end
       
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo