Hey hello otland friends! I need your help with my fishing script ie the fishing works fine but the problem is when fishing does not say the monster text that fish only fishing without any text here I leave my script!
local config = {
waterIds = {493, 4608, 4609, 4610, 4611, 4612, 4613, 4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625},
rateSkill = 1,
allowFromPz = false,
useWorms = false
}
local v = {
[{300,100}] = {name = "Water Elemental", chance = 150000, storage = 36000},
[{400,100}] = {name = "Hydros", chance = 80000, storage = 36001},
[{500,100}] = {name = "Tyria", chance = 60000, storage = 36002},
[{100,110}] = {name = "Doctor octagonapus", chance = 50000, storage = 36003},
[{200,110}] = {name = "Elder hydros", chance = 25600, storage = 36004},
[{200,115}] = {name = "Kingler", chance = 12800, storage = 36005},
[{200,115}] = {name = "Triton", chance = 6400, storage = 36006},
[{200,120}] = {name = "Jaws", chance = 3200, storage = 36007},
[{300,130}] = {name = "Aegaeus", chance = 2600, storage = 36008},
[{300,130}] = {name = "Aekre", chance = 1800, storage = 36009},
[{400,135}] = {name = "Kraken", chance = 900, storage = 36010},
[{500,140}] = {name = "Blastoise", chance = 650, storage = 36011},
[{600,145}] = {name = "Lady adshara", chance = 400, storage = 36012},
[{600,145}] = {name = "Leviathan", chance = 280, storage = 36013}
}
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((100 + (getPlayerSkill(cid, SKILL_FISHING) / 60))) < getPlayerSkill(cid, SKILL_FISHING) and (not config.useWorms or (getPlayerItemCount(cid, ITEM_WORM) > 0 and doPlayerRemoveItem(cid, ITEM_WORM, 1))) then
local bsMessage = "%s have caught %s"
for i, k in pairs(v) do
if getPlayerLevel(cid) >= i[1] and getPlayerSkillLevel(cid, SKILL_FISHING) >= i[2] then
local c = math.random(200000000)
if c <= k.chance then
doSummonCreature(k.name, getThingPos(cid))
setPlayerStorageValue(cid, k.storage, getPlayerStorageValue(cid, k.storage) +1)
end
end
if k.broadcast then
doBroadcastMessage(bsMessage:format(getCreatureName(cid), k.name))
break
end
end
end
if doPlayerAddSkillTry(cid, SKILL_FISHING, 1) then
return doSendMagicEffect(toPosition, CONST_ME_LOSEENERGY)
end
end
local config = {
waterIds = {493, 4608, 4609, 4610, 4611, 4612, 4613, 4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625},
rateSkill = 1,
allowFromPz = false,
useWorms = false
}
local v = {
[{300,100}] = {name = "Water Elemental", chance = 150000, storage = 36000},
[{400,100}] = {name = "Hydros", chance = 80000, storage = 36001},
[{500,100}] = {name = "Tyria", chance = 60000, storage = 36002},
[{100,110}] = {name = "Doctor octagonapus", chance = 50000, storage = 36003},
[{200,110}] = {name = "Elder hydros", chance = 25600, storage = 36004},
[{200,115}] = {name = "Kingler", chance = 12800, storage = 36005},
[{200,115}] = {name = "Triton", chance = 6400, storage = 36006},
[{200,120}] = {name = "Jaws", chance = 3200, storage = 36007},
[{300,130}] = {name = "Aegaeus", chance = 2600, storage = 36008},
[{300,130}] = {name = "Aekre", chance = 1800, storage = 36009},
[{400,135}] = {name = "Kraken", chance = 900, storage = 36010},
[{500,140}] = {name = "Blastoise", chance = 650, storage = 36011},
[{600,145}] = {name = "Lady adshara", chance = 400, storage = 36012},
[{600,145}] = {name = "Leviathan", chance = 280, storage = 36013}
}
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((100 + (getPlayerSkill(cid, SKILL_FISHING) / 60))) < getPlayerSkill(cid, SKILL_FISHING) and (not config.useWorms or (getPlayerItemCount(cid, ITEM_WORM) > 0 and doPlayerRemoveItem(cid, ITEM_WORM, 1))) then
local bsMessage = "%s have caught %s"
for i, k in pairs(v) do
if getPlayerLevel(cid) >= i[1] and getPlayerSkillLevel(cid, SKILL_FISHING) >= i[2] then
local c = math.random(200000000)
if c <= k.chance then
doSummonCreature(k.name, getThingPos(cid))
setPlayerStorageValue(cid, k.storage, getPlayerStorageValue(cid, k.storage) +1)
end
end
if k.broadcast then
doBroadcastMessage(bsMessage:format(getCreatureName(cid), k.name))
break
end
end
end
if doPlayerAddSkillTry(cid, SKILL_FISHING, 1) then
return doSendMagicEffect(toPosition, CONST_ME_LOSEENERGY)
end
end