Ultimate Mining Script - Base Script by Jaseowns
Description: Updated 4/19/2024 to no longer pause for captcha - does show a helper to speed up mining by disabling the "Filter repeated system message" checkbox on Filters -> Text & Messages tab in razor though!
1# Ultimate Mining Script by Jaseowns
2# UO Outlands - https://outlands.uorazorscripts.com/miner-bot
3# Requirements:
4####
5# Walking has been removed. So Ive updated the script 7/10/2023.
6# I also removed the captcha check and replaced it with a helper message 4/19/2024
7###################
8# MAKE SURE FILTERS -> FILTER SYSTEM MESSAGES IS UNCHECKED
9###########
10#
11###################
12# Moving Ore <3
13#####
14# This script no longer users organizer agents. It will automatically
15# attempt to move your ore onto a near by pack horse. Once the pack horse
16# is full, it will move to the next horse.
17#
18###################
19# Automatic Smelting
20###########
21# If you stand near a player made forge, your ignots on the packy
22# will be automatically be smelted.
23#
24# You can turn on tryAndSmeltEvenIfNotNearPlayerMadeForge as 1 if you
25# want to attempt to smelt randomly checking for natural forges
26
27@setvar! tryAndSmeltEvenIfNotNearPlayerMadeForge 1
28@setvar! cdTryAndSmeltEvenIfNotNearPlayerMadeForge 15000
29@setvar! hideIngotsInRedPouch 1
30@setvar! oreCountToMove 30
31@setvar! cdAvoidForgeTimerStuck 15000
32
33
34@setvar! minimumWaitForPing 200
35@setvar! globalTimeout 650
36
37if not varexist jasePacky
38 @setvar! jasePacky 0
39endif
40
41if not varexist hasAnyPacky
42 @setvar! hasAnyPacky 0
43endif
44
45
46@setvar! forgeFound 0
47
48if not timerexists forgeCheckTimer
49 settimer forgeCheckTimer cdAvoidForgeTimerStuck
50endif
51
52if tryAndSmeltEvenIfNotNearPlayerMadeForge = 1 and findtype "iron ore" backpack as jore
53
54 if not timerexists tryAndSmeltEvenIfNotNearPlayerMadeForgeTimer
55 settimer tryAndSmeltEvenIfNotNearPlayerMadeForgeTimer cdTryAndSmeltEvenIfNotNearPlayerMadeForge
56 endif
57
58 if timer tryAndSmeltEvenIfNotNearPlayerMadeForgeTimer >= cdTryAndSmeltEvenIfNotNearPlayerMadeForge
59 overhead "Checking for a natural forge..." 88
60 dclick jore
61 wait globalTimeout
62 if insysmsg "You do not see any nearby forges"
63 // do nothing
64 else
65 @setvar! forgeFound 1
66 endif
67 settimer tryAndSmeltEvenIfNotNearPlayerMadeForgeTimer 0
68 endif
69endif
70
71
72if findtype "forge" ground -1 -1 2 or findtype 0x0FB1 ground -1 -1 2 or forgeFound = 1
73 overhead "Automatically Smelting..." 88
74 @clearignore
75 while findtype 291|292 ground -1 -1 2 as smeltPacky
76 if noto smeltPacky = "friend"
77 getlabel smeltPacky testPacky
78 if "[0/2000" in testPacky
79 // do nothing
80 else
81 dclick smeltPacky
82 wait globalTimeout
83 settimer forgeCheckTimer 0
84 while findtype "iron ore" smeltPacky as jore
85 dclick jore
86 wait globalTimeout
87 if timer forgeCheckTimer >= cdAvoidForgeTimerStuck
88 break
89 endif
90 endwhile
91 endif
92 endif
93 @ignore smeltPacky
94 endwhile
95
96 settimer forgeCheckTimer 0
97 while findtype "iron ore" backpack as jore
98 dclick jore
99 wait globalTimeout
100 if timer forgeCheckTimer >= cdAvoidForgeTimerStuck
101 break
102 endif
103 endwhile
104
105
106 if hideIngotsInRedPouch = 1 and findtype "pouch" backpack 38 as jouch
107 while findtype 7154 backpack as jingots
108 if find jingots jouch
109 // do nothing
110 else
111 lift jingots 60000
112 drop jouch -1 -1 -1
113 wait globalTimeout
114 endif
115 @ignore jingots
116 endwhile
117 endif
118
119 @clearignore
120endif
121
122
123
124if not dead jasePacky
125 @setvar! hasAnyPacky 1
126 getlabel jasePacky desc
127 if "[2000/2000" in desc or "[1999/2000" in desc or "[1998/2000" in desc or "[1997/2000" in desc or "[1996/2000" in desc or "[1995/2000" in desc or "[1994/2000" in desc or "[1993/2000" in desc or "[1992/2000" in desc or "[1991/2000" in desc or "[1990/2000" in desc or "[1989/2000" in desc or "[1988/2000" in desc or "[1987/2000" in desc or "[1986/2000" in desc or "[1985/2000" in desc or "[1984/2000" in desc or "[1983/2000" in desc or "[1982/2000" in desc or "[1981/2000" in desc or "[1980/2000" in desc or "[1979/2000" in desc or "[1978/2000" in desc or "[1977/2000" in desc or "[1976/2000" in desc or "[1975/2000" in desc or "[1974/2000" in desc or "[1973/2000" in desc or "[1972/2000" in desc or "[1971/2000" in desc or "[1970/2000" in desc or "[1969/2000" in desc or "[1968/2000" in desc or "[1967/2000" in desc or "[1966/2000" in desc or "[1965/2000" in desc or "[1964/2000" in desc or "[1963/2000" in desc or "[1962/2000" in desc or "[1961/2000" in desc or "[1960/2000" in desc
128 overhead "Our packy is full, ignoring this one and moving to next" 34
129 @ignore jasePacky
130 @setvar! jasePacky 0
131 replay
132 elseif counttype 6585 backpack >= oreCountToMove
133 overhead "Moving ore"
134 while findtype 6585 backpack as jore
135 lift jore oreCountToMove
136 drop jasePacky -1 -1 -1
137 wait globalTimeout
138 endwhile
139 endif
140elseif followers > 0
141 if findtype 291|292 ground -1 -1 10 as packy
142 if noto packy = "friend"
143 @setvar! jasePacky packy
144 replay
145 else
146 @ignore packy
147 replay
148 endif
149 elseif hasAnyPacky = 1
150 overhead "we have no more packies to load.. be sure to drop off!" 34
151 overhead "if you have already dropped off, clearignore"
152 wait globalTimeout
153 endif
154endif
155
156if not varexist jase_miner_runebook or not find jase_miner_runebook backpack
157 if counttype "runebook" backpack = 1 and counttype "runetome" backpack = 0 and findtype "runebook" backpack as myBook
158 overhead "Automatically selected your one runebook" 88
159 @setvar jase_miner_runebook myBook
160 elseif counttype "runebook" backpack = 0 and counttype "runetome" backpack = 1 and findtype "runetome" backpack as myBook
161 overhead "Automatically selected your one runetome" 88
162 @setvar jase_miner_runebook myBook
163 elseif counttype 7956 backpack = 1 and findtype 7956 backpack as myBook
164 overhead "Automatically selected your one rune" 88
165 @setvar jase_miner_runebook myBook
166 elseif counttype "runebook" backpack > 0 or counttype 7956 backpack > 0 or counttype "runetome" backpack > 0
167 overhead "Select your escape plan (runebook or runetome)" 88
168 @setvar jase_miner_runebook
169 endif
170endif
171
172if not listexists "jase_miner_actions"
173 createlist "jase_miner_actions"
174endif
175
176
177if inlist "jase_miner_actions" "red_alert"
178 overhead "Red Alert!" 34
179 poplist "jase_miner_actions" "red_alert"
180 # You could also replace this magery bit with your ultimate recaller
181 # Ultimate Recall using Tome or Book as Escape (ALT-M)
182 # https://outlands.uorazorscripts.com/script/5b3fde97-fa90-4707-9f8e-7f56dca6792b
183 # hotkey "Play Script: UltimaRecaller"
184 if skill "Magery" >= 40
185 overhead 'Recalling...'
186 while not targetexists
187 if findtype 8012 backpack as item
188 dclick item
189 else
190 cast "Recall"
191 endif
192 wait minimumWaitForPing
193 if insysmsg "You do not have that spell!"
194 overhead "We cannot recall!" 34
195 break
196 endif
197 endwhile
198 target jase_miner_runebook
199 elseif skill "Hiding" >= 40
200 useskill "Hiding"
201 endif
202 overhead "Stopping script..." 34
203 stop
204 # replay
205endif
206
207if skill "Tracking" > 0
208 if not findbuff "tracking"
209 clearsysmsg
210 while not gumpexists 4267467659
211 useskill 'tracking'
212 wait minimumWaitForPing
213 endwhile
214 if gumpexists 4267467659
215 while not insysmsg "You will now hunt all hostile players."
216 gumpresponse 8 4267467659
217 waitforgump 4267467659 5000
218 endwhile
219 gumpresponse 6 4267467659
220 wait minimumWaitForPing
221 endif
222 gumpclose 4267467659
223 endif
224endif
225
226clearsysmsg
227
228if rhandempty ?? 0
229 if findtype "pickaxe" backpack
230 dclicktype 'pickaxe' backpack
231 wait minimumWaitForPing
232 endif
233endif
234
235if rhandempty ?? 0
236 overhead "No more pickaxe!" 34
237 wait minimumWaitForPing
238 replay
239endif
240
241
242# Basic Heal to start bandage by Jaseowns
243# https://outlands.uorazorscripts.com/script/fd1c9331-fc25-4a89-8d75-3eba6a929247
244if skill "Healing" > 0
245 if findtype "clean bandage%s%" backpack as aids
246 if not bandaging and hp < maxhp
247 dclick aids
248 wft 500
249 hotkey 'Target Self'
250 elseif not bandaging and poisoned
251 dclick aids
252 wft 500
253 hotkey 'Target Self'
254 elseif not bandaging and findbuff "bleed"
255 dclick aids
256 wft 500
257 hotkey 'Target Self'
258 elseif not bandaging and findbuff "disease"
259 dclick aids
260 wft 500
261 hotkey 'Target Self'
262 endif
263 else
264 overhead "No bandages" 34
265 endif
266endif
267
268if diffweight <= 30
269 overhead "Too heavy... make sure to drop off ore (or find a pack horse)" 34
270 wait minimumWaitForPing
271 replay
272endif
273
274overhead 'Mining' 0
275hotkey 'Use item in hand'
276wait minimumWaitForPing
277for 25
278 wait 250
279 if insysmsg "now tracking"
280 pushlist "jase_miner_actions" "red_alert"
281 replay
282 endif
283 if insysmsg 'world is saving'
284 for 30
285 overhead 'Waiting for world save...'
286 wait 1000
287 if insysmsg 'save complete'
288 overhead 'Save complete - continue on!' 88
289 replay
290 elseif insysmsg "now tracking"
291 pushlist "jase_miner_actions" "red_alert"
292 replay
293 endif
294 endfor
295 elseif rhandempty ?? 0
296 overhead "Broke pickaxe" 34
297 replay
298 elseif insysmsg 'You do not see any'
299 overhead 'Move to next spot' 88
300 wait minimumWaitForPing
301 replay
302 elseif insysmsg "harvesting is not allowed"
303 overhead 'Move out of town...' 66
304 wait 1000
305 replay
306 elseif insysmsg "travel"
307 overhead 'Waiting for travel...' 77
308 wait 1000
309 replay
310 else
311 if insysmsg "any harvestable"
312 // No Ore
313 overhead 'Move to next spot' 88
314 replay
315 elseif insysmsg "harvesting is not allowed"
316 // Not allowed
317 replay
318 elseif insysmsg "world is saving" or insysmsg 'World save complete'
319 // World Save
320 replay
321 elseif insysmsg "You loosen"
322 // Failed
323 replay
324 elseif insysmsg "You dig"
325 // Success
326 replay
327 elseif insysmsg "You must wait"
328 // Wait message
329 overhead 'You must wait..' 34
330 wait minimumWaitForPing
331 replay
332 endif
333 endif
334endfor
335
336if insysmsg "You must wait"
337 // Wait message
338 overhead 'You must wait..' 34
339 wait minimumWaitForPing
340 replay
341endif
342
343for 2
344 overhead 'The script thinks you are stuck.. to speed it up go to:' 34
345 overhead 'Razor: Filters Tab -> Text & Messages' 88
346 overhead 'Uncheck filter repeating system messages' 77
347 sysmsg 'The script thinks you are stuck.. to speed it up go to:' 34
348 sysmsg 'Razor: Filters Tab -> Text & Messages ' 88
349 sysmsg 'Uncheck filter repeating system messages' 77
350 wait 5000
351 if insysmsg 'Captcha successful'
352 overhead 'Success - continue on!' 88
353 wait 1000
354 replay
355 endif
356endfor
357replay