Created: 05/14/2022, 09:33:36 PM Updated: 06/14/2022, 10:29:16 PM View Change History
1
2
3
4
5
6clearsysmsg
7unsetvar chest
8setvar! locked 0
9setvar! trapped 0
10
11
12if not listexists 'lootTypes'
13 overhead 'Compiling list...' 1150
14 createlist 'lootTypes'
15
16 pushlist 'lootTypes' 0xeed
17
18 pushlist 'lootTypes' 0xa8c6
19
20 pushlist 'lootTypes' 0x42bf
21
22 pushlist 'lootTypes' 0x227a
23
24 pushlist 'lootTypes' 0xefc
25
26 pushlist 'lootTypes' 0xf91
27
28 pushlist 'lootTypes' 0x5740
29
30 pushlist 'lootTypes' 0xef3
31
32 pushlist 'lootTypes' 0x72a4
33
34 pushlist 'lootTypes' 0x14ec
35
36
37 pushlist 'lootTypes' 0xf7a
38
39 pushlist 'lootTypes' 0xf7b
40
41 pushlist 'lootTypes' 0xf86
42
43 pushlist 'lootTypes' 0xf84
44
45 pushlist 'lootTypes' 0xf85
46
47 pushlist 'lootTypes' 0xf88
48
49 pushlist 'lootTypes' 0xf8d
50
51 pushlist 'lootTypes' 0xf8c
52
53
54 pushlist 'lootTypes' 0xf25
55
56 pushlist 'lootTypes' 0xf16
57
58 pushlist 'lootTypes' 0xf15
59
60 pushlist 'lootTypes' 0xf26
61
62 pushlist 'lootTypes' 0xf10
63
64 pushlist 'lootTypes' 0xf13
65
66 pushlist 'lootTypes' 0xf19
67
68 pushlist 'lootTypes' 0xf21
69
70 pushlist 'lootTypes' 0xf2d
71
72
73 pushlist 'lootTypes' 0xefa
74
75
76 pushlist 'lootTypes' 0xf3f
77
78 pushlist 'lootTypes' 0xe21
79
80 pushlist 'lootTypes' 0x1bfb
81endif
82
83
84if not find lootBag backpack
85 overhead 'Set Loot Bag:' 1150
86 setvar! lootBag
87 wait 250
88endif
89
90
91if findtype 'metal chest' ground any any 2 as metalChest
92 setvar! chest metalChest
93elseif findtype 'wooden chest' ground any any 2 as woodenChest
94 setvar! chest woodenChest
95endif
96getlabel chest chestLabel
97wait 100
98if 'dungeon chest' in chestLabel or 'treasure map chest' in chestLabel
99 overhead chestLabel 1150
100else
101 overhead 'No chest found!' 38
102 stop
103endif
104
105
106dclick chest
107waitforgump 736038070 500
108if gumpexists 736038070
109 setvar! locked 1
110 setvar! trapped 1
111else
112 overhead 'Chest not locked!' 38
113 overhead 'Target chest to continue looting:' 38
114 setvar chest
115endif
116
117
118while trapped = 1
119 gumpresponse 7
120 wait 250
121 if insysmsg 'cleared it of traps' or insysmsg 'devoid of traps'
122 overhead 'Trap removed!' 1150
123 setvar! trapped 0
124 break
125 elseif insysmsg 'attempt to remove traps'
126 overhead 'Removing trap...' 1150
127 for 15
128 if insysmsg 'cleared it of traps' or insysmsg 'devoid of traps'
129 break
130 else
131 wait 250
132 endif
133 endfor
134 else
135 overhead 'Check Script!' 38
136 wait 250
137 endif
138endwhile
139wait 250
140
141
142while locked = 1
143 gumpresponse 4
144 wait 250
145 if not gumpexists 736038070 or insysmsg 'successfully pick the lock'
146 overhead 'Lock picked!' 1150
147 setvar! locked 0
148 break
149 elseif insysmsg 'attempt to pick the lock'
150 overhead 'Picking lock...' 1150
151 for 15
152 if insysmsg 'successfully pick the lock'
153 break
154 else
155 wait 250
156 endif
157 endfor
158 else
159 overhead 'Check Script!' 38
160 wait 250
161 endif
162endwhile
163wait 250
164
165
166overhead 'Looting...' 1150
167foreach t in 'lootTypes'
168 while findtype t chest as loot
169 getlabel loot lootLabel
170 overhead lootLabel 1150
171 lift loot 60000
172 drop lootBag -1 -1 -1
173 wait 500
174 endwhile
175endfor
176
177unsetvar chest
178overhead 'Script Complete!' 1150