-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSmithBOD-Filler.uos
510 lines (509 loc) · 14.5 KB
/
SmithBOD-Filler.uos
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
//all menu buttons were updated to work for Alexandria
if not @findobject 'Bulk Source'
promptalias 'Bulk Source'
endif
if not @findobject 'Bulk Destination'
promptalias 'Bulk Destination'
endif
if not @findobject 'Restock'
promptalias 'Restock'
endif
if not @findobject 'Trash BODs Destination'
promptalias 'Trash BODs Destination'
endif
if not @findobject 'Trash Barrel'
promptalias 'Trash Barrel'
endif
// Craft Info
if not listexists 'CraftInfoBS'
@createlist 'CraftInfoBS'
// Ringmail
@pushlist 'CraftInfoBS' 0x13EB
@pushlist 'CraftInfoBS' 0x13F0
@pushlist 'CraftInfoBS' 0x13EE
@pushlist 'CraftInfoBS' 0x13EC
// Chainmail
@pushlist 'CraftInfoBS' 0x13BB
@pushlist 'CraftInfoBS' 0x13BE
@pushlist 'CraftInfoBS' 0x13BF
// Platemail
@pushlist 'CraftInfoBS' 0x1410
@pushlist 'CraftInfoBS' 0x1414
@pushlist 'CraftInfoBS' 0x1413
@pushlist 'CraftInfoBS' 0x1411
@pushlist 'CraftInfoBS' 0x1415
// Helmets
@pushlist 'CraftInfoBS' 0x140C
@pushlist 'CraftInfoBS' 0x1408
@pushlist 'CraftInfoBS' 0x140A
@pushlist 'CraftInfoBS' 0x140E
@pushlist 'CraftInfoBS' 0x1412
// Shields
@pushlist 'CraftInfoBS' 0x1B73
@pushlist 'CraftInfoBS' 0x1B72
@pushlist 'CraftInfoBS' 0x1B76
@pushlist 'CraftInfoBS' 0x1B7B
@pushlist 'CraftInfoBS' 0x1B74
@pushlist 'CraftInfoBS' 0x1B78
// Bladed
@pushlist 'CraftInfoBS' 0x0F5E
@pushlist 'CraftInfoBS' 0x1441
@pushlist 'CraftInfoBS' 0x0F52
@pushlist 'CraftInfoBS' 0x13FF
@pushlist 'CraftInfoBS' 0x1401
@pushlist 'CraftInfoBS' 0x0F61
@pushlist 'CraftInfoBS' 0x13B6
@pushlist 'CraftInfoBS' 0x13B9
// Axes
@pushlist 'CraftInfoBS' 0x13FB
@pushlist 'CraftInfoBS' 0x0F4B
@pushlist 'CraftInfoBS' 0x0F45
@pushlist 'CraftInfoBS' 0x0F47
@pushlist 'CraftInfoBS' 0x0F47
@pushlist 'CraftInfoBS' 0x0F52
@pushlist 'CraftInfoBS' 0x0F49
// Polearms
@pushlist 'CraftInfoBS' 0x0F4D
@pushlist 'CraftInfoBS' 0x143E
@pushlist 'CraftInfoBS' 0x1403
@pushlist 'CraftInfoBS' 0x0F62
@pushlist 'CraftInfoBS' 0x1405
// Bashing
@pushlist 'CraftInfoBS' 0x1407
@pushlist 'CraftInfoBS' 0x143D
@pushlist 'CraftInfoBS' 0x0F5C
@pushlist 'CraftInfoBS' 0x143B
@pushlist 'CraftInfoBS' 0x1439
endif
// Search for a Blacksmithing BOD to fill
if @findtype 0x2258 0x44E 'backpack'
@setalias 'bod' 'found'
useobject! 'bod'
waitforgump 0x5afbd742 15000
// Combine
if not targetexists 'server'
replygump 0x5afbd742 2
waitforgump 0x5afbd742 15000
waitfortarget 5000
endif
// Check for tongs or smith hammers
if @findtype 0xFBB 0 'backpack' or @findtype 0x13e3 0 'backpack'
pause 1500
@setalias 'tong' 'found'
useobject! 'tong'
waitforgump 0x38920abd 15000
// Craft
while targetexists 'server'
// Check for tong or smith hammer before craft
if not @findobject 'tong'
break
endif
// Check for ingots
if @counttype 0x1BF2 'any' 'backpack' < 50
if @movetype 0x1BF2 'Restock' 'backpack' 0 0 0 'any' 100
pause 1500
else
sysmsg 'Out of ingots!' 25
@canceltarget
stop
endif
endif
// Ringmail
if @ingump 0x5afbd742 'ringmail gloves'
replygump 0x77567887 1
waitforgump 0x77567887 15000
replygump 0x77567887 2
waitforgump 0x77567887 15000
pause 250
@findtype CraftInfoBS[0]
elseif @ingump 0x5afbd742 'ringmail leggings'
replygump 0x77567887 1
waitforgump 0x77567887 15000
replygump 0x77567887 9
waitforgump 0x77567887 15000
pause 250
@findtype CraftInfoBS[1]
elseif @ingump 0x5afbd742 'ringmail sleeves'
replygump 0x77567887 1
waitforgump 0x77567887 15000
replygump 0x77567887 16
waitforgump 0x77567887 15000
pause 250
@findtype CraftInfoBS[2]
elseif @ingump 0x5afbd742 'ringmail tunic'
replygump 0x77567887 1
waitforgump 0x77567887 15000
replygump 0x77567887 23
waitforgump 0x77567887 15000
pause 250
@findtype CraftInfoBS[3]
// Chainmail
elseif @ingump 0x5afbd742 'chainmail coif'
replygump 0x77567887 1
waitforgump 0x77567887 15000
replygump 0x77567887 30
waitforgump 0x77567887 15000
pause 250
@findtype CraftInfoBS[4]
elseif @ingump 0x5afbd742 'chainmail leggings'
replygump 0x77567887 1
waitforgump 0x77567887 15000
replygump 0x77567887 37
waitforgump 0x77567887 15000
pause 250
@findtype CraftInfoBS[5]
elseif @ingump 0x5afbd742 'chainmail tunic'
replygump 0x77567887 1
waitforgump 0x77567887 15000
replygump 0x77567887 44
waitforgump 0x77567887 15000
pause 250
@findtype CraftInfoBS[6]
// Platemail
elseif @ingump 0x5afbd742 'platemail arms'
replygump 0x77567887 1
waitforgump 0x77567887 15000
replygump 0x77567887 51
waitforgump 0x77567887 15000
pause 250
@findtype CraftInfoBS[7]
elseif @ingump 0x5afbd742 'platemail gloves'
replygump 0x77567887 1
waitforgump 0x77567887 15000
replygump 0x77567887 58
waitforgump 0x77567887 15000
pause 250
@findtype CraftInfoBS[8]
elseif @ingump 0x5afbd742 'platemail gorget'
replygump 0x77567887 1
waitforgump 0x77567887 15000
replygump 0x77567887 65
waitforgump 0x77567887 15000
pause 250
@findtype CraftInfoBS[9]
elseif @ingump 0x5afbd742 'platemail legs'
replygump 0x77567887 1
waitforgump 0x77567887 15000
replygump 0x77567887 72
waitforgump 0x77567887 15000
pause 250
@findtype CraftInfoBS[10]
elseif @ingump 0x5afbd742 'platemail tunic'
replygump 0x77567887 1
waitforgump 0x77567887 15000
replygump 0x77567887 79
waitforgump 0x77567887 15000
pause 250
@findtype CraftInfoBS[11]
// Helmets
elseif @ingump 0x5afbd742 'bascinet'
replygump 0x77567887 8
waitforgump 0x77567887 15000
replygump 0x77567887 2
waitforgump 0x77567887 15000
pause 250
@findtype CraftInfoBS[12]
elseif @ingump 0x5afbd742 'close helmet'
replygump 0x77567887 8
waitforgump 0x77567887 15000
replygump 0x77567887 9
waitforgump 0x77567887 15000
pause 250
@findtype CraftInfoBS[13]
elseif @ingump 0x5afbd742 'helmet'
replygump 0x77567887 8
waitforgump 0x77567887 15000
replygump 0x77567887 16
waitforgump 0x77567887 15000
pause 250
@findtype CraftInfoBS[14]
elseif @ingump 0x5afbd742 'norse helm'
replygump 0x77567887 8
waitforgump 0x77567887 15000
replygump 0x77567887 23
waitforgump 0x77567887 15000
pause 250
@findtype CraftInfoBS[15]
elseif @ingump 0x5afbd742 'plate helm'
replygump 0x77567887 8
waitforgump 0x77567887 15000
replygump 0x77567887 30
waitforgump 0x77567887 15000
pause 250
@findtype CraftInfoBS[16]
// Shields
elseif @ingump 0x5afbd742 'buckler'
replygump 0x77567887 15
waitforgump 0x77567887 15000
replygump 0x77567887 2
waitforgump 0x77567887 15000
pause 250
@findtype CraftInfoBS[17]
elseif @ingump 0x5afbd742 'bronze shield'
replygump 0x77567887 15
waitforgump 0x77567887 15000
replygump 0x77567887 9
waitforgump 0x77567887 15000
pause 250
@findtype CraftInfoBS[18]
elseif @ingump 0x5afbd742 'heater shield'
replygump 0x77567887 15
waitforgump 0x77567887 15000
replygump 0x77567887 16
waitforgump 0x77567887 15000
pause 250
@findtype CraftInfoBS[19]
elseif @ingump 0x5afbd742 'metal shield'
replygump 0x77567887 15
waitforgump 0x77567887 15000
replygump 0x77567887 23
waitforgump 0x77567887 15000
pause 250
@findtype CraftInfoBS[20]
elseif @ingump 0x5afbd742 'metal kite shield'
replygump 0x77567887 15
waitforgump 0x77567887 15000
replygump 0x77567887 30
waitforgump 0x77567887 15000
pause 250
@findtype CraftInfoBS[21]
elseif @ingump 0x5afbd742 'tear kite shield'
replygump 0x77567887 15
waitforgump 0x77567887 15000
replygump 0x77567887 37
waitforgump 0x77567887 15000
pause 250
@findtype CraftInfoBS[22]
// Bladed
elseif @ingump 0x5afbd742 'broadsword'
replygump 0x77567887 29
waitforgump 0x77567887 15000
replygump 0x77567887 9
waitforgump 0x77567887 15000
pause 250
@findtype CraftInfoBS[23]
elseif @ingump 0x5afbd742 'cutlass'
replygump 0x77567887 29
waitforgump 0x77567887 15000
replygump 0x77567887 23
waitforgump 0x77567887 15000
pause 250
@findtype CraftInfoBS[24]
elseif @ingump 0x5afbd742 'dagger'
replygump 0x77567887 29
waitforgump 0x77567887 15000
replygump 0x77567887 30
waitforgump 0x77567887 15000
pause 250
@findtype CraftInfoBS[25]
elseif @ingump 0x5afbd742 'katana'
replygump 0x77567887 29
waitforgump 0x77567887 15000
replygump 0x77567887 37
waitforgump 0x77567887 15000
pause 250
@findtype CraftInfoBS[26]
elseif @ingump 0x5afbd742 'kryss'
replygump 0x77567887 29
waitforgump 0x77567887 15000
replygump 0x77567887 44
waitforgump 0x77567887 15000
pause 250
@findtype CraftInfoBS[27]
elseif @ingump 0x5afbd742 'longsword'
replygump 0x77567887 29
waitforgump 0x77567887 15000
replygump 0x77567887 51
waitforgump 0x77567887 15000
pause 250
@findtype CraftInfoBS[28]
elseif @ingump 0x5afbd742 'scimitar'
replygump 0x77567887 29
waitforgump 0x77567887 15000
replygump 0x77567887 58
waitforgump 0x77567887 15000
pause 250
@findtype CraftInfoBS[29]
elseif @ingump 0x5afbd742 'viking sword'
replygump 0x77567887 29
waitforgump 0x77567887 15000
replygump 0x77567887 65
waitforgump 0x77567887 15000
pause 250
@findtype CraftInfoBS[30]
// Axes
elseif @ingump 0x5afbd742 'large battle axe'
replygump 0x77567887 36
waitforgump 0x77567887 15000
replygump 0x77567887 30
waitforgump 0x77567887 15000
pause 250
@findtype CraftInfoBS[31]
elseif @ingump 0x5afbd742 'double axe'
replygump 0x77567887 36
waitforgump 0x77567887 15000
replygump 0x77567887 16
waitforgump 0x77567887 15000
pause 250
@findtype CraftInfoBS[32]
elseif @ingump 0x5afbd742 "executioner's axe"
replygump 0x77567887 36
waitforgump 0x77567887 15000
replygump 0x77567887 23
waitforgump 0x77567887 15000
pause 250
@findtype CraftInfoBS[33]
elseif @ingump 0x5afbd742 'battle axe'
replygump 0x77567887 36
waitforgump 0x77567887 15000
replygump 0x77567887 9
waitforgump 0x77567887 15000
pause 250
@findtype CraftInfoBS[34]
elseif @ingump 0x5afbd742 'two handed axe'
replygump 0x77567887 36
waitforgump 0x77567887 15000
replygump 0x77567887 37
waitforgump 0x77567887 15000
pause 250
@findtype CraftInfoBS[35]
elseif @ingump 0x5afbd742 'war axe'
replygump 0x77567887 36
waitforgump 0x77567887 15000
replygump 0x77567887 44
waitforgump 0x77567887 15000
pause 250
@findtype CraftInfoBS[36]
elseif @ingump 0x5afbd742 'axe'
replygump 0x77567887 36
waitforgump 0x77567887 15000
replygump 0x77567887 2
waitforgump 0x77567887 15000
pause 250
@findtype CraftInfoBS[37]
// Polearms
elseif @ingump 0x5afbd742 'bardiche'
replygump 0x77567887 43
waitforgump 0x77567887 15000
replygump 0x77567887 2
waitforgump 0x77567887 15000
pause 250
@findtype CraftInfoBS[38]
ereplygump 0x77567887 43
waitforgump 0x77567887 15000
replygump 0x77567887 23
waitforgump 0x77567887 15000
pause 250
@findtype CraftInfoBS[39]
replygump 0x77567887 43
waitforgump 0x77567887 15000
replygump 0x77567887 44
waitforgump 0x77567887 15000
pause 250
@findtype CraftInfoBS[40]
elseif @ingump 0x5afbd742 'spear'
replygump 0x77567887 43
waitforgump 0x77567887 15000
replygump 0x77567887 58
waitforgump 0x77567887 15000
pause 250
@findtype CraftInfoBS[41]
elseif @ingump 0x5afbd742 'war fork'
replygump 0x77567887 43
waitforgump 0x77567887 15000
replygump 0x77567887 65
waitforgump 0x77567887 15000
pause 250
@findtype CraftInfoBS[42]
// Bashing
elseif @ingump 0x5afbd742 'war mace'
replygump 0x77567887 50
waitforgump 0x77567887 15000
replygump 0x77567887 30
waitforgump 0x77567887 15000
pause 250
@findtype CraftInfoBS[43]
elseif @ingump 0x5afbd742 'hammer pick'
replygump 0x77567887 50
waitforgump 0x77567887 15000
replygump 0x77567887 2
waitforgump 0x77567887 15000
pause 250
@findtype CraftInfoBS[44]
elseif @ingump 0x5afbd742 'mace'
replygump 0x77567887 50
waitforgump 0x77567887 15000
replygump 0x77567887 9
waitforgump 0x77567887 15000
pause 250
@findtype CraftInfoBS[45]
elseif @ingump 0x5afbd742 'maul'
replygump 0x77567887 50
waitforgump 0x77567887 15000
replygump 0x77567887 16
waitforgump 0x77567887 15000
pause 250
@findtype CraftInfoBS[46]
elseif @ingump 0x5afbd742 'war hammer'
replygump 0x77567887 50
waitforgump 0x77567887 15000
replygump 0x77567887 37
waitforgump 0x77567887 15000
pause 250
@findtype CraftInfoBS[47]
else
@unsetalias 'found'
endif
// No crafted items were found
if not @findobject 'found'
// Craft failed, try again
if @ingump 0x38920abd 'failed to create the item'
continue
endif
// Trash BOD or missing definitions
@moveitem! 'bod' 'Trash BODs Destination'
pause 1500
break
endif
target! 'found'
waitfortarget 5000
if not targetexists and @injournal 'must be exceptional' 'system'
// Recycle this item
replygump 0x77567887 14
waitfortarget 5000
target! 'found'
pause 1500
// Unable to recycle, trash item
if @findobject 'found'
@moveitem! 'found' 'Trash Barrel'
pause 1500
endif
replygump 0x5afbd742 2
waitforgump 0x5afbd742 15000
waitfortarget 5000
clearjournal
endif
endwhile
// BOD is complete, move to destination
if not targetexists 'server'
@moveitem 'bod' 'Bulk Destination'
endif
pause 1500
// Out of tongs
elseif @movetype 0xFBB 'Restock' 'backpack' or @movetype 0x13e3 'Restock' 'backpack'
pause 1500
else
sysmsg 'Out of tongs and smith hammers!' 25
@canceltarget
stop
endif
elseif not property 'Deeds In Book: 0' 'Bulk Source'
useobject! 'Bulk Source'
waitforgump 0x54f555df 15000
replygump 0x54f555df 5
pause 1500
else
sysmsg 'Unable to find BODs to fill.' 64
@canceltarget
stop
endif