Krasnog's Restock Resupply Script by krasnog
Description from the author:
##################################################################
## Krasnogs Restock and Resupply Script for UO Outlands ##
## release v1.3 on 5/29/24 ##
##################################################################
# This script is what I run before heading out of my home. Great #
# for inbetween your farming runs. It drops off gold onto your #
# safe, adds magic items to recycler & vault, adds items to your #
# stockpile, adds items to your shelf - it then resupplies #
# everything in an organized pouch. Last, arms yourself and #
# sets aspect in the case you are recovering from being a #
# ghost o0o0 o0o0 o0o0o. I hope its useful for you. Enjoy, Kras #
##################################################################
##################################################################
# --- SCRIPT CREDITS --- #
# Shout out to Jaseowns and yagermeistertv for their scripts #
# I have repurposed or learned from them to make this script. #
# Dump, Restock and Organize: https://outlands.uorazorscripts.com/script/0ac01dd4-81c4-462b-81d9-b968ca4302bb
# Move Pouches: https://outlands.uorazorscripts.com/script/90c7e8b0-1b40-4df6-9ccb-dc5d83ddcf8377
# Lock or Unlock Loot Box: https://outlands.uorazorscripts.com/script/08a2e31f-f8b8-430a-9772-5a934167d5f4
##################################################################
##################################################################
# --- SCRIPT VARIABLES --- #
# 1. Youll need to change a couple of variables with your own #
# IDs so that the script will work for you. #
# 2. To get the ID of your items in game, type >info and then #
# select the item #
# 3. Replace red variables below using your IDs and preferences #
##################################################################
// Safe
@setvar! mySafe 0x770EA720
// Reagent Satchel
@setvar! mySatchel 'mySatchel'
// Recycler
@setvar! myRecycler 0x770D5CE2
// Stockpile
@setvar! myStockpile 0x76F69D80
// Shelf
@setvar! myShelf 0x7804F1D8
// Magic Vault
@setvar! myVault 0x4149B7D3
// Repair Bench
@setvar! myBench 0x450A909D
// Primary Right-Hand Weapon
@setvar! myBaby 0x423DF0D7
// If you use a LockBox & Key for security from Thieves
@setvar! myLockBox 'Lootbox'
@setvar! myLockBoxKey 'LootboxKey'
// Use a lower number to speed up, higher to slow down
@setvar! globalPause 1000
// color of message https://outlands.uorazorscripts.com/hues
@setvar! myColor 55
// Global Timeout - you shouldnt need to change this
@setvar! globalTimeout 400
##################################################################
# --- The Script --- #
##################################################################
sysmsg 'Runnning Restock Script'
# ------------------------------------------ #
# Drop Off, Restock, Resupply
# ------------------------------------------ #
# Move any gold and dobloons to safe
overhead "Depositing gold in safe..." myColor
while findtype 'gold coin' backpack as gold
lift gold 60000
drop mySafe -1 -1 0
wait globalTimeout
endwhile
overhead "Depositing doubloons in safe..." myColor
while findtype 2539 backpack 2125 as doubloons
lift doubloons 60000
drop safe -1 -1 -1
wait globalTimeout
endwhile
pause globalPause
# select recycler and add items from backpack
overhead "Adding magic items to recycler..." myColor
menu myRecycler 1
pause globalPause
# select magic vault and add items from backpack
overhead "Adding known magic items to vault..." myColor
menu myVault 0
waitfortarget
target 'self'
pause globalPause
# select shelf and restock from self
overhead "Restocking items to shelf..." myColor
menu myShelf 0
waitfortarget
target 'self'
pause globalPause
# select stockpile and restock from self
overhead "Restocking items to stockpile..." myColor
menu myStockpile 0
waitfortarget
target 'self'
pause globalPause
# select shelf and resupply
overhead "Resupplying from shelf..." myColor
waitforgump 3232825965
gumpclose
menu myShelf 1
pause globalPause
# Repair armor if its needed
overhead "Repairing armor..." myColor
dclick myBench
pause globalPause
# ------------------------------------------ #
# Ogranize Your Reagent Satchel
# ------------------------------------------ #
overhead "Organizing reagent satchel..." myColor
if findtype "Blood Moss" mySatchel as myitem
lift myitem 999
drop mySatchel 45 65
wait globalTimeout
endif
if findtype "Nightshade" mySatchel as myitem
lift myitem 999
drop mySatchel 60 75
wait globalTimeout
endif
if findtype "Garlic" mySatchel as myitem
lift myitem 999
drop mySatchel 75 65
wait globalTimeout
endif
if findtype "Ginseng" mySatchel as myitem
lift myitem 999
drop mySatchel 90 75
wait globalTimeout
endif
if findtype "Sulfurous Ash" mySatchel as myitem
lift myitem 999
drop mySatchel 105 65
wait globalTimeout
endif
if findtype "Black Pearl%s%" mySatchel as myitem
lift myitem 999
drop mySatchel 120 75
wait globalTimeout
endif
if findtype "Spiders Silk" mySatchel as myitem
lift myitem 999
drop mySatchel 135 65
wait globalTimeout
endif
if findtype "Mandrake Root%s%" mySatchel as myitem
lift myitem 999
drop mySatchel 150 75
wait globalTimeout
endif
if findtype "Summon Fire Elemen" mySatchel as myitem
lift myitem 999
drop mySatchel 40 120
wait globalTimeout
endif
if findtype "Flamestrike Scroll" mySatchel as myitem
lift myitem 999
drop mySatchel 80 120
wait globalTimeout
endif
if findtype "Summon Earth Eleme" mySatchel as myitem
lift myitem 999
drop mySatchel 120 120
wait globalTimeout
endif
# ------------------------------------------ #
# Ogranize Your Supply Pouch
# ------------------------------------------ #
overhead "Organizing supply pouch..." myColor
if findtype "pouch" backpack 0 any any as mybag
setvar SupplyBag mybag
// put supply pouch at top left of backpack
lift mybag
drop backpack 0 0 0
endif
#
# Organize the first Row
#
# Healing Pot
if findtype "yellow potion" backpack as myitem
lift myitem 999
drop SupplyBag 45 65
wait globalTimeout
endif
# Cure Pot
if findtype "orange potion" backpack as myitem
lift myitem 999
drop SupplyBag 55 65
wait globalTimeout
endif
# Refresh Pot
if findtype "red potion" backpack as myitem
lift myitem 999
drop SupplyBag 65 65
wait globalTimeout
endif
# Strength Pot
if findtype "white potion" backpack as myitem
lift myitem 999
drop SupplyBag 75 65
wait globalTimeout
endif
# Dexterity Pot
if findtype "blue potion" backpack as myitem
lift myitem 999
drop SupplyBag 85 65
wait globalTimeout
endif
# Poison Pot
if findtype "green potion" backpack as myitem
lift myitem 999
drop SupplyBag 95 65
wait globalTimeout
endif
# Explosion Pot
if findtype "purple potion" backpack as myitem
lift myitem 999
drop SupplyBag 105 65
wait globalTimeout
endif
# Magic Resist
if findtype "black potion" backpack as myitem
lift myitem 999
drop SupplyBag 115 65
wait globalTimeout
endif
# Bandages
if findtype "clean bandage%s%" backpack as myitem
lift myitem 999
drop SupplyBag 125 65
wait globalTimeout
endif
# Vet Supplies
if findtype "veterinary supplies" backpack as myitem
lift myitem 999
drop SupplyBag 135 65
wait globalTimeout
endif
# Recall Scrolls
if findtype "recall" backpack as myitem
lift myitem 999
drop SupplyBag 145 65
wait globalTimeout
endif
#
# Organize the second Row (Run Supplies)
#
# Loot Box Key - Put at same cordinate as Rope, so rope hides it.
if find myLockBoxKey backpack as myitem
lift myitem 999
drop SupplyBag 50 87
wait globalTimeout
endif
# Rope - goes on top of or Loot Box key
if findtype "rope" backpack as myitem
lift myitem 999
drop SupplyBag 45 85
wait globalTimeout
endif
# magic mushroom
if findtype "mushroom" backpack as myitem
lift myitem 999
drop SupplyBag 75 85
wait globalTimeout
endif
# smoke bombs
if findtype "bombs" backpack as myitem
lift myitem 999
drop SupplyBag 95 85 0
wait globalTimeout
endif
# food tray
if findtype "tray" backpack as myitem
lift myitem 999
drop SupplyBag 115 85 0
wait globalTimeout
endif
# sewing kit
if findtype "sewing kit" backpack as myitem
lift myitem 999
drop SupplyBag 125 85 0
wait globalTimeout
endif
# id wand
if findtype "wand" backpack as myitem
lift myitem 999
drop SupplyBag 135 85 0
wait globalTimeout
endif
#
# Organize the third Row (Ship Items)
#
if findtype "barrel" backpack as myitem
lift myitem 999
drop SupplyBag 45 105 0
wait globalTimeout
endif
# repair kits
if findtype "ship repair kit" backpack as myitem
lift myitem 999
drop SupplyBag 85 100 0
wait globalTimeout
endif
# boarding rope
if findtype "rope" backpack as myitem
lift myitem 999
drop SupplyBag 45 85
wait globalTimeout
endif
# cannon balls
if findtype "cannon ball" backpack as myitem
lift myitem 999
drop SupplyBag 105 110 0
wait globalTimeout
endif
# ------------------------------------------ #
# Ogranize Pouches
# ------------------------------------------ #
@clearignore
# Shuffle Trapped Pouches in Main Backpack
while findtype "pouch" backpack 38 as item
overhead "Shuffling Trapped Pouches..." myColor
lift item 60000
drop backpack -1 -1 -1
wait 650
# lift item
# drop backpack 0 0 0
# wait globalTimeout
if insysmsg "you may pick up an item from here"
// do nothing
else
@ignore item
endif
endwhile
# pouches
if findtype "pouch" backpack as myPouch
lift myPouch 999
drop backpack 0 0 0
wait globalTimeout
endif
# ------------------------------------------ #
# Open Pouches
# ------------------------------------------ #
# Open non trapped pouches
dclick backpack
while findtype "pouch" backpack 0 as item
overhead "Opening Pouches..." myColor
dclick item
wait globalTimeout
@ignore item
endwhile
pause globalPause
@clearignore
# ------------------------------------------ #
# Lock Box
# ------------------------------------------ #
dclick myLockBoxKey
wft 500
target myLockBox
getlabel myLockBox desc
if "stones" in desc
overhead "Loot Box is Unlocked..." myColor
// move loot box to bottom row (visual indicator of unlocked)
lift myLockBox
drop backpack 165 100 0
// open
dclick myLockBox
else
// move loot box to top row (visual indicator of locked)
lift myLockBox
drop backpack 125 45 0
overhead "Loot Box is Locked..." 34
endif
# ------------------------------------------ #
# Arm
# ------------------------------------------ #
# Arm yourself
overhead "Arming yourself..." myColor
dclick myBaby
pause globalPause
# ------------------------------------------ #
# Set Aspect
# ------------------------------------------ #
# Set Aspect for Wep, Spellbook, Armor
overhead "Setting Aspect..." myColor
say '[aspect'
# weapon
waitforgump 2424293173
gumpresponse 8
waitforgump 2424293173
gumpresponse 8
# spellbook
waitforgump 2424293173
gumpresponse 13
waitforgump 2424293173
gumpresponse 13
# armor
waitforgump 2424293173
gumpresponse 17
waitforgump 2424293173
gumpresponse 17
# Close aspect menu
waitforgump 2424293173
gumpclose
pause globalPause
# ------------------------------------------ #
# Closing Message - self affirmation goes a long way
# ------------------------------------------ #-
overhead "You are good to go, Legend!" myColor
sysmsg 'Completed Restock Resupply Script'This script is what I run before heading out of my home. Great for inbetween your farming runs. It drops off gold onto your safe, adds magic items to recycler & vault, adds items to your stockpile, adds items to your shelf - it then resupplies everything in an organized pouch. Last, arms yourself and sets aspect in the case you are recovering from being a ghost o0o0 o0o0 o0o0o. I hope it's useful for you. Enjoy, Kras