[UOSteam] Boat Fishing

If you make a Client-side script you can publish it here for other players to use
Post Reply
spook4324
Novice Scribe
Posts: 9
Joined: Fri Nov 27, 2009 12:53 am

[UOSteam] Boat Fishing

Post by spook4324 »

First time making a script, i'm sure some of this could be done better but it's working without issues for me. Just be on a boat and have a fishing rod equipped. It will fish until there are no fish, you fish up a monster, or your Fishing pole durability reaches 0

Updated with some error checking for an equipped fishing pole. Figured i would leave this one in case someone needed fishing but lacked carpentry or tinkering

Code: Select all

if not @findalias 'fishing pole'
  headmsg 'Select a fishing pole'
  promptalias 'fishing pole'
endif
if property 'durability' 'fishing pole' <= 0
  moveitem! 'fishing pole' 'backpack'
  sysmsg '**Repair Fishing Pole - Halting**' '240'
  stop
else
  //  Change weight to
  // your needs
  if weight <= '500'
    @useobject 'fishing pole'
    waitfortarget 500
    targettileoffset  3 0 2
    if @injournal "Must be equiped"
      sysmsg '**Equip a Fishing Pole - Halting**' '233'
      @clearjournal
      stop
    endif
    pause 7500
  else
    sysmsg '**Overweight - Halting**' '240'
    stop
  endif
endif
if @injournal "The fish don't seem to be biting here."
  sysmsg '**No More Fish - Moving**'
  @clearjournal
  msg 'forward one'
  pause 2000
  msg 'forward one'
  pause 2000
  msg 'forward one'
  pause 2000
  msg 'forward one'
  pause 2000
  sysmsg '**Fishing**'
endif
if @injournal 'Uh oh! That'
  @clearjournal
  sysmsg '**Kill It - Halting**' '233'
  stop
endif
This script has auto repairing and crafting fishing hooks and equipping them(you have to have a hook initially equipped but once it breaks it replaces it). Also not sure how to add error checking so make sure you have ingots for hooks

Code: Select all

if not @findalias 'fishing pole'
  headmsg 'Select a fishing pole'
  promptalias 'fishing pole'
endif
if not @findalias 'saw'
  headmsg 'Select carpentry tool'
  promptalias 'saw'
endif
if not @findalias 'tool kit'
  headmsg 'Select tinker tools'
  promptalias 'tool kit'
endif
if property 'durability' 'fishing pole' <= 0
  moveitem! 'fishing pole' 'backpack'
  sysmsg '**Repairing Fishing Pole**' '240'
  useobject 'saw'
  waitforgump 949095101 15000
  replygump 0x38920abd 42
  waitfortarget 15000
  target 'fishing pole'
  waitforgump 949095101 15000
  replygump 0x38920abd 0
  equipitem 'fishing pole' 1
  pause 1000
else
  if @injournal "Your hook has crumbled."
    sysmsg '**Broken Hook - Crafting**' '240'
    useobject 'tool kit'
    waitforgump 949095101 15000
    replygump 0x38920abd 29
    waitforgump 949095101 15000
    replygump 0x38920abd 79
    waitforgump 949095101 15000
    replygump 0x38920abd 0
    pause 500
    contextmenu 'fishing pole' 0
    waitforgump 1330461698 15000
    replygump 0x4f4d3c02 60001
    waitforgump 1330461698 15000
    replygump 0x4f4d3c02 60002
    waitforgump 1330461698 15000
    waitfortarget 15000
    targettype '0x3a96'
    waitforgump 1330461698 15000
    replygump 0x4f4d3c02 0
    @clearjournal
  else
    //  Change weight to
    // your needs
    if weight <= '500'
      @useobject 'fishing pole'
      waitfortarget 500
      targettileoffset  3 0 2
      if @injournal "Must be equiped"
        sysmsg '**Equip a Fishing Pole - Halting**' '233'
        @clearjournal
        stop
      endif
      pause 7500
    else
      sysmsg '**Overweight - Halting**' '240'
      stop
    endif
  endif
endif
if @injournal "The fish don't seem to be biting here."
  sysmsg '**No More Fish - Moving**'
  @clearjournal
  msg 'forward one'
  pause 2000
  msg 'forward one'
  pause 2000
  msg 'forward one'
  pause 2000
  msg 'forward one'
  pause 2000
  sysmsg '**Fishing**'
endif
if @injournal 'Uh oh! That'
  @clearjournal
  sysmsg '**Kill It - Halting**' '233'
  stop
endif
Last edited by spook4324 on Sun Apr 07, 2019 7:22 pm, edited 2 times in total.
zerobyte
Apprentice Scribe
Posts: 13
Joined: Sun Dec 30, 2018 7:00 am

Re: [UOSteam] Boat Fishing

Post by zerobyte »

Works very well! Thanks for sharing.

Some upgrades would be very cool :
1) When durability is 0, the macro put the fishing pole on backpack. Would be cool if the script begin to repair the pole and re-arm it
2) When you are overweight, i would prefer to cut the fishes in raw fish steak and move all sandals and shoes in the safe trash 4 token

As i said, script works very good for the moment :)
spook4324
Novice Scribe
Posts: 9
Joined: Fri Nov 27, 2009 12:53 am

Re: [UOSteam] Boat Fishing

Post by spook4324 »

I messed around with cutting the fish but i suck and it was kinda jank, it was a miracle i got this working lol. Instead I just run Shindaril's [EasyUO]Fishing partner. works perfectly, and already has bag of holding setup.
Mansonjr
Novice Scribe
Posts: 8
Joined: Sat Sep 21, 2019 8:23 am

Re: [UOSteam] Boat Fishing

Post by Mansonjr »

Hi, I'm Working on this script, i found an useful work around for setting up a check on the right hand.

Code: Select all

if not findalias 'pole'
  if @findlayer 'self' 1
    // Unequip
    @moveitem! 'found' 'backpack'
    pause 1000
  endif
  if @findtype! '0xdc0' '0' 'backpack'
    setalias 'pole' 'found'
    equipitem 'pole' 1
    pause 100
  endif
  if @findalias 'pole' 'backpack'
    equipitem 'pole' 1
  endif
endif
pause 2000
if not findalias 'pole'
  sysmsg 'No Pole detected...' 33
  stop
endif
It's my first time coding and i'm pretty new to UO, but When decided to try fishing (After starting with easy macros for the easy ones), I was looking for a good base script because i knew this will be a hard one, and really took me a few hours to made this modification to work.

What the script does:
  • - Look for tinkering tool and get a new one after broken from toolhouse if present (If not it will stop)
    - Look for saw tool and get a new one after broken from toolhouse if present (If not it will stop)
    - It will Prompt you where to trash the boots, sandals, etc.. (Keep sure you dont have any footwear not insured or blessed)
    - Look for wood and get more if needed from Woodkey if present (If not it will stop)
    - Look for Iron and get more if needed from Metalkey if present (If not it will stop)
    - It will cut fish almost inmediatly
    - It will organize your fish steaks if you have a organizar called 'Fish' (Best to setup from backpack to Bag of holding or likeli, totally optional, just comment the lines)
From original:
- It will fish and advance when needed as original intended
- it will make the hook when broken.

Things i added:
  • - Checks for every tool or material needed in the process.
    - Extraction from Toolhouse if any needed tool is not present
    - Extraction from woodkey and metalkey for required materials
    - Cut fishing (butcher knife will be made by the macro if not present)
    - Trash away boots or any item you list
    - Call organizer to store fish steaks when you reach some weight (Totally optional, just ad // before de organizer and done)
Things i have pending to do:
  • - Automate Fishing pole
    - Hook's detection (It's not a promess)
Things you will need:
  • - House tool with tools inside or tool in backpack
    - Iron and Boards for hook reparation and fabrication. (I have still pending to code the automated way to do fishing pole if not present but now lack of more time)
    - Metal Key or ingots in backpack
    - Wood Key or Boards in backpack
    - First fishing Pole with Fishing hook (Fishing hook detection still a challenge or "Pain in the *ss" but i not surrender)
Usage recommendations for the best performance:
- Open your keys to configure every extraction of material to 5 - Screen on this link
- Set an organizer to move fish steaks from backpack to any weightless bag or even your mule :)
- Clear all active objects from UOSTEAM if you run in some troubles or you changed something related on your backpack.



The complete script i'm using right now:

Code: Select all

//Script core done by spook4324
//Reworked for checks and addons by MansonJr
//============================================================
//=- Trashbag prompt select for Junk items (sandals, etc) --=
//============================================================
if not @findobject 'TrashBag'
  headmsg 'Select a bag to Trash'
  promptalias 'TrashBag'
endif
//============================================================
//=------- Tinkering Tools check  0x1eb8 color 0-------------=
//============================================================
if @counttype! '0x1eb8' '0' 'backpack' => 1
elseif not @findtype '0x22c4' '69' 'backpack'
  sysmsg '*****No Tinkerin Tools OR TOOL HOUSE CHARGED!*****' '0'
  stop
elseif @counttype! '0x1eb8' '0' 'backpack' < 1
  sysmsg 'Trying to get a Tinker Tools from a Tool House...' 33
  @usetype! '0x22c4' '69' 'backpack'
  waitforgump 1513449091 15000
  replygump 0x5a356683 60006
  waitforgump 1513449091 15000
  replygump 0x5a356683 0
endif
pause 500
//============================================================
//=--------------- Saw check  0x1034 color 0----------------=
//============================================================
if @counttype! '0x1034' '0' 'backpack' => 1
elseif not @findtype '0x22c4' '69' 'backpack'
  sysmsg '*****No SAW OR TOOLHOUSE CHARGED!*****' '0'
  stop
elseif @counttype! '0x1034' '0' 'backpack' < 1
  sysmsg 'Trying to get a Saw from a Tool House...' 33
  @usetype! '0x22c4' '69' 'backpack'
  waitforgump 1513449091 15000
  replygump 0x5a356683 60004
  waitforgump 1513449091 15000
  replygump 0x5a356683 0
endif
pause 500
//============================================================
//=------------------Wood's Check----------------=
//============================================================
if @counttype '0x1bd7' '0' 'backpack' => 5
elseif not @findtype! '0x176b' '88' 'backpack'
  headmsg '*****No Wood Keys found.*****' '33'
  @canceltarget
  stop
elseif @counttype '0x1bd7' '0' 'backpack' < 5
  sysmsg 'Trying to get Wood from a key...' 33
  @usetype! '0x176b' '88' 'backpack'
  waitforgump 173511501 15000
  replygump 0xa57934d 60000
  waitforgump 173511501 15000
  replygump 0xa57934d 0
endif
pause 500
//============================================================
//=------------------Iron Check----------------=
//============================================================
if @counttype '0x1bf2' '0' 'backpack' => 5
elseif not @findtype! '0x176b' '20' 'backpack'
  headmsg '*****No Metals Keys found.*****' '33'
  @canceltarget
  stop
elseif @counttype '0x1bf2' '0' 'backpack' < 5
  sysmsg 'Trying to get Ingots from a key...' 33
  @usetype! '0x176b' '20' 'backpack'
  waitforgump 4213074123 15000
  replygump 0xfb1e68cb 60000
  waitforgump 4213074123 15000
  replygump 0xfb1e68cb 0
endif
pause 500
//============================================================
//=------------------Butcher Check----------------=
//============================================================
if @counttype '0x13f6' '0' 'backpack' => 1
elseif @counttype '0x13f6' '0' 'backpack' < 1
  sysmsg 'Trying to make a butcher knife...' 33
  @usetype! '0x1eb8' '0' 'backpack'
  waitforgump 949095101 15000
  replygump 0x38920abd 22
  waitforgump 949095101 15000
  replygump 0x38920abd 2
  waitforgump 949095101 15000
  replygump 0x38920abd 0
elseif not @findtype! '0x13f6' '0' 'backpack'
  headmsg '*****No Butcher Key found.*****' '33'
  stop
endif
pause 500
//============================================================
//=------- Fishing pole check  0xdc0 color 0-------------=
//============================================================
if not findalias 'pole'
  if @findlayer 'self' 1
    // Unequip
    @moveitem! 'found' 'backpack'
    pause 1000
  endif
  if @findtype! '0xdc0' '0' 'backpack'
    setalias 'pole' 'found'
    equipitem 'pole' 1
    pause 100
  endif
  if @findalias 'pole' 'backpack'
    equipitem 'pole' 1
  endif
endif
pause 2000
if not findalias 'pole'
  sysmsg 'No Pole detected, We gonna try to make one...' 33
  stop
endif
//Cutting fishes
if @findtype '0x9cc' 'any' 'backpack' 1
  @usetype '0x13f6' 'any' 'backpack' 1
  waitfortarget 1000
  @Target! 'found'
  pause 600
endif
if @findtype '0x9cf' 'any' 'backpack' 1
  @usetype '0x13f6' 'any' 'backpack' 1
  waitfortarget 1000
  @Target! 'found'
  pause 600
endif
if @findtype '0x9cd' 'any' 'backpack' 1
  @usetype '0x13f6' 'any' 'backpack' 1
  waitfortarget 1000
  @Target! 'found'
  pause 600
endif
if @findtype '0x9ce' 'any' 'backpack' 1
  @usetype '0x13f6' 'any' 'backpack' 1
  waitfortarget 1000
  @Target! 'found'
  pause 600
endif
if property 'durability' 'pole' <= 0
  moveitem! 'pole' 'backpack'
  pause 1000
  sysmsg '**Repairing Fishing Pole**' '240'
  @usetype! '0x1034' '0' 'backpack'
  waitforgump 949095101 15000
  replygump 0x38920abd 42
  waitfortarget 15000
  pause 500
  target! 'pole'
  waitforgump 949095101 15000
  replygump 0x38920abd 0
  equipitem 'pole' 1
  pause 1000
else
  if @injournal "Your hook has crumbled."
    sysmsg '**Broken Hook - Crafting**' '240'
    @usetype! '0x1eb8' '0' 'backpack'
    waitforgump 949095101 15000
    replygump 0x38920abd 29
    waitforgump 949095101 15000
    replygump 0x38920abd 79
    waitforgump 949095101 15000
    replygump 0x38920abd 0
    pause 500
    contextmenu 'pole' 0
    waitforgump 1330461698 15000
    replygump 0x4f4d3c02 60001
    waitforgump 1330461698 15000
    replygump 0x4f4d3c02 60002
    waitforgump 1330461698 15000
    waitfortarget 15000
    targettype '0x3a96'
    waitforgump 1330461698 15000
    replygump 0x4f4d3c02 0
    @clearjournal
  else
    //  Change weight to
    // your needs
    if weight <= '500'
      @useobject 'pole'
      waitfortarget 500
      targettileoffset  3 0 2
      if @injournal "Must be equiped"
        sysmsg '**Equip a Fishing Pole - Halting**' '233'
        @clearjournal
        stop
      endif
      pause 7500
    else
      sysmsg '**Overweight - Halting**' '240'
      stop
    endif
  endif
endif
if @injournal "The fish don't seem to be biting here."
  sysmsg '**No More Fish - Moving**'
  @clearjournal
  msg 'forward one'
  pause 2000
  msg 'forward one'
  pause 2000
  msg 'forward one'
  pause 2000
  msg 'forward one'
  pause 2000
  sysmsg '**Fishing**'
endif
if @injournal 'Uh oh! That'
  @clearjournal
  sysmsg '**Kill It - Halting**' '233'
  stop
endif
//============================================================
//=------- Calling organizer-------------=
//============================================================
if weight >= '400'
  organizer 'Fish'
endif
//============================================================
//=------- Looking for Trash to recicle-------------=
//============================================================
if not listexists 'trashloote'
  createlist 'trashloote'
  @pushlist 'trashloote' '0x1711'
  @pushlist 'trashloote' '0x170f'
  @pushlist 'trashloote' '0x170d'
  @pushlist 'trashloote' '0x170b'
endif
for 0 to 'trashloote'
  while @findtype trashloote[] 'any' 'backpack' 'o' 'any'
    sysmsg ' **** trash found - Moving ****' '20'
    if @injournal 'cannot hold more'
      sysmsg ' !!! WARNING: Your bag is full.  Exiting script !!!' '28'
      @clearjournal
      stop
    else
      @moveitem 'found' 'TrashBag'
      pause 1000
    endif
  endwhile
endfor
I hope it helps OR works well for everyone i been testing it for a few hours and no problems.
If something goes wrong I will try to help, but again, i'm still new at coding and maybe took me time.
Post Reply