03-24-2024, 03:13 PM
Hello.
This script will fish on specific water ids using a custom fishing rod until reaches a specific capacity.
You can also setup to pick random places, max attempts per script run.
This script will fish on specific water ids using a custom fishing rod until reaches a specific capacity.
You can also setup to pick random places, max attempts per script run.
local FISHING_ROD_ID = 5331 -- Fishing rod id.
local PLAYER_CAP = 50 -- Only starts fishing if capacity is higher than this.
local SUFFLE_PLACES = true -- Pick a random place to fish?
local DELAY_BETWEEN_FISHING = { Min = 1000, Max = 2000 }
local FISH_ATTEMPTS_EACH_RUN = 10 -- How many attempts to fish every time script run? 0 to unlimited! 10 to try to fish on 10 different places.
local WATER_IDS = { 618, 619, 620, 622, 623, 624, 625, 626, 627, 628, 629, 4597, 4598, 4599, 4600, 4601, 4602, 4608, 4609, 4610, 4611, 4612, 4613, 4614, 4615, 4616, 4617, 4618, 4619, 4620, 4653, 4654, 4655 } -- Water ids which script should try to fish.
if connected() and cap() > PLAYER_CAP then
local player_x = posx()
local player_y = posy()
local player_z = posz()
local tiles = gettiles()
local places = { }
for _, tile in ipairs(tiles) do
if math.abs(tile.posx - player_x) <= 7 and math.abs(tile.posy - player_y) <= 5 and tile.posz == player_z then
for __, item in ipairs(tile.items) do
if table.find(WATER_IDS, item.id) ~= nil then
table.insert(places, { x = tile.posx, y = tile.posy })
break
end
end
end
end
if SUFFLE_PLACES then
table.shuffle(places)
end
for _, place in ipairs(places) do
useitemon(FISHING_ROD_ID, place.x, place.y, player_z)
wait(DELAY_BETWEEN_FISHING.Min, DELAY_BETWEEN_FISHING.Max)
count = count + 1
if count >= FISH_ATTEMPTS_EACH_RUN or cap() < PLAYER_CAP then
break
end
end
end
