Back to "restock" tags

Krasnog's Restock Resupply Script by krasnog

Description: 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

1################################################################## 
2##     Krasnogs Restock and Resupply Script for UO Outlands     ##
3##                   release v1.3 on 5/29/24                    ##
4################################################################## 
5# This script is what I run before heading out of my home. Great #
6# for inbetween your farming runs. It drops off gold onto your   #
7# safe, adds magic items to recycler & vault, adds items to your #
8# stockpile, adds items to your shelf - it then resupplies       #
9# everything in an organized pouch. Last, arms yourself and      #
10# sets aspect in the case you are recovering from being a        #
11# ghost o0o0 o0o0 o0o0o. I hope its useful for you. Enjoy, Kras  #
12################################################################## 
13
14##################################################################
15#                 --- SCRIPT CREDITS ---                         #
16# Shout out to Jaseowns and yagermeistertv for their scripts     # 
17# I have repurposed or learned from them to make this script.    #
18# Dump, Restock and Organize: https://outlands.uorazorscripts.com/script/0ac01dd4-81c4-462b-81d9-b968ca4302bb
19# Move Pouches: https://outlands.uorazorscripts.com/script/90c7e8b0-1b40-4df6-9ccb-dc5d83ddcf8377
20# Lock or Unlock Loot Box: https://outlands.uorazorscripts.com/script/08a2e31f-f8b8-430a-9772-5a934167d5f4
21##################################################################
22
23##################################################################
24#                --- SCRIPT VARIABLES ---                        #
25# 1. Youll need to change a couple of variables with your own    #
26#    IDs so that the script will work for you.                   #
27# 2. To get the ID of your items in game, type >info and then    #
28#    select the item                                             #
29# 3. Replace red variables below using your IDs and preferences  #
30##################################################################
31// Safe
32@setvar! mySafe 0x770EA720
33
34// Reagent Satchel
35@setvar! mySatchel 'mySatchel'
36
37// Recycler
38@setvar! myRecycler 0x770D5CE2
39
40// Stockpile
41@setvar! myStockpile 0x76F69D80
42
43// Shelf
44@setvar! myShelf 0x7804F1D8
45
46// Magic Vault
47@setvar! myVault 0x4149B7D3
48
49// Repair Bench
50@setvar! myBench 0x450A909D
51
52// Primary Right-Hand Weapon
53@setvar! myBaby 0x423DF0D7
54
55// If you use a LockBox & Key for security from Thieves
56@setvar! myLockBox 'Lootbox'
57@setvar! myLockBoxKey 'LootboxKey'
58
59// Use a lower number to speed up, higher to slow down
60@setvar! globalPause 1000
61
62// color of message https://outlands.uorazorscripts.com/hues
63@setvar! myColor 55  
64
65// Global Timeout - you shouldnt need to change this
66@setvar! globalTimeout 400
67
68##################################################################
69#                    --- The Script ---                          #
70##################################################################
71sysmsg 'Runnning Restock Script'
72# ------------------------------------------ #
73# Drop Off, Restock, Resupply
74# ------------------------------------------ #
75
76# Move any gold and dobloons to safe
77overhead "Depositing gold in safe..." myColor
78while findtype 'gold coin' backpack as gold
79    lift gold 60000
80    drop mySafe -1 -1 0
81    wait globalTimeout
82endwhile
83overhead "Depositing doubloons in safe..." myColor
84while findtype 2539 backpack 2125 as doubloons
85        lift doubloons 60000
86        drop safe -1 -1 -1
87        wait globalTimeout
88endwhile
89pause globalPause
90
91# select recycler and add items from backpack
92overhead "Adding magic items to recycler..." myColor
93menu myRecycler 1
94pause globalPause
95
96# select magic vault and add items from backpack
97overhead "Adding known magic items to vault..." myColor
98menu myVault 0
99waitfortarget
100target 'self'
101pause globalPause
102
103# select shelf and restock from self
104overhead "Restocking items to shelf..." myColor
105menu myShelf 0
106waitfortarget
107target 'self'
108pause globalPause
109
110# select stockpile and restock from self
111overhead "Restocking items to stockpile..." myColor
112menu myStockpile 0
113waitfortarget
114target 'self'
115pause globalPause
116
117# select shelf and resupply 
118overhead "Resupplying from shelf..." myColor
119waitforgump 3232825965
120gumpclose 
121menu myShelf 1
122pause globalPause
123
124# Repair armor if its needed 
125overhead "Repairing armor..." myColor
126dclick myBench
127pause globalPause
128
129
130# ------------------------------------------ #
131# Ogranize Your Reagent Satchel
132# ------------------------------------------ #
133
134overhead "Organizing reagent satchel..." myColor
135
136if findtype "Blood Moss" mySatchel as myitem
137    lift myitem 999
138    drop mySatchel 45 65
139    wait globalTimeout
140endif
141
142if findtype "Nightshade" mySatchel as myitem
143    lift myitem 999
144    drop mySatchel 60 75
145    wait globalTimeout
146endif
147
148if findtype "Garlic" mySatchel as myitem
149    lift myitem 999
150    drop mySatchel 75 65
151    wait globalTimeout
152endif
153
154if findtype "Ginseng" mySatchel as myitem
155    lift myitem 999
156    drop mySatchel 90 75
157    wait globalTimeout
158endif
159
160if findtype "Sulfurous Ash" mySatchel as myitem
161    lift myitem 999
162    drop mySatchel 105 65
163    wait globalTimeout
164endif
165
166if findtype "Black Pearl%s%" mySatchel as myitem
167    lift myitem 999
168    drop mySatchel 120 75
169    wait globalTimeout
170endif
171
172if findtype "Spiders Silk" mySatchel as myitem
173    lift myitem 999
174    drop mySatchel 135 65
175    wait globalTimeout
176endif
177
178if findtype "Mandrake Root%s%" mySatchel as myitem
179    lift myitem 999
180    drop mySatchel 150 75
181    wait globalTimeout
182endif
183
184if findtype "Summon Fire Elemen" mySatchel as myitem
185    lift myitem 999
186    drop mySatchel 40 120
187    wait globalTimeout
188endif
189
190if findtype "Flamestrike Scroll" mySatchel as myitem
191    lift myitem 999
192    drop mySatchel 80 120
193    wait globalTimeout
194endif
195
196if findtype "Summon Earth Eleme" mySatchel as myitem
197    lift myitem 999
198    drop mySatchel 120 120
199    wait globalTimeout
200endif
201
202
203# ------------------------------------------ #
204# Ogranize Your Supply Pouch
205# ------------------------------------------ #
206
207overhead "Organizing supply pouch..." myColor
208if findtype "pouch" backpack 0 any any as mybag
209    setvar SupplyBag mybag
210    // put supply pouch at top left of backpack
211    lift mybag
212    drop backpack 0 0 0
213endif
214
215#
216# Organize the first Row
217#
218# Healing Pot
219if findtype "yellow potion" backpack as myitem
220    lift myitem 999
221    drop SupplyBag 45 65
222    wait globalTimeout
223endif
224
225# Cure Pot
226if findtype "orange potion" backpack as myitem
227    lift myitem 999
228    drop SupplyBag 55 65
229    wait globalTimeout
230endif
231
232# Refresh Pot
233if findtype "red potion" backpack as myitem
234    lift myitem 999
235    drop SupplyBag 65 65
236    wait globalTimeout
237endif
238
239# Strength Pot
240if findtype "white potion" backpack as myitem
241    lift myitem 999
242    drop SupplyBag 75 65
243    wait globalTimeout
244endif
245
246# Dexterity Pot
247if findtype "blue potion" backpack as myitem
248    lift myitem 999
249    drop SupplyBag 85 65
250    wait globalTimeout
251endif
252
253# Poison Pot
254if findtype "green potion" backpack as myitem
255    lift myitem 999
256    drop SupplyBag 95 65
257    wait globalTimeout
258endif
259
260# Explosion Pot
261if findtype "purple potion" backpack as myitem
262    lift myitem 999
263    drop SupplyBag 105 65
264    wait globalTimeout
265endif
266
267# Magic Resist
268if findtype "black potion" backpack as myitem
269    lift myitem 999
270    drop SupplyBag 115 65
271    wait globalTimeout
272endif    
273
274# Bandages
275if findtype "clean bandage%s%" backpack as myitem
276   lift myitem 999
277   drop SupplyBag 125 65
278   wait globalTimeout
279endif
280
281# Vet Supplies
282if findtype "veterinary supplies" backpack as myitem
283   lift myitem 999
284   drop SupplyBag 135 65
285   wait globalTimeout
286endif  
287
288# Recall Scrolls
289if findtype "recall" backpack as myitem
290   lift myitem 999
291   drop SupplyBag 145 65
292   wait globalTimeout
293endif  
294#
295# Organize the second Row (Run Supplies)
296#
297# Loot Box Key - Put at same cordinate as Rope, so rope hides it.
298if find myLockBoxKey backpack as myitem
299   lift myitem 999
300   drop SupplyBag 50 87
301   wait globalTimeout
302endif  
303
304# Rope - goes on top of or Loot Box key
305if findtype "rope" backpack as myitem
306   lift myitem 999
307   drop SupplyBag 45 85
308   wait globalTimeout
309endif  
310
311# magic mushroom
312if findtype "mushroom" backpack as myitem
313   lift myitem 999
314   drop SupplyBag 75 85
315   wait globalTimeout
316endif    
317
318# smoke bombs
319if findtype "bombs" backpack as myitem
320   lift myitem 999
321   drop SupplyBag 95 85 0
322   wait globalTimeout
323endif  
324
325# food tray
326if findtype "tray" backpack as myitem
327   lift myitem 999
328   drop SupplyBag 115 85 0
329   wait globalTimeout
330endif 
331
332# sewing kit
333if findtype "sewing kit" backpack as myitem
334   lift myitem 999
335   drop SupplyBag 125 85 0
336   wait globalTimeout
337endif 
338
339# id wand
340if findtype "wand" backpack as myitem
341   lift myitem 999
342   drop SupplyBag 135 85 0
343   wait globalTimeout
344endif 
345 
346
347#
348# Organize the third Row (Ship Items)
349#
350if findtype "barrel" backpack as myitem
351   lift myitem 999
352   drop SupplyBag 45 105 0
353   wait globalTimeout
354endif  
355# repair kits
356if findtype "ship repair kit" backpack as myitem
357   lift myitem 999
358   drop SupplyBag 85 100 0
359   wait globalTimeout
360endif  
361# boarding rope
362if findtype "rope" backpack as myitem
363   lift myitem 999
364   drop SupplyBag 45 85
365   wait globalTimeout
366endif
367# cannon balls
368if findtype "cannon ball" backpack as myitem
369   lift myitem 999
370   drop SupplyBag 105 110 0
371   wait globalTimeout
372endif
373
374
375# ------------------------------------------ #
376# Ogranize Pouches
377# ------------------------------------------ #
378
379@clearignore 
380# Shuffle Trapped Pouches in Main Backpack
381while findtype "pouch" backpack 38 as item
382    overhead "Shuffling Trapped Pouches..." myColor
383    lift item 60000
384    drop backpack -1 -1 -1
385    wait 650
386   # lift item
387   # drop backpack 0 0 0
388   # wait globalTimeout
389    if insysmsg "you may pick up an item from here"
390        // do nothing
391    else
392        @ignore item
393    endif
394endwhile
395
396# pouches 
397if findtype "pouch" backpack as myPouch
398   lift myPouch 999
399   drop backpack 0 0 0
400   wait globalTimeout
401   endif    
402
403   
404# ------------------------------------------ #
405# Open Pouches
406# ------------------------------------------ #
407
408# Open non trapped pouches
409dclick backpack
410while findtype "pouch" backpack 0 as item
411    overhead "Opening Pouches..." myColor 
412    dclick item
413    wait globalTimeout
414    @ignore item
415endwhile
416pause globalPause
417@clearignore 
418
419
420# ------------------------------------------ #
421# Lock Box 
422# ------------------------------------------ #
423
424dclick myLockBoxKey
425wft 500
426target myLockBox
427getlabel myLockBox desc
428if "stones" in desc
429    overhead "Loot Box is Unlocked..." myColor
430    // move loot box to bottom row (visual indicator of unlocked)
431    lift myLockBox
432    drop backpack 165 100 0
433    // open
434    dclick myLockBox
435else
436    // move loot box to top row (visual indicator of locked)
437    lift myLockBox
438    drop backpack 125 45 0
439    overhead "Loot Box is Locked..." 34
440endif
441
442
443
444# ------------------------------------------ #
445# Arm
446# ------------------------------------------ #
447
448# Arm yourself
449overhead "Arming yourself..." myColor 
450dclick myBaby
451pause globalPause
452
453
454# ------------------------------------------ #
455# Set Aspect
456# ------------------------------------------ #
457
458# Set Aspect for Wep, Spellbook, Armor
459overhead "Setting Aspect..." myColor 
460say '[aspect'
461# weapon
462waitforgump 2424293173
463gumpresponse 8
464waitforgump 2424293173
465gumpresponse 8
466# spellbook
467waitforgump 2424293173
468gumpresponse 13
469waitforgump 2424293173
470gumpresponse 13
471# armor
472waitforgump 2424293173
473gumpresponse 17
474waitforgump 2424293173
475gumpresponse 17
476# Close aspect menu
477waitforgump 2424293173
478gumpclose
479pause globalPause
480
481
482# ------------------------------------------ #
483# Closing Message - self affirmation goes a long way
484# ------------------------------------------ #-
485overhead "You are good to go, Legend!" myColor
486
487sysmsg 'Completed Restock Resupply Script'