Ir para conteúdo
Banner com Efeitos

Kibbutz

Membro
  • Registro em

  • Última visita

  1. Rumplestiltiskin reagiu a uma resposta no tópico: pokedex mod
  2. http://www.tibiaking.com/forum/topic/46664-pokedex-mod/ veja ai o topico
  3. http://www.tibiaking.com/forum/topic/46664-pokedex-mod/ veja ai o topico
  4. Kibbutz postou uma resposta no tópico em Sistemas, Mods & Funções .lua
    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. 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.

Informação Importante

Confirmação de Termo