• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[Pokemon] cant catch all pokes?

Komit

Schwartz Revolution Memb
Joined
Jul 31, 2009
Messages
39
Reaction score
0
Hello all...im trying to build pokemon server i used few scripts i found here and i made few myself...but i got one problem... for some reason i can catch some pokes (to throw balls on them) and on others i cant... ex. I can catch Beedrilll but i cant Bulbasaur...can some1 tell me what i need to do to fix this.. plz :)) ty for help.:):)
 
Do you use this script ?

Code:
local pokes = {
["Venonat"] = {chance = 2, corpse = 5997, health = 120, maxhealth = 120}, --
["Venusaur"] = {chance = 2, corpse = 5962, health = 120, maxhealth = 120}, --
["Vulpix"] = {chance = 2, corpse = 6003, health = 120, maxhealth = 120}, --
["Wartortle"] = {chance = 2, corpse = 5978, health = 120, maxhealth = 120}, --
["Weezing"] = {chance = 2, corpse = 6306, health = 120, maxhealth = 120}, --
["Wigglytuff"] = {chance = 2, corpse = 6012, health = 120, maxhealth = 120}, --
["Zapdos"] = {chance = 2, corpse = 6074, health = 120, maxhealth = 120}, --
["Spearow"] = {chance = 2, corpse = 5968, health = 120, maxhealth = 120}, --
["Squirtle"] = {chance = 2, corpse = 6008, health = 120, maxhealth = 120}, --
["Starmie"] = {chance = 2, corpse = 7320, health = 120, maxhealth = 120}, --
["Staryu"] = {chance = 2, corpse = 5987, health = 120, maxhealth = 120},
["Tangela"] = {chance = 2, corpse = 5976, health = 120, maxhealth = 120},
["Tauros"] = {chance = 2, corpse = 6302, health = 120, maxhealth = 120},
["Tentacool"] = {chance = 2, corpse = 2961, health = 120, maxhealth = 120},
["Tentacruel"] = {chance = 2, corpse = 6037, health = 120, maxhealth = 120},
["Vaporeon"] = {chance = 2, corpse = 5960, health = 120, maxhealth = 120},
["Venomoth"] = {chance = 2, corpse = 2925, health = 120, maxhealth = 120},
["Porygon"] = {chance = 2, corpse = 5963, health = 120, maxhealth = 120},
["Primeape"] = {chance = 2, corpse = 6032, health = 120, maxhealth = 120},
["Psyduck"] = {chance = 2, corpse = 6029, health = 120, maxhealth = 120},
["Raichu"] = {chance = 2, corpse = 5996, health = 120, maxhealth = 120},
["Rapidash"] = {chance = 2, corpse = 4323, health = 120, maxhealth = 120},
["Rhydon"] = {chance = 2, corpse = 2858, health = 120, maxhealth = 120},
["Rhyhorn"] = {chance = 2, corpse = 3035, health = 120, maxhealth = 120},
["Scyther"] = {chance = 2, corpse = 3002, health = 120, maxhealth = 120},
["Seaking"] = {chance = 2, corpse = 3038, health = 120, maxhealth = 120},
["Seel"] = {chance = 2, corpse = 6030, health = 120, maxhealth = 120},
["Shellder"] = {chance = 2, corpse = 2837, health = 120, maxhealth = 120},
["Slowbro"] = {chance = 2, corpse = 5986, health = 120, maxhealth = 120},
["Slowpoke"] = {chance = 2, corpse = 2926, health = 120, maxhealth = 120},
["Snorlax"] = {chance = 2, corpse = 6016, health = 120, maxhealth = 120},
["Exeggutor"] = {chance = 2, corpse = 3005, health = 120, maxhealth = 120},
["Farfetchd"] = {chance = 2, corpse = 2836, health = 120, maxhealth = 120},
["Fearow"] = {chance = 2, corpse = 5992, health = 120, maxhealth = 120},
["Flareon"] = {chance = 2, corpse = 6059, health = 120, maxhealth = 120},
["Gastly"] = {chance = 2, corpse = 5993, health = 120, maxhealth = 120},
["Gengar"] = {chance = 2, corpse = 6336, health = 120, maxhealth = 120},
["Goldeen"] = {chance = 2, corpse = 2970, health = 120, maxhealth = 120},
["Golduck"] = {chance = 2, corpse = 6028, health = 120, maxhealth = 120},
["Growlithe"] = {chance = 2, corpse = 6036, health = 120, maxhealth = 120},
["Gyarados"] = {chance = 2, corpse = 6331, health = 120, maxhealth = 120},
["Haunter"] = {chance = 2, corpse = 6004, health = 120, maxhealth = 120},
["Hitmonchan"] = {chance = 2, corpse = 5977, health = 62200, maxhealth = 62200},
["Hitmonlee"] = {chance = 2, corpse = 6067, health = 62200, maxhealth = 62200},
["Hypno"] = {chance = 2, corpse = 6046, health = 120, maxhealth = 120},
["Ivysaur"] = {chance = 2, corpse = 5982, health = 120, maxhealth = 120}, --
["Jigglypuff"] = {chance = 2, corpse = 6011, health = 120, maxhealth = 120},
["Jolteon"] = {chance = 2, corpse = 6044, health = 120, maxhealth = 120},
["Jynx"] = {chance = 2, corpse = 5765, health = 120, maxhealth = 120},
["Kabuto"] = {chance = 2, corpse = 5972, health = 120, maxhealth = 120},
["Kabutops"] = {chance = 2, corpse = 6345, health = 120, maxhealth = 120},
["Kangaskhan"] = {chance = 2, corpse = 6073, health = 120, maxhealth = 120},
["Kingler"] = {chance = 2, corpse = 6340, health = 120, maxhealth = 120},
["Koffing"] = {chance = 2, corpse = 2936, health = 120, maxhealth = 120},
["Krabby"] = {chance = 2, corpse = 6039, health = 120, maxhealth = 120},
["Lapras"] = {chance = 2, corpse = 6018, health = 120, maxhealth = 120},
["Lickitung"] = {chance = 2, corpse = 2953, health = 120, maxhealth = 120},
["Machamp"] = {chance = 2, corpse = 6048, health = 120, maxhealth = 120},
["Machoke"] = {chance = 2, corpse = 4251, health = 120, maxhealth = 120},
["Machop"] = {chance = 2, corpse = 6045, health = 120, maxhealth = 120},
["Magmar"] = {chance = 2, corpse = 7283, health = 120, maxhealth = 120},
["Mankey"] = {chance = 2, corpse = 6035, health = 120, maxhealth = 120},
["Marowak"] = {chance = 2, corpse = 6072, health = 120, maxhealth = 120},
["Meowth"] = {chance = 2, corpse = 6034, health = 120, maxhealth = 120},
["Metapod"] = {chance = 2, corpse = 5970, health = 120, maxhealth = 120}, --
["Mew"] = {chance = 2, corpse = 2939, health = 120, maxhealth = 120},
["Mewtwo"] = {chance = 2, corpse = 5973, health = 120, maxhealth = 120},
["Moltres"] = {chance = 2, corpse = 7330, health = 120, maxhealth = 120},
["Mr Mime"] = {chance = 2, corpse = 6069, health = 120, maxhealth = 120},
["Nidoking"] = {chance = 2, corpse = 5995, health = 4800, maxhealth = 4800},
["Nidoqueen"] = {chance = 2, corpse = 3004, health = 120, maxhealth = 120},
["Nidoran Female"] = {chance = 2, corpse = 6013, health = 600, maxhealth = 120},
["Nidoran Male"] = {chance = 2, corpse = 6015, health = 650, maxhealth = 120},
["Nidorina"] = {chance = 2, corpse = 6014, health = 120, maxhealth = 120},
["Nidorino"] = {chance = 2, corpse = 6019, health = 120, maxhealth = 120},
["Ninetales"] = {chance = 2, corpse = 6040, health = 120, maxhealth = 120},
["Omanyte"] = {chance = 2, corpse = 5998, health = 120, maxhealth = 120},
["Omastar"] = {chance = 2, corpse = 5994, health = 120, maxhealth = 120},
["Onix"] = {chance = 2, corpse = 2990, health = 120, maxhealth = 120},
["Paras"] = {chance = 2, corpse = 3007, health = 120, maxhealth = 120},
["Parasect"] = {chance = 2, corpse = 6027, health = 120, maxhealth = 120},
["Persian"] = {chance = 2, corpse = 6009, health = 120, maxhealth = 120},
["Pikachu"] = {chance = 2, corpse = 6001, health = 120, maxhealth = 120},
["Pinsir"] = {chance = 2, corpse = 7282, health = 120, maxhealth = 120},
["Ponyta"] = {chance = 2, corpse = 5975, health = 120, maxhealth = 120},
["Caterpie"] = {chance = 2, corpse = 5971, health = 120, maxhealth = 120},--
["Aerodactyl"] = {chance = 2, corpse = 6338, health = 120, maxhealth = 120},
["Articuno"] = {chance = 2, corpse = 7256, health = 120, maxhealth = 120},
["Butterfree"] = {chance = 2, corpse = 5985, health = 120, maxhealth = 120}, --
["Chansey"] = {chance = 2, corpse = 6010, health = 120, maxhealth = 120},
["Clefable"] = {chance = 2, corpse = 6006, health = 120, maxhealth = 120},
["Clefairy"] = {chance = 2, corpse = 2968, health = 120, maxhealth = 120},
["Cloyster"] = {chance = 2, corpse = 2932, health = 120, maxhealth = 120},
["Cubone"] = {chance = 2, corpse = 6050, health = 120, maxhealth = 120},
["Dewgong"] = {chance = 2, corpse = 6038, health = 120, maxhealth = 120},
["Diglett"] = {chance = 2, corpse = 6023, health = 120, maxhealth = 120},
["Ditto"] = {chance = 2, corpse = 2817, health = 120, maxhealth = 120},
["Dragonair"] = {chance = 2, corpse = 6002, health = 120, maxhealth = 120},
["Dragonite"] = {chance = 2, corpse = 4295, health = 120, maxhealth = 120},
["Dratini"] = {chance = 2, corpse = 2879, health = 120, maxhealth = 120},
["Drowzee"] = {chance = 2, corpse = 6026, health = 120, maxhealth = 120},
["Dugtrio"] = {chance = 2, corpse = 6024, health = 120, maxhealth = 120},
["Eevee"] = {chance = 2, corpse = 6364, health = 120, maxhealth = 120},
["Ekans"] = {chance = 2, corpse = 5979, health = 120, maxhealth = 120},
["Elder Charizard"] = {chance = 2, corpse = 2954, health = 120, maxhealth = 120},
["Electabuzz"] = {chance = 2, corpse = 6065, health = 120, maxhealth = 120},
["Exeggcute"] = {chance = 2, corpse = 2982, health = 120, maxhealth = 120},
["Arbok"] = {chance = 2, corpse = 5984, health = 120, maxhealth = 120},
["Bulbasaur"] = {chance = 2, corpse = 5969, health = 120, maxhealth = 120},
["Blastoise"] = {chance = 2, corpse = 5999, health = 120, maxhealth = 120}, --
["Arcanine"] = {chance = 2, corpse = 6031, health = 120, maxhealth = 120},
["Magikarp"] = {chance = 2, corpse = 2818, health = 120, maxhealth = 120},
["Abra"] = {chance = 59, corpse = 2905, health = 620, maxhealth = 620},
["Kadabra"] = {chance = 142, corpse = 6060, health = 2500, maxhealth = 2500},
["Alakazam"] = {chance = 241, corpse = 6057, health = 2500, maxhealth = 2500},
["Rattata"] = {chance = 8, corpse = 5974, health = 350, maxhealth = 350},
["Raticate"] = {chance = 16, corpse = 6007, health = 900, maxhealth = 900},
["Pidgey"] = {chance = 11, corpse = 5961, health = 380, maxhealth = 380},
["Pidgeotto"] = {chance = 26, corpse = 5966, health = 1400, maxhealth = 1400},
["Pidgeot"] = {chance = 167, corpse = 6020, health = 3800, maxhealth = 3800},
["Zubat"] = {chance = 15, corpse = 5989, health = 450, maxhealth = 450},
["Golbat"] = {chance = 53, corpse = 6053, health = 1900, maxhealth = 1900},
["Bellsprout"] = {chance = 28, corpse = 2806, health = 420, maxhealth = 420},
["Weepinbell"] = {chance = 28, corpse = 2928, health = 1100, maxhealth = 1100},
["Victreebel"] = {chance = 140, corpse = 6332, health = 4000, maxhealth = 4000},
["Poliwag"] = {chance = 8, corpse = 6042, health = 400, maxhealth = 400},
["Poliwhirl"] = {chance = 29, corpse = 6054, health = 1200, maxhealth = 1200},
["Poliwrath"] = {chance = 2, corpse = 6033, health = 4400, maxhealth = 4400},
["Oddish"] = {chance = 7, corpse = 3008, health = 340, maxhealth = 340},
["Gloom"] = {chance = 25, corpse = 6017, health = 1400, maxhealth = 1400},
["Vileplume"] = {chance = 133, corpse = 6025, health = 3300, maxhealth = 3300},
["Horsea"] = {chance = 10, corpse = 2973, health = 300, maxhealth = 300},
["Seadra"] = {chance = 87, corpse = 2872, health = 2500, maxhealth = 2500},
["Grimer"] = {chance = 14, corpse = 6055, health = 600, maxhealth = 600},
["Weedle"] = {chance = 3, corpse = 5964, health = 325, maxhealth = 325}, --
["Kakuna"] = {chance = 18, corpse = 6000, health = 900, maxhealth = 900}, --
["Beedrill"] = {chance = 40, corpse = 5990, health = 1900, maxhealth = 1900}, --
["Muk"] = {chance = 55, corpse = 2845, health = 2400, maxhealth = 2400},
["Doduo"] = {chance = 16, corpse = 2842, health = 600, maxhealth = 600},
["Dodrio"] = {chance = 79, corpse = 6047, health = 2650, maxhealth = 2650},
["Magnemite"] = {chance = 19, corpse = 6056, health = 450, maxhealth = 450},
["Magneton"] = {chance = 70, corpse = 6076, health = 1750, maxhealth = 1750},
["Voltorb"] = {chance = 13, corpse = 6049, health = 620, maxhealth = 620},
["Electrode"] = {chance = 60, corpse = 6051, health = 2000, maxhealth = 2000},
["Geodude"] = {chance = 17, corpse = 6071, health = 700, maxhealth = 700},
["Graveler"] = {chance = 105, corpse = 6516, health = 3000, maxhealth = 3000},
["Golem"] = {chance = 205, corpse = 6043, health = 6500, maxhealth = 6500},
["Sandshrew"] = {chance = 16, corpse = 5988, health = 700, maxhealth = 700},
["Sandslash"] = {chance = 160, corpse = 6041, health = 3400, maxhealth = 3400},
["Charmander"] = {chance = 20, corpse = 5983, health = 970, maxhealth = 970}, --
["Charmeleon"] = {chance = 73, corpse = 5981, health = 2900, maxhealth = 2900}, --
["Charizard"] = {chance = 261, corpse = 6005, health = 5200, maxhealth = 5200}, --
}

local description = "%pokename' ball."

function onUse(cid, item, frompos, item2, topos)
local name = 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
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[i].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(cid) <= 0.99 then
item = doCreateItemEx(newid-1)
doItemSetAttribute(item, "poke", params.poke)
doItemSetAttribute(item, "nome", params.nome)
doItemSetAttribute(item, "description", params.description)
doPlayerSendMailByName(getCreatureName(params.cid), item, 1)
doPlayerSendTextMessage(cid, 27, "Congratulations, you caught a ("..i..")!")
doPlayerSendTextMessage(cid, 27, "Since you are already holding six pokemons, this pokeball has been sent to your depot.")
else
item = doCreateItemEx(params.ball)
doItemSetAttribute(item, "poke", params.poke)
doItemSetAttribute(item, "nome", params.nome)
doItemSetAttribute(item, "description", params.description)
doPlayerAddItemEx(params.cid, item, true)
doTransformItem(item, newid)
doPlayerSendTextMessage(cid, 27, "Congratulations, you caught a ("..i..")!")
end
if #getCreatureSummons(cid) >= 1 then
doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 178)
else
doSendMagicEffect(getThingPos(cid), 178)
end
end

local description = ""..i.."'s pokeball."
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, you didn\'t catch that pokemon.")
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
 
nah but i just tried it and still nothing..i dont even get any errors...its rly odd..its like when u try to use pokeball on floor, nothing happen...

p.s. i dont know is this important but corpse's dont decay. Its like they melt with floor O,o ? i saw that in one server with geodude he dont decay and u can kill him but cant thorw a ball on corpse..
 
Last edited by a moderator:
Hey Komit...
I had the same problem just right now but when i looked into the script and read it wisely i thought of an idea maybe it should work..
The corpse id of the Charizard in the catch.lua is not the same corpse of the Charizard in data/monsters/scripts/charizard.lua

For an EXAMPLE... The Chariard Corpse ID in the Script (catch.lua) is like 20 or what ever
And the Corpse id in data/monsters/scripts/charizard.lua... Is like 60
So the script won't work... Either of them gotta be same as the other got it?
I hope i explained well and you got it lol.. Sorry for my english its not my first language
If you dont understand it ask me to rexplain

Ranyo13...
Rep++ if i helped u plz ^^
 
well i tried...and still nothing... i checked in catch.lua and in monsters/pokemon.lua same id's and still wont work... :/

send me name of your server i want to check it out :))
 
Back
Top