SUPER ID-Recycler-while-farming by dennozz
Description: Recycle all your magical armor and weapons while farming. Keep only those items you wish to save and recycle all the rest. Automatically eat arcane essences if activated and more!
1#SUPER ID-Recycler-while-farming ver.2.00
2
3#Made by @dennozz on discord.
4#Inspired/learned by other scrips in https://outlands.uorazorscripts.com/
5
6#This is a recycling while farming script!
7#It will recycle any item identified or unidentified that is not in your Magical Items List.
8
9#You will need sewing kit, regular/container ID wand or 80 > in ID Skill
10#Optional The script will look for a bag (rounded one) and will move all good items and recycled materials to the bag
11
12#--- Auto eat arcane essences ---#
13# 0 - disabled
14# 1 - enabled
15
16@setvar! eatArcaneEssence 1
17
18#--- Move materials and good items into rounded bag ---#
19# 0 - disabled
20# 1 - enable (need to have a rounded bag in backpack)
21
22@setvar! materialsIntoBag 1
23
24removelist "MagicalItems"
25createlist "MagicalItems"
26
27# ** Add or remove magical items you want to keep to the list **
28# ** Copy & Paste one line and add description of the item you are looking for **
29
30#********** ADD YOUR MAGICAL ITEMS YOU WANT TO SAVE **********
31
32pushlist "MagicalItems" "slaying"
33
34pushlist "MagicalItems" "indestructible"
35pushlist "MagicalItems" "invulnerability"
36pushlist "MagicalItems" "supremely"
37pushlist "MagicalItems" "vanquishing"
38
39pushlist "MagicalItems" "fortified"
40pushlist "MagicalItems" "fortification"
41pushlist "MagicalItems" "exceedingly"
42pushlist "MagicalItems" "power"
43
44pushlist "MagicalItems" "eminently potent might"
45pushlist "MagicalItems" "eminently potent force"
46pushlist "MagicalItems" "surpassingly potent might"
47pushlist "MagicalItems" "surpassingly potent force"
48
49#-- Set your wait times depending on your ping
50
51@setvar! maxwaittimeinms 700
52@setvar! itemusewaittimeinms 200
53
54#********** DO NOT EDIT FROM HERE **********
55
56if not findtype 3997 backpack
57 overhead "Sewing kit NOT found" 34
58 stop
59endif
60
61removetimer testTimer
62createtimer testTimer
63settimer testTimer 0
64
65setvar! deleteAllLists 0
66
67if deleteAllLists = 1
68 removelist identified_items
69 removelist display_goods
70 removelist recycled_items
71 removelist good_items
72 removelist bad_items
73 overhead "All lists cleared" 65
74 stop
75endif
76
77setvar! craftingToolGumpID 949095101
78
79removelist display_goods
80createlist display_goods
81
82removelist loot_items
83createlist loot_items
84
85clearsysmsg
86
87overhead "Beginning Item Recycle:" 65
88
89#********** SCAN ALL ARMOR **********
90
91sysmsg "Scanning All Armor..." 11
92
93#Armor - all serials:
94while findtype 5056|5059|5060|5061|5063|5070|5074|5075|5076|5078|5085|5089|5090|5101|5103|5105|5106|5129|5131|5132|5135|5138|5139|5142|5143|5144|5146|5201|5203|5204|5205|5207|7169|7170|7173|7175|7177|7179|7181|7610|7947|31003|31004|31005|31006|31007|31008|31009|31010|31011|31012|31015|31191 backpack as itemzy
95
96 getlabel itemzy itemDesc
97
98 if "aspect" in itemDesc or "exceptional" in itemDesc
99 #sysmsg "item not added : {{itemDesc}}" 44
100 else
101 pushlist loot_items itemzy
102 endif
103
104 @ignore itemzy
105endwhile
106
107#********** SCAN ALL ARCANES, STAFF, SPELLBOOKS **********
108
109sysmsg "Scanning Arcane Staffs, Spellbooks..." 11
110
111#Arcane Staffs, Spellbook - all serials:
112while findtype 31017|31019|31021|31023|31025|31027|31029|31031|31033|31035|31037|31038|31041|31043|31045|31047|31049|31051|31053|31055|3834 backpack as itemzy
113
114 getlabel itemzy itemDesc
115
116 if "aspect" in itemDesc or "exceptional" in itemDesc
117 #sysmsg "item not added : {{itemDesc}}" 44
118 else
119 pushlist loot_items itemzy
120 endif
121
122 @ignore itemzy
123endwhile
124
125#********** SCAN ALL SHIELDS & INSTRUMENTS **********
126
127sysmsg "Scanning Shields & Instruments..." 11
128
129#Instruments, Shields - all serials:
130while findtype 3740|3742|3762|3763|10245|20006|20008|20010|20012|20014|20016|7026|7027|7029|7031|7033|7034|7035|7107|7109|31002|31130 backpack as itemzy
131
132 getlabel itemzy itemDesc
133
134 if "aspect" in itemDesc or "exceptional" in itemDesc
135 #sysmsg "item not added : {{itemDesc}}" 44
136 else
137 pushlist loot_items itemzy
138 endif
139
140 @ignore itemzy
141endwhile
142
143#********** SCAN ALL MELEE WEAPONS **********
144
145sysmsg "Scanning Dexxers Weapons..." 11
146
147#Archery, Fencing, Mace Fighting, Swordsmanship, Wrestling - all serials:
148while findtype 3920|5042|5117|30990|30993|30994|30995|31184|31186|3719|3922|3938|5121|5123|5125|30989|30992|30996|30997|30998|31176|31188|3568|3713|3721|3932|5040|5044|5112|5127|5177|5179|5181|30991|30999|31000|31001|31014|31178|31180|31182|3909|3911|3913|3915|3917|3934|3937|5046|5049|5115|5119|5182|5185|5187|30988|31128|31190|22187|31141|31142|31169|31172 backpack as itemzy
149
150 getlabel itemzy itemDesc
151
152 if "aspect" in itemDesc or "exceptional" in itemDesc
153 #sysmsg "item not added : {{itemDesc}}" 44
154 else
155 pushlist loot_items itemzy
156 endif
157
158 @ignore itemzy
159endwhile
160
161clearignore
162
163#********** START IDENTIFYING ITEMS **********
164
165sysmsg "Identiying all items..." 11
166
167removelist identified_items
168createlist identified_items
169
170foreach loot in loot_items
171
172 if targetexists
173 hotkey 'cancel current target'
174 endif
175
176 getlabel loot lootLabel
177
178 if skill 'item identification' = 120 or findtype 20495 backpack
179 pushlist identified_items loot
180
181 elseif skill 'item identification' >= 80
182 if "unidentified" in lootLabel
183 while "unidentified" in lootLabel
184 if index != 0
185 poplist identified_items loot
186 endif
187 overhead "Slowly identifying with skill..." 10
188 wait 1200
189 skill 'itemidentification'
190 waitfortarget maxwaittimeinms
191
192 while not targetexists
193 skill 'itemidentification'
194 waitfortarget maxwaittimeinms
195 endwhile
196
197 target loot
198 pushlist identified_items loot
199 getlabel loot lootLabel
200 endwhile
201 else
202 pushlist identified_items loot
203 endif
204
205 elseif findtype 20496 backpack as wandy
206
207 if "unidentified" in lootLabel
208 getlabel wandy wandDesc
209
210 if "(10 uses" in wandDesc
211 overhead "ID wand 10 uses left!!" 34
212 elseif "(5 uses" in wandDesc
213 overhead "ID wand 5 uses left!!" 34
214 elseif "(1 uses" in wandDesc
215 overhead "ID wand 1 use left!!" 34
216 endif
217
218 dclicktype 20496 backpack
219 waitfortarget itemusewaittimeinms
220
221 while not targetexists and findtype 20496 backpack
222 dclicktype 20496 backpack
223 waitfortarget itemusewaittimeinms
224 endwhile
225
226 if targetexists
227 target loot
228 pushlist identified_items loot
229 endif
230 else
231 pushlist identified_items loot
232 endif
233
234 else
235 overhead "Wand ID not found" 34
236 break
237 endif
238
239endfor
240
241#********** IF FOUND USE 120 ITEM ID OR CONTAINER WAND ID **********
242
243if list loot_items > 0
244 if skill 'item identification' = 120
245 overhead "ID with 120 skill"
246 wait maxwaittimeinms
247 skill 'itemidentification'
248 waitfortarget maxwaittimeinms
249
250 while not targetexists
251 skill 'itemidentification'
252 waitfortarget maxwaittimeinms
253 endwhile
254
255 target backpack
256 wait maxwaittimeinms
257 elseif findtype 20495 backpack
258 overhead "ID with container WAND"
259 wait maxwaittimeinms
260 dclicktype 20495 backpack
261 waitfortarget maxwaittimeinms
262
263 while not targetexists
264 dclicktype 20495 backpack
265 waitfortarget maxwaittimeinms
266 endwhile
267 target backpack
268 wait maxwaittimeinms
269 endif
270endif
271
272#********** SEPARATE GOOD ITEMS AND BAD ITEMS **********
273
274sysmsg "Sorting good/bad items" 11
275
276removelist good_items
277createlist good_items
278
279removelist bad_items
280createlist bad_items
281
282@setvar! alertCD 800
283settimer alertTimer alertCD
284
285foreach i in identified_items
286 if timer alertTimer > alertCD
287 settimer alertTimer 0
288 overhead "sorting items.." 44
289 endif
290
291 if i != 'x'
292 @setvar! found 0
293 getlabel i itemDesc
294
295 foreach keepDesc in "MagicalItems"
296 if keepDesc in itemDesc
297 @setvar! found 1
298 endif
299 endfor
300
301 if 0 = found
302 pushlist bad_items i
303 else
304 pushlist good_items i
305 pushlist display_goods itemDesc
306 endif
307
308 poplist identified_items i
309 pushlist identified_items 'x' front
310
311 endif
312
313endfor
314
315removelist identified_items
316
317#********** RECYCLE BAD ITEMS **********
318
319sysmsg "Opening sewing kit..." 11
320
321if not listexists recycled_items
322 createlist recycled_items
323endif
324
325dclicktype 3997 backpack
326waitforgump craftingToolGumpID maxwaittimeinms
327clearsysmsg
328while not gumpexists craftingToolGumpID
329 sysmsg "Opening sewing kit..." 11
330 dclicktype 3997 backpack
331 waitforgump craftingToolGumpID maxwaittimeinms
332endwhile
333
334foreach b in bad_items
335 if find b backpack
336 getlabel b badLabel
337 if targetexists
338 hotkey 'cancel current target'
339 endif
340
341 @setvar! itemError 0
342
343 gumpresponse 3 craftingToolGumpID
344 waitfortarget maxwaittimeinms
345 target b
346 wait 50
347 while not ingump "you recycle" 949095101 and 0 = itemError
348 if index = 50
349 @setvar! itemError 1
350 sysmsg "Error, item skipped" 34
351
352 while not gumpexists craftingToolGumpID
353 sysmsg "Opening sewing kit..." 11
354 dclicktype 3997 backpack
355 waitforgump craftingToolGumpID maxwaittimeinms
356 endwhile
357 endif
358 if insysmsg "that is too far"
359 @setvar! itemError 1
360 endif
361 if ingump "That cannot be recycled" 949095101
362 getlabel b notLabel
363 sysmsg "Not recycled : {{notLabel}}" 34
364 @setvar! itemError 1
365 endif
366 endwhile
367
368 if itemError = 0
369 pushlist recycled_items badLabel
370 endif
371 endif
372endfor
373
374removelist bad_items
375
376if targetexists
377 hotkey 'cancel current target'
378endif
379gumpclose craftingToolGumpID
380
381#********** MOVE GOOD ITEMS TO BAG **********
382
383if 1 = materialsIntoBag and not findtype 3702 backpack
384 sysmsg "No bag found to move good items!" 34
385else
386 sysmsg "Moving good items if any..." 11
387 if weight > maxweight
388 sysmsg "overweight! moving items cancelled" 44
389 else
390 foreach g in good_items
391
392 if g != 'x'
393 if findtype 3702 backpack as myBaggy
394 while not find g myBaggy
395 lift g 1
396 drop myBaggy -1 -1 0
397 wait maxwaittimeinms
398 endwhile
399
400 poplist good_items g
401 pushlist good_items 'x' front
402 sysmsg "Item saved." 55
403 endif
404 endif
405 endfor
406 endif
407endif
408
409removelist good_items
410
411#********** MOVE RECYCLED MATERIALS TO BAG **********
412
413sysmsg "Moving materiasl to bag..." 11
414
415if weight > maxweight
416 sysmsg "cancelled overweight" 44
417else
418
419 if findtype "bag" backpack as baggyz and materialsIntoBag = 1
420
421 while findtype 'cut up leather' backpack any any 1 as leather
422 sysmsg "moving leathers..." 6
423 lift leather 1000
424 drop baggyz -1 -1 0
425 wait maxwaittimeinms
426 endwhile
427
428 while findtype 'board%s' backpack any any 1 as board
429 sysmsg "moving boards..." 6
430 lift board 1000
431 drop baggyz -1 -1 0
432 wait maxwaittimeinms
433 endwhile
434
435 while findtype 'iron ingot%s' backpack any any 1 as iron
436 sysmsg "moving ingots..." 6
437 lift iron 1000
438 drop baggyz -1 -1 0
439 wait maxwaittimeinms
440 endwhile
441
442 while findtype 'blank scroll%s%' backpack any any 1 as blankz
443 sysmsg "moving scrolls..." 6
444 lift blankz 1000
445 drop baggyz -1 -1 0
446 wait maxwaittimeinms
447 endwhile
448
449 if eatArcaneEssence = 0
450 while findtype 12686 backpack any any 1 as arcanyz
451 sysmsg "moving arcanes..." 6
452 lift arcanyz 1000
453 drop baggyz -1 -1 0
454 wait maxwaittimeinms
455 endwhile
456 endif
457
458 endif
459endif
460
461#********** DISPLAY ALL GOOD AND BAD ITEMS PROCCESED **********
462
463if list display_goods = 0
464 sysmsg "0 Good items" 55
465else
466 foreach dg in display_goods
467 sysmsg dg 55
468 endfor
469endif
470
471removelist display_goods
472
473if list recycled_items = 0
474 sysmsg "0 recycled items" 33
475else
476 foreach dr in recycled_items
477 sysmsg dr 33
478 endfor
479endif
480
481removelist recycled_items
482
483hotkey 'cancel current target'
484gumpclose craftingToolGumpID
485
486#********** EAT ARCANE ESSENCES **********
487
488if eatArcaneEssence = 1
489 wait itemusewaittimeinms
490 if findtype 12686 backpack
491 sysmsg "Eating arcane.." 11
492 dclicktype 12686 backpack
493 waitfortarget maxwaittimeinms
494 while not targetexists
495 sysmsg "Trying to eat arcane.." 11
496 dclicktype 12686 backpack
497 waitfortarget maxwaittimeinms
498 endwhile
499 waitfortarget maxwaittimeinms
500 target 'self'
501 endif
502endif
503
504overhead "Recycle Finished!" 65
505sysmsg "Time Elapse in miliseconds : {{testTimer}}" 65