Back to "autohide" tags

Improved Picker waiting outside wagon to pick/loot and recall (P) by Jaseowns

1# Automagic Tmapper Picker by Jaseowns
2# UO Outlands - https://youtu.be/gSymYQ_D01A
3@setvar! globalTimeout 650
4
5if position 1828 998
6    while not gumpexists 3899019871 and findtype "blue moongate" ground 0 1 2 as jGate
7        dclick jGate
8    endwhile
9
10    if gumpexists 3899019871 and findtype "blue moongate" ground 0 1 2 as jGate
11        gumpresponse 2 3899019871
12    endif
13
14    if not hidden
15        useskill 'Hiding'
16    endif
17    wait 500
18    replay
19endif
20
21
22if not varexist chestWeWannaWork
23    @setvar! chestWeWannaWork 0
24endif
25if not timerexists chestOpenTimer
26    createtimer chestOpenTimer
27    settimer chestOpenTimer 3500
28endif
29
30if dead 
31    overhead "RIP" 34
32    wait 5000
33    loop
34endif
35
36
37if findtype "metal chest|wooden chest" ground -1 -1 2 as chest
38
39    overhead "finding monsters"
40    hotkey 'Target Closest Grey Monster'
41    wait 200
42    if insysmsg "No one matching" or not find lasttarget ground -1 -1 4
43        if chestWeWannaWork = chest
44            // do nothing
45        else
46            dclick chest
47            wait 200
48            @setvar! chestWeWannaWork chest
49        endif
50    endif
51
52    if gumpexists 736038070
53        
54        if not hidden
55            useskill 'hiding'
56            wait 200
57            if not hidden
58                while not targetexists
59                    cast 'Invisibility'
60                    wait 50
61                endwhile
62                if targetexists 
63                    target 'self'
64                endif
65            endif
66        endif
67    
68        sysmsg "Working chest..." 88
69        if timer chestOpenTimer >= 3500
70            if ingump "Cleared of Traps" 736038070
71                if findtype "lockpicks" backpack as picky
72                    gumpresponse 4 736038070
73                else 
74                    overhead "No lockpicks left!" 34
75                endif
76            else
77                if findtype "drill" backpack as drilly
78                    gumpresponse 7 736038070
79                    wait 200
80                    if insysmsg "You do not have any trap tools of that material on hand."
81                        gumpresponse 5 736038070
82                    endif
83                else 
84                    overhead "No trap tools left!" 34
85                endif
86            endif
87            settimer chestOpenTimer 0
88        endif
89        wait 200
90    else
91        
92        // Gold
93        while find chest ground -1 -1 2 and findtype 5356|24434|43206|29363|43166|22336|29348|17087|3985|8826|3827|29030|3836|5981|4248|5359|3839|3838|3843|2597|29036|48407|3834|3865|3859|3885|3856|3878|3877|3873|3861|3862|576|5123|7177|7027|3920|5131|5179|5075|3980|5060|5076|5042|10245|3938|3913|7169|3909|5063|5089|3981|7170|7033|3976|3762|5040|5103|5117|7181|7029|3568|6264|3742|5139|6263|7026|5125|3740|5121|3973|3974|5204|5105|5185|5078|5115|7175|5059|7034|3713|3915|5112|5070|5049|5119|5205|5046|3962|3934|7035|3911|7179|5106|5143|3573|3719|5177|7610|5181|3917|5132|3963|7031|5207|5056|5085|3763|5129|5187|3721|3972|5138|3570|5101|5061|5074|5142|5182|5146|6265|5090|5203|5044|5144|3932|5201|5127|3572|7173|5135|3937|3571|22326|27611|9917|3821|5356|8455|5362|45315|8454|22187|5901|7163|3617|3903|12686 chest as item
94            getlabel item lootDesc
95            overhead lootDesc
96            wait 50
97            hotkey 'Grab Item'
98            target item
99            while queued
100                wait 50
101            endwhile
102        endwhile
103        
104        // Scrolls
105        while find chest ground -1 -1 2 and findtype 7981|7982|7983|7984|7985|7986|7987|7988|7989|7990|7991|7992|7993|7994|7995|7996|7997|7998|7999|8000|8001|8002|8003|8004|8005|8006|8007|8008|8009|8010|8011|8012|8013|8014|8015|8016|8017|8018|8019|8020|8021|8022|8023|8024|8025|8026|8027|8028|8029|8030|8031|8032|8033|8034|8035|8036|8037|8038|8039|8040|8041|8042|8033|8044 chest as item
106            getlabel item lootDesc
107            overhead lootDesc
108            wait 50
109            hotkey 'Grab Item'
110            target item
111            while queued
112                wait 50
113            endwhile
114        endwhile
115        
116        if findtype "reagent satchel" self as satchel
117            menu satchel 0
118            wait 200
119        endif
120        
121        // quiver
122        if findtype 12215 self as satchel
123            menu satchel 0
124            wait 200
125        endif
126        
127        getlabel chestWeWannaWork chestDesc
128        if "0 items, 0 stones" in chestDesc
129            @clearignore
130            while findtype "map" backpack as item
131                getlabel item desc
132                if "completed" in desc
133                    lift item
134                    drop chestWeWannaWork -1 -1 -1
135                    wait globalTimeout
136                endif
137                @ignore item
138            endwhile
139            @clearignore
140            menu chestWeWannaWork 1
141            @setvar! readyToShovel 1
142            script "RecallHomeAfterChest"
143        endif
144        
145    endif
146endif
147
148
149wait 200
150loop