Ir para conteúdo

Ajuda


tchuca02

Posts Recomendados

EAE EU TO AKI PRA PEDIR A AJUDA DOS SCRIPTERS É QUE EU PEGEI O SYSTEMA DE LVL DO POKE DE OT POKEMON SQUDIUM

MAIS ELE DA DANDO ERRO O MEU CATCH E GO/BACK NAO ESTA MAIS FUNCIONANDO VO COLOCAR AKI O SCRIPT TODO

 

 

Catch

 

local pokecatches = {

["Bulbasaur"] = {chance = 45, corpse = 5969, health = 1200, maxhealth = 1200},

["Ivysaur"] = {chance = 45, corpse = 5982, health = 2600, maxhealth = 2600},

["Venusaur"] = {chance = 45, corpse = 5962, health = 5200, maxhealth = 5200},

["Shiny Venusaur"] = {chance = 45, corpse = 8764, health = 10400, maxhealth = 10400},

["Machop"] = {chance = 180, corpse = 6045, health = 1100, maxhealth = 1100},

["Machoke"] = {chance = 90, corpse = 4251, health = 3500, maxhealth = 3500},

["Machamp"] = {chance = 45, corpse = 6048, health = 7500, maxhealth = 7500},

["Geodude"] = {chance = 255, corpse = 6071, health = 700, maxhealth = 700},

["Graveler"] = {chance = 120, corpse = 6516, health = 3000, maxhealth = 3000},

["Golem"] = {chance = 45, corpse = 6046, health = 6500, maxhealth = 6500},

["Poliwag"] = {chance = 255, corpse = 6042, health = 400, maxhealth = 400},

["Poliwhirl"] = {chance = 120, corpse = 6054, health = 1200, maxhealth = 1200},

["Poliwrath"] = {chance = 45, corpse = 6033, health = 4400, maxhealth = 4400},

["Tentacool"] = {chance = 190, corpse = 2961, health = 1050, maxhealth = 1050},

["Shiny Tentacool"] = {chance = 150, corpse = 8748, health = 2100, maxhealth = 2100},

["Tentacruel"] = {chance = 60, corpse = 6037, health = 7500, maxhealth = 7500},

["Shiny Tentacruel"] = {chance = 45, corpse = 8757, health = 15000, maxhealth = 15000},

["Bellsprout"] = {chance = 255, corpse = 2806, health = 420, maxhealth = 420},

["Weepinbell"] = {chance = 120, corpse = 4266, health = 1100, maxhealth = 1100},

["Victreebel"] = {chance = 45, corpse = 6332, health = 4000, maxhealth = 4000},

["Abra"] = {chance = 200, corpse = 2905, health = 620, maxhealth = 620},

["Shiny Abra"] = {chance = 50, corpse = 8771, health = 10000, maxhealth = 10000},

["Kadabra"] = {chance = 100, corpse = 6060, health = 2500, maxhealth = 2500},

["Alakazam"] = {chance = 50, corpse = 6057, health = 4000, maxhealth = 4000},

["Shiny Alakazam"] = {chance = 25, corpse = 10282, health = 20000, maxhealth = 20000},

["Charmander"] = {chance = 45, corpse = 5983, health = 970, maxhealth = 970},

["Charmeleon"] = {chance = 45, corpse = 5981, health = 2900, maxhealth = 2900},

["Charizard"] = {chance = 45, corpse = 6005, health = 5200, maxhealth = 5200},

["Blastoise"] = {chance = 45, corpse =5999, health = 5900, maxhealth = 5900},

["Shiny Blastoise"] = {chance = 25, corpse =5950, health = 12000, maxhealth = 12000},

["Wartortle"] = {chance = 45, corpse =5978, health = 2800, maxhealth = 2800},

["Squirtle"] = {chance = 45, corpse =6008, health = 1350, maxhealth = 1350},

["Caterpie"] = {chance = 255, corpse =5970, health = 300, maxhealth = 300},

["Metapod"] = {chance = 120, corpse =5971, health = 1100, maxhealth = 1100},

["Butterfree"] = {chance = 45, corpse =5985, health = 2000, maxhealth = 2000},

["Shiny butterfle"] = {chance = 25, corpse =8762, health = 4000, maxhealth = 4000},

["Weedle"] = {chance = 255, corpse =5964, health = 325, maxhealth = 325},

["Kakuna"] = {chance = 120, corpse =6000, health = 900, maxhealth = 900},

["Beedrill"] = {chance = 45, corpse =5990, health = 1900, maxhealth = 1900},

["Shiny Bedril"] = {chance = 25, corpse =8767, health = 4000, maxhealth = 4000},

["Pidgey"] = {chance = 255, corpse =5961, health = 380, maxhealth = 380},

["Pidgeotto"] = {chance = 120, corpse =5966 , health = 1400, maxhealth = 1400},

["Pidgeot"] = {chance = 45, corpse =6020, health = 3800, maxhealth = 3800},

["Rattata"] = {chance = 255, corpse =5974, health = 350, maxhealth = 350},

["Shiny Rattata"] = {chance = 125, corpse =8751, health = 800, maxhealth = 800},

["Raticate"] = {chance = 127, corpse =6007, health = 900, maxhealth = 900},

["Shiny Raticate"] = {chance = 63, corpse =8765, health = 1800, maxhealth = 1800},

["Spearow"] = {chance = 255, corpse =5968, health = 450, maxhealth = 450},

["Fearow"] = {chance = 90, corpse =5992, health = 3300, maxhealth = 3300},

["Ekans"] = {chance = 255, corpse =5979, health = 600, maxhealth = 600},

["Arbok"] = {chance = 90, corpse =5984, health = 2900, maxhealth = 2900},

["Pikachu"] = {chance = 190, corpse =6001, health = 900, maxhealth = 900},

["Raichu"] = {chance = 75, corpse =5996, health = 3200, maxhealth = 3200},

["Shiny Raichu"] = {chance = 32,corpse =8770, health = 6400, maxhealth = 6400},

["Sandshrew"] = {chance = 255, corpse =5988, health = 700, maxhealth = 700},

["Sandslash"] = {chance = 90, corpse =6041, health = 3400, maxhealth = 3400},

["Nidoranfe"] = {chance = 235, corpse =6013, health = 600, maxhealth = 600},

["Nidorina"] = {chance = 120, corpse =6014, health = 2000, maxhealth = 2000},

["Nidoqueen"] = {chance = 45, corpse =6021, health = 4200, maxhealth = 4200},

["Nidoran"] = {chance = 235, corpse =6015, health = 650, maxhealth = 650},

["Nidorino"] = {chance = 120, corpse =6019, health = 2500, maxhealth = 2500},

["Nidoking"] = {chance = 45, corpse =5995, health = 4800, maxhealth = 4800},

["Clefairy"] = {chance = 150, corpse =2966, health = 600, maxhealth = 600},

["Clefable"] = {chance = 25, corpse =6006, health = 2400, maxhealth = 2400},

["Vulpix"] = {chance = 190, corpse =6003, health = 680, maxhealth = 680},

["Ninetales"] = {chance = 75, corpse =6040, health = 3400, maxhealth = 3400},

["Jigglypuff"] = {chance = 170, corpse =6011, health = 550, maxhealth = 550},

["Wigglytuff"] = {chance = 50, corpse =6012, health = 2900, maxhealth = 2900},

["Zubat"] = {chance = 255, corpse =5989, health = 450, maxhealth = 450},

["Shiny Zubat"] = {chance = 122, corpse =8750, health = 1000, maxhealth = 1000},

["Golbat"] = {chance = 90, corpse =6053, health = 1900, maxhealth = 1900},

["Oddish"] = {chance = 255, corpse =3008, health = 340, maxhealth = 340},

["Shiny Oddish"] = {chance = 122,corpse =8749, health = 700, maxhealth = 700},

["Gloom"] = {chance = 120, corpse =6017, health = 1400, maxhealth = 1400},

["Vileplume"] = {chance = 45, corpse =6025, health = 3300, maxhealth = 3300},

["Paras"] = {chance = 255, corpse =3007, health = 850, maxhealth = 850},

["Shiny Paras"] = {chance = 122, corpse =8743, health = 1800, maxhealth = 1800},

["Parasect"] = {chance = 75, corpse =6027, health = 3800, maxhealth = 3800},

["Shiny Parasect"] = {chance = 35, corpse =8756, health = 8000, maxhealth = 8000},

["Venonath"] = {chance = 190, corpse =5997, health = 1350, maxhealth = 1350},

["Venomoth"] = {chance = 75, corpse =2925, health = 3850, maxhealth = 3850},

["Diglet"] = {chance = 255, corpse =6023, health = 900, maxhealth = 900},

["Dugtrio"] = {chance = 50, corpse =6024, health = 3450, maxhealth = 3450},

["Meowth"] = {chance = 255, corpse =6034, health = 950, maxhealth = 950},

["Persian"] = {chance = 90, corpse =6009, health = 2250, maxhealth = 2250},

["Psyduck"] = {chance = 190, corpse =6029, health = 950, maxhealth = 950},

["Golduck"] = {chance = 75, corpse =6028, health = 4000, maxhealth = 4000},

["Mankey"] = {chance = 190, corpse =6035, health = 1050, maxhealth = 1050},

["Primeape"] = {chance = 75, corpse =6032, health = 4500, maxhealth = 4500},

["Ponyta"] = {chance = 190, corpse =5975, health = 1400, maxhealth = 1400},

["Rapidash"] = {chance = 60, corpse =4323, health = 5500, maxhealth = 5500},

["Slowpoke"] = {chance = 190, corpse =2926, health = 1200, maxhealth = 1200},

["Slowbro"] = {chance = 75, corpse =5986, health = 4600, maxhealth = 4600},

["Doduo"] = {chance = 190, corpse =2842, health = 600, maxhealth = 600},

["Dodrio"] = {chance = 45, corpse =6047, health = 2650, maxhealth = 2650},

["Seel"] = {chance = 190, corpse =6030, health = 1000, maxhealth = 1000},

["Dewgong"] = {chance = 75, corpse =6038, health = 5200, maxhealth = 5200},

["Magnemite"] = {chance = 190, corpse =6056, health = 450, maxhealth = 450},

["Magneton"] = {chance = 60, corpse =6076, health = 1750, maxhealth = 1750},

["Growlithe"] = {chance = 190, corpse =6036, health = 1000, maxhealth = 1000},

["Shiny Growlithe"] = {chance = 90, corpse =8742, health = 2000, maxhealth = 2000},

["Shiny Arcanine"] = {chance = 32, corpse =8746, health = 14000, maxhealth = 14000},

["Arcanine"] = {chance = 75, corpse =6031, health = 6800, maxhealth = 6800},

["Grimer"] = {chance = 190, corpse =6055, health = 600, maxhealth = 600},

["Shiny Grimer"] = {chance = 80, corpse =8752, health = 1200, maxhealth = 1200},

["Muk"] = {chance = 75, corpse =2845, health = 2400, maxhealth = 2400},

["Shiny Muk"] = {chance = 32, corpse =8747, health = 5000, maxhealth = 5000},

["Shellder"] = {chance = 190, corpse =2837, health = 800, maxhealth = 800},

["Cloyster"] = {chance = 60, corpse =2932, health = 5000, maxhealth = 5000},

["Gastly"] = {chance = 190, corpse =5993, health = 1000, maxhealth = 1000},

["Haunter"] = {chance = 90, corpse =6004, health = 3000, maxhealth = 3000},

["Gengar"] = {chance = 45, corpse =6336, health = 7000, maxhealth = 7000},

["Onix"] = {chance = 45, corpse =2990, health = 5300, maxhealth = 5300},

["Drowzee"] = {chance = 190, corpse =6026, health = 1150, maxhealth = 1150},

["Hypno"] = {chance = 75, corpse =6046, health = 4600, maxhealth = 4600},

["Shiny Krabby"] = {chance = 112, corpse =8755, health =1700, maxhealth =1700},

["Krabby"] = {chance = 225,corpse =6039, health = 850, maxhealth = 850},

["Shiny Kingler"] = {chance = 30, corpse =8769, health = 6600, maxhealth = 6600},

["Kingler"] = {chance = 60, corpse =6340, health = 3250, maxhealth = 3250},

["Voltorb"] = {chance = 190, corpse =6049, health = 620, maxhealth = 620},

["Shiny Voltorb"] = {chance = 140, corpse =8754, health = 1200, maxhealth = 1200},

["Electrode"] = {chance = 60, corpse =6051, health = 2000, maxhealth = 2000},

["Shiny Electrode"] = {chance = 30, corpse =8753, health = 4000, maxhealth = 4000},

["Exeggcute"] = {chance = 90, corpse =2982, health = 800, maxhealth = 800},

["Exeggutor"] = {chance = 45, corpse =3005, health = 4000, maxhealth = 4000}, -- PAREI AQUI!

["Cubone"] = {chance = 70, corpse =6050, health = 1200, maxhealth = 1200},

["Marowak"] = {chance = 40, corpse =6072, health = 3900, maxhealth = 3900},

["Hitmonlee"] = {chance = 20, corpse =6067, health = 5500, maxhealth = 5500},

["Hitmonchan"] = {chance = 20, corpse =5977, health = 5500, maxhealth = 5500},

["Goldeen"] = {chance = 100, corpse = 2970, health = 950, maxhealth = 950},

["Seaking"] = {chance = 50, corpse =3038, health = 2000, maxhealth = 2000},

["Koffing"] = {chance = 100, corpse = 2936, health = 900, maxhealth = 900},

["Weezing"] = {chance = 70, corpse =6306, health = 2800, maxhealth = 2800},

["Rhydon"] = {chance = 50, corpse = 2858, health = 7000, maxhealth = 7000},

["Rhyhorn"] = {chance = 70, corpse =3035, health = 3800, maxhealth = 3800},

["Chansey"] = {chance = 50, corpse = 6010, health = 7500, maxhealth = 7500},

["Tangela"] = {chance = 60, corpse = 5976, health = 3500, maxhealth = 3500},

["Kangaskhan"] = {chance = 30, corpse = 6073, health = 7000, maxhealth = 7000},

["Shiny Horsea"] = {chance = 70, corpse = 8768, health = 600, maxhealth = 600},

["Horsea"] = {chance = 150, corpse = 2973, health = 300, maxhealth = 300},

["Shiny Seadra"] = {chance = 60, corpse = 8760, health =5000, maxhealth = 5000 },

["Seadra"] = {chance = 60, corpse = 2872, health =2500, maxhealth = 2500 },

["Staryu"] = {chance = 150, corpse = 5987, health = 1050, maxhealth = 1050},

["Starmie"] = {chance = 60, corpse = 7320, health = 3800, maxhealth = 3800},

["Mr.mime"] = {chance = 30, corpse =6069, health = 5500, maxhealth = 5500},

["Scyther"] = {chance = 30, corpse =3002, health = 6500, maxhealth = 6500},

["Shiny Scyther"] = {chance = 5, corpse =8772, health = 13000, maxhealth = 13000},

["Jynx"] = {chance = 40, corpse = 6077, health = 6000, maxhealth = 6000},

["Shiny Jynx"] = {chance = 15, corpse = 8758, health = 12000, maxhealth = 12000},

["Electabuzz"] = {chance = 30, corpse =6065, health = 6800, maxhealth = 6800},

["Shiny Electabuzz"] = {chance = 15, corpse =8773, health = 14000, maxhealth = 14000},

["Magmar"] = {chance = 30, corpse =7283, health = 7200, maxhealth = 7200},

["Pinsir"] = {chance = 50, corpse = 7282, health = 4000, maxhealth = 4000},

["Tauros"] = {chance = 50, corpse = 6302, health = 4200, maxhealth = 4200},

["Magikarp"] = {chance = 700, corpse = 2818, health = 120, maxhealth = 120 },

["Shiny Magikarp"] = {chance = 200, corpse = 8766, health = 240, maxhealth = 240},

["Gyarados"] = {chance = 30, corpse = 6331, health = 7800, maxhealth = 7800},

["Shiny Gyarados"] = {chance = 10, corpse = 2020, health = 18000, maxhealth = 18000},

["Lapras"] = {chance = 20, corpse =6018, health = 7000, maxhealth = 7000},

["Ditto"] = {chance = 35, corpse =2817, health = 4000, maxhealth = 4000},

["Vaporeon"] = {chance = 50, corpse =5960, health = 4500, maxhealth = 4500},

["Eevee"] = {chance = 100, corpse =6364, health = 1500, maxhealth = 1500},

["Flareon"] = {chance = 50, corpse =6059, health = 4500, maxhealth = 4500},

["Jolteon"] = {chance = 50, corpse =6044, health = 4500, maxhealth = 4500},

["Porygon"] = {chance = 35, corpse =5963 , health = 1700, maxhealth = 1700},

["Omanyte"] = {chance = 60, corpse =5998, health = 1300, maxhealth = 1300},

["Omastar"] = {chance = 30, corpse =5994, health = 6000, maxhealth = 6000},

["Kabutops"] = {chance = 30, corpse = 6345, health = 6500, maxhealth = 6500},

["Kabuto"] = {chance = 60, corpse = 5972, health = 1300, maxhealth = 1300},

["Aerodactyl"] = {chance = 10, corpse = 6338, health = 8000, maxhealth = 8000},

["Snorlax"] = {chance = 30, corpse = 6016, health = 9500, maxhealth = 9500},

["Moltres"] = {chance = 1, corpse = 7330, health = 11000, maxhealth = 11000},

["Articuno"] = {chance = 1, corpse = 7256, health = 11000, maxhealth = 11000},

["Zapdos"] = {chance = 1, corpse = 6074, health = 11000, maxhealth = 11000},

["Crystal Onix"] = {chance = 10, corpse = 6320, health = 10000, maxhealth = 10000},

["Mew"] = {chance = 1, corpse = 2939, health = 7200, maxhealth = 7200},

["Mewtwo"] = {chance = 1, corpse = 5973, health = 8500, maxhealth = 8500},

["Elder Charizard"] = {chance = 10, corpse = 2954, health = 10000, maxhealth = 10000},

["Dragonite"] = {chance = 10, corpse = 4295, health = 10800, maxhealth = 10800},

["Dragonair"] = {chance = 20, corpse = 6002, health = 5600, maxhealth = 5600},

["Dratini"] = {chance = 40, corpse = 2879, health = 1200, maxhealth = 1200},

["Farfetch'd"] = {chance = 80, corpse = 2836, health = 3000, maxhealth = 3000},

["Shiny Farfetch'd"] = {chance = 100, corpse = 8745, health = 6000, maxhealth = 6000}

}

 

function onUse(cid, item, frompos, item2, topos)

 

local name = string.lower(getItemNameById(item2.itemid))

 

if item.itemid == 2147 then

catchrate = 1

oncatch = 24

onfail = 23

bolabola = 2222

elseif item.itemid == 2146 then

catchrate = 4

oncatch = 200

onfail = 199

bolabola = 2220

elseif item.itemid == 2144 then

catchrate = 2

oncatch = 198

onfail = 197

bolabola = 11362

elseif item.itemid == 2145 then

catchrate = 3

oncatch = 202

onfail = 201

bolabola = 11365

end

 

local rate = (catchrate)

local catch = oncatch

local fail = onfail

local newid = bolabola

 

for i, x in pairs(pokecatches) do

 

if string.find(name, string.lower(i)) then

if not item2.itemid == pokecatches.corpse then return true end

 

if cid ~= getItemAttribute(item2.uid, "corpseowner") and getItemAttribute(item2.uid, "corpseowner") ~= nil and isInArray({1,8}, getPlayerGroupId(cid)) then

if isBr(cid) then

doPlayerSendCancel(cid, "Você não tem permissão para capturar esse pokemon.")

else

doPlayerSendCancel(cid, "You are not allowed to catch this pokemon.")

end

return true

end

 

local clevel = tonumber(getItemAttribute(item2.uid, "level"))

local cexp = leveltable[clevel].min

local cnext = leveltable[clevel].next

local coffense = getItemAttribute(item2.uid, "offense")

local cdefense = getItemAttribute(item2.uid, "defense")

local cspeed = getItemAttribute(item2.uid, "speed")

local cvitality = getItemAttribute(item2.uid, "vitality")

local cspatk = getItemAttribute(item2.uid, "spattack")

local happy = 70

 

doRemoveItem(item.uid, 1)

doRemoveItem(item2.uid, 1)

 

local pegar = math.random(0, x.chance)

 

if pegar <= 1*(rate) then

doSendMagicEffect(topos, catch)

 

local function capturou(cid, poke)

if not isCreature(cid) then

return true

end

if getPlayerStorageValue(cid, 54842) == -1 then

setPlayerStorageValue(cid, 54842, "")

end

if not string.find(getPlayerStorageValue(cid, 54842), ""..i..",") then

setPlayerStorageValue(cid, 54842, getPlayerStorageValue(cid, 54842)..""..i..", ")

end

local description = "Contains a "..poke.."."

if getPlayerMana(cid) == 6 then

item = doCreateItemEx(newid-1)

doItemSetAttribute(item, "poke", poke)

doItemSetAttribute(item, "hp", 1)

doItemSetAttribute(item, "offense", coffense)

doItemSetAttribute(item, "level", clevel)

doItemSetAttribute(item, "exp", cexp)

doItemSetAttribute(item, "nextlevelexp", cnext)

doItemSetAttribute(item, "defense", cdefense)

doItemSetAttribute(item, "speed", cspeed)

doItemSetAttribute(item, "vitality", cvitality)

doItemSetAttribute(item, "specialattack", cspatk)

doItemSetAttribute(item, "happy", happy)

doItemSetAttribute(item, "nick", "?")

doItemSetAttribute(item, "fakedesc", description)

doItemSetAttribute(item, "description", description)

doPlayerSendMailByName(getCreatureName(cid), item, 1)

if isBr(cid) then

doPlayerSendTextMessage(cid, 27, "Parabéns, você capturou um pokemon ("..poke..", level "..clevel..")!")

doPlayerSendTextMessage(cid, 27, "Já que você já possui seis pokemons com você, esta pokebola foi enviada ao seu depósito.")

else

doPlayerSendTextMessage(cid, 27, "Congratulations, you caught a pokemon ("..poke..", level "..clevel..")!")

doPlayerSendTextMessage(cid, 27, "Since you are already holding six pokemons, this pokeball has been sent to your depot.")

end

else

item = doCreateItemEx(2219)

doItemSetAttribute(item, "poke", poke)

doItemSetAttribute(item, "hp", 1)

doItemSetAttribute(item, "offense", coffense)

doItemSetAttribute(item, "level", clevel)

doItemSetAttribute(item, "exp", cexp)

doItemSetAttribute(item, "nextlevelexp", cnext)

doItemSetAttribute(item, "defense", cdefense)

doItemSetAttribute(item, "speed", cspeed)

doItemSetAttribute(item, "vitality", cvitality)

doItemSetAttribute(item, "specialattack", cspatk)

doItemSetAttribute(item, "happy", happy)

doItemSetAttribute(item, "nick", "?")

doItemSetAttribute(item, "description", description)

doItemSetAttribute(item, "fakedesc", description)

doPlayerAddItemEx(cid, item, true)

doTransformItem(item, newid)

if isBr(cid) then

doPlayerSendTextMessage(cid, 27, "Parabéns, você capturou um pokemon ("..poke..", level "..clevel..")!")

else

doPlayerSendTextMessage(cid, 27, "Congratulations, you caught a pokemon ("..poke..", level "..clevel..")!")

end

end

if #getCreatureSummons(cid) >= 1 then

doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 178)

else

doSendMagicEffect(getThingPos(cid), 178)

end

end

doPlayerAddSoul(cid, 1)

addEvent(capturou, 4000, cid, i)

else

 

local function ruim(cid)

if not isCreature(cid) then

return true

end

if isBr(cid) then

doPlayerSendTextMessage(cid, 27, "Desculpe, você não capturou esse pokemon.")

else

doPlayerSendTextMessage(cid, 27, "Sorry, you didn\'t catch that pokemon.")

end

if #getCreatureSummons(cid) >= 1 then

doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 166)

else

doSendMagicEffect(getThingPos(cid), 166)

end

end

 

addEvent(ruim, 4000, cid)

doSendMagicEffect(topos, fail)

 

end

end

end

return TRUE

end

 

 

Go/back

 

--doCreatureSetNick(pk, getItemAttribute(item.uid, "nickname"))

 

local pokes = {

["Zubat"] = {level = 5, go = "Go, Zubat!" , back = "Back, Zubat!"},

["Zapdos"] = {level = 150, go = "Go, Zapdos!", back = "Back, Zapdos!"},

["Wygglypuff"] = {level = 8, go = "Go, Wygglypuff!", back = "Back, Wygglypuff!"},

["Wigglytuff"] = {level = 42, go = "Go, Wigglytuff", back = "Back, Wigglytuff!"},

["Weezing"] = {level = 30, go = "Go, Weezing", back = "Back, Weezing!"},

["Weepinbell"] = {level = 18, go = "Go, Weepinbell!", back = "Back, Weepinbell!"},

["Weedle"] = {level = 1, go = "Go, Weedle!", back = "Back, Weedle!"},

["Wartortle"] = {level = 40, go = "Go, Wartortle!", back = "Back, Wartortle!"},

["Vulpix"] = {level = 20, go = "Go, Vulpix", back = "Back, Vulpix!"},

["Voltorb"] = {level = 12, go = "Go, Voltorb!", back = "Back, Voltorb!"},

["Vileplume"] = {level = 50, go = "Go, Vileplume!", back = "Back, Vileplume!"},

["Victreebel"] = {level = 50, go = "Go, Victreebel!", back = "Back, Victreebel!"},

["Venusaur"] = {level = 85, go = "Go, Venusaur!", back = "Back, Venusaur!"},

["Venonat"] = {level = 18, go = "Go, Venonat!", back = "Back, Venonat!"},

["Venomoth"] = {level = 50, go = "Go, Venomoth!", back = "Back, Venomoth!"},

["Vaporeon"] = {level = 55, go = "Go, Vaporeon!", back = "Back, Vaporeon!"},

["Tentacruel"] = {level = 70, go = "Go, Tentacruel!", back = "Back, Tentacruel!"},

["Tentacool"] = {level = 12, go = "Go, Tentacool!", back = "Back, Tentacool!"},

["Tauros"] = {level = 40, go = "Go, Tauros!", back = "Back, Tauros!"},

["Tangela"] = {level = 40, go = "Go, Tangela!", back = "Back, Tangela!"},

["Staryu"] = {level = 15, go = "Go, Staryu!", back = "Back, Staryu!"},

["Starmie"] = {level = 45, go = "Go, Starmie!", back = "Back, Starmie!"},

["Squirtle"] = {level = 20, go = "Go, Squirtle!", back = "Back, Squirtle!"},

["Spearow"] = {level = 5, go = "Go, Spearow!", back = "Back, Spearow!"},

["Snorlax"] = {level = 85, go = "Go, Snorlax!", back = "Back, Snorlax!"},

["Slowpoke"] = {level = 12, go = "Go, Slowpoke!", back = "Back, Slowpoke!"},

["Slowbro"] = {level = 45, go = "Go, Slowbro!", back = "Back, Slowbro!"},

["Shellder"] = {level = 5, go = "Go, Shellder!", back = "Back, Shellder!"},

["Seel"] = {level = 20, go = "Go, Seel!", back = "Back, Seel!"},

["Seaking"] = {level = 25, go = "Go, Seaking!", back = "Back, Seaking!"},

["Seadra"] = {level = 45, go = "Go, Seadra!", back = "Back, Seadra!"},

["Scyther"] = {level = 70, go = "Go, Scyther!", back = "Back, Scyther!"},

["Sandslash"] = {level = 55, go = "Go, Sandslash!", back = "Back, Sandslash!"},

["Sandshrew"] = {level = 18, go = "Go, Sandshrew!", back = "Back, Sandshrew!"},

["Rhyhorn"] = {level = 35, go = "Go, Rhyhorn!", back = "Back, Rhyhorn!"},

["Rhydon"] = {level = 65, go = "Go, Rhydon!", back = "Back, Rhydon!"},

["Rattata"] = {level = 1, go = "Go, Rattata!", back = "Back, Rattata!"},

["Raticate"] = {level = 20, go = "Go, Raticate!", back = "Back, Raticate!"},

["Rapidash"] = {level = 60, go = "Go, Rapidash!", back = "Back, Rapidash!"},

["Raichu"] = {level = 50, go = "Go, Raichu!", back = "Back, Raichu!"},

["Psyduck"] = {level = 12, go = "Go, Psyduck!", back = "Back, Psyduck!"},

["Primeape"] = {level = 45, go = "Go, Primeape!", back = "Back, Primeape!"},

["Porygon"] = {level = 45, go = "Go, Porygon!", back = "Back, Porygon!"},

["Ponyta"] = {level = 20, go = "Go, Ponyta!", back = "Back, Ponyta!"},

["Poliwrath"] = {level = 65, go = "Go, Poliwrath!", back = "Back, Poliwrath!"},

["Poliwhirl"] = {level = 20, go = "Go, Poliwhirl!", back = "Back, Poliwhirl!"},

["Poliwag"] = {level = 5, go = "Go, Poliwag!", back = "Back, Poliwag!"},

["Pinsir"] = {level = 42, go = "Go, Pinsir!", back = "Back, Pinsir!"},

["Pikachu"] = {level = 20, go = "Go, Pikachu!", back = "Back, Pikachu!"},

["Pidgeot"] = {level = 65, go = "Go, Pidgeot!", back = "Back, Pidgeot!"},

["Pidgey"] = {level = 5, go = "Go, Pidgey!", back = "Back, Pidgey!"},

["Pidgeotto"] = {level = 20, go = "Go, Pidgeotto!", back = "Back, Pidgeotto!"},

["Persian"] = {level = 25, go = "Go, Persian!", back = "Back, Persian!"},

["Parasect"] = {level = 50, go = "Go, Parasect!", back = "Back, Parasect!"},

["Paras"] = {level = 8, go = "Go, Paras!", back = "Back, Paras!"},

["Onix"] = {level = 50, go = "Go, Onix!", back = "Back, Onix!"},

["Omastar"] = {level = 70, go = "Go, Omastar!", back = "Back, Omastar!"},

["Omanyte"] = {level = 20, go = "Go, Omanyte!", back = "Back, Omanyte!"},

["Oddish"] = {level = 5, go = "Go, Oddish!", back = "Back, Oddish!"},

["Ninetales"] = {level = 65, go = "Go, Ninetales!", back = "Back, Ninetales!"},

["Nidorino"] = {level = 25, go = "Go, Nidorino!", back = "Back, Nidorino!"},

["Nidorina"] = {level = 25, go = "Go, Nidorina!", back = "Back, Nidorina!"},

["Nidoranma"] = {level = 10, go = "Go, Nidoran!", back = "Back, Nidoran!"},

["Nidoranfe"] = {level = 10, go = "Go, Nidoran!", back = "Back, Nidoran!"},

["Nidoqueen"] = {level = 65, go = "Go, Nidoqueen!", back = "Back, Nidoqueen!"},

["Nidoking"] = {level = 65, go = "Go, Nidoking!", back = "Back, Nidoking!"},

["Muk"] = {level = 30, go = "Go, Muk!", back = "Back, Muk!"},

["Mr.Mine"] = {level = 8, go = "Go, Mr.Mime!", back = "Back, Mr.Mime!"},

["Moltres"] = {level = 150, go = "Go, Moltres!", back = "Back, Moltres!"},

["Mewtwo"] = {level = 200, go = "Go, Mewtwo!", back = "Back, Mewtwo!"},

["Mew"] = {level = 200, go = "Go, Mew!", back = "Back, Mew!"},

["Metapod"] = {level = 10, go = "Go, Metapod!", back = "Back, Metapod!"},

["Meowth"] = {level = 12, go = "Go, Meowth!", back = "Back, Meowth!"},

["Marowak"] = {level = 45, go = "Go, Marowak!", back = "Back, Marowak!"},

["Mankey"] = {level = 10, go = "Go, Mankey!", back = "Back, Mankey!"},

["Magneton"] = {level = 35, go = "Go, Magneton!", back = "Back, Magneton!"},

["Magnemite"] = {level = 8, go = "Go, Magnemite!", back = "Back, Magnemite!"},

["Magmar"] = {level = 70, go = "Go, Magmar!", back = "Back, Magmar!"},

["Magikarp"] = {level = 1, go = "Go, Magikarp!", back = "Back, Magikarp!"},

["Machop"] = {level = 18, go = "Go, Machop!", back = "Back, Machop!"},

["Machoke"] = {level = 40, go = "Go, Machoke!", back = "Back, Machoke!"},

["Machamp"] = {level = 65, go = "Go, Machamp!", back = "Back, Machamp!"},

["Lickitung"] = {level = 45, go = "Go, Lickitung!", back = "Back, Lickitung!"},

["Lapras"] = {level = 70, go = "Go, Lapras!", back = "Back, Lapras!"},

["Krabby"] = {level = 5, go = "Go, Krabby!", back = "Back, Krabby!"},

["Koffing"] = {level = 15, go = "Go, Koffing!", back = "Back, Koffing!"},

["Kingler"] = {level = 35, go = "Go, Kingler!", back = "Back, Kingler!"},

["Kangaskhan"] = {level = 60, go = "Go, Kangaskhan!", back = "Back, Kanghaskan!"},

["Kakuna"] = {level = 10, go = "Go, Kakuna!", back = "Back, Kakuna!"},

["Kadabra"] = {level = 50, go = "Go, Kadabra", back = "Back, Kadabra!"},

["Kabutops"] = {level = 70, go = "Go, Kabutops!", back = "Back, Kabutops!"},

["Kabuto"] = {level = 20, go = "Go, Kabuto!", back = "Back, Kabuto!"},

["Jynx"] = {level = 65, go = "Go, Jynx!", back = "Back, Jynx!"},

["Jyglipuff"] = {level = 8, go = "Go, Jyglipuff!", back = "Back, Jyglipuff!"},

["Jolteon"] = {level = 55, go = "Go, Jolteon!", back = "Back, Jolteon!"},

["Jigglypuff"] = {level = 10, go = "Go, Jigglypuff!", back = "Back, Jigglypuff!"},

["Ivysaur"] = {level = 40, go = "Go, Ivysaur!", back = "Back, Ivysaur!"},

["Hypno"] = {level = 50, go = "Go, Hypno!", back = "Back, Hypno!"},

["Horsea"] = {level = 5, go = "Go, Horsea!", back = "Back, Horsea!"},

["Hitmonlee"] = {level = 60, go = "Go, Hitmonlee!", back = "Back, Hitmonlee!"},

["Hitmonchan"] = {level = 60, go = "Go, Hitmonchan!", back = "Back, Hitmonchan!"},

["Haunter"] = {level = 45, go = "Go, Haunter!", back = "Back, Haunter!"},

["Gyarados"] = {level = 75, go = "Go, Gyarados!", back = "Back, Gyarados!"},

["Growlithe"] = {level = 20, go = "Go, Growlithe!", back = "Back, Growlithe!"},

["Goldeen"] = {level = 5, go = "Go, Goldeen!", back = "Back, Goldeen!"},

["Golduck"] = {level = 55, go = "Go, Golduck!", back = "Back, Golduck!"},

["Golem"] = {level = 65, go = "Go, Golem!", back = "Back, Golem!"},

["Graveler"] = {level = 40, go = "Go, Graveler!", back = "Back, Graveler!"},

["Grimer"] = {level = 12, go = "Go, Grimer!", back = "Back, Grimer!"},

["Golbat"] = {level = 30, go = "Go, Golbat!", back = "Back, Golbat!"},

["Gloom"] = {level = 18, go = "Go, Gloom!", back = "Back, Gloom!"},

["Geodude"] = {level = 12, go = "Go, Geodude!", back = "Back, Geodude!"},

["Gengar"] = {level = 80, go = "Go, Gengar!", back = "Back, Gengar!"},

["Gastly"] = {level = 18, go = "Go, Gastly!", back = "Back, Gastly!"},

["Flareon"] = {level = 55, go = "Go, Flareon!", back = "Back, Flareon!"},

["Fearow"] = {level = 40, go = "Go, Fearow!", back = "Back, Fearow!"},

["Farfetch"] = {level = 40, go = "Go, Farfetch!", back = "Back, Farfetch!"},

["Exeggutor"] = {level = 48, go = "Go, Exeggutor!", back = "Back, Exeggutor!"},

["Exeggcute"] = {level = 8, go = "Go, Exeggcute!", back = "Back, Exeggcute!"},

["Staryu"] = {level = 8, go = "Go, Staryu!", back = "Back, Staryu!"},

["Ekans"] = {level = 12, go = "Go, Ekans!", back = "Back, Ekans!"},

["Shiny Charizard"] = {level = 100, go = "Go, Shiny Charizard!", back = "Back, Shiny Charizard!"},

["Electabuzz"] = {level = 70, go = "Go, Electabuzz!", back = "Back, Electabuzz!"},

["Electrode"] = {level = 40, go = "Go, Electrode!", back = "Back, Electrode!"},

["Dugtrio"] = {level = 35, go = "Go, Dugtrio!", back = "Back, Dugtrio!"},

["Drowzee"] = {level = 22, go = "Go, Drowzee!", back = "Back, Drowzee!"},

["Dratini"] = {level = 10, go = "Go, Dratini!", back = "Back, Dratini!"},

["Dragonite"] = {level = 100, go = "Go, Dragonite!", back = "Back, Dragonite!"},

["Dragonair"] = {level = 70, go = "Go, Dragonair!", back = "Back, Dragonair!"},

["Doduo"] = {level = 12, go = "Go, Doduo!", back = "Back, Doduo!"},

["Dodrio"] = {level = 45, go = "Go, Dodrio!", back = "Back, Dodrio!"},

["Ditto"] = {level = 40, go = "Go, Ditto!", back = "Back, Ditto!"},

["Diglett"] = {level = 5, go = "Go, Digglet!", back = "Back, Digglet!"},

["Dewgong"] = {level = 65, go = "Go, Dewgong!", back = "Back, Dewgong!"},

["Cubone"] = {level = 18, go = "Go, Cubone!", back = "Back, Cubone!"},

["Crystal Onix"] = {level = 100, go = "Go, Crystal Onix!", back = "Back, Crystal Onix!"},

["Cloyster"] = {level = 65, go = "Go, Cloyster!", back = "Back, Cloyster!"},

["Clefairy"] = {level = 10, go = "Go, Clefairy!", back = "Back, Clefairy!"},

["Clefabe"] = {level = 42, go = "Go, Clefabe!", back = "Back, Clefabe!"},

["Charmeleon"] = {level = 40, go = "Go, Charmeleon!", back = "Back, Charmeleon!"},

["Charmander"] = {level = 20, go = "Go, Charmander!", back = "Back, Charmander!"},

["Charizard"] = {level = 85, go = "Go, Charizard!", back = "Back, Charizard!"},

["Chansey"] = {level = 60, go = "Go, Chansey!", back = "Back, Chansey!"},

["Caterpie"] = {level = 1, go = "Go, Caterpie!", back = "Back, Caterpie!"},

["Butterfree"] = {level = 30, go = "Go, Butterfree!", back = "Back, Butterfree!"},

["Bulbasaur"] = {level = 20, go = "Go, Bulbasaur!", back = "Back, Bulbasaur!"},

["Blastoise"] = {level = 85, go = "Go, Blastoise!", back = "Back, Blastoise!"},

["Bellsprout"] = {level = 5, go = "Go, Bellsprout!", back = "Back, Bellsprout!"},

["Beedrill"] = {level = 30, go = "Go, Beedril!", back = "Back, Beedril!"},

["Articuno"] = {level = 150, go = "Go, Articuno!", back = "Back, Articuno!"},

["Arcanine"] = {level = 80, go = "Go, Arcanine!", back = "Back, Arcanine!"},

["Arbok"] = {level = 30, go = "Go, Arbok!", back = "Back, Arbok!"},

["Alakazam"] = {level = 80, go = "Go, Alakazam!", back = "Back, Alakazam!"},

["Aerodactyl"] = {level = 100, go = "Go, Aerodactyl!", back = "Back, Aerodactyl!"},

["Abra"] = {level = 10, go = "Go, Abra!", back = "Back, Abra!"},

}

 

function onUse(cid, item, frompos, item2, topos)

 

if getCreatureCondition(cid, CONDITION_OUTFIT) == true then

return true

end

 

if item.itemid == 2222 or item.itemid == 2223 then

gobackeff = 10

elseif item.itemid == 2220 or item.itemid == 2221 then

gobackeff = 191

elseif item.itemid == 11362 or item.itemid == 11363 then

gobackeff = 189

elseif item.itemid == 11365 or item.itemid == 11366 then

gobackeff = 190

end

local effect = gobackeff

 

if item.itemid == 2223 or item.itemid == 2221 or item.itemid == 11363 or item.itemid == 11366 then

 

for a, b in pairs(ginasios) do

if getPlayerStorageValue(cid, b.storage) == 1 then -- GYM

if isBr(cid) then

doPlayerSendCancel(cid, "Você não pode retornar seu pokemon durante batalhas de ginásios!.")

else

doPlayerSendCancel(cid, "You can't return your pokemon during gym battles.")

end

return true

end

end

 

if #getCreatureSummons(cid) <= 0 then

doTransformItem(item.uid, item.itemid-1)

doItemSetAttribute(item.uid, "hp", 0)

return true

end

 

local z = getCreatureSummons(cid)[1]

local pokename = getItemAttribute(item.uid, "nick")

if pokename == "?" then

pokename = getCreatureName(z)

end

local mbk = msgs[math.random(1, 6)].back:gsub("doka", pokename)

 

doTransformItem(item.uid, item.itemid-1)

doCreatureSay(cid, mbk, TALKTYPE_SAY)

 

local pokelife = (getCreatureHealth(z) / getCreatureMaxHealth(z))

doItemSetAttribute(item.uid, "hp", pokelife)

 

setPlayerStorageValue(cid, 61204, 0)

setPlayerStorageValue(cid, 2, 0)

 

doSendMagicEffect(getCreaturePosition(z), effect)

doRemoveCreature(z)

 

elseif item.itemid == 2222 or item.itemid == 2220 or item.itemid == 11362 or item.itemid == 11365 then

 

if item.uid ~= getPlayerSlotItem(cid, CONST_SLOT_FEET).uid then

if isBr(cid) then

doPlayerSendCancel(cid, "Você deve colocar sua pokebola no lugar correto!")

else

doPlayerSendCancel(cid, "You must put your pokeball in the correct place!")

end

return TRUE

end

 

local pokemon = getItemAttribute(item.uid, "poke")

 

if not pokes[pokemon] then

return true

end

 

local x = pokes[pokemon]

 

if getPlayerLevel(cid) < x.level then

if isBr(cid) then

doPlayerSendCancel(cid, "Você precisa ser nível "..x.level.." ou maior para usar este pokemon.")

else

doPlayerSendCancel(cid, "You need level "..x.level.." or higher to use this pokemon.")

end

return true

end

 

doSummonMonster(cid, pokemon)

 

local pk = getCreatureSummons(cid)[1]

 

if not isCreature(pk) then return true end

 

doCreatureSetLookDir(pk, 2)

if getItemAttribute(item.uid, "nick") ~= "?" then

doCreatureSetNick(pk, getItemAttribute(item.uid, "nick"))

end

 

adjustStatus(pk, item.uid)

 

local mh = (getCreatureMaxHealth(pk) + (x.cons * getVitality(pk)))

local rd = 1 - (tonumber(getItemAttribute(item.uid, "hp")))

 

setCreatureMaxHealth(pk, mh)

doCreatureAddHealth(pk, getCreatureMaxHealth(pk))

doCreatureAddHealth(pk, -(getCreatureMaxHealth(pk) * rd))

 

doTransformItem(item.uid, item.itemid+1)

 

local pokename = getItemAttribute(item.uid, "nick")

if pokename == "?" then

pokename = getCreatureName(pk)

end

local mgo = msgs[math.random(1, 6)].go:gsub("doka", pokename)

doCreatureSay(cid, mgo, TALKTYPE_SAY)

 

doSendMagicEffect(getCreaturePosition(pk), effect)

 

registerCreatureEvent(pk, "DiePoke")

registerCreatureEvent(pk, "Exp")

 

if getItemAttribute(item.uid, "burn") ~= nil and getItemAttribute(item.uid, "burn") >= 1 then

addEvent(doBurn, 3700, pk, pk, getItemAttribute(item.uid, "burn"), getItemAttribute(item.uid, "burndmg"))

end

 

if getItemAttribute(item.uid, "poison") ~= nil and getItemAttribute(item.uid, "poison") >= 1 then

addEvent(doPoison, 1200, pk, pk, getItemAttribute(item.uid, "poison"), getItemAttribute(item.uid, "poisondmg"))

end

 

if getItemAttribute(item.uid, "confuse") ~= nil and getItemAttribute(item.uid, "confuse") >= 1 then

addEvent(doConfuse, 1200, pk, getItemAttribute(item.uid, "confuse"))

end

 

if getItemAttribute(item.uid, "blind") ~= nil and getItemAttribute(item.uid, "blind") >= 1 then

addEvent(doBlind, 300, pk, getItemAttribute(item.uid, "blind"), getItemAttribute(item.uid, "blindef"))

end

 

end

return TRUE

end

 

 

Agora Na pasta creaturescript

Pokeexp

 

local balls = {2146, 2147, 2150, 2149, 2521}

 

 

function onDeath(cid, corpse)

if isSummon(cid) then return true end

local givenexp = getWildPokemonExp(cid)

local expstring = cid.."expEx"

local killer = getItemAttribute(corpse.uid, "corpseowner")

local killers = string.explode(getPlayerStorageValue(cid, 2000), ", ")

for a = 1, #killers do

local pk = getPlayerByName(killers[a])

if isCreature(pk) then

local firstball = getPlayerSlotItem(pk, 8)

if getItemAttribute(firstball.uid, expstring) ~= null and getItemAttribute(firstball.uid, expstring) ~= 0 then

local gainexp = math.ceil(getItemAttribute(firstball.uid, expstring) * givenexp)

doItemSetAttribute(firstball.uid, expstring, 0)

givePokemonExp(pk, firstball, gainexp)

end

for b = 1, #balls do

local pokes = getItemsInContainerById(getPlayerSlotItem(pk, 3).uid, balls)

for _, uid in pairs (pokes) do

if getItemAttribute(uid, expstring) ~= null and getItemAttribute(uid, expstring) ~= 0 then

local gainexp = math.ceil(getItemAttribute(uid, expstring) * givenexp)

doItemSetAttribute(uid, expstring, 0)

givePokemonExpInBp(pk, uid, gainexp, balls)

end

end

end

end

end

doItemSetAttribute(corpse.uid, "offense", getOffense(cid))

doItemSetAttribute(corpse.uid, "defense", getDefense(cid))

doItemSetAttribute(corpse.uid, "speed", getSpeed(cid))

doItemSetAttribute(corpse.uid, "vitality", getVitality(cid))

doItemSetAttribute(corpse.uid, "spattack", getSpecialAttack(cid))

doItemSetAttribute(corpse.uid, "level", getLevel(cid))

return true

end

 

 

 

Agora na pasta Lib

level system

 

 

function doEvolvePokemon(cid, item2, theevo, stone1, stone2)

local owner = getCreatureMaster(item2.uid)

local pokeball = getPlayerSlotItem(cid, 8)

local description = "Contains a "..theevo.."."

 

doItemSetAttribute(pokeball.uid, "poke", theevo)

doItemSetAttribute(pokeball.uid, "fakedesc", "Contains a "..theevo..".")

 

if getItemAttribute(pokeball.uid, "nick") ~= "?" then

local newdes = getItemAttribute(getPlayerSlotItem(cid, 8).uid, "fakedesc").."\nIt's nickname is: "..getItemAttribute(getPlayerSlotItem(cid, 8).uid, "nname").."."

doItemSetAttribute(pokeball.uid, "description", newdes)

else

doItemSetAttribute(pokeball.uid, "description", "Contains a "..theevo..".")

end

 

if isBr(cid) then

doPlayerSendTextMessage(cid, 27, "Parabéns! Seu "..getPokeName(item2.uid).." evoluiu para um "..theevo.."!")

else

doPlayerSendTextMessage(cid, 27, "Congratulations! Your "..getPokeName(item2.uid).." evolved into a "..theevo.."!")

end

doSendMagicEffect(getThingPos(item2.uid), 18)

doTransformItem(getPlayerSlotItem(cid, 7).uid, fotos[theevo].fotopoke)

doSendMagicEffect(getThingPos(cid), 173)

local oldpos = getThingPos(item2.uid)

doRemoveCreature(item2.uid)

 

doSummonMonster(cid, theevo)

local pk = getCreatureSummons(cid)[1]

 

if getItemAttribute(pokeball.uid, "nick") ~= "?" then

doCreatureSetNick(pk, getItemAttribute(pokeball.uid, "nick"))

end

 

registerCreatureEvent(pk, "DiePoke")

registerCreatureEvent(pk, "Exp")

doTeleportThing(pk, oldpos, false)

doCreatureSetLookDir(pk, 2)

setCreatureMaxHealth(pk, getCreatureMaxHealth(pk) + (pokes[getPokemonName(pk)].cons * getPlayerLevel(cid)))

doCreatureAddHealth(pk, getCreatureMaxHealth(pk))

doPlayerRemoveItem(cid, stone1, 1)

doPlayerRemoveItem(cid, stone2, 1)

setPlayerStorageValue(cid, 2, 0)

 

local i = getPokemonName(getCreatureSummons(cid)[1])

doItemSetAttribute(pokeball.uid, "hp", 1)

if not string.find(getPlayerStorageValue(cid, 54842), ""..i..",") then

setPlayerStorageValue(cid, 54842, getPlayerStorageValue(cid, 54842)..""..i..", ")

end

end

 

function givePokemonExp(cid, item, expe)

if expe <= 0 then return true end

doItemSetAttribute(item.uid, "exp", getItemAttribute(item.uid, "exp") + expe)

doItemSetAttribute(item.uid, "nextlevelexp", getItemAttribute(item.uid, "nextlevelexp") - expe)

doPlayerSendTextMessage(cid, 27, "Your "..getPokeballName(item.uid).." has received "..expe.." experience points.")

if isBeingUsed(item.itemid) then

doSendAnimatedText(getThingPos(getCreatureSummons(cid)[1]), expe, 215)

end

if getItemAttribute(item.uid, "nextlevelexp") <= 0 then

doPlayerSendTextMessage(cid, 27, "Your "..getPokeballName(item.uid).." has leveled up!")

if isBeingUsed(item.itemid) then

doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 28)

doSendAnimatedText(getThingPos(getCreatureSummons(cid)[1]), "Level up!", math.random(3, 250))

end

adjustPokemonLevel(item.uid, cid, item.itemid)

doItemSetAttribute(item.uid, "nextlevelexp", leveltable[getItemAttribute(item.uid, "level")].next - math.abs(getItemAttribute(item.uid, "nextlevelexp")))

end

end

 

 

 

function adjustPokemonLevel(item, cid, id)

local a = getItemAttribute(item, "exp")

local d = 1

for b, c in pairs (leveltable) do

if a >= c.min and a <= c.max then

d = b

end

end

local pokemon = getItemAttribute(item, "poke")

local happy = getItemAttribute(item, "happy")

local rate = happy / 100

local vit = 0

if happy >= 249 then

vit = 6

elseif happy >= 230 then

vit = 5

elseif happy >= 210 then

vit = 4

elseif happy >= 180 then

vit = 3

elseif happy >= 140 then

vit = 2

elseif happy >= 110 then

vit = 1

end

local off = math.ceil(pokes[pokemon].off * rate)

local def = math.ceil(pokes[pokemon].def * rate)

local spd = math.ceil(pokes[pokemon].spd * rate)

 

doItemSetAttribute(item, "level", d)

doItemSetAttribute(item, "happy", happy + 5)

doItemSetAttribute(item, "offense", getItemAttribute(item, "offense") + off)

doItemSetAttribute(item, "defense", getItemAttribute(item, "defense") + def)

doItemSetAttribute(item, "speed", getItemAttribute(item, "speed") + spd)

doItemSetAttribute(item, "vitality", getItemAttribute(item, "vitality") + vit)

if isCreature(cid) and id >= 1 then

if isBeingUsed(id) then

adjustStatus(getCreatureSummons(cid)[1], item, vit)

doPlayerSendTextMessage(cid, 27, "• Level: "..d.." • Offense: +"..off.." • Defense: +"..def.." • Agility: +"..spd.." • Vitality: +"..vit.."")

end

end

end

 

function adjustStatus(pk, item, hp)

setPlayerStorageValue(pk, 1000, getItemAttribute(item, "level"))

setPlayerStorageValue(pk, 1001, getItemAttribute(item, "offense"))

setPlayerStorageValue(pk, 1002, getItemAttribute(item, "defense"))

setPlayerStorageValue(pk, 1003, getItemAttribute(item, "speed"))

doChangeSpeed(pk, -getCreatureSpeed(pk))

doChangeSpeed(pk, getCreatureBaseSpeed(pk) + getSpeed(pk))

setPlayerStorageValue(pk, 1004, getItemAttribute(item, "vitality"))

if hp then

setCreatureMaxHealth(pk, getCreatureMaxHealth(pk) + pokes[getCreatureName(pk)].cons * hp)

end

setPlayerStorageValue(pk, 1005, getItemAttribute(item, "specialattack"))

end

 

function givePokemonExpInBp(cid, item, expe, ballid)

if expe <= 0 then return true end

doItemSetAttribute(item, "exp", getItemAttribute(item, "exp") + expe)

doItemSetAttribute(item, "nextlevelexp", getItemAttribute(item, "nextlevelexp") - expe)

doPlayerSendTextMessage(cid, 27, "Your "..getPokeballName(item).." has received "..expe.." experience points.")

if isBeingUsed(ballid) then

doSendAnimatedText(getThingPos(getCreatureSummons(cid)[1]), expe, 215)

end

if getItemAttribute(item, "nextlevelexp") <= 0 then

doPlayerSendTextMessage(cid, 27, "Your "..getPokeballName(item).." has leveled up!")

if isBeingUsed(item) then

doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 28)

doSendAnimatedText(getThingPos(getCreatureSummons(cid)[1]), "Level up!", math.random(3, 250))

end

adjustPokemonLevel(item, cid, ballid)

doItemSetAttribute(item, "nextlevelexp", leveltable[getItemAttribute(item, "level")].next - math.abs(getItemAttribute(item, "nextlevelexp")))

end

end

 

 

function setWildPokemonLevel(cid)

local range = math.random(getCreatureOutfit(cid).lookHead, getCreatureOutfit(cid).lookBody)

setPlayerStorageValue(cid, 1000, range)

setPlayerStorageValue(cid, 1001, math.random(pokes[getCreatureName(cid)].off * range * 0.7, pokes[getCreatureName(cid)].off * range * 1.3))

setPlayerStorageValue(cid, 1002, math.random(pokes[getCreatureName(cid)].def * range * 0.7, pokes[getCreatureName(cid)].def * range * 1.3))

setPlayerStorageValue(cid, 1003, math.random(pokes[getCreatureName(cid)].spd * range * 0.7, pokes[getCreatureName(cid)].spd * range * 1.3))

doChangeSpeed(cid, -getCreatureSpeed(cid))

doChangeSpeed(cid, getCreatureBaseSpeed(cid) + getPlayerStorageValue(cid, 1003))

setPlayerStorageValue(cid, 1004, math.random(range * 0.8, range * 1.2))

setCreatureMaxHealth(cid, getCreatureMaxHealth(cid) + (getPlayerStorageValue(cid, 1004) * pokes[getCreatureName(cid)].cons))

doCreatureAddHealth(cid, getCreatureMaxHealth(cid))

setPlayerStorageValue(cid, 1005, math.random(pokes[getCreatureName(cid)].spa * range * 0.7, pokes[getCreatureName(cid)].spa * range * 1.3))

setPlayerStorageValue(cid, 1006, pokes[getCreatureName(cid)].exp * range + getMonsterInfo(getCreatureName(cid)).experience)

end

 

 

function getOffense(cid)

return getPlayerStorageValue(cid, 1001)

end

 

function getDefense(cid)

return getPlayerStorageValue(cid, 1002)

end

 

function getSpeed(cid)

return getPlayerStorageValue(cid, 1003)

end

 

function getVitality(cid)

return getPlayerStorageValue(cid, 1004)

end

 

function getSpecialAttack(cid)

return getPlayerStorageValue(cid, 1005)

end

 

function getSpecialDefense(cid)

return getPlayerStorageValue(cid, 1007)

end

 

function getWildPokemonExp(cid)

return getPlayerStorageValue(cid, 1006)

end

 

function getWildPokemonLevel(cid)

return getPlayerStorageValue(cid, 1000)

end

 

function getLevel(cid)

if isSummon(cid) then

return getItemAttribute(getPlayerSlotItem(getCreatureMaster(cid), 8).uid, "level")

end

return getPlayerStorageValue(cid, 1000)

end

 

function getPokeName(cid)

local item = getPlayerSlotItem(getCreatureMaster(cid), 8)

if getItemAttribute(item.uid, "nick") ~= "?" then

return getItemAttribute(item.uid, "nick")

end

return getCreatureName(cid)

end

 

function getPokeballName(item)

if getItemAttribute(item, "nick") ~= "?" then

return getItemAttribute(item, "nick")

end

return getItemAttribute(item, "poke")

end

 

function getPokemonName(cid)

return getCreatureName(cid)

end

 

function getPokemonLevel(cid)

return getPlayerStorageValue(cid, 1000)

end

 

 

Pronto ta ae

Eu peso por favor pra algum scripter me ajudar ou se caso alguem tiver e quiser postar aki dou 10 rep+ para quem conseguir me ajudar

Sou Grato

tchutchuco_08@hotmail.com meu msn caso alguem queira me passar

Link para o comentário
Compartilhar em outros sites

Bom amigo, esse scripts que você posto não esta completo, falta algumas coisas que evitariam dar bugs,

 

exemplo o script dessa função (isBr(cid)) veja se não esta copilado com o executavel de onde vc retirou esse sistema ou procure o resto do script,

 

outro exemplo é o leveltable, n tem valor ali... você precisa postar oque falta do script

 

thx

Editado por eduardobean
Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...