Discussion in   Coding Corner   started     9 years ago   October 19, 2015, 01:13:53 PM   by   habsburg

[UOSteam] Semi-Automatic Gold Panning

habsburg
Offline
2 Posts
Topic :   [UOSteam] Semi-Automatic Gold Panning
9 years ago  October 19, 2015, 01:13:53 PM

I didn't find a script, so I made a simple one myself.

What it does:
- Uses a gold pan from your backpack and clicks the last targetted tile
- Double clicks full gold pans to empty them

You basically just walk around and target water tiles until you find a valid one and then wait until the script finished the spot.


I don't have fishing skill, so if the process is different once you have higher skill (works faster? different journal messages?) that's not included.
Also I cannot code and there surely will be easier ways to do the same, but hey, it works. Feel free to post any improvements, though.

Anyways, have fun and don't use it AFK, this is just supposed to minimize your risk of getting RSI ;)

Needs to be Looped!
Version 1.1

Code: [Select]
if @findtype 0x9d8 'any' 'backpack'
  useobject 'found'
endif
if @findtype 0x9d7 'any' 'backpack'
  useobject 'found'
  waitfortarget 15000
  pause 500
  targettile 'last'
  pause 9000
  if injournal 'Target cannot be seen.'
    @findtype 0x9d7 'any' 'backpack'
    useobject 'found'
    sysmsg 'Target a different tile!' 32
    waitfortarget 15000
    clearjournal
  elseif injournal 'seem to be any nuggets left here.'
    @findtype 0x9d7 'any' 'backpack'
    useobject 'found'
    sysmsg 'Area emptied, go find a new one.' 32
    waitfortarget 15000
    clearjournal
  elseif injournal 'pan for gold there!'
    @findtype 0x9d7 'any' 'backpack'
    useobject 'found'
    sysmsg 'Find a proper water tile!' 32
    waitfortarget 15000
    clearjournal
  elseif injournal 'You need to be closer to the water for panning!'
    @findtype 0x9d7 'any' 'backpack'
    useobject 'found'
    sysmsg 'Too far away!' 32
    waitfortarget 15000
    clearjournal
  endif
endif


Changelog:
1.1 Added reaction to "You need to be closer to the water for panning!" journal message

Riversilk
Offline
31 Posts
#1 Re :   [UOSteam] Semi-Automatic Gold Panning
9 years ago  October 20, 2015, 06:38:51 PM

Nice work!
Just a suggestion, instead of telling others to enable loop, just include e "replay" statement ad the end of the script.
Same effect, but no need to remember anything.

Smilingdeath
Offline
275 Posts
#2 Re :   [UOSteam] Semi-Automatic Gold Panning
8 years ago  January 25, 2016, 10:09:59 PM

How about a script that would place the results into a specific container in your pack?

Sturger
Offline
730 Posts
#3 Re :   [UOSteam] Semi-Automatic Gold Panning
8 years ago  January 26, 2016, 01:45:29 PM

  That script would be called an Organizer... which is a feature in most 3rd party help programs for UO these days.

habsburg
Offline
2 Posts
#4 Re :   [UOSteam] Semi-Automatic Gold Panning
8 years ago  March 02, 2016, 08:05:02 AM

How about a script that would place the results into a specific container in your pack?
Yes, like Sturger said, the Agents -> Organizer function would be your best bet.
You click "New" in the lower left, then it adds something like "Organizer-1". You double click that entry in the list and name it however you want.
Then you click "Set Containers" and target your backpack as source and then the bag you want to move stuff into and finally press "Insert" and add all the items you want to move to the list.


Then you can set a Hotkey for your Organizer or just add it to a Macro by adding it for example like this:


Code: [Select]
organizer 'Organizer-1'
while organizing
  pause 600
endwhile


Organizer-1 should be the standard name for a new Organizer Entry, if you renamed it you have to change that.