Well i got edited monster fishing script, but i cant seem to figure out how to limit it to catch only 1 monster at a time or not summoning a monster when theres not enough room around the player.
Heres my script:
Heres my script:
Code:
local config = {
waterIds = {493, 4608, 4609, 4610, 4611, 4612, 4613, 4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625},
allowFromPz = false,
useWorms = false
}
local v = {
[1] = {name = "Quara Constrictor", chance = 30},
[2] = {name = "Quara Hydromancer", chance = 20},
[3] = {name = "Quara Mantassin", chance = 10},
[4] = {name = "Quara Pincher", chance = 9},
[5] = {name = "Quara Predator", chance = 7},
[6] = {name = "Sea Serpent", chance = 4},
[7] = {name = "Wyrm", chance = 2}
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if not isInArray(config.waterIds, itemEx.itemid) then
return false
end
if (config.allowFromPz or not getTileInfo(getThingPos(cid)).protection) and itemEx.itemid ~= 493 and math.random and (not config.useWorms or (getPlayerItemCount(cid, ITEM_WORM) > 0 and doPlayerRemoveItem(cid, ITEM_WORM, 1))) then
for i, k in pairs(v) do
if getPlayerStorageValue(cid,85987) >= i then
local c = math.random(100)
if c <= k.chance then
doSummonCreature(k.name, getThingPos(cid))
end
end
end
end
return doSendMagicEffect(toPosition, CONST_ME_LOSEENERGY)
end