Post by nefariis on Mar 15, 2021 0:05:46 GMT
They changed fishing a little bit, so here is an update to an older script.
I think I captured all the new(er) messages, but I might have missed one, feel free to comment if an update is needed.
What makes this script unique is that you can define the entire fishing field at the beginning of the script, this should let you fish in the same location all day.
1. Have a few Fishing Rods in your bag
2. Click Play
3. Define the Upper Left Point
4. Define the Lower Right Point
5. Let it Run
-- LoA 1.4.0.0
-- LoU 1.2.1.0
local ulx, ulz, lrx, lrz
function havePole()
if RIGHTHANDNAME == "Fishing Rod" then
return true
else
FindItem("fishing rod", BACKPACKID)
if FINDITEM then
ContextMenu(FINDITEM[1].ID, "Equip")
return true
end
end
print("No Fishing Pole")
return false
end
function fishing()
x, z = math.random(ulx, lrx), math.random(ulz, lrz)
print(string.format("\tNow fishing x: %s, z: %s", x, z))
while true do
print("\t\tCasting...")
Macro(28)
WaitForTarget()
TargetLoc(x, CHARPOSY, z)
start = TIME
repeat
ScanJournal(TIME)
if TIME - start > 25
or string.match(SCANJOURNALMESSAGE, "seem to be biting here")
or string.match(SCANJOURNALMESSAGE, "must be water")
or string.match(SCANJOURNALMESSAGE, "line of sight")
or string.match(SCANJOURNALMESSAGE, "Too far")then
sleep(3000)
return true
end
until string.match(SCANJOURNALMESSAGE, "caught")
or string.match(SCANJOURNALMESSAGE, "fish a while")
or string.match(SCANJOURNALMESSAGE, "you fish up")
or string.match(SCANJOURNALMESSAGE, "fish got away")
or string.match(SCANJOURNALMESSAGE, "fail to catch")
sleep(3000)
end
end
print("Please define top left fishing location...")
sleep(5000)
ulx, ulz = CLICKWORLDX, CLICKWORLDZ
print(string.format(" - Upper Bounds x: %s, z: %s", ulx, ulz))
print("Please define lower right fishing location...")
sleep(5000)
lrx, lrz = CLICKWORLDX, CLICKWORLDZ
print(string.format(" - Lower Bounds x: %s, z: %s", lrx, lrz))
while havePole() do
fishing()
end