Ir para conteúdo
Banner com Efeitos

Featured Replies

Postado

Uso como base o pokémon titanium, os pokémons não evoluem, e na dex fica em branco as stones... 

 

evolution:

 

local special = specialevo

 
local types = {
[leaf] = {"Bulbasaur", "Ivysaur", "Oddish", "Gloom", "Bellsprout", "Weepinbell", "Exeggcute", "Chikorita", "Bayleef", "Hoppip", "Skiploom", "Sunkern"},
[water] = {"Squirtle", "Wartortle", "Horsea", "Goldeen", "Magikarp", "Psyduck", "Poliwag", "Poliwhirl", "Tentacool", "Krabby", "Staryu", "Omanyte", "Eevee", "Totodile", "Croconow", "Chinchou", "Marill", "Wooper", "Slowpoke", "Remoraid", "Seadra"},
[dusk] = {"Zubat", "Ekans", "Nidoran male", "Nidoran female", "Nidorino", "Nidorina", "Gloom", "Venonat", "Tentacool", "Grimer", "Koffing", "Spinarak", "Golbat"},
[thunder] = {"Magnemite", "Pikachu", "Voltorb", "Eevee", "Chinchou", "Pichu", "Mareep", "Flaaffy", "Elekid"},
[moon] = {"Geodude", "Graveler", "Rhyhorn", "Kabuto", "Slugma", "Pupitar"},
[electirizer] = {"Machop", "Machoke", "Mankey", "Poliwhirl", "Tyrogue"},
[fire] = {"Charmander", "Charmeleon", "Vulpix", "Growlithe", "Ponyta", "Eevee", "Cyndaquil", "Quilava", "Slugma", "Houndour", "Magby"},
[magmarizer] = {"Caterpie", "Metapod", "Weedle", "Kakuna", "Paras", "Venonat", "Scyther", "Ledyba", "Spinarak", "Pineco"},
[prismscale] = {"Dratini", "Dragonair", "Magikarp", "Omanyte", "Kabuto", "Seadra"},
[dubiousdisc] = {"Gastly", "Haunter", "Eevee", "Houndour", "Pupitar"},
[protector] = {"Cubone", "Sandshrew", "Nidorino", "Nidorina", "Diglett", "Onix", "Rhyhorn", "Wooper", "Swinub", "Phanpy", "Larvitar"},
[shiny] = {"Abra", "Kadabra", "Psyduck", "Slowpoke", "Drowzee", "Eevee", "Natu", "Smoochum"},
[deephseascale] = {"Rattata", "Pidgey", "Pidgeotto", "Spearow", "Clefairy", "Jigglypuff", "Meowth", "Doduo", "Porygon", "Chansey", "Sentret", "Hoothoot", "Cleffa", "Igglybuff", "Togepi", "Snubull", "Teddiursa"},
[dawn] = {"Seel", "Shellder", "Smoochum", "Swinub"},
[king] = {"Slowpoke", "Poliwhirl"},
[metal] = {"Onix", "Scyther"},
[dragon] = {"Seadra"},
[upgrade] = {"Porygon"},
[sun] = {"Sunkern", "Gloom"},
--[sfire] = {"Shiny Charmander", "Shiny Charmeleon", "Shiny Vulpix", "Shiny Growlithe", "Shiny Ponyta", "Shiny Eevee"},
[swater] = {"Shiny Squirtle", "Shiny Wartortle", "Shiny Horsea", "Shiny Goldeen", "Shiny Magikarp", "Shiny Psyduck", "Shiny Poliwag", "Shiny Poliwhirl", "Shiny Tentacool", "Shiny Krabby", "Shiny Staryu", "Shiny Omanyte", "Shiny Eevee"},
[sleaf] = {"Shiny Bulbasaur", "Shiny Ivysaur", "Shiny Oddish", "Shiny Gloom", "Shiny Bellsprout", "Shiny Weepinbell", "Shiny Exeggcute"},
[sheart] = {"Shiny Rattata", "Shiny Pidgey", "Shiny Pidgeotto", "Shiny Spearow", "Shiny Clefairy", "Shiny Jigglypuff", "Shiny Meowth", "Shiny Doduo", "Shiny Porygon", "Shiny Chansey"},
[senigma] = {"Shiny Abra", "Shiny Kadabra", "Shiny Psyduck", "Shiny Slowpoke", "Shiny Drowzee", "Shiny Eevee"},
[srock] = {"Shiny Geodude", "Shiny Graveler", "Shiny Rhyhorn", "Shiny Kabuto"},
[svenom] = {"Shiny Zubat", "Shiny Ekans", "Shiny Nidoran male", "Shiny Nidoran female", "Shiny Nidorino", "Shiny Nidorina", "Shiny Gloom", "Shiny Venonat", "Shiny Tentacool", "Shiny Grimer", "Shiny Koffing"},
[sice] = {"Shiny Seel", "Shiny Shellder"},
[sthunder] = {"Shiny Magnemite", "Shiny Pikachu", "Shiny Voltorb", "Shiny Eevee"},
[scrystal] = {"Shiny Dratini", "Shiny Dragonair", "Shiny Magikarp", "Shiny Omanyte", "Shiny Kabuto"},
[scoccon] = {"Shiny Caterpie", "Shiny Metapod", "Shiny Weedle", "Shiny Kakuna", "Shiny Paras", "Shiny Venonat", "Shiny Scyther"},
[sdarkness] = {"Shiny Gastly", "Shiny Haunter", "Shiny Eevee"},
[spunch] = {"Shiny Machop", "Shiny Machoke", "Shiny Mankey", "Shiny Poliwhirl"},
[searth] = {"Shiny Cubone", "Shiny Sandshrew", "Shiny Nidorino", "Shiny Nidorina", "Shiny Diglett", "Shiny Onix", "Shiny Rhyhorn"}
 
}
 
function onUse(cid, item, frompos, item2, topos)
 
local pokeball = getPlayerSlotItem(cid, 8)
 
if not isMonster(item2.uid) or not isSummon(item2.uid) or #getCreatureSummons(cid) > 1 then   --alterado v2.9
return true
end
if getCreatureCondition(item2.uid, CONDITION_INVISIBLE) then return true end
 
local pevo = poevo[getCreatureName(item2.uid)]
 
if not isInArray(specialevo, getCreatureName(item2.uid)) then
   if not pevo then
      doPlayerSendCancel(cid, "Bu Pokemon Evrimlesemez.")
return true
   end
 
   if pevo.level ~= 1 and not allEvolutionsCanBeInduzedByStone then
      doPlayerSendCancel(cid, "Bu Pokemon Evrim Tasi Ile Gelistirilemez.")
return true
   end
 
   if not isPlayer(getCreatureMaster(item2.uid)) or getCreatureMaster(item2.uid) ~= cid then
      doPlayerSendCancel(cid, "Sadece Kendi Pokemonunuzda Evrim Tasi Kullanabilirsiniz.")
return true
   end
 
   if pevo.stoneid ~= item.itemid and pevo.stoneid2 ~= item.itemid then 
      doPlayerSendCancel(cid, "Bu Pokemonun Evrimi Için Baska Bir Tas Gereklidir!")
return true
   end
end
 
local minlevel = 0
 
if getPokemonName(item2.uid) == "Eevee" then
   local eevee = ""
   if item.itemid == thunder then
      eevee = "Jolteon"
   elseif item.itemid == water then
      eevee = "Vaporeon"
   elseif item.itemid == fire then
      eevee = "Flareon"
   elseif item.itemid == leaf then
      eevee = "Leafeon"
   elseif item.itemid == dawn then
      eevee = "Glaceon"
   elseif item.itemid == prismscale then
      eevee = "Sylveon"
   elseif item.itemid == shiny and allEvolutionsCanBeInduzedByStone then
      eevee = "Espeon"
   elseif item.itemid == dusk and allEvolutionsCanBeInduzedByStone then
      eevee = "Umbreon"
   else
      doPlayerSendCancel(cid, "Bu Pokemonu Gelistirmek Için Gerekli Tas Bu Degil.")
      return true
   end
   minlevel = pokes[eevee].level
   if getPlayerLevel(cid) < minlevel then
      doPlayerSendCancel(cid, "Bu Pokemonu Gelistirmek Için Yeterli Levele Sahip Degilsiniz ("..minlevel..").")
return true
   end
   
   if getPokemonLevel(item2.uid) < 50 then
      return doPlayerSendCancel(cid, "Bu Pokemon Gelismek Için Yeterli Levele Sahip Degil (50).")
   end
   doRemoveItem(item.uid, 1)
   doEvolvePokemon(cid, item2, eevee, 0, 0)
   return true
end
 
if getPokemonName(item2.uid) == "Shiny Eevee" then
   local eevee = ""
   if item.itemid == thunder then
      eevee = "Shiny Jolteon"
   elseif item.itemid == water then
      eevee = "Shiny Vaporeon"
   elseif item.itemid == fire then
      eevee = "Shiny Flareon"
   elseif item.itemid == shiny and allEvolutionsCanBeInduzedByStone then
      eevee = "Shiny Espeon"
   elseif item.itemid == dusk and allEvolutionsCanBeInduzedByStone then
      eevee = "Shiny Umbreon"
   else
      doPlayerSendCancel(cid, "Bu Pokemonu Gelistirmek Için Gerekli Tas Bu Degil.")
      return true
   end
   minlevel = pokes[eevee].level
   if getPlayerLevel(cid) < minlevel then
doPlayerSendCancel(cid, "Bu Pokemonu Gelistirmek Için Yeterli Levele Sahip Degilsiniz ("..minlevel..").")
return true
   end
   if getPokemonLevel(item2.uid) < 50 then
      return doPlayerSendCancel(cid, "Bu Pokemon Gelismek Için Yeterli Levele Sahip Degil (50).")
   end
   doRemoveItem(item.uid, 1)
   doEvolvePokemon(cid, item2, eevee, 0, 0)
   return true
end
 
if getPokemonName(item2.uid) == "Gloom" then
   local gloom = ""
   if item.itemid == leaf then
      gloom = "Vileplume"
   elseif item.itemid == sun then
      gloom = "Bellossom"
   else
      doPlayerSendCancel(cid, "Bu Pokemonu Gelistirmek Için Gerekli Tas Bu Degil.")
      return true
   end
   minlevel = pokes[gloom].level
   if getPlayerLevel(cid) < minlevel then
      doPlayerSendCancel(cid, "Bu Pokemonu Gelistirmek Için Yeterli Levele Sahip Degilsiniz ("..minlevel..").")
return true
   end
   
   if getPokemonLevel(item2.uid) < 40 then
      return doPlayerSendCancel(cid, "Bu Pokemon Gelismek Için Yeterli Levele Sahip Degil (40).")
   end
   doRemoveItem(item.uid, 1)
   doEvolvePokemon(cid, item2, gloom, 0, 0)
   return true
end
 
if getPokemonName(item2.uid) == "Shiny Gloom" then
   local gloom = ""
   if item.itemid == leaf then
      gloom = "Shiny Vileplume"
   elseif item.itemid == sun then
      gloom = "Shiny Bellossom"
   else
      doPlayerSendCancel(cid, "Bu Pokemonu Gelistirmek Için Gerekli Tas Bu Degil.")
      return true
   end
   minlevel = pokes[gloom].level
   if getPlayerLevel(cid) < minlevel then
      doPlayerSendCancel(cid, "Bu Pokemonu Gelistirmek Için Yeterli Levele Sahip Degilsiniz ("..minlevel..").")
return true
   end
   
   if getPokemonLevel(item2.uid) < 40 then
      return doPlayerSendCancel(cid, "Bu Pokemon Gelismek Için Yeterli Levele Sahip Degil (40).")
   end
   doRemoveItem(item.uid, 1)
   doEvolvePokemon(cid, item2, gloom, 0, 0)
   return true
end
 
if getPokemonName(item2.uid) == "Poliwhirl" then
   local poliwhirl = ""
   if item.itemid == water then
      poliwhirl = "Poliwrath"
   elseif item.itemid == king then
      poliwhirl = "Politoed"
   else
      doPlayerSendCancel(cid, "Bu Pokemonu Gelistirmek Için Gerekli Tas Bu Degil.")
      return true
   end
   minlevel = pokes[poliwhirl].level
   if getPlayerLevel(cid) < minlevel then
      doPlayerSendCancel(cid, "Bu Pokemonu Gelistirmek Için Yeterli Levele Sahip Degilsiniz ("..minlevel..").")
return true
   end
   
   if getPokemonLevel(item2.uid) < 50 then
      return doPlayerSendCancel(cid, "Bu Pokemon Gelismek Için Yeterli Levele Sahip Degil (50).")
   end
   doRemoveItem(item.uid, 1)
   doEvolvePokemon(cid, item2, poliwhirl, 0, 0)
   return true
end
 
if getPokemonName(item2.uid) == "Shiny Poliwhirl" then
   local poliwhirl = ""
   if item.itemid == water then
      poliwhirl = "Shiny Poliwrath"
   elseif item.itemid == king then
      poliwhirl = "Shiny Politoed"
   else
      doPlayerSendCancel(cid, "Bu Pokemonu Gelistirmek Için Gerekli Tas Bu Degil.")
      return true
   end
   minlevel = pokes[poliwhirl].level
   if getPlayerLevel(cid) < minlevel then
      doPlayerSendCancel(cid, "Bu Pokemonu Gelistirmek Için Yeterli Levele Sahip Degilsiniz ("..minlevel..").")
return true
   end
   
   if getPokemonLevel(item2.uid) < 50 then
      return doPlayerSendCancel(cid, "Bu Pokemon Gelismek Için Yeterli Levele Sahip Degil (50).")
   end
   doRemoveItem(item.uid, 1)
   doEvolvePokemon(cid, item2, poliwhirl, 0, 0)
   return true
end
 
if getPokemonName(item2.uid) == "Slowpoke" then
   local slowpoke = ""
   if item.itemid == water then
      slowpoke = "Slowbro"
   elseif item.itemid == king then
      slowpoke = "Slowking"
   else
      doPlayerSendCancel(cid, "Bu Pokemonu Gelistirmek Için Gerekli Tas Bu Degil.")
      return true
   end
   minlevel = pokes[slowpoke].level
   if getPlayerLevel(cid) < minlevel then
      doPlayerSendCancel(cid, "Bu Pokemonu Gelistirmek Için Yeterli Levele Sahip Degilsiniz ("..minlevel..").")
return true
   end
   
   if getPokemonLevel(item2.uid) < 50 then
      return doPlayerSendCancel(cid, "Bu Pokemon Gelismek Için Yeterli Levele Sahip Degil (50).")
   end
   doRemoveItem(item.uid, 1)
   doEvolvePokemon(cid, item2, slowpoke, 0, 0)
   return true
end
 
if getPokemonName(item2.uid) == "Shiny Slowpoke" then
   local slowpoke = ""
   if item.itemid == water then
      slowpoke = "Shiny Slowbro"
   elseif item.itemid == king then
      slowpoke = "Shiny Slowking"
   else
      doPlayerSendCancel(cid, "Bu Pokemonu Gelistirmek Için Gerekli Tas Bu Degil.")
      return true
   end
   minlevel = pokes[slowpoke].level
   if getPlayerLevel(cid) < minlevel then
      doPlayerSendCancel(cid, "Bu Pokemonu Gelistirmek Için Yeterli Levele Sahip Degilsiniz ("..minlevel..").")
return true
   end
   
   if getPokemonLevel(item2.uid) < 50 then
      return doPlayerSendCancel(cid, "Bu Pokemon Gelismek Için Yeterli Levele Sahip Degil (50).")
   end
   doRemoveItem(item.uid, 1)
   doEvolvePokemon(cid, item2, slowpoke, 0, 0)
   return true
end
 
if getPokemonName(item2.uid) == "Tyrogue" then
   local tyrogue = ""
   if item.itemid == punch then
      tyrogue = "Hitmonchan"
   elseif item.itemid == kick then
      tyrogue = "Hitmonlee"
   elseif item.itemid == rolling then
      tyrogue = "Hitmontop"
   else
      doPlayerSendCancel(cid, "Bu Pokemonu Gelistirmek Için Gerekli Tas Bu Degil.")
      return true
   end
   minlevel = pokes[tyrogue].level
   if getPlayerLevel(cid) < minlevel then
      doPlayerSendCancel(cid, "Bu Pokemonu Gelistirmek Için Yeterli Levele Sahip Degilsiniz ("..minlevel..").")
return true
   end
   
   if getPokemonLevel(item2.uid) < 50 then
      return doPlayerSendCancel(cid, "Bu Pokemon Gelismek Için Yeterli Levele Sahip Degil (50).")
   end
   doRemoveItem(item.uid, 1)
   doEvolvePokemon(cid, item2, tyrogue, 0, 0)
   return true
end
 
if getPokemonName(item2.uid) == "Shiny Tyrogue" then
   local tyrogue = ""
   if item.itemid == punch then
      tyrogue = "Shiny Hitmonchan"
   elseif item.itemid == kick then
      tyrogue = "Shiny Hitmonlee"
   elseif item.itemid == rolling then
      tyrogue = "Shiny Hitmontop"
   else
      doPlayerSendCancel(cid, "Bu Pokemonu Gelistirmek Için Gerekli Tas Bu Degil.")
      return true
   end
   minlevel = pokes[tyrogue].level
   if getPlayerLevel(cid) < minlevel then
      doPlayerSendCancel(cid, "Bu Pokemonu Gelistirmek Için Yeterli Levele Sahip Degilsiniz ("..minlevel..").")
return true
   end
   
   if getPokemonLevel(item2.uid) < 50 then
      return doPlayerSendCancel(cid, "Bu Pokemon Gelismek Için Yeterli Levele Sahip Degil (50).")
   end
   doRemoveItem(item.uid, 1)
   doEvolvePokemon(cid, item2, tyrogue, 0, 0)
   return true
end
 
local count = poevo[getPokemonName(item2.uid)].count
local stnid = poevo[getPokemonName(item2.uid)].stoneid
local stnid2 = poevo[getPokemonName(item2.uid)].stoneid2
local evo = poevo[getPokemonName(item2.uid)].evolution
local nlevel = poevo[getPokemonName(item2.uid)].level
 
local count = poevo[getPokemonName(item2.uid)].count
local stnid = poevo[getPokemonName(item2.uid)].stoneid
local stnid2 = poevo[getPokemonName(item2.uid)].stoneid2
local evo = poevo[getPokemonName(item2.uid)].evolution
local nlevel = poevo[getPokemonName(item2.uid)].level
 
 
if stnid2 > 1 and (getPlayerItemCount(cid, stnid2) < count or getPlayerItemCount(cid, stnid) < count) then
doPlayerSendCancel(cid, "You need at least one "..getItemNameById(stnid).." and one "..getItemNameById(stnid2).." to evolve this pokemon!")
return true
end
 
if getPlayerItemCount(cid, stnid) < count then
local str = ""
if count >= 2 then
str = "s"
end
return doPlayerSendCancel(cid, "You need at least "..count.." "..getItemNameById(stnid)..""..str.." to evolve this pokemon!")
end
 
minlevel = pokes[evo].level
 
if getPlayerLevel(cid) < minlevel and evolutionByStoneRequireLevel then
doPlayerSendCancel(cid, "Bu Pokemonu Gelistirmek Için Yeterli Levele Sahip Degilsiniz ("..minlevel..").")
return true
end
 
if getPokemonLevel(item2.uid) < nlevel and evolutionByStoneRequireLevel then
doPlayerSendCancel(cid, "Bu Pokemon Gelismek Için Yeterli Levele Sahip Degil ("..nlevel..").")
return true
end
 
if count >= 2 then
stnid2 = stnid
end
 
doEvolvePokemon(cid, item2, evo, stnid, stnid2)
 
return TRUE
end
 

 

Evolution um NPC que eu achei:

 

<?xml version="1.0" encoding="UTF-8"?>

<monster name="Evolution" nameDescription="" race="electric" experience="0" speed="0" manacost="0">
  <health now="1000" max="1000"/>
  <look type="100" head="15" body="20" legs="95" feet="113" corpse="0"/>
  <targetchange interval="10000" chance="0"/>
  <strategy attack="100" defense="0"/>
<flags>
 <flag summonable="1"/>
 <flag attackable="0"/>
 <flag hostile="0"/>
 <flag illusionable="1"/>
 <flag convinceable="1"/>
 <flag pushable="0"/>
 <flag canpushitems="0"/>
 <flag canpushcreatures="0"/>
 <flag targetdistance="1"/>
 <flag staticattack="97"/>
 <flag runonhealth="0"/>
</flags>
 
<attacks>
</attacks>
 
 
<defenses armor="0" defense="0">
</defenses>
 
  <loot>
  </loot>
 

</monster>

 

pokedex system:

 

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 50."
          end   
          table.insert(stt, "Evolve Stone: Water Stone or King's Rock\n\n")
          table.insert(stt, "Evolutions:\nPoliwrath, requires level 50.\nPolitoed, requires level 50.")
       elseif name == "Shiny Poliwhirl" then
          if next then
             return "\nShiny Poliwrath or Shiny Politoed, requires level 50."
          end   
          table.insert(stt, "Evolve Stone: Water Stone or King's Rock\n\n")
          table.insert(stt, "Evolutions:\nShiny Poliwrath, requires level 50.\nShiny Politoed, requires level 50.")
       elseif name == "Gloom" then
          if next then
             return "\nVileplume or Bellossom, requires level 40."
          end
          table.insert(stt, "Evolve Stone: Leaf Stone or Sun Stone\n\n")
          table.insert(stt, "Evolutions:\nVileplume, requires level 40.\nBellossom, requires level 40.")
       elseif name == "Shiny Gloom" then
          if next then
             return "\nShiny Vileplume or Shiny Bellossom, requires level 40."
          end
          table.insert(stt, "Evolve Stone: Leaf Stone or Sun Stone\n\n")
          table.insert(stt, "Evolutions:\nShiny Vileplume, requires level 40.\nShiny Bellossom, requires level 40.")
       elseif name == "Slowpoke" then
          if next then
             return "\nSlowbro, requires level 50.\nSlowking, requires level 50."
          end
          table.insert(stt, "Evolve Stone: Water Stone or King's Rock\n\n")
          table.insert(stt, "Evolutions:\nSlowbro, requires level 50.\nSlowking, requires level 50.")
       elseif name == "Shiny Slowpoke" then
          if next then
             return "\nShiny Slowbro, requires level 50.\nShiny Slowking, requires level 50."
          end
          table.insert(stt, "Evolve Stone: Water Stone or King's Rock\n\n")
          table.insert(stt, "Evolutions:\nShiny Slowbro, requires level 50.\nShiny Slowking, requires level 50.")
       elseif name == "Eevee" then
          if next then
             return "\nVaporeon, requires level 50.\nJolteon, requires level 50.\nFlareon, requires level 50.\nUmbreon, requires level 50.\nEspeon, requires level 50.\nLeafeon, requires level 50.\nGlaceon, requires level 50.\nSylveon, requires level 50."
          end
          table.insert(stt, "Evolve Stone: Water Stone or Thunder Stone or Fire Stone or Dusk Stone or Shiny Stone or Leaf Stone or Dawn Stone or Prism Scale\n\n")
          table.insert(stt, "Evolutions:\nVaporeon, requires level 50.\nJolteon, requires level 50.\nFlareon, requires level 50.\nUmbreon, requires level 50.\nEspeon, requires level 50.\nLeafeon, requires level 50.\nGlaceon, requires level 50.\nSylveon, requires level 50.")
       elseif name == "Shiny Eevee" then
          if next then
             return "\nShiny Vaporeon, requires level 50.\nShiny Jolteon, requires level 50.\nShiny Flareon, requires level 50.\nShiny Umbreon, requires level 50.\nShiny Espeon, requires level 50."
          end
          table.insert(stt, "Evolve Stone: Water Stone or Thunder Stone or Fire Stone or Dusk Stone or Shiny Stone\n\n")
          table.insert(stt, "Evolutions:\nShiny Vaporeon, requires level 50.\nShiny Jolteon, requires level 50.\nShiny Flareon, requires level 50.\nShiny Umbreon, requires level 50.\nShiny Espeon, requires level 50.")
       elseif name == "Tyrogue" then
          if next then
             return "\nHitmonlee, requires level 50.\nHitmonchan, requires level 50.\nHitmontop, requires level 50."
          end
          table.insert(stt, "Evolve Stone: Punch Machine or Kick Machine or Rolling Kick Machine\n\n")   
          table.insert(stt, "Evolutions:\nHitmonlee, requires level 50.\nHitmonchan, requires level 50.\nHitmontop, requires level 50.")
       elseif name == "Shiny Tyrogue" then
          if next then
             return "\nShiny Hitmonlee, requires level 50.\nShiny Hitmonchan, requires level 50.\nShiny Hitmontop, requires level 50."
          end
          table.insert(stt, "Evolve Stone: Punch Machine or Kick Machine or Rolling Kick Machine\n\n")   
          table.insert(stt, "Evolutions:\nShiny Hitmonlee, requires level 50.\nShiny Hitmonchan, requires level 50.\nShiny Hitmontop, requires level 50.")
 
       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 doesn'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, x.tmove1, x.tmove2, x.tmove3}
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", "mining", "headbutt", "harvest"}
local passivas = {
["Electricity"] = {"Electabuzz", "Shiny Electabuzz", "Elekid", "Shiny Elekid", "Joltik", "Galvantula", "Zekrom", tpw = "electric"},
["Lava Counter"] = {"Magmar", "Shiny Magmar", "Magby", "Shiny Magby", "Reshiram", tpw = "fire"},
["Bone Counter"] = {"Cubone", "Marowak", "Shiny Cubone", "Shiny Marowak", tpw = "ground"},
["Counter Helix"] = {tpw = "bug"},
["Giroball"] = {"Pineco", "Forretress", "Shiny Pineco", "Shiny Forretress", tpw = "steel"},
["Counter Claw"] = {"Scizor", "Shiny 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", "Shiny Psyduck", "Shiny Golduck", "Wobbuffet", "Shiny Wobbuffet", tpw = "psychic"},
["Groundshock"] = {"Kangaskhan", "Shiny Kangaskhan", tpw = "normal"},
["Electric Charge"] = {"Pikachu", "Raichu", "Shiny Pikachu", "Shiny Raichu", tpw = "electric"},
["Melody"] = {"Wigglytuff", "Shiny Wigglytuff", tpw = "normal"},
["Dragon Fury"] = {"Dratini", "Dragonair", "Dragonite", "Shiny Dratini", "Shiny Dragonair", "Shiny Dragonite", tpw = "dragon"},
["Fury"] = {"Persian", "Raticate", "Shiny Persian", "Shiny Raticate", tpw = "normal"},
["Mega Drain"] = {"Oddish", "Gloom", "Vileplume", "Kabuto", "Kabutops", "Parasect", "Tangela", "Shiny Oddish", "Shiny Gloom", "Shiny Vileplume", "Shiny Kabuto", "Shiny Kabutops", "Shiny Parasect", "Shiny Tangela", tpw = "grass"},
["Spores Reaction"] = {"Oddish", "Gloom", "Vileplume", "Shiny Oddish", "Shiny Gloom", "Shiny Vileplume", tpw = "grass"},
["Amnesia"] = {"Wooper", "Quagsire", "Swinub", "Piloswine", "Mamoswine", "Shiny Wooper", "Shiny Quagsire", "Shiny Swinub", "Shiny Piloswine", "Shiny Mamoswine",  tpw = "psychic"},
["Zen Mind"] = {"Slowking", "Shiny Slowking", tpw = "psychic"}, 
["Mirror Coat"] = {"Wobbuffet", "Shiny Wobbuffet", tpw = "psychic"},
["Lifesteal"] = {"Crobat", "Shiny Crobat", tpw = "normal"},
["Evasion"] = {"Scyther", "Scizor", "Hitmonlee", "Hitmonchan", "Hitmontop", "Tyrogue", "Shiny Tyrogue", "Shiny Scyther", "Pink Scyther", "Shiny Scizor", "Shiny Hitmonchan", "Shiny Hitmonlee", "Shiny Hitmontop", "Ledian", "Ledyba", "Sneasel", "Shiny Ledian", "Shiny Ledyba", "Shiny Sneasel", tpw = "normal"},
["Foresight"] = {"Machamp", "Shiny Machamp", "Shiny Hitmonchan", "Shiny Hitmonlee", "Shiny Hitmontop", "Hitmontop", "Hitmonlee", "Hitmonchan", tpw = "fighting"},
["Levitate"] = {"Gengar", "Haunter", "Gastly", "Misdreavus", "Weezing", "Koffing", "Unown", "Mismagius", "Shiny Mismagius", "Shiny Unown", "Shiny Misdreavus", "Shiny Weezing", "Shiny Koffing", "Shiny Haunter", "Shiny Gastly", "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
 
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
elseif name == "Shiny Ditto" then
   if virtual then
      table.insert(stt, "\nIt doesn't use any moves until transformed.")
   elseif getPlayerStorageValue(item2.uid, 1010) == "Shiny 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("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, table.concat(stt))

end


up


Resolvido, pode fechar.

Editado por GabrielSapient (veja o histórico de edições)

Resolvido por ViitinG

Ir para solução
Postado
  • Solução

Você abriu uma denúncia relatando que ja resolveu o problema então se possível comente como resolveu o problema para que outros membros que tiverem com o mesmo problema saberem como resolver. ;)

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

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo