Bom dia.
estou tentando aumentar o catch do meu server porém estou com um problema
o catch.lua n é daqueles organizadinhos que é só descer a pagina e mudar
queria a ajuda para descobrir qual é a parte.
e se alguem puder arruma-lo pra mim ja tentei substitui-lo por um mais
organizado mais não funcionou. quem puder ajudar ae
local pokes = {
["Bulbasaur"] = {chance = 120, corpse = 5969, health = 1200, maxhealth = 1200},
["Ivysaur"] = {chance = 240, corpse = 5982, health = 3000, maxhealth = 3000},
["Venusaur"] = {chance = 400, corpse = 5962, health = 9000, maxhealth = 9000},
["Machop"] = {chance = 120, corpse = 6045, health = 425, maxhealth = 425},
["Machoke"] = {chance = 240, corpse = 4251, health = 2850, maxhealth = 2850},
["Machamp"] = {chance = 440, corpse = 6048, health = 6100, maxhealth = 6100},
["Geodude"] = {chance = 60, corpse = 6071, health = 800, maxhealth = 800},
["Graveler"] = {chance = 120, corpse = 6516, health = 3000, maxhealth = 3000},
["Golem"] = {chance = 320, corpse = 6043, health = 6500, maxhealth = 6500},
["Poliwag"] = {chance = 6, corpse = 6042, health = 400, maxhealth = 400},
["Poliwhirl"] = {chance = 100, corpse = 6054, health = 1800, maxhealth = 1800},
["Poliwrath"] = {chance = 280, corpse = 6033, health = 4400, maxhealth = 4400},
["Tentacool"] = {chance = 20, corpse = 2961, health = 725, maxhealth = 725},
["Tentacruel"] = {chance = 280, corpse = 6037, health = 6000, maxhealth = 6000},
["Bellsprout"] = {chance = 6, corpse = 2806, health = 420, maxhealth = 420},
["Weepinbell"] = {chance = 120, corpse = 2928, health = 1100, maxhealth = 1100},
["Victreebel"] = {chance = 280, corpse = 6332, health = 4000, maxhealth = 4000},
["Abra"] = {chance = 60, corpse = 2905, health = 800, maxhealth = 800},
["Kadabra"] = {chance = 200, corpse = 6060, health = 4000, maxhealth = 4000},
["Alakazam"] = {chance = 600, corpse = 6057, health = 7000, maxhealth = 7000},
["Charmander"] = {chance = 80, corpse = 5983, health = 1200, maxhealth = 1200},
["Charmeleon"] = {chance = 240, corpse = 5981, health = 2900, maxhealth = 2900},
["Charizard"] = {chance = 400, corpse = 6005, health = 9000, maxhealth = 9000},
["Blastoise"] = {chance = 400, corpse =5999, health = 9000, maxhealth = 9000},
["Wartortle"] = {chance = 200, corpse =5978, health = 3500, maxhealth = 3500},
["Squirtle"] = {chance = 80, corpse =6008, health = 1200, maxhealth = 1200},
["Caterpie"] = {chance = 3, corpse =5970, health = 200, maxhealth = 200},
["Metapod"] = {chance = 30, corpse =5971, health = 405, maxhealth = 405},
["Butterfree"] = {chance = 90, corpse =5985, health = 2500, maxhealth = 2500},
["Weedle"] = {chance = 3, corpse =5964, health = 325, maxhealth = 325},
["Kakuna"] = {chance = 60, corpse =6000, health = 900, maxhealth = 900},
["Beedrill"] = {chance = 120, corpse =5990, health = 1900, maxhealth = 1900},
["Pidgey"] = {chance = 5, corpse =5961, health = 380, maxhealth = 380},
["Pidgeotto"] = {chance = 80, corpse =5966 , health = 1400, maxhealth = 1400},
["Pidgeot"] = {chance = 240, corpse =6020, health = 3800, maxhealth = 3800},
["Rattata"] = {chance = 1, corpse =5974, health = 350, maxhealth = 350},
["Raticate"] = {chance = 120, corpse =6007, health = 1500, maxhealth = 1500},
["Spearow"] = {chance = 6, corpse =5968, health = 200, maxhealth = 200},
["Fearow"] = {chance = 200, corpse =5992, health = 5000, maxhealth = 5000},
["Ekans"] = {chance = 40, corpse =5979, health = 800, maxhealth = 800},
["Arbok"] = {chance = 80, corpse =5984, health = 2300, maxhealth = 2300},
["Pikachu"] = {chance = 60, corpse =6001, health = 1600, maxhealth = 1600},
["Raichu"] = {chance = 120, corpse =5996, health = 4000, maxhealth = 4000},
["Sandshrew"] = {chance = 40, corpse =5988, health = 700, maxhealth = 700},
["Sandslash"] = {chance = 120, corpse =6041, health = 5000, maxhealth = 5000},
["Nidoran Female"] = {chance = 15, corpse =6013, health = 500, maxhealth = 500},
["Nidorina"] = {chance = 80, corpse =6014, health = 2135, maxhealth = 2135},
["Nidoqueen"] = {chance = 320, corpse =6021, health = 6500, maxhealth = 6500},
["Nidoran Male"] = {chance = 15, corpse =6015, health = 500, maxhealth = 500},
["Nidorino"] = {chance = 80, corpse =6019, health = 2000, maxhealth = 2000},
["Nidoking"] = {chance = 330, corpse =5995, health = 7000, maxhealth = 7000},
["Clefairy"] = {chance = 80, corpse =2968, health = 1400, maxhealth = 1400},
["Clefable"] = {chance = 150, corpse =6006, health = 3000, maxhealth = 3000},
["Vulpix"] = {chance = 15, corpse =6003, health = 800, maxhealth = 800},
["Ninetales"] = {chance = 200, corpse =6040, health = 6000, maxhealth = 6000},
["Jigglypuff"] = {chance = 80, corpse =6011, health = 800, maxhealth = 800},
["Wigglytuff"] = {chance = 150, corpse =6012, health = 4000, maxhealth = 4000},
["Zubat"] = {chance = 8, corpse =5989, health = 335, maxhealth = 335},
["Golbat"] = {chance = 120, corpse =6053, health = 1900, maxhealth = 1900},
["Oddish"] = {chance = 10, corpse =3008, health = 300, maxhealth = 300},
["Gloom"] = {chance = 120, corpse =6017, health = 1400, maxhealth = 1400},
["Vileplume"] = {chance = 240, corpse =6025, health = 4000, maxhealth = 4000},
["Paras"] = {chance = 2, corpse =3007, health = 65, maxhealth = 65},
["Parasect"] = {chance = 60, corpse =6027, health = 2500, maxhealth = 2500},
["Venonat"] = {chance = 50, corpse =5997, health = 1500, maxhealth = 1500},
["Venomoth"] = {chance = 80, corpse =2925, health = 4000, maxhealth = 4000},
["Diglett"] = {chance = 20, corpse =6023, health = 500, maxhealth = 500},
["Dugtrio"] = {chance = 80, corpse =6024, health = 2500, maxhealth = 2500},
["Meowth"] = {chance = 40, corpse =6034, health = 1000, maxhealth = 1000},
["Persian"] = {chance = 80, corpse =6009, health = 3500, maxhealth = 3500},
["Psyduck"] = {chance = 50, corpse =6029, health = 2000, maxhealth = 2000},
["Golduck"] = {chance = 150, corpse =6028, health = 4000, maxhealth = 4000},
["Mankey"] = {chance = 7, corpse =6035, health = 800, maxhealth = 800},
["Primeape"] = {chance = 40, corpse =6032, health = 2550, maxhealth = 2550},
["Ponyta"] = {chance = 15, corpse =5975, health = 800, maxhealth = 800},
["Rapidash"] = {chance = 60, corpse =4323, health = 6000, maxhealth = 6000},
["Slowpoke"] = {chance = 30, corpse =2926, health = 1200, maxhealth = 1200},
["Slowbro"] = {chance = 80, corpse =5986, health = 3000, maxhealth = 3000},
["Doduo"] = {chance = 30, corpse =2842, health = 600, maxhealth = 600},
["Dodrio"] = {chance = 60, corpse =6047, health = 2650, maxhealth = 2650},
["Seel"] = {chance = 40, corpse =6030, health = 1200, maxhealth = 1200},
["Dewgong"] = {chance = 80, corpse =6038, health = 6000, maxhealth = 6000},
["Magnemite"] = {chance = 20, corpse =6056, health = 450, maxhealth = 450},
["Magneton"] = {chance = 50, corpse =6076, health = 2000, maxhealth = 2000},
["Growlithe"] = {chance = 40, corpse =6036, health = 1000, maxhealth = 1000},
["Arcanine"] = {chance = 280, corpse =6031, health = 6000, maxhealth = 6000},
["Grimer"] = {chance = 30, corpse =6055, health = 600, maxhealth = 600},
["Muk"] = {chance = 80, corpse =2845, health = 2400, maxhealth = 2400},
["Shellder"] = {chance = 60, corpse =2837, health = 800, maxhealth = 800},
["Cloyster"] = {chance = 240, corpse =2932, health = 6000, maxhealth = 6000},
["Gastly"] = {chance = 50, corpse =5993, health = 800, maxhealth = 800},
["Haunter"] = {chance = 100, corpse =6004, health = 3000, maxhealth = 3000},
["Gengar"] = {chance = 150, corpse =6336, health = 8000, maxhealth = 8000},
["Onix"] = {chance = 80, corpse =2990, health = 4000, maxhealth = 4000},
["Drowzee"] = {chance = 20, corpse =6026, health = 1200, maxhealth = 1200},
["Hypno"] = {chance = 80, corpse =6046, health = 4000, maxhealth = 4000},
["Krabby"] = {chance = 3,corpse =6039, health = 500, maxhealth = 500},
["Kingler"] = {chance = 30, corpse =6340, health = 2750, maxhealth = 2750},
["Voltorb"] = {chance = 15, corpse =6049, health = 800, maxhealth = 800},
["Electrode"] = {chance = 30, corpse =6051, health = 2000, maxhealth = 2000},
["Exeggcute"] = {chance = 10, corpse =2982, health = 500, maxhealth = 500},
["Exeggutor"] = {chance = 70, corpse =3005, health = 3500, maxhealth = 3500},
["Cubone"] = {chance = 30, corpse =6050, health = 900, maxhealth = 900},
["Marowak"] = {chance = 80, corpse =6072, health = 5000, maxhealth = 5000},
["Hitmonlee"] = {chance = 800, corpse =6067, health = 8000, maxhealth = 8000},
["Hitmonchan"] = {chance = 800, corpse =5977, health = 6000, maxhealth = 6000},
["Goldeen"] = {chance = 3, corpse = 2970, health = 300, maxhealth = 300},
["Seaking"] = {chance = 40, corpse =3038, health = 2000, maxhealth = 2000},
["Koffing"] = {chance = 15, corpse = 2936, health = 700, maxhealth = 700},
["Weezing"] = {chance = 40, corpse =6306, health = 1250, maxhealth = 1250},
["Rhydon"] = {chance = 240, corpse = 2858, health = 6000, maxhealth = 6000},
["Rhyhorn"] = {chance = 40, corpse =3035, health = 2500, maxhealth = 2500},
["Chansey"] = {chance = 400, corpse = 6010, health = 3500, maxhealth = 3500},
["Tangela"] = {chance = 90, corpse = 5976, health = 4000, maxhealth = 4000},
["Kangaskhan"] = {chance = 400, corpse = 6073, health = 8000, maxhealth = 8000},
["Horsea"] = {chance = 6, corpse = 2973, health = 300, maxhealth = 300},
["Seadra"] = {chance = 30, corpse = 2872, health =2500, maxhealth = 2500},
["Staryu"] = {chance = 30, corpse = 5987, health = 1200, maxhealth = 1200},
["Starmie"] = {chance = 120, corpse = 7320, health = 3000, maxhealth = 3000},
["Mr Mime"] = {chance = 150, corpse =6069, health = 4000, maxhealth = 4000},
["Scyther"] = {chance = 800, corpse =3002, health = 8000, maxhealth = 8000},
["Jynx"] = {chance = 150, corpse = 6077, health = 7000, maxhealth = 7000},
["Electabuzz"] = {chance = 350, corpse =6065, health = 8000, maxhealth = 8000},
["Magmar"] = {chance = 350, corpse =7283, health = 8000, maxhealth = 8000},
["Pinsir"] = {chance = 40, corpse = 7282, health = 3000, maxhealth = 3000},
["Tauros"] = {chance = 40, corpse = 6302, health = 2400, maxhealth = 2400},
["Magikarp"] = {chance = 1, corpse = 2818, health = 120, maxhealth = 120},
["Gyarados"] = {chance = 350, corpse = 6331, health = 8000, maxhealth = 8000},
["Lapras"] = {chance = 400, corpse =6018, health = 7000, maxhealth = 7000},
["Ditto"] = {chance = 200, corpse =2817, health = 1200, maxhealth = 1200},
["Vaporeon"] = {chance = 150, corpse =5960, health = 3500, maxhealth = 3500},
["Eevee"] = {chance = 140, corpse =6364, health = 1500, maxhealth = 1500},
["Flareon"] = {chance = 150, corpse =6059, health = 2010, maxhealth = 2010},
["Jolteon"] = {chance = 150, corpse =6044, health = 4000, maxhealth = 4000},
["Porygon"] = {chance = 280, corpse =5963 , health = 4000, maxhealth = 4000},
["Omanyte"] = {chance = 160, corpse =5998, health = 2000, maxhealth = 2000},
["Omastar"] = {chance = 320, corpse =5994, health = 6000, maxhealth = 6000},
["Kabutops"] = {chance = 320, corpse = 6345, health = 7500, maxhealth = 7500},
["Kabuto"] = {chance = 160, corpse = 5972, health = 3000, maxhealth = 3000},
["Aerodactyl"] = {chance = 2500, corpse = 6338, health = 13000, maxhealth = 13000},
["Snorlax"] = {chance = 800, corpse = 6016, health = 9000, maxhealth = 9000},
["Moltres"] = {chance = 99999999, corpse = 7330, health = 200000, maxhealth = 200000},
["Articuno"] = {chance = 9999999, corpse = 7256, health = 200000, maxhealth = 200000},
["Zapdos"] = {chance = 99999999, corpse = 6074, health = 200000, maxhealth = 200000},
["Mew"] = {chance = 999999, corpse = 2939, health = 50000, maxhealth = 50000},
["Mewtwo"] = {chance = 9999999, corpse = 5973, health = 100000, maxhealth = 100000},
["Dragonite"] = {chance = 1000, corpse = 4295, health = 17000, maxhealth = 17000},
["Dragonair"] = {chance = 500, corpse = 6002, health = 6000, maxhealth = 6000},
["Dratini"] = {chance = 150, corpse = 2879, health = 1500, maxhealth = 1500},
["Farfetchd"] = {chance = 40, corpse = 2836, health = 4000, maxhealth = 4000},
["Lickitung"] = {chance = 70, corpse =2953, health = 2350, maxhealth = 2350},
["Crystal Onix"] = {chance = 1800, corpse = 6320, health = 18000, maxhealth = 18000},
["Elder Charizard"] = {chance = 1800, corpse = 2954, health = 15000, maxhealth = 15000},
["Shiny Arcanine"] = {chance = 1200, corpse =8746, health = 13000, maxhealth = 13000},
["Shiny Abra"] = {chance = 1200, corpse = 11423, health = 10000, maxhealth = 10000},
["Shiny Alakazam"] = {chance = 2600, corpse = 11435, health = 12000, maxhealth = 12000},
["Shiny Blastoise"] = {chance = 9000, corpse =8763, health = 15000, maxhealth = 15000},
["Shiny Butterfree"] = {chance = 120, corpse =8762, health = 5000, maxhealth = 5000},
["Shiny Beedrill"] = {chance = 150, corpse =8767, health = 5000, maxhealth = 5000},
["Shiny Cubone"] = {chance = 240, corpse = 11433, health = 2500, maxhealth = 2500},
["Shiny Dratini"] = {chance = 560, corpse = 8744, health = 2900, maxhealth = 2900},
["Shiny Dragonair"] = {chance = 1200, corpse = 8775, health = 15000, maxhealth= 15000},
["Shiny Electabuzz"] = {chance = 1200, corpse =8773, health = 10000, maxhealth = 10000},
["Shiny Electrode"] = {chance = 160, corpse =8753, health = 5000, maxhealth = 5000},
["Shiny Farfetchd"] = {chance = 300, corpse = 8745, health = 10000, maxhealth = 10000},
["Shiny Gengar"] = {chance = 1200, corpse = 8782, health = 13000, maxhealth= 13000},
["Shiny Golbat"] = {chance = 300, corpse = 8781, health = 10000, maxhealth= 10000},
["Shiny Growlithe"] = {chance = 120, corpse =8742, health = 8000, maxhealth = 8000},
["Shiny Gyarados"] = {chance = 1200, corpse = 8774, health = 16000, maxhealth = 16000},
["Shiny Grimer"] = {chance = 100, corpse =8752, health = 5000, maxhealth = 5000},
["Shiny Horsea"] = {chance = 40, corpse = 8768, health = 1000, maxhealth = 1000},
["Shiny Jynx"] = {chance = 1200, corpse = 8758, health = 12000, maxhealth= 12000},
["Shiny Krabby"] = {chance = 60, corpse =8755, health =1000, maxhealth =1000},
["Shiny Kingler"] = {chance = 60, corpse =8769, health = 6000, maxhealth = 6000},
["Shiny Magikarp"] = {chance = 10, corpse = 8766, health = 1000, maxhealth = 1000},
["Shiny Muk"] = {chance = 300, corpse =8747, health = 8000, maxhealth = 8000},
["Shiny Marowak"] = {chance = 500, corpse = 8779, health = 9000, maxhealth= 9000},
["Shiny Oddish"] = {chance = 150,corpse =8749, health = 1200, maxhealth = 1200},
["Shiny Paras"] = {chance = 15, corpse =8743, health = 800, maxhealth = 800},
["Shiny Parasect"] = {chance = 110, corpse =8756, health = 5000, maxhealth = 5000},
["Shiny Pidgeot"] = {chance = 1000, corpse = 8783, health = 9000, maxhealth= 9000},
["Shiny Pinsir"] = {chance = 300, corpse = 8780, health = 7000, maxhealth= 7000},
["Shiny Raichu"] = {chance = 800,corpse =8770, health = 9000, maxhealth = 9000},
["Shiny Rattata"] = {chance = 10, corpse =8751, health = 800, maxhealth = 800},
["Shiny Raticate"] = {chance = 120, corpse =8765, health = 5000, maxhealth = 5000},
["Shiny Scyther"] = {chance = 2400, corpse =8772, health = 10000, maxhealth = 10000},
["Shiny Seadra"] = {chance = 460, corpse = 8760, health =8000, maxhealth =8000},
["Shiny Snorlax"] = {chance = 2000, corpse = 8776, health = 25000, maxhealth= 25000},
["Shiny Tentacool"] = {chance = 100, corpse = 8748, health = 2000, maxhealth = 2000},
["Shiny Tentacruel"] = {chance = 1800, corpse = 8757, health = 11000, maxhealth = 11000},
["Shiny Tangela"] = {chance = 500, corpse = 8785, health = 8000, maxhealth= 8000},
["Shiny Voltorb"] = {chance = 30, corpse =8754, health = 2000, maxhealth = 2000},
["Shiny Venomoth"] = {chance = 300, corpse = 8761, health = 6500, maxhealth= 6500},
["Shiny Venonat"] = {chance = 50, corpse = 8759, health = 3000, maxhealth= 3000},
["Shiny Venusaur"] = {chance = 1800, corpse = 8764, health = 15000, maxhealth = 15000},
["Shiny Zubat"] = {chance = 30, corpse =8750, health = 2000, maxhealth = 2000}
}
bolasCatch = {
[2147] = {catchrate = 1, oncatch = 24, onfail = 23, bolabola = 2222},
[11437] = {catchrate = 2, oncatch = 198, onfail = 197, bolabola = 11438},
[11441] = {catchrate = 3, oncatch = 202, onfail = 201, bolabola = 11442},
[2146] = {catchrate = 1000, oncatch = 10000, onfail = 199, bolabola = 2220},
[11445] = {catchrate = 4, oncatch = 204, onfail = 203, bolabola = 11446},
}
local description = "Contains a %pokename."
function onUse(cid, item, frompos, item2, topos)
local name = getItemNameById(item2.itemid)
local tmp = bolasCatch[item.itemid]
if tmp ~= nil then
catchrate = tmp.catchrate
oncatch = tmp.oncatch
onfail = tmp.onfail
bolabola = tmp.bolabola
end
local rate = (catchrate)
local catch = oncatch
local fail = onfail
local newid = bolabola
for i,x in pairs(pokes) do
if getItemNameById(item2.itemid):find(i:lower()) then
if getItemIdByName(name) == pokes.corpse then
if cid ~= getItemAttribute(item2.uid, "corpseowner") and isInArray({1,8}, getPlayerGroupId(cid)) then
doPlayerSendCancel(cid, "You are not allowed to catch this pokemon.")
return true
end
doRemoveItem(item.uid, 1)
doRemoveItem(item2.uid, 1)
local pegar = math.random(0, x.chance)
if pegar <= 1*(rate) then
doSendMagicEffect(topos, catch)
local nas = {
['%%pokename'] = i
}
for i,x in pairs(nas) do
if description:find(i) then
description = description:gsub(i, x)
end
end
local function capturou(params)
if not isCreature(params.cid) then
return true
end
if not string.find(getPlayerStorageValue(cid, 54842), ""..i..",") then
doPlayerAddSoul(cid, 1)
setPlayerStorageValue(cid, 54842, getPlayerStorageValue(cid, 54842)..""..i..", ")
end
if getPlayerFreeCap(params.cid) <= 0.99 then
item = doCreateItemEx(params.ball)
doItemSetAttribute(item, "poke", params.poke)
doItemSetAttribute(item, "nome", params.nome)
doItemSetAttribute(item, "apelido", params.nome)
doItemSetAttribute(item, "special", "Its belongs to "..getCreatureName(params.cid))
doItemSetAttribute(item, "description", params.description)
doTransformItem(item, newid -1)
doPlayerSendMailByName(getPlayerName(params.cid), item, 1)
--doPlayerAddDepotItem(params.cid, item)
doPlayerSendTextMessage(cid, 27, "You catch a Pokemon! ("..i..").")
doPlayerSendTextMessage(cid, 27, "You already holding six pokemons, your new pokemon will be teleported to the Pokemon Center!")
else
item = doCreateItemEx(params.ball)
doItemSetAttribute(item, "poke", params.poke)
doItemSetAttribute(item, "nome", params.nome)
doItemSetAttribute(item, "apelido", params.nome)
doItemSetAttribute(item, "special", "Its belongs to "..getCreatureName(params.cid))
doItemSetAttribute(item, "description", params.description)
doPlayerAddItemEx(params.cid, item, true)
doTransformItem(item, newid)
doPlayerSendTextMessage(cid, 27, "You catch a Pokemon! ("..i..").")
end
if #getCreatureSummons(cid) >= 1 then
doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 173)
else
doSendMagicEffect(getThingPos(cid), 173)
end
end
local description = "Contains a "..i.."."
local poke1 = "This is "..i.."'s pokeball. HP = ["..x.health.."/"..x.maxhealth.."]"
addEvent(capturou, 4000, {cid = cid, poke = poke1, nome = i, description = description, ball = 2219, letter = 2597})
else
function ruim(params)
if not isCreature(params.cid) then
return true
end
doPlayerSendTextMessage(params.cid, 27, "Sorry, your poke ball broke.")
if #getCreatureSummons(params.cid) >= 1 then
doSendMagicEffect(getThingPos(getCreatureSummons(params.cid)[1]), 166)
else
doSendMagicEffect(getThingPos(params.cid), 166)
end
end
addEvent(ruim, 4000, {cid = cid})
doSendMagicEffect(topos, fail)
end
end
end
end
return TRUE
end