Bapeth's Peaceful Harvester by barryroser
Description from the author:
# Bapeths Peaceful Harvester
#
# December 1st 2024 (Fixed Barding while doing Resource Map)
#
# "Required" - Do not include quotations when entering data
# Create cooldowns in game :
#
# "Resource Map" > Trigger Type : Overhead Message > Trigger Text : "You extract" + "You gather" > Cooldown : "0.5"
# "Peacemaking" No data needed
# "Barding Reset" > Trigger Type : Overhead Message > Trigger Text : "Your barding skill cooldowns reset" > Cooldown : "0.5"
# "Tracking" No data needed
#
# Hold TAB key for combat should be unchecked in UO Options > Combat-Spells > General
#
# "Harvest Speed"
# This script uses razor "Auto-Queue Object Delay" setting
# Make sure this setting is turned ON in the razor Options tab > Targeting & Queues sub-tab
# And set "object delay to 503" MINING WILL BE SLOW IF YOU DONT DO THIS
#
# "Required Items" : Pickaxe or Hatchet, BoomBox (or any container), Musical Instrument (supreme is good), Resource stockpile (or extraction script for ingots:boombox), Atlas
#
# "Boom Box / Ore Container"
# Open the "Atlas" menu while the script is playing to "set your container"
# Type [atlas or double click the party scroll in your paperdoll
# Always keep your ore container in your backpack - "do not" put it on a pack animal
#
# "Optional"
# If you want to install "Bapeths Custom Razor Overheads" for this Build
# Copy overheads here " https://outlands.uorazorscripts.com/script/308de01b-9175-4ec3-9640-b302c619bc4c "
# Paste them into your characters razor profile in the "Overheads" section
# Default pathway is " C:\Program Files (x86)\Ultima Online Outlands\ClassicUO\Data\Plugins\Assistant\Profiles "
#
# Additional Items Script Uses : Cure pot, Heal pot, Refresh pot, Strength pot, Cleansing brew, Scissors (Blessed), Rune Tome/book (or Recall scroll and Rune), Pack Animal
#
# "Spam Reduction"
# Options tab > Targeting & Queues subtab > Uncheck "Attack/Target name overhead"
# Filters tab > Text & Messages subtab > Check "Filter Repeating Razor Messages" ONLY
# Filters tab > Text & Messages subtab > Add > "You cannot produce any wood from that." and filter from overhead
#
# "Yell Emote"
# Ctrl + F Search for "say [Yell" if you want to replace this with a different emote
#
# "**HOW TO USE**"
# 1. Gather required items and play script near resource
# 2. Script will auto sort ore/boards/ingots into Boom Box / Ore Container
# 3. To get ingots out of trapped box: use "resource stockpile" in your house/inn room to grab ingots without triggering trap (or use a sorting script)
# 4. Do not carry both a pickaxe and a hatchet at the same time, choose one or the other
#
# "In Peace Mode"
# The script will auto harvest very quickly
# Auto heal/cure
# Auto peacemake hostile
# Auto track (set hunting mode manually) <---- "Important for auto escape"
#
# "In War Mode" In addition to everything peace mode does...
# Mining speed is 33% slower while ore is sorted into the Ore Container / Pack Animal
# Look for and display nearby player forges (Natural non-player will not display)
# Auto smelt ingots when near any forge
# Turn logs into boards
# Auto sort boards/ingots/ore into a Boombox / Ore Container
#
# "Pack Animals"
# The script will auto sort your ore into the your pack animals pack when in "war mode"
#
# "Auto-Escape" Toggled on and off by double clicking the "scissors" while the script is playing
# This feature uses a "Rune Tome/Book" - Your escape rune must be placed in the very "first slot" of your book
# If you do not have a Rune Tome/Book you can simply use a "Recall Rune & Recall scroll" instead - Reagents also work here in place of scroll (make sure Auto Use Spell Scrolls is Enabled)
# This feature will always be default "Off" and will reset to default if you restart your game completely
#
# War mode uses action resources and may slow down active mining slightly
#
# "***Recommended Build***"
# -"Peace Harvester"-
# Tracking ------ 120
# Lumberjacking - 120
# Mining -------- 120
# Peacemaking --- 100
# Magery -------- 100 (80 is fine, 100 only used for gate travel)
# Musicianship -- 100
# Camping ------- 60 (Use 80 here if your magery is 80)
#
# Use "Effective Harvest Skill" links if you can
#
# Script starts here
if not varexist peaceharvfirsttime
@setvar peaceharvfirsttime backpack
overhead "Welcome to Bapeths Peaceful Harvester..." 88
pause 4000
overhead "This script may require up to three cooldowns:" 88
pause 800
overhead "Tracking" 78
overhead "Peacemaking" 78
overhead "Barding Reset" 78
pause 4000
overhead "Create these in your UO options page" 88
pause 4000
overhead "Read the breakdown at the top of the script for more info..." 88
pause 6000
overhead "Now, get out there and farm some resources!" 55
endif
if timerexists usetool
removetimer usetool
endif
if not timerexists htoolcheck
createtimer htoolcheck
settimer htoolcheck 28000
endif
if not hidden and not findtype "atlas" backpack
pause 500
say "[Atlas"
getlabel backpack ping
overhead "Double click the Atlas anytime you wish to reset your Ore Container..." 88
pause 500
endif
if gumpexists 341416395
gumpclose 341416395
endif
if not timerexists instrumcheck
createtimer instrumcheck
settimer instrumcheck 5000
endif
if skill "Peacemaking" >= 50 and not find "harvinstrument" backpack and findtype 3763|20016|20010|10245|20008|20006|20014|20012|3742|3740|3762 backpack as binstrument
@setvar "harvinstrument" binstrument
while queued
//donothing
endwhile
dclick binstrument
pause 500
getlabel backpack ping
endif
if timer instrumcheck >= 5000 and not find "harvinstrument" backpack and skill "Peacemaking" >= 50
overhead "I should get an instrument..." 88
settimer instrumcheck 0
endif
if not find "currentpackanimal"
if findtype "291|292" ground as bpackanimal
if noto bpackanimal = "friend"
@setvar "currentpackanimal" bpackanimal
endif
endif
endif
if not timerexists openanimalpack and not find "currentpackanimal" ground -1 -1 1
createtimer openanimalpack
endif
if timerexists openanimalpack and find "currentpackanimal" ground -1 -1 1 not targetexists and not casting
while queued
//donothing
endwhile
dclick "currentpackanimal"
getlabel backpack ping
removetimer openanimalpack
endif
if gumpexists 341416395
gumpclose 341416395
if targetexists
hotkey "Cancel Current Target"
endif
overhead "Select Boom Box" 88
overhead "-----> OR" 78
overhead "Select Trapped Pouch" 88
pause 550
hotkey "Set Last Target"
wft 500
while targetexists
//donothing
endwhile
@setvar "harvboombox" lasttarget
hotkey "Cancel Current Target"
overhead "Container Set" 78
if find "harvboombox"
hotkey "Set Grab Item HotBag"
wft 500
target "harvboombox"
endif
pause 750
endif
if not find "escaperune" backpack
overhead "Select Escape Method" 88
pause 1500
overhead "Select Runetome, or" 78
overhead "Select Runebook, or" 78
overhead "Select Rune" 78
pause 750
hotkey "Set Last Target"
wft 500
while targetexists
//donothing
endwhile
@setvar "escaperune" lasttarget
hotkey "Cancel Current Target"
overhead "Escape Method Set" 88
pause 750
endif
if not timerexists freshlogin
createtimer freshlogin
drop backpack
lift "harvboombox"
drop backpack
pause 500
getlabel backpack ping
if findtype "alchemists satchel" backpack as satch
dclick satch
endif
endif
if not timerexists escapeswitch
if insysmsg "What should I use these scissors on?"
hotkey "Cancel Current Target"
createtimer escapeswitch
overhead "--Escape Mode Enabled--" 88
endif
endif
if timerexists escapeswitch
if insysmsg "What should I use these scissors on?"
hotkey "Cancel Current Target"
removetimer escapeswitch
overhead "--Escape Mode Disabled--" 38
endif
endif
if not find "bharvest" and findtype 3718|3908 backpack as harvtool
@setvar "bharvest" harvtool
endif
if not find "bharvest" self and findlayer self lefthand as leftdrop
drop backpack
lift leftdrop
drop backpack
pause 500
getlabel backpack ping
replay
elseif not find "bharvest" self and findlayer self righthand as rightdrop
drop backpack
lift rightdrop
drop backpack
pause 500
getlabel backpack ping
replay
endif
if find "bharvest" backpack and findlayer self lefthand as leftdrop
drop backpack
lift leftdrop
drop backpack
pause 500
getlabel backpack ping
replay
elseif find "bharvest" backpack and findlayer self righthand as rightdrop
drop backpack
lift rightdrop
drop backpack
pause 500
getlabel backpack ping
replay
endif
if rhandempty and find "bharvest" backpack and not targetexists
dclick "bharvest"
overhead "Harvest Time!" 88
pause 500
getlabel backpack ping
endif
if lhandempty and find "bharvest" backpack and not targetexists
dclick "bharvest"
overhead "Harvest Time!" 88
pause 500
getlabel backpack ping
endif
while find "bharvest" self and not hidden and not casting
while queued
//donothing
endwhile
hotkey 'use item in hand'
if findlayer self lefthand
getlabel backpack ping
endif
if targetexists and findlayer self lefthand
target self
hotkey "Cancel Current Target"
getlabel backpack ping
endif
if not find "currentpackanimal"
if findtype "291|292" ground as bpackanimal
if noto bpackanimal = "friend"
@setvar "currentpackanimal" bpackanimal
endif
endif
endif
if not timerexists openanimalpack and not find "currentpackanimal" ground -1 -1 1
createtimer openanimalpack
endif
if timerexists openanimalpack and find "currentpackanimal" ground -1 -1 1 not targetexists and not casting
while queued
//donothing
endwhile
dclick "currentpackanimal"
getlabel backpack ping
removetimer openanimalpack
endif
if insysmsg "You do not see any harvestable resources nearby."
if timerexists rescheck
overhead "Resource Depleted..." 78
removetimer rescheck
endif
if warmode and not findtype "forge" ground -1 -1 2
if find "currentpackanimal" ground
if find "currentpackanimal" ground -1 -1 2 and findtype "6585" backpack as rawore
while queued
//donothing
endwhile
drop backpack
lift rawore 60000
drop "currentpackanimal"
pause 500
getlabel backpack ping
endif
elseif findtype "6585" backpack as rawore
while queued
//donothing
endwhile
hotkey "Grab Item"
wft 500
target rawore
pause 500
getlabel backpack ping
if not find "currentpackanimal"
@ignore rawore
endif
endif
if find "harvboombox" backpack
@clearignore
while findtype 7154|7127| backpack as refinedresource
@ignore refinedresource
endwhile
endif
if findtype "6585" backpack as natsmelt
clearsysmsg
while queued
//donothing
endwhile
dclick natsmelt
getlabel backpack ping
elseif find "currentpackanimal" ground -1 -1 1 and findtype "6585" "currentpackanimal" as natsmelt
dclick "currentpackanimal"
while queued
//donothing
endwhile
dclick natsmelt
getlabel backpack ping
endif
if insysmsg "You smelt the ore"
while findtype 7154|7127 backpack as refinedresource
while queued
//donothing
endwhile
hotkey "Grab Item"
wft 500
target refinedresource
pause 500
getlabel backpack ping
@ignore refinedresource
endwhile
if find "harvboombox" backpack
@clearignore
while findtype 7154|7127| backpack as refinedresource
@ignore refinedresource
endwhile
endif
while findtype "6585" backpack as natore
dclick natore
pause 500
getlabel backpack ping
if insysmsg "You do not see any nearby forges"
gumpclose 341416395
getlabel backpack ping
break
endif
endwhile
if find "currentpackanimal" -1 -1 1
dclick "currentpackanimal"
endif
while findtype "6585" "currentpackanimal" as natore
dclick natore
pause 500
getlabel backpack ping
if insysmsg "You do not see any nearby forges"
gumpclose 341416395
getlabel backpack ping
break
endif
endwhile
while findtype 7154|7127 backpack as refinedresource
while queued
//donothing
endwhile
hotkey "Grab Item"
wft 500
target refinedresource
pause 500
getlabel backpack ping
@ignore refinedresource
endwhile
endif
if not find "currentpackanimal"
while findtype 6585 backpack as ore
@ignore ore
endwhile
endif
endif
endif
if warmode
while findtype 7133 backpack as rawlog
dclick rawlog
pause 500
getlabel backpack ping
endwhile
endif
if timer htoolcheck >= 60000
getlabel "bharvest" desc
overhead desc
settimer htoolcheck 0
endif
if cooldown "Resource Map"
if not timerexists resourcemapskilltimer
createtimer resourcemapskilltimer
settimer resourcemapskilltimer 0
endif
endif
if find "harvinstrument" backpack and skill "Peacemaking" >= 10 and not cooldown "Peacemaking" and not targetexists and not casting
for 6
hotkey 'Next Grey Monster Target'
if insysmsg "No one matching"
break
endif
@setvar peacetarget lasttarget
#Actually non-hostile because razor code is backward (bug)
if noto "peacetarget" = hostile
//donothing
elseif find peacetarget ground -1 -1 1
createtimer peaceit
elseif find peacetarget ground -1 -1 2
createtimer peaceit
elseif find peacetarget ground -1 -1 3
createtimer peaceit
elseif find peacetarget ground -1 -1 4
createtimer peaceit
elseif find peacetarget ground -1 -1 5
createtimer peaceit
elseif find peacetarget ground -1 -1 6
createtimer peaceit
elseif find peacetarget ground -1 -1 7
createtimer peaceit
elseif find peacetarget ground -1 -1 8
createtimer peaceit
elseif find peacetarget ground -1 -1 9
createtimer peaceit
elseif find peacetarget ground -1 -1 10
createtimer peaceit
elseif find peacetarget ground -1 -1 11
createtimer peaceit
elseif find peacetarget ground -1 -1 12
createtimer peaceit
endif
if timerexists peaceit
getlabel peacetarget desc
if "pacified" in desc
//donothing
else
overhead "Peace target acquired..." 2085
overhead desc 1161
if timerexists resourcemapskilltimer
pause 2000
endif
skill "Peacemaking"
wft 500
target "peacetarget"
getlabel backpack ping
if insysmsg "You play successfully, pacifying your target"
cooldown "Peacemaking" 10000
cooldown "Tracking" 12500
elseif insysmsg "You fail"
cooldown "Peacemaking" 5000
cooldown "Tracking" 12500
elseif insysmsg "Target cannot be seen"
cooldown "Peacemaking" 3000
endif
if cooldown "Barding Reset"
cooldown "Peacemaking" 1
endif
endif
break
endif
endfor
hotkey "Cancel Current Target"
settimer findpeacetarget 0
removetimer peaceit
endif
if timerexists escapeswitch
if insysmsg 'Now tracking:'
if not timerexists emotetimer
createtimer emotetimer
settimer emotetimer 120000
endif
if timer emotetimer >= 120000
say "[Yell" 454
settimer emotetimer 0
endif
while not dead
getlabel "escaperune" desc
if "tome" in desc
dclick "escaperune"
waitforgump 167090027 500
if skill "Magery" <= 59
gumpresponse 100
while casting
//donothing
endwhile
pause 800
clearsysmsg
elseif skill "Magery" >= 60
gumpresponse 200
waitforgump 167090027 500
gumpresponse 10
while casting
//donothing
endwhile
pause 800
clearsysmsg
endif
break
elseif "runebook" in desc
dclick "escaperune"
waitforgump 167090027 500
if skill "Magery" <= 59
gumpresponse 2
while casting
//donothing
endwhile
pause 800
clearsysmsg
elseif skill "Magery" >= 60
gumpresponse 5
while casting
//donothing
endwhile
pause 800
clearsysmsg
endif
break
elseif findtype "7956" backpack
cast "Recall"
while casting
//donothing
endwhile
wft 500
target "escaperune"
pause 800
clearsysmsg
break
endif
endwhile
endif
endif
if not timerexists escapeswitch
if insysmsg 'Now tracking:'
if not timerexists emotetimer
createtimer emotetimer
settimer emotetimer 120000
endif
if timer emotetimer >= 120000
say "[Yell" 454
settimer emotetimer 0
endif
if not cooldown "Tracking" and not findtype "map" backpack
gumpclose 4267467659
getlabel backpack ping
skill "Tracking"
waitforgump 4267467659 500
gumpresponse 5
cooldown "Tracking" 6000
endif
endif
endif
if warmode
if findlayer self lefthand
//donothing
else
for 18
if index > 0 and findtype "forge|4017" ground -1 -1 index as bforge
overhead "****FORGE HERE****" 2085 bforge
break
endif
endfor
endif
if findtype "forge" ground -1 -1 2
if find "harvboombox" backpack
@clearignore
while findtype 7154|7127| backpack as refinedresource
@ignore refinedresource
endwhile
endif
while findtype 6585 backpack as Bapore
dclick Bapore
pause 500
getlabel backpack ping
endwhile
if find "currentpackanimal" -1 -1 1
dclick "currentpackanimal"
endif
while findtype 6585 "currentpackanimal" as Bapore
dclick Bapore
pause 500
getlabel backpack ping
endwhile
endif
while findtype 7154|7127 backpack as refinedresource
while queued
//donothing
endwhile
hotkey "Grab Item"
wft 500
target refinedresource
pause 500
getlabel backpack ping
@ignore refinedresource
endwhile
if find "currentpackanimal" ground
if find "currentpackanimal" ground -1 -1 2 and findtype "6585" backpack as rawore
while queued
//donothing
endwhile
drop backpack
lift rawore 60000
drop "currentpackanimal"
pause 500
getlabel backpack ping
endif
elseif findtype "6585" backpack as rawore
while queued
//donothing
endwhile
hotkey "Grab Item"
wft 500
target rawore
pause 500
getlabel backpack ping
if not find "currentpackanimal"
@ignore rawore
endif
endif
endif
if find "harvinstrument" backpack and skill "Peacemaking" >= 10 and not findbuff "Song Of Peacemaking"
skill "Peacemaking"
wft 500
targetrelloc -1 -1
endif
if skill "Tracking" >= 10 and not cooldown "Tracking" and not findbuff "Tracking Hunting"
skill 'tracking'
waitforgump 4267467659 500
gumpresponse 6
pause 250
gumpclose 4267467659
endif
if not hidden and not timerexists brew and findbuff "Bleed" and findtype 50675 backpack as cbrew
if not timerexists bleedmobdelay
createtimer bleedmobdelay
endif
if timer bleedmobdelay >= 1100
while queued
//donothing
endwhile
dclick cbrew
createtimer brew
removetimer bleedmobdelay
endif
elseif not hidden and not timerexists brew and findbuff "Diseased" and findtype 50675 backpack as cbrew
while queued
//donothing
endwhile
dclick cbrew
createtimer brew
endif
if timerexists brew
if timer brew >= 120000
removetimer brew
endif
endif
if not hidden and findbuff "Weaken" and not targetexists and findtype "White Potion" backpack as stpot
while queued
//donothing
endwhile
getlabel backpack ping
dclick stpot
pause 500
getlabel backpack ping
endif
if not hidden and stam <= 4 and findtype "Red Potion" backpack as redpot
while queued
//donothing
endwhile
dclick redpot
endif
if skill "Magery" >= 80 and mana >= 15
if timerexists reflect and not findbuff "Magic Reflection"
if timer reflect > 31000
cast "Magic Reflection"
pause 1800
replay
endif
endif
if findbuff "Magic Reflection" and timerexists reflect
removetimer reflect
endif
if not findbuff "Magic Reflection" and not timerexists reflect
createtimer reflect
endif
endif
if skill "Magery" >= 20 and mana >= 4
if timerexists reactive and not findbuff "Reactive Armor"
if timer reactive > 31000
cast "Reactive Armor"
pause 900
replay
endif
endif
if findbuff "Reactive Armor" and timerexists reactive
removetimer reactive
endif
if not findbuff "Reactive Armor" and not timerexists reactive
createtimer reactive
endif
endif
if not hidden and paralyzed and not targetexists and findtype "pouch" backpack 38
say "[Pouch"
pause 500
getlabel backpack ping
endif
if hp < 50
while hp < 50 and skill "Magery" >= 30
hotkey 'Cancel Current Target'
cast 'Heal'
wft 2500
hotkey 'Target Self'
hotkey 'Cancel Current Target'
pause 250
endwhile
replay
endif
if not timerexists bhealpot
createtimer bhealpot
settimer bhealpot 11000
endif
if timer bhealpot >= 11000 and hp < maxhp and findtype "Yellow Potion" backpack as healpot
while queued
//donothing
endwhile
dclick healpot
settimer bhealpot 0
pause 500
getlabel backpack ping
endif
if hp < 90 and skill "Magery" >= 30
cast 'Heal'
wft 2500
hotkey 'Target Self'
hotkey 'Cancel Current Target'
pause 250
replay
endif
if hp < 79 and skill "Magery" >= 60
hotkey 'Cancel Current Target'
cast 'Greater Heal'
wft 3500
hotkey 'Target self'
hotkey 'Cancel Current Target'
pause 250
replay
endif
while poisoned and not targetexists
if findtype "Orange Potion" backpack as curepot
dclick curepot
pause 500
getlabel backpack ping
elseif poisoned and skill "Magery" >= 40
while poisoned
mana >= 6
cast "Cure"
wft 2500
target self
hotkey 'Cancel Current Target'
endwhile
replay
endif
endwhile
if insysmsg "You have recently traveled and must wait"
removetimer usetool
overhead "Travel Cooldown..." 45
pause 500
getlabel backpack ping
endif
if insysmsg "You dig"
createtimer rescheck
endif
if insysmsg "You chop"
createtimer rescheck
endif
if not timerexists escapeswitch
if insysmsg "What should I use these scissors on?"
hotkey "Cancel Current Target"
createtimer escapeswitch
overhead "--Escape Mode Enabled--" 88
endif
endif
if timerexists escapeswitch
if insysmsg "What should I use these scissors on?"
hotkey "Cancel Current Target"
removetimer escapeswitch
overhead "--Escape Mode Disabled--" 38
endif
endif
if not find "currentpackanimal"
if findtype "291|292" ground as bpackanimal
if noto bpackanimal = "friend"
@setvar "currentpackanimal" bpackanimal
endif
endif
endif
if not timerexists openanimalpack and not find "currentpackanimal" ground -1 -1 1
createtimer openanimalpack
endif
if timerexists openanimalpack and find "currentpackanimal" ground -1 -1 1 not targetexists and not casting
while queued
//donothing
endwhile
dclick "currentpackanimal"
getlabel backpack ping
removetimer openanimalpack
endif
if gumpexists 341416395
gumpclose 341416395
if targetexists
hotkey "Cancel Current Target"
endif
overhead "Select Boom Box" 88
overhead "-----> OR" 78
overhead "Select Trapped Pouch" 88
pause 550
hotkey "Set Last Target"
wft 500
while targetexists
//donothing
endwhile
@setvar "harvboombox" lasttarget
hotkey "Cancel Current Target"
overhead "Container Set" 78
if find "harvboombox"
hotkey "Set Grab Item HotBag"
wft 500
target "harvboombox"
endif
pause 750
endif
if skill "Peacemaking" >= 50 and not find "harvinstrument" backpack and findtype 3763|20016|20010|10245|20008|20006|20014|20012|3742|3740|3762 backpack as binstrument
@setvar "harvinstrument" binstrument
while queued
//donothing
endwhile
dclick binstrument
pause 500
getlabel backpack ping
endif
if timer instrumcheck >= 5000 and not find "harvinstrument" backpack and skill "Peacemaking" >= 50
overhead "I should get an instrument..." 88
settimer instrumcheck 0
endif
endwhile
if not timerexists escapeswitch
if insysmsg "What should I use these scissors on?"
hotkey "Cancel Current Target"
createtimer escapeswitch
overhead "--Escape Mode Enabled--" 88
endif
endif
if timerexists escapeswitch
if insysmsg "What should I use these scissors on?"
hotkey "Cancel Current Target"
removetimer escapeswitch
overhead "--Escape Mode Disabled--" 38
endif
endif
if not findlayer self righthand and not findlayer self lefthand
overhead "Time for a break..." 45
stop
endif
loopIn Peace Mode - This script will auto harvest, auto heal/cure, auto peacemake hostile, auto track (set hunting mode manually)
In War Mode - This script will additionally look for nearby forges, smelt ingots, turn logs to boards, and auto sort resources into a Boombox/Trapped Pouch