Back to "time dungeon" tags

Bapeth's Time Sense by barryroser

Description: This script will sense and loot containers in Time Dungeon

1# Bapeths Time Dungeon Sense
2# 
3# Feb 28 2025 Update : Improved recycler - now uses Container ID Wand, removed Tourmaline and Citrine from loot list, Removed inner container seach as it seems broken
4#
5# This script will sense and loot containers in Time Dungeon (Some quest items may still need to be added)
6#
7# "Auto Loot Control"
8# This script uses razor "Auto-Queue Object Delay" setting
9# Make sure this setting is turned ON in the razor Options tab > Targeting & Queues sub-tab
10# And set "object delay to 503" AUTO LOOTING WILL BE SLOW IF YOU DONT DO THIS!
11#
12# "Loot-Sense & Vacuum Mode"
13# This function will overhead display *loot* above items on the ground and pick them up as you pass by (2 tiles)
14# To toggle this feature on/off (default is off) "Double click a Wizard Grimoire"
15#
16# "Auto Door Lockpick"
17# Go into "Warmode" near a pickable door and the scirpt will ask you which door you wish to pick
18# The script will then pick the door lock untill it opens
19#
20# "Auto Switch Flipper"
21# This is for green wall switches in "Time Dungeon"
22# Go into warmode when standing near a wall switch and the script will flip the switch and return to peacemode
23#
24# "Wizard Hat Stealth Trick" - prevents you from stumbling over a player/mob while moving in stealth
25# It is recommended to have in your pack a "Blessed and Aspected Armored Magical Wizard Hat" (Purchasable at prev vendor)
26# Alternatively you can buy a cheap "Magical Wizards Hat" from the Mage NPC in town (non-aspectable)
27# This is for the stealth part of the script
28# It will quick swap your hat and reduce your stamina
29# If your hat ever gets stuck in a "spam loop"
30# Go to Script tab > Options subtab and delete "bwiz" "bmain" and "nonaspectedwiz"
31#
32# "Auto-Recycler"
33# This feature will auto recycle bad items and keep the good ones - To use this feature:
34# You must be carrying at least one "Container identification wand" and at least one "recycler tool" type (Tinker Tools, Sewing Kit, Saw, Tongs, or Scribes Pen)
35# You must have a pair of scissors in your pack (blessed)
36# Double click the scissors when you are ready to start the recycle routine
37#
38# Script starts here...
39
40if not targetexists and not casting
41    if not timerexists bappykeytimer
42        createtimer bappykeytimer
43        settimer bappykeytimer 5500
44    elseif timer bappykeytimer >= 5500 and findtype "4112" backpack as bappykey
45        overhead "*key*" 78 bappykey
46        settimer bappykeytimer 0
47    endif
48    if not timerexists timesensecontainer
49        createtimer timesensecontainer
50        settimer timesensecontainer 1000
51    endif
52    if not findtype 4239|4240 ground -1 -1 2 and timer timesensecontainer >= 1000
53        for 18
54            if index > 0 and findtype "wooden shelf|wooden box|armoire|dead|chest of drawers|3712|2712|3651|3649|3648|3650|3708|2475|2713|2637|2474|3647|3710|3645|3703|3702|2472|3701|2473|2639|3788|3791|3786|2711|3709|3789|3646|3705|27284|27287|27289|27286|27288|3793|3787|3794|3790|3792|2643|3644" ground -1 -1 index as dungeonfloorcontainers
55                getlabel dungeonfloorcontainers desc
56                overhead "*search*" 88 dungeonfloorcontainers
57                @ignore dungeonfloorcontainers
58            endif
59            if findtype "wooden shelf|wooden box|armoire|dead|chest of drawers|3712|2712|3651|3649|3648|3650|3708|2475|2713|2637|2474|3647|3710|3645|3703|3702|2472|3701|2473|2639|3788|3791|3786|2711|3709|3789|3646|3705|27284|27287|27289|27286|27288|3793|3787|3794|3790|3792|2643|3644" ground -1 -1 2
60                break
61            endif
62            if warmode and findtype "barred metal door|metal door|iron gate" ground -1 -1 2
63                break
64            endif
65            if warmode and findtype 4239|4240 ground -1 -1 2
66                break
67            endif
68            if varexist "bwiz" and find "bwiz" backpack and find "bmain" self
69                if not targetexists and not casting and skill "Stealth" >= 80 and hidden and stam = maxstam
70                    while queued
71                        //donothing
72                    endwhile
73                    dclick "bwiz"
74                    while queued
75                        //donothing
76                    endwhile
77                    pause 30
78                    dclick "bmain"
79                    pause 500
80                    getlabel backpack ping
81                endif
82                if not targetexists and not casting and not findlayer self head and find "bmain" self
83                    while queued
84                        //donothing
85                    endwhile
86                    dclick "bmain"
87                    pause 500
88                    getlabel backpack ping
89                endif
90            endif
91            if varexist "bwiz" and find "bmain" self
92                if not targetexists and not casting and not find "bwiz" backpack
93                    while queued
94                        //donothing
95                    endwhile
96                    dclick "bmain"
97                    pause 500
98                    getlabel backpack ping
99                endif
100            endif
101        endfor
102        @clearignore
103        settimer timesensecontainer 0
104    endif
105    if not timerexists switchandstufftimer
106        createtimer switchandstufftimer
107        settimer switchandstufftimer 1000
108    endif
109    if timer switchandstufftimer >= 1000
110        for 18
111            if index > 0 and findtype 4239|4240  ground -1 -1 index as switchandstuff
112                getlabel switchandstuff desc
113                overhead "*switch*" 78 switchandstuff
114                @ignore switchandstuff
115            endif
116            if warmode and findtype 4239|4240 ground -1 -1 2
117                break
118            endif 
119        endfor
120        @clearignore
121        settimer switchandstufftimer 0
122    endif
123    if warmode and findtype 4239|4240 ground -1 -1 2 as timewallswitch
124        dclick timewallswitch
125        warmode off
126        getlabel backpack ping
127    endif
128    @clearignore 
129    while findtype "wooden box|armoire|dead|chest of drawers|wooden shelf|3712|2712|3651|3649|3648|3650|3708|2475|2713|2637|2474|3647|3710|3645|3703|3702|2472|3701|2473|2639|3788|3791|3786|2711|3709|3789|3646|3705|27284|27287|27289|27286|27288|3793|3787|3794|3790|3792|2643|3644" ground -1 -1 2 as timecontainer
130        if warmode and findtype 4239|4240 ground -1 -1 2
131            break
132        endif
133        if varexist "bwiz" and find "bwiz" backpack and find "bmain" self
134            if not targetexists and not casting and skill "Stealth" >= 80 and hidden and stam = maxstam
135                while queued
136                    //donothing
137                endwhile
138                dclick "bwiz"
139                while queued
140                    //donothing
141                endwhile
142                pause 30
143                dclick "bmain"
144                pause 500
145                getlabel backpack ping
146            endif
147            if not targetexists and not casting and not findlayer self head and find "bmain" self
148                while queued
149                    //donothing
150                endwhile
151                dclick "bmain"
152                pause 500
153                getlabel backpack ping
154            endif
155        endif
156        if varexist "bwiz" and find "bmain" self
157            if not targetexists and not casting and not find "bwiz" backpack
158                while queued
159                    //donothing
160                endwhile
161                dclick "bmain"
162                pause 500
163                getlabel backpack ping
164            endif
165        endif        
166        @setvar "bapcontaineroftime" timecontainer
167        while queued
168            //donothing
169        endwhile
170        getlabel timecontainer desc
171        if "the remains of" in desc
172            overhead "*avatar corpse*" 45 timecontainer
173        else
174            dclick timecontainer
175            pause 500
176            getlabel backpack ping
177            if gumpexists 736038070
178                @ignore timecontainer
179                gumpclose 736038070
180            endif
181# This seems to have been broken by Tranq in the last update - check again later to see if it gets fixed
182#            @ignore timecontainer
183#            while findtype "wooden shelf|wooden box|armoire|dead|chest of drawers|3712|2712|3651|3649|3648|3650|3708|2475|2713|2637|2474|3647|3710|3645|3703|3702|2472|3701|2473|2639|3788|3791|3786|2711|3709|3789|3646|3705|27284|27287|27289|27286|27288|3793|3787|3794|3790|3792|2643|3644" timecontainer -1 -1 2 as innercontainer
184#                while queued
185#                    //donothing
186#                endwhile
187#                dclick innercontainer
188#                pause 500
189#                getlabel backpack ping
190#                @ignore innercontainer
191#            endwhile
192#            @unignore timecontainer
193        endif
194        while 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|31017|31019|31021|31023|31025|31027|31029|31031|31033|31035|31037|31038|31041|31043|31045|31047|31049|31051|31053|31055|3834|3740|3742|3762|3763|10245|20006|20008|20010|20012|20014|20016|7026|7027|7029|7031|7033|7034|7035|7107|7109|31002|31130|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 timecontainer as checkunid
195            getlabel checkunid desc
196            if "unidentified" in desc
197                hotkey 'Grab Item' 
198                target checkunid
199                overhead "*looting*" 2091 timecontainer
200                if insysmsg "Invalid or inaccessible item."
201                    @ignore checkunid
202                endif
203                while queued
204                    //donothing
205                endwhile
206            else 
207                @ignore checkunid
208            endif
209            if insysmsg "That container cannot hold more weight."
210                break
211            endif
212            if not find "bapcontaineroftime" ground -1 -1 2
213                break
214            endif
215            if varexist "bwiz" and find "bwiz" backpack and find "bmain" self
216                if not targetexists and not casting and skill "Stealth" >= 80 and hidden and stam = maxstam
217                    while queued
218                        //donothing
219                    endwhile
220                    dclick "bwiz"
221                    while queued
222                        //donothing
223                    endwhile
224                    pause 30
225                    dclick "bmain"
226                    pause 500
227                    getlabel backpack ping
228                endif
229                if not targetexists and not casting and not findlayer self head and find "bmain" self
230                    while queued
231                        //donothing
232                    endwhile
233                    dclick "bmain"
234                    pause 500
235                    getlabel backpack ping
236                endif
237            endif
238            if varexist "bwiz" and find "bmain" self
239                if not targetexists and not casting and not find "bwiz" backpack
240                    while queued
241                        //donothing
242                    endwhile
243                    dclick "bmain"
244                    pause 500
245                    getlabel backpack ping
246                endif
247            endif
248        endwhile
249        while findtype 3827 timecontainer 0 as zeroscroll
250            @ignore zeroscroll
251        endwhile
252        while findtype 7154 timecontainer 0 as zeroingot
253            @ignore zeroingot
254        endwhile
255        while findtype 4225 timecontainer 0 as zeroleather
256            @ignore zeroleather
257        endwhile
258        while findtype 7127 timecontainer 0 as zeroboard
259            @ignore zeroboard
260        endwhile
261        while findtype 7154 timecontainer 2419 as zeroingot
262            @ignore zeroingot
263        endwhile
264        while findtype 4225 timecontainer 2419 as zeroleather
265            @ignore zeroleather
266        endwhile
267        while findtype 7127 timecontainer 2419 as zeroboard
268            @ignore zeroboard
269        endwhile
270        while findtype 7154 timecontainer 2406 as zeroingot
271            @ignore zeroingot
272        endwhile
273        while findtype 4225 timecontainer 2406 as zeroleather
274            @ignore zeroleather
275        endwhile
276        while findtype 7127 timecontainer 2406 as zeroboard
277            @ignore zeroboard
278        endwhile
279        while findtype 7154 timecontainer 2413 as zeroingot
280            @ignore zeroingot
281        endwhile
282        while findtype 4225 timecontainer 2413 as zeroleather
283            @ignore zeroleather
284        endwhile
285        while findtype 7127 timecontainer 2413 as zeroboard
286            @ignore zeroboard
287        endwhile
288        while findtype 7154 timecontainer 2418 as zeroingot
289            @ignore zeroingot
290        endwhile
291        while findtype 4225 timecontainer 2418 as zeroleather
292            @ignore zeroleather
293        endwhile
294        while findtype 7127 timecontainer 2418 as zeroboard
295            @ignore zeroboard
296        endwhile
297        while findtype 7154 timecontainer 2213 as zeroingot  
298            @ignore zeroingot
299        endwhile
300        while findtype 4225 timecontainer 2213 as zeroleather
301            @ignore zeroleather
302        endwhile
303        while findtype 7127 timecontainer 2213 as zeroboard
304            @ignore zeroboard
305        endwhile
306        while findtype 22326 timecontainer 2401 as badseed
307            @ignore badseed
308        endwhile
309        while findtype 22326 timecontainer 2882 as badseed
310            @ignore badseed
311        endwhile
312        while findtype 22326 timecontainer 2451 as badseed
313            @ignore badseed
314        endwhile
315        while findtype 22326 timecontainer 63 as badseed
316            @ignore badseed
317        endwhile
318        while findtype 5901|5899|5903|5905 timecontainer as timefootwear
319            getlabel timefootwear desc
320            if "(hue" in desc
321                break
322            else 
323                @ignore timefootwear
324            endif
325        endwhile
326        while findtype "54230|44985|glass display|20049|Pig Iron|broken shield|blackrock fragment|gargish fragment|18705|55247|49482|53694|54570|53696|53876|50612|55420|53280|53473|54831|50278|49528|bottle set|entrail bucket|mounted stalaghorn|sea glass bulb|juggling daggers|st patricks cross|divination orb|mirror display|murder of crows|charmed cobra|prodigy fiddle|wilting rose belljar|scale of balance|screaming mandrake|statue of the siren|the final hour|55204|specimen jars|shattered weapon|bird cage|widows grief|54684|27612|49223|54591|54601|54718|7408|19948|58325|19959|19822|49730|49729|19944|19949|47613|47612|47611|47610|47611|3986|3966|cathedral tapestry|Darkscale tapestry|large painting|landscape painting|portrait painting|figurine|statue|20291|44987|49730|47107|18653|45127|20103|47103|29363|47105|29361|43453|5899|47109|45250|41509|43447|18657|4025|51308|45156|51304|45214|28769|28799|28803|28765|45211|45248|51259|45220|51328|45218|3842|51327|45222|45241|51336|11858|51375|45282|54722|45255|45246|28795|44983|45235|45251|45238|51258|51314|28761|45236|51260|54718|18400|58325|45252|18656|47111|3839|45239|45242|45254|45281|45247|42241|45216|28775|51321|3838|51318|5901|5905|45259|5903|48407|51302|4248|27611|15296|43166|5359|5981|4026|3985|25359|17686|3836|17087|5356|29030|24434|22336|29036|3843|29025|51098|29034|8826|51094|576|3827|22326|45315|3891|2539|39898|39896|39892|39918|39911|39916|39897|39905|39891|39917|39912|39909|39889|31047|31017|31049|31019|31055|31051|31053|31025|31027|31031|31041|54717|31021|31011|31023|31029|31043|31003|31035|31033|31045|31037|31002|20006|31169|31006|30999|31012|31009|30996|7109|7107|31128|31188|20014|31014|31004|31142|31001|31000|37181|31010|30998|31172|30988|30997|31038|31141|7947|20008|31005|31191|31008|31007|30994|30993|31182|30989|20012|31186|31178|31015|30991|20010|20016|31184|31190|30990|30995|31176|31180|30992|31130|5207|7031|7026|7034|7033|7027|7035|7029|5078|5063|5059|5105|5060|5138|5129|5201|5142|5143|5076|5106|7610|5139|5090|5103|5132|7177|5061|7181|7179|3920|5042|5127|5117|5185|5125|3938|5177|3937|5044|5121|3915|3909|3568|3932|5123|5144|5119|5056|5135|5187|5074|5089|3934|3913|3917|3721|5075|5046|5049|7170|5146|5205|5203|5115|5204|5040|5179|5070|5182|5085|5181|3719|7173|5131|3911|5101|7175|7169|3713|5112|22187|9917|3859|3862|3878|3865|3856|3873|3877|3834|3742|3762|3740|3763|10245|3572|3573|3571|12686|19985|19981|19984|19982|19983|19991|19989|19986|19987|19988|19994|19995|19992|19993|19990|19980|19977|19976|19978|19979|43423|7154|4225|7127" timecontainer as bitem
327            hotkey 'Grab Item' 
328            target bitem
329            overhead "*looting*" 2091 timecontainer
330            if insysmsg "Invalid or inaccessible item."
331                @ignore bitem
332            endif
333            while queued
334                //donothing
335            endwhile
336            if insysmsg "That container cannot hold more weight."
337                break
338            endif
339            if not find "bapcontaineroftime" ground -1 -1 2
340                break
341            endif
342            if varexist "bwiz" and find "bwiz" backpack and find "bmain" self
343                if not targetexists and not casting and skill "Stealth" >= 80 and hidden and stam = maxstam
344                    while queued
345                        //donothing
346                    endwhile
347                    dclick "bwiz"
348                    while queued
349                        //donothing
350                    endwhile
351                    pause 30
352                    dclick "bmain"
353                    pause 500
354                    getlabel backpack ping
355                endif
356                if not targetexists and not casting and not findlayer self head and find "bmain" self
357                    while queued
358                        //donothing
359                    endwhile
360                    dclick "bmain"
361                    pause 500
362                    getlabel backpack ping
363                endif
364            endif
365            if varexist "bwiz" and find "bmain" self
366                if not targetexists and not casting and not find "bwiz" backpack
367                    while queued
368                        //donothing
369                    endwhile
370                    dclick "bmain"
371                    pause 500
372                    getlabel backpack ping
373                endif
374            endif
375        endwhile
376        @ignore timecontainer
377    endwhile
378endif
379if skill "Lockpicking" >= 20 and warmode and findtype "barred metal door|metal door|iron gate" ground -1 -1 2
380    if findtype 5373 backpack as picks
381        clearsysmsg 
382        overhead "Which door shall I pick?" 88
383        hotkey "Set Last Target"
384        wft 1000
385        while targetexists 
386            if not findtype "barred metal door|metal door|iron gate" ground -1 -1 2
387                break
388            endif
389        endwhile
390        @setvar "bapdoorpick" lasttarget 
391        overhead "Time is of the essence..." 88
392        for 2000
393            if not timerexists doorpicktimer
394                createtimer doorpicktimer
395                settimer doorpicktimer 3150
396            endif
397            if timer doorpicktimer >= 3150
398                dclick picks
399                wft 1000
400                target bapdoorpick
401                overhead "*picking*" 1060 bapdoorpick
402                getlabel backpack ping
403                settimer doorpicktimer 0
404            endif
405            if insysmsg "That is not locked"
406                warmode "off"
407                getlabel backpack ping
408                break
409            endif
410            if insysmsg "Target cannot be seen"
411                warmode "off"
412                getlabel backpack ping
413                break
414            endif
415            if insysmsg "You pick the lock!"
416                overhead "What lay beyond this door..." 87
417                dclick bapdoorpick
418                warmode "off"
419                getlabel backpack ping
420                break
421            endif
422            if not findtype 5373 backpack
423                overhead "Argh, it was my last pick..." 38
424                warmode "off"
425                getlabel backpack ping
426                break
427            endif
428            if not findtype "barred metal door" ground -1 -1 2
429                warmode "off"
430                getlabel backpack ping
431                break
432            endif
433            if not warmode 
434                break
435            endif
436            if insysmsg "You have worn out your tool"
437                overhead "This tool is worn out!" 805
438            endif
439            if not findtype 5373 backpack
440                break
441            endif
442            if timerexists frostshellswitch and timer frostshelltimer > 5000 and not cooldown "Aspect" and hp <= 35
443                say "[AspectArmor Frost"
444                getlabel backpack ping
445                if insysmsg "Your armor is already of that aspect"
446                    //donothing
447                else
448                    cooldown "Aspect" 30000
449                    overhead "--Frost Shell Primed--" 2234
450                endif
451                settimer frostshelltimer 0
452            endif
453            if not cooldown "Move" and not hidden and not cooldown "Hiding" and not cooldown "Stealth" and not cooldown "Stealing" and skill "Hiding" >= 80
454                skill "Hiding"
455                warmode on
456                getlabel backpack ping
457                if hidden
458                    getlabel backpack ping
459                    cooldown "Hiding" 10000
460                endif
461            endif
462            if not cooldown "Move" and findbuff "Invisibility" and not cooldown "Hiding" and not cooldown "Stealth" and not cooldown "Stealing" and skill "Hiding" >= 80
463                skill "Hiding"
464                warmode on
465                getlabel backpack ping
466                if hidden
467                    getlabel backpack ping
468                    cooldown "Hiding" 10000
469                    removetimer ots
470                endif
471            endif
472            if hidden and not cooldown "Hiding" and not cooldown "Stealth" and not timerexists ots and skill "Stealth" >= 80
473                skill "Stealth"
474                getlabel backpack ping
475                if not timerexists ots
476                    createtimer ots
477                endif
478            endif
479            if insysmsg "move quietly"
480                getlabel backpack ping
481                cooldown "Stealth" 10000
482            endif
483            if not cooldown "Move" and hidden and not cooldown "Hiding" and not cooldown "Stealth" and insysmsg "hide first" and skill "Hiding" >= 80
484                pause 1000
485                getlabel backpack ping
486                skill "Hiding"
487                getlabel backpack ping
488                if hidden
489                    getlabel backpack ping
490                    cooldown "Hiding" 10000
491                endif
492                removetimer ots
493            endif
494            if varexist "bwiz" and find "bwiz" backpack and find "bmain" self
495                if not targetexists and not casting and skill "Stealth" >= 80 and hidden and stam = maxstam
496                    while queued
497                        //donothing
498                    endwhile
499                    dclick "bwiz"
500                    while queued
501                        //donothing
502                    endwhile
503                    pause 30
504                    dclick "bmain"
505                    pause 500
506                    getlabel backpack ping
507                endif
508                if not targetexists and not casting and not findlayer self head and find "bmain" self
509                    while queued
510                        //donothing
511                    endwhile
512                    dclick "bmain"
513                    pause 500
514                    getlabel backpack ping
515                endif
516            endif
517            if varexist "bwiz" and find "bmain" self
518                if not targetexists and not casting and not find "bwiz" backpack
519                    while queued
520                        //donothing
521                    endwhile
522                    dclick "bmain"
523                    pause 500
524                    getlabel backpack ping
525                endif
526            endif
527        endfor
528     else 
529         overhead "I am out of lockpicks!" 38
530         warmode "off"
531         getlabel backpack ping
532     endif
533endif
534
535if insysmsg "What should I use these scissors on?" and findtype "sewing kit|saw|pen and ink|tongs|tool kit" backpack as breakdowntool
536    hotkey "Cancel Current Target"
537    if not find "ContainerIDWand" and findtype 20495 backpack as contIDwand
538        @setvar "ContainerIDWand" contIDwand
539    endif
540    if find "ContainerIDWand" backpack
541        clearsysmsg 
542        while queued
543            //donothing
544        endwhile
545        dclick "ContainerIDWand"
546        wft 500
547        overhead "Select Container to ID..." 88
548        while targetexists 
549            //donothing
550        endwhile
551        getlabel backpack ping
552        overhead "Attempting recycle..." 88
553        if insysmsg "No unidentified items found."
554            overhead "Nothing fresh to ID..." 45
555        elseif insysmsg "That is not a container." 
556            overhead "Invalid container, try again.." 45
557        endif
558        if findtype 3834 backpack 0 as bbook
559            @ignore bbook
560        endif
561        while 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|31017|31019|31021|31023|31025|31027|31029|31031|31033|31035|31037|31038|31041|31043|31045|31047|31049|31051|31053|31055|3834|3740|3742|3762|3763|10245|20006|20008|20010|20012|20014|20016|7026|7027|7029|7031|7033|7034|7035|7107|7109|31002|31130|3920|5042|5117|30990|30993|30994|30995|31184|31186|3719|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 IDitem
562            getlabel IDitem desc
563            if "aspect" in desc or "training" in desc or "vanquishing" in desc or "supremely" in desc or "slaying" in desc or "enticement" in desc or "invulnerability" in desc or "power" in desc or "exceedingly accurate force" in desc or "exceedingly potent" in desc or "valorite" in desc or "valehide" in desc or "valewood" in desc or "avarite" in desc or "avarhide" in desc or "avarwood" in desc or "verite" in desc or "verehide" in desc or "verewood" in desc or "agapite" in desc or "rosehide" in desc or "rosewood" in desc or "fortification" in desc
564                @ignore IDitem
565                overhead "*strong magic*" 2091 IDitem
566            elseif "durable" in desc or "substantial" in desc or "massive" in desc or "fortified" in desc or "indestructible" in desc or "exceptional" in desc or "accurate" in desc or "surpassingly" in desc or "eminently" in desc or "exceedingly" in desc or "ruin" in desc or "might" in desc or "force" in desc or "power" in desc or "mastercrafted" in desc or "defense" in desc or "guarding" in desc or "hardening" in desc or "potent" in desc or "melodious" in desc
567                overhead "*trash*" 1779 IDitem
568                while not gumpexists 949095101
569                    while queued
570                        //donothing
571                    endwhile
572                    dclick breakdowntool
573                    waitforgump 949095101 1000
574                endwhile
575                while not ingump "Recycle Single Item" 949095101
576                    gumpresponse 2
577                    waitforgump 949095101 1000
578                endwhile                                
579                gumpresponse 3
580                waitforgump 949095101 1000
581                target IDitem
582                getlabel backpack ping
583                pause 250
584                gumpclose 949095101
585            else
586                @ignore IDitem
587            endif
588            if not find "ContainerIDWand" backpack
589                break
590            endif
591        endwhile
592        if gumpexists 949095101
593            gumpclose 949095101
594        endif
595    else
596        overhead "No Container ID Wand..." 38
597    endif
598    if targetexists 
599        hotkey "Cancel Current Target"
600    endif
601    overhead "Recycle Complete." 88
602endif
603
604if not timerexists lootvacuumswitch
605    if gumpexists 1281623709
606        gumpclose 1281623709
607        createtimer lootvacuumswitch
608        settimer lootvacuumswitch 15000
609        overhead "--Loot Vacuum Enabled--" 2085
610    endif
611endif
612if timerexists lootvacuumswitch
613    if gumpexists 1281623709
614        gumpclose 1281623709
615        removetimer lootvacuumswitch
616        overhead "--Loot Vacuum Disabled--" 1779
617    endif
618endif
619while diffweight <= 0 and findtype "gold coin" backpack as dropgold
620    if not hidden and stam <= 4 and findtype "Red Potion" backpack as redpot
621        while queued
622            //donothing
623        endwhile
624        dclick redpot
625    endif
626    overhead "My cup runneth over..." 1194
627    if findtype 4225 backpack 0 as garbleather
628        drop backpack
629        lift garbleather 59999
630        drop 0
631        while queued
632            //donothing
633        endwhile
634    endif
635    drop backpack
636    lift dropgold 444
637    drop 0
638    while queued
639        //donothing
640    endwhile
641    settimer lootvacuumswitch 0
642endwhile
643if timerexists lootvacuumswitch
644    if timer lootvacuumswitch >= 9000
645        if not timerexists lootsensetimer
646            createtimer lootsensetimer
647            settimer lootsensetimer 1000
648        endif
649        if not findtype 4239|4240 ground -1 -1 2 and timer lootsensetimer >= 1000
650            for 18
651                while findtype 3827 ground 0 as zeroscroll
652                    @ignore zeroscroll
653                endwhile
654                while findtype 7154 ground 0 as zeroingot
655                    @ignore zeroingot
656                endwhile
657                while findtype 4225 ground 0 as zeroleather
658                    @ignore zeroleather
659                endwhile
660                while findtype 7127 ground 0 as zeroboard
661                    @ignore zeroboard
662                endwhile
663                while findtype 7154 ground 2419 as zeroingot
664                    @ignore zeroingot
665                endwhile
666                while findtype 4225 ground 2419 as zeroleather
667                    @ignore zeroleather
668                endwhile
669                while findtype 7127 ground 2419 as zeroboard
670                    @ignore zeroboard
671                endwhile
672                while findtype 7154 ground 2406 as zeroingot
673                    @ignore zeroingot
674                endwhile
675                while findtype 4225 ground 2406 as zeroleather
676                    @ignore zeroleather
677                endwhile
678                while findtype 7127 ground 2406 as zeroboard
679                    @ignore zeroboard
680                endwhile
681                while findtype 7154 ground 2413 as zeroingot
682                    @ignore zeroingot
683                endwhile
684                while findtype 4225 ground 2413 as zeroleather
685                    @ignore zeroleather
686                endwhile
687                while findtype 7127 ground 2413 as zeroboard
688                    @ignore zeroboard
689                endwhile
690                while findtype 7154 ground 2418 as zeroingot
691                    @ignore zeroingot
692                endwhile
693                while findtype 4225 ground 2418 as zeroleather
694                    @ignore zeroleather
695                endwhile
696                while findtype 7127 ground 2418 as zeroboard
697                    @ignore zeroboard
698                endwhile
699                while findtype 7154 ground 2213 as zeroingot  
700                    @ignore zeroingot
701                endwhile
702                while findtype 4225 ground 2213 as zeroleather
703                    @ignore zeroleather
704                endwhile
705                while findtype 7127 ground 2213 as zeroboard
706                    @ignore zeroboard
707                endwhile
708                while findtype 22326 ground 2401 as badseed
709                    @ignore badseed
710                endwhile
711                while findtype 22326 ground 2882 as badseed
712                    @ignore badseed
713                endwhile
714                while findtype 22326 ground 2451 as badseed
715                    @ignore badseed
716                endwhile
717                while findtype 22326 ground 63 as badseed
718                    @ignore badseed
719                endwhile
720                if index > 0 and findtype "54230|44985|glass display|20049|Pig Iron|blackrock fragment|gargish fragment|18705|55247|49482|53694|54570|53696|53876|50612|55420|53280|53473|54831|50278|49528|bottle set|entrail bucket|mounted stalaghorn|sea glass bulb|juggling daggers|st patricks cross|divination orb|mirror display|murder of crows|charmed cobra|prodigy fiddle|wilting rose belljar|scale of balance|screaming mandrake|statue of the siren|the final hour|55204|specimen jars|bird cage|widows grief|54684|27612|49223|54591|54601|54718|19948|58325|19959|19822|49730|49729|19944|19949|47613|47612|47611|47610|47611|3986|3966|cathedral tapestry|Darkscale tapestry|large painting|landscape painting|portrait painting|figurine|statue|20291|44987|49730|47107|18653|45127|20103|47103|29363|47105|29361|43453|5899|47109|45250|41509|43447|18657|4025|51308|45156|51304|45214|28769|28799|28803|28765|45211|45248|51259|45220|51328|45218|3842|51327|45222|45241|51336|11858|51375|45282|54722|45255|45246|28795|44983|45235|45251|45238|51258|51314|28761|45236|51260|54718|18400|58325|45252|18656|47111|3839|45239|45242|45254|45281|45247|42241|45216|28775|51321|3838|51318|5901|5905|45259|5903|48407|51302|4248|27611|15296|43166|5359|5981|4026|3985|25359|17686|3836|17087|5356|29030|24434|22336|29036|3843|29025|51098|29034|8826|51094|576|3827|22326|45315|3891|2539|39898|39896|39892|39918|39911|39916|39897|39905|39891|39917|39912|39909|39889|31047|31017|31049|31019|31055|31051|31053|31025|31027|31031|31041|54717|31021|31011|31023|31029|31043|31003|31035|31033|31045|31037|31002|20006|31169|31006|30999|31012|31009|30996|7109|7107|31128|31188|20014|31014|31004|31142|31001|31000|37181|31010|30998|31172|30988|30997|31038|31141|7947|20008|31005|31191|31008|31007|30994|30993|31182|30989|20012|31186|31178|31015|30991|20010|20016|31184|31190|30990|30995|31176|31180|30992|31130|5207|7031|7026|7034|7033|7027|7035|7029|5078|5063|5059|5105|5060|5138|5129|5201|5142|5143|5076|5106|7610|5139|5090|5103|5132|7177|5061|7181|7179|3920|5042|5127|5117|5185|5125|3938|5177|3937|5044|5121|3915|3909|3568|3932|5123|5144|5119|5056|5135|5187|5074|5089|3934|3913|3917|3721|5075|5046|5049|7170|5146|5205|5203|5115|5204|5040|5179|5070|5182|5085|5181|3719|7173|5131|3911|5101|7175|7169|3713|5112|22187|9917|3859|3862|3878|3865|3856|3873|3877|3834|3742|3762|3740|3763|10245|3572|3573|3571|12686|19985|19981|19984|19982|19983|19991|19989|19986|19987|19988|19994|19995|19992|19993|19990|19980|19977|19976|19978|19979|43423|7154|4225|7127" ground -1 -1 index as lootlocation
721                    overhead "*loot*" 2091 lootlocation
722                    @ignore lootlocation
723                endif
724                if warmode and findtype 4239|4240 ground -1 -1 2
725                    break
726                endif
727            endfor
728            @clearignore 
729            settimer lootsensetimer 0
730        endif
731        while findtype 3827 ground 0 as zeroscroll
732            @ignore zeroscroll
733        endwhile
734        while findtype 7154 ground 0 as zeroingot
735            @ignore zeroingot
736        endwhile
737        while findtype 4225 ground 0 as zeroleather
738            @ignore zeroleather
739        endwhile
740        while findtype 7127 ground 0 as zeroboard
741            @ignore zeroboard
742        endwhile
743        while findtype 7154 ground 2419 as zeroingot
744            @ignore zeroingot
745        endwhile
746        while findtype 4225 ground 2419 as zeroleather
747            @ignore zeroleather
748        endwhile
749        while findtype 7127 ground 2419 as zeroboard
750            @ignore zeroboard
751        endwhile
752        while findtype 7154 ground 2406 as zeroingot
753            @ignore zeroingot
754        endwhile
755        while findtype 4225 ground 2406 as zeroleather
756            @ignore zeroleather
757        endwhile
758        while findtype 7127 ground 2406 as zeroboard
759            @ignore zeroboard
760        endwhile
761        while findtype 7154 ground 2413 as zeroingot
762            @ignore zeroingot
763        endwhile
764        while findtype 4225 ground 2413 as zeroleather
765            @ignore zeroleather
766        endwhile
767        while findtype 7127 ground 2413 as zeroboard
768            @ignore zeroboard
769        endwhile
770        while findtype 7154 ground 2418 as zeroingot
771            @ignore zeroingot
772        endwhile
773        while findtype 4225 ground 2418 as zeroleather
774            @ignore zeroleather
775        endwhile
776        while findtype 7127 ground 2418 as zeroboard
777            @ignore zeroboard
778        endwhile
779        while findtype 7154 ground 2213 as zeroingot  
780            @ignore zeroingot
781        endwhile
782        while findtype 4225 ground 2213 as zeroleather
783            @ignore zeroleather
784        endwhile
785        while findtype 7127 ground 2213 as zeroboard
786            @ignore zeroboard
787        endwhile
788        while findtype 22326 ground 2401 as badseed
789            @ignore badseed
790        endwhile
791        while findtype 22326 ground 2882 as badseed
792            @ignore badseed
793        endwhile
794        while findtype 22326 ground 2451 as badseed
795            @ignore badseed
796        endwhile
797        while findtype 22326 ground 63 as badseed
798            @ignore badseed
799        endwhile
800        while not casting and not targetexists and findtype "54230|44985|glass display|20049|Pig Iron|blackrock fragment|gargish fragment|18705|55247|49482|53694|54570|53696|53876|50612|55420|53280|53473|54831|50278|49528|bottle set|entrail bucket|mounted stalaghorn|sea glass bulb|juggling daggers|st patricks cross|divination orb|mirror display|murder of crows|charmed cobra|prodigy fiddle|wilting rose belljar|scale of balance|screaming mandrake|statue of the siren|the final hour|55204|specimen jars|bird cage|widows grief|54684|27612|49223|54591|54601|54718|19948|58325|19959|19822|49730|49729|19944|19949|47613|47612|47611|47610|47611|3986|3966|cathedral tapestry|Darkscale tapestry|large painting|landscape painting|portrait painting|figurine|statue|20291|44987|49730|47107|18653|45127|20103|47103|29363|47105|29361|43453|5899|47109|45250|41509|43447|18657|4025|51308|45156|51304|45214|28769|28799|28803|28765|45211|45248|51259|45220|51328|45218|3842|51327|45222|45241|51336|11858|51375|45282|54722|45255|45246|28795|44983|45235|45251|45238|51258|51314|28761|45236|51260|54718|18400|58325|45252|18656|47111|3839|45239|45242|45254|45281|45247|42241|45216|28775|51321|3838|51318|5901|5905|45259|5903|48407|51302|4248|27611|15296|43166|5359|5981|4026|3985|25359|17686|3836|17087|5356|29030|24434|22336|29036|3843|29025|51098|29034|8826|51094|576|3827|22326|45315|3891|2539|39898|39896|39892|39918|39911|39916|39897|39905|39891|39917|39912|39909|39889|31047|31017|31049|31019|31055|31051|31053|31025|31027|31031|31041|54717|31021|31011|31023|31029|31043|31003|31035|31033|31045|31037|31002|20006|31169|31006|30999|31012|31009|30996|7109|7107|31128|31188|20014|31014|31004|31142|31001|31000|37181|31010|30998|31172|30988|30997|31038|31141|7947|20008|31005|31191|31008|31007|30994|30993|31182|30989|20012|31186|31178|31015|30991|20010|20016|31184|31190|30990|30995|31176|31180|30992|31130|5207|7031|7026|7034|7033|7027|7035|7029|5078|5063|5059|5105|5060|5138|5129|5201|5142|5143|5076|5106|7610|5139|5090|5103|5132|7177|5061|7181|7179|3920|5042|5127|5117|5185|5125|3938|5177|3937|5044|5121|3915|3909|3568|3932|5123|5144|5119|5056|5135|5187|5074|5089|3934|3913|3917|3721|5075|5046|5049|7170|5146|5205|5203|5115|5204|5040|5179|5070|5182|5085|5181|3719|7173|5131|3911|5101|7175|7169|3713|5112|22187|9917|3859|3862|3878|3865|3856|3873|3877|3834|3742|3762|3740|3763|10245|3572|3573|3571|12686|19985|19981|19984|19982|19983|19991|19989|19986|19987|19988|19994|19995|19992|19993|19990|19980|19977|19976|19978|19979|43423|7154|4225|7127" ground -1 -1 2 as eatloot
801            hotkey 'Grab Item' 
802            target eatloot
803            if insysmsg "Invalid or inaccessible item."
804                @ignore eatloot
805            endif            
806            while queued
807                //donothing
808            endwhile 
809        endwhile
810    endif
811endif
812
813if findtype 5912 self and not varexist "bwiz" and findlayer self head as regularhat
814    getlabel regularhat desc
815    if "magical" in desc
816        dclick regularhat
817        pause 500
818        getlabel backpack ping
819        replay
820    endif
821endif
822if not find "bwiz" self and findtype 5912 backpack as wizhat
823    getlabel wizhat desc
824    if "restyled" in desc
825        @ignore wizhat
826        replay
827    elseif "armored" in desc
828        @setvar "bwiz" wizhat
829    elseif "magical" in desc
830        @setvar "bwiz" wizhat
831        @setvar "nonaspectedwiz" wizhat
832    endif
833endif
834if varexist "bwiz" and find "bwiz" backpack
835    if not find "bmain" self and findlayer self head as hat
836        @setvar "bmain" hat
837    endif
838    if not varexist "bmain"
839        overhead "I need a primary hat or helm to wear.." 88
840        pause 2000
841        overhead "Anything will do, just not a magical wizard hat..." 88
842        stop
843    endif
844endif
845
846if varexist "bwiz" and find "bwiz" backpack and find "bmain" self
847    if not targetexists and not casting and skill "Stealth" >= 80 and hidden and stam = maxstam
848        while queued
849            //donothing
850        endwhile
851        dclick "bwiz"
852        while queued
853            //donothing
854        endwhile
855        pause 30
856        dclick "bmain"
857        pause 500
858        getlabel backpack ping
859    endif
860    if not targetexists and not casting and not findlayer self head and find "bmain" self
861        while queued
862            //donothing
863        endwhile
864        dclick "bmain"
865        pause 500
866        getlabel backpack ping
867    endif
868endif
869if varexist "bwiz" and find "bmain" self
870    if not targetexists and not casting and not find "bwiz" backpack
871        while queued
872            //donothing
873        endwhile
874        dclick "bmain"
875        pause 500
876        getlabel backpack ping
877    endif
878endif
879loop