Hello I'm working on fishing up monsters, but I need to make it certain levels for certain monsters... I tried this-
but when i did that the monsters would not pop up.. there were no errors in the console.
Lua:
local config = {
waterIds = {493, 4608, 4609, 4610, 4611, 4612, 4613, 4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625},
rateSkill = getConfigValue("rateSkill"),
allowFromPz = false,
useWorms = true
}
local formula = math.random(1,2000)
function onUse(cid, item, fromPosition, itemEx, toPosition)
if(not isInArray(config.waterIds, itemEx.itemid)) then
return false
end
if((config.allowFromPz or not getTileInfo(getCreaturePosition(cid)).protection) and itemEx.itemid ~= 493 and
math.random(1, (100 + (getPlayerSkill(cid, SKILL_FISHING) / 50))) < getPlayerSkill(cid, SKILL_FISHING) and
(not config.useWorms or (getPlayerItemCount(cid, ITEM_WORM) > 0 and doPlayerRemoveItem(cid, ITEM_WORM, 1)))) then
doPlayerAddItem(cid, ITEM_FISH, 1)
if(formula >= 4.50) and getPlayerLevel(cid) == 60 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You\'ve caught a Wyrm!")
doSummonCreature("Wyrm", getCreaturePosition(cid))
elseif(formula <= 5.11) and getPlayerLevel(cid) == 50 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You\'ve caught a Sea Serpent!")
doSummonCreature("Sea Serpent", getCreaturePosition(cid))
elseif(formula >= 9.50) and getPlayerLevel(cid) == 55 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You\'ve caught a Quara Constrictor!")
doSummonCreature("quara constrictor", getCreaturePosition(cid))
elseif(formula >= 10.99) and getPlayerLevel(cid) == 65 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You\'ve caught a Quara Cydromancer!")
doSummonCreature("quara hydromancer", getCreaturePosition(cid))
elseif(formula <= 11.50) and getPlayerLevel(cid) == 70 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You\'ve caught a Quara Mantassin!")
doSummonCreature("quara mantassin", getCreaturePosition(cid))
elseif(formula >= 12.90) and getPlayerLevel(cid) == 70 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You\'ve caught a Quara Pincher!")
doSummonCreature("quara pincher", getCreaturePosition(cid))
elseif(formula <= 15.30) and getPlayerLevel(cid) == 70 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You\'ve caught a Quara Predator!")
doSummonCreature("quara predator", getCreaturePosition(cid))
elseif(formula >= 20.90) and getPlayerLevel(cid) == 100 then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You\'ve angered the water gods and a water god has been sent to kill you!!")
doSummonCreature("massive water elemental", getCreaturePosition(cid))
doBroadcastMessage(getPlayerName(cid) .. " has angered the goddess of water", 22)
end
doPlayerAddSkillTry(cid, SKILL_FISHING, 1)
end
doSendMagicEffect(toPosition, CONST_ME_LOSEENERGY)
return true
end
but when i did that the monsters would not pop up.. there were no errors in the console.
Last edited: