WiLDTuRTLE
Member
- Joined
- Feb 26, 2011
- Messages
- 478
- Reaction score
- 5
I actually got this script, but i need it so every /item/monster have a % chance of being caught.
haalp a noob plis
Code:
local stuff = {
[{85001, 87000}] = 2159,
[{87001, 88000}] = 2143,
[{88001, 89000}] = 2144,
[{89001, 95000}] = 'Water Elemental',
[{95001, 99000}] = 'Serpent Spawn',
[{99001, 100000}] = 'Fire Elemental',
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if itemEx.itemid == 4625 then
local rand = math.random(100000)
for r, v in pairs(stuff) do
if rand >= r[1] and rand <= r[2] then
if type(v) == 'number' then
doPlayerAddItem(cid, 2160, math.random(50, 100))
else
doSummonCreature(v, toPosition)
end
break
end
end
doSendMagicEffect(toPosition, CONST_ME_LOSEENERGY)
doPlayerAddSkillTry(cid, SKILL_FISHING, 1)
else
return FALSE
end
return TRUE
end
haalp a noob plis