I wanna a new fishing system like this:
Look at this sketch:
Look at this sketch:
Code:
local listOthers = {2226, 2240, 5417, 10583, 5951}
config = {
[3877] = {bait = {8297}, obtain = {{2667, 70, math.random(1, 4)}, {listOthers[math.random(#listOthers)], 29, math.random(1, 5)}, {5895, 1, 1}}} -- Example: {Item, Chance, Quantidade}
[2580] = {bait = {5951, 3976, 9005}, obtain = {{2667, 70, 1}, {5554, 30, 1}}} -- Example: {Item, Chance, Quantidade}
[10223] = {bait = false, obtain = {10224, 100, 1}} -- Example: {Item, Chance, Quantidade}
}
player:addSkillTries(SKILL_FISHING, 1)
local waterIds = {493, 4608, 4609, 4610, 4611, 4612, 4613, 4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625, 7236, 10499, 15401, 15402}
if not isInArray(waterIds, itemEx.itemid) then
return false
end
if bait == false then
return true
elseif (bait == 8297 or bait == 5951 or bait == 3976 or bait == 9005) then
return true
else
player:sendCancelMessage("You need to put a bait.")
end
local stor = 97170035
if player:getStorageValue(stor) == 1440 then
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Now you are a professional fisherman.")
end
local obtain = player:addItem(config.obtain)
if (obtain == 2667 or obtain == 10224) then
player:setStorageValue(stor, player:getStorageValue(stor)+1)
end
Last edited: