Created: 09/15/2022, 01:42:44 AM Updated: 05/23/2024, 01:13:44 AM View Change History
1
2
3
4
5
6@setvar! recallHomeRunePosition 1
7
8if name = "Jase Owns"
9 @setvar! recallHomeRunePosition 22
10elseif name = "Jaseowns"
11 @setvar! recallHomeRunePosition 14
12elseif name = "of Time"
13 @setvar! recallHomeRunePosition 26
14endif
15
16if not findtype "runebook" backpack and not findtype "runetome" backpack
17 overhead "We do not have a runebook or runetome" 34
18 stop
19endif
20
21
22if findlayer self righthand as item
23 @setvar! jase_recall_right_hand item
24endif
25
26if findlayer self lefthand as item
27 @setvar! jase_recall_left_hand item
28endif
29
30if not varexist myEscapePlan
31 if counttype "runebook" backpack = 1 and counttype "runetome" backpack = 0 and findtype "runebook" backpack as myBook
32 overhead "Automatically selected your one runebook" 88
33 @setvar myEscapePlan myBook
34 elseif counttype "runebook" backpack = 0 and counttype "runetome" backpack = 1 and findtype "runetome" backpack as myBook
35 overhead "Automatically selected your one runetome" 88
36 @setvar myEscapePlan myBook
37 else
38 overhead "Select your escape plan (runebook or runetome)" 88
39 @setvar myEscapePlan
40 endif
41endif
42
43if myEscapePlan = 0 or not find myEscapePlan backpack
44 unsetvar myEscapePlan
45 replay
46endif
47
48if mana < 12
49 overhead "Need more mana... trying again" 34
50 wait 500
51 replay
52endif
53
54
55
56@setvar! escapePlanUseMagery 0
57if skill "Magery" >= 60
58 if counttype "Black Pearl%s%" self >= 1 and counttype "Blood Moss" self >= 1 and counttype "Mandrake Root%s%" self >= 1
59 @setvar! escapePlanUseMagery 1
60 else
61 if findtype "reagent satchel" self as satchel
62 if counttype "Black Pearl%s%" satchel >= 1 and counttype "Blood Moss" satchel >= 1 and counttype "Mandrake Root%s%" satchel >= 1
63 @setvar! escapePlanUseMagery 1
64 endif
65 endif
66 if escapePlanUseMagery = 0
67 overhead "No regs, using scroll instead" 34
68 endif
69 endif
70endif
71
72
73getlabel myEscapePlan desc
74@setvar! escapePlanGumpId 1551740969
75@setvar! secondaryGumpResponse 0
76if "rune tome" in desc
77
78 if escapePlanUseMagery = 1
79 if recallHomeRunePosition = 1
80 @setvar! recallHomeGumpResponse 200
81 elseif recallHomeRunePosition = 2
82 @setvar! recallHomeGumpResponse 201
83 elseif recallHomeRunePosition = 3
84 @setvar! recallHomeGumpResponse 202
85 elseif recallHomeRunePosition = 4
86 @setvar! recallHomeGumpResponse 203
87 elseif recallHomeRunePosition = 5
88 @setvar! recallHomeGumpResponse 204
89 elseif recallHomeRunePosition = 6
90 @setvar! recallHomeGumpResponse 205
91 elseif recallHomeRunePosition = 7
92 @setvar! recallHomeGumpResponse 206
93 elseif recallHomeRunePosition = 8
94 @setvar! recallHomeGumpResponse 207
95 elseif recallHomeRunePosition = 9
96 @setvar! recallHomeGumpResponse 208
97 elseif recallHomeRunePosition = 10
98 @setvar! recallHomeGumpResponse 209
99 elseif recallHomeRunePosition = 11
100 @setvar! recallHomeGumpResponse 210
101 elseif recallHomeRunePosition = 12
102 @setvar! recallHomeGumpResponse 211
103 elseif recallHomeRunePosition = 13
104 @setvar! recallHomeGumpResponse 212
105 elseif recallHomeRunePosition = 14
106 @setvar! recallHomeGumpResponse 213
107 elseif recallHomeRunePosition = 15
108 @setvar! recallHomeGumpResponse 214
109 elseif recallHomeRunePosition = 16
110 @setvar! recallHomeGumpResponse 215
111 elseif recallHomeRunePosition = 16
112 @setvar! recallHomeGumpResponse 215
113 elseif recallHomeRunePosition = 17
114 @setvar! recallHomeGumpResponse 216
115 elseif recallHomeRunePosition = 18
116 @setvar! recallHomeGumpResponse 217
117 elseif recallHomeRunePosition = 19
118 @setvar! recallHomeGumpResponse 218
119 elseif recallHomeRunePosition = 20
120 @setvar! recallHomeGumpResponse 219
121 elseif recallHomeRunePosition = 21
122 @setvar! recallHomeGumpResponse 220
123 elseif recallHomeRunePosition = 22
124 @setvar! recallHomeGumpResponse 221
125 elseif recallHomeRunePosition = 23
126 @setvar! recallHomeGumpResponse 222
127 elseif recallHomeRunePosition = 24
128 @setvar! recallHomeGumpResponse 223
129 elseif recallHomeRunePosition = 25
130 @setvar! recallHomeGumpResponse 224
131 elseif recallHomeRunePosition = 26
132 @setvar! recallHomeGumpResponse 225
133 else
134 overhead "Update recallHomeRunePosition to 1 through 26" 34
135 wait 1000
136 replay
137 endif
138
139 if recallHomeGumpResponse = 201 or recallHomeGumpResponse = 203 or recallHomeGumpResponse = 205 or recallHomeGumpResponse = 207 or recallHomeGumpResponse = 209 or recallHomeGumpResponse = 211 or recallHomeGumpResponse = 213 or recallHomeGumpResponse = 215 or recallHomeGumpResponse = 217 or recallHomeGumpResponse = 219 or recallHomeGumpResponse = 221 or recallHomeGumpResponse = 223 or recallHomeGumpResponse = 223 or recallHomeGumpResponse = 225
140 @setvar! secondaryGumpResponse 20
141 else
142 @setvar! secondaryGumpResponse 10
143 endif
144 else
145 if recallHomeRunePosition = 1
146 @setvar! recallHomeGumpResponse 100
147 elseif recallHomeRunePosition = 2
148 @setvar! recallHomeGumpResponse 101
149 elseif recallHomeRunePosition = 3
150 @setvar! recallHomeGumpResponse 102
151 elseif recallHomeRunePosition = 4
152 @setvar! recallHomeGumpResponse 103
153 elseif recallHomeRunePosition = 5
154 @setvar! recallHomeGumpResponse 104
155 elseif recallHomeRunePosition = 6
156 @setvar! recallHomeGumpResponse 105
157 elseif recallHomeRunePosition = 7
158 @setvar! recallHomeGumpResponse 106
159 elseif recallHomeRunePosition = 8
160 @setvar! recallHomeGumpResponse 107
161 elseif recallHomeRunePosition = 9
162 @setvar! recallHomeGumpResponse 108
163 elseif recallHomeRunePosition = 10
164 @setvar! recallHomeGumpResponse 109
165 elseif recallHomeRunePosition = 11
166 @setvar! recallHomeGumpResponse 110
167 elseif recallHomeRunePosition = 12
168 @setvar! recallHomeGumpResponse 111
169 elseif recallHomeRunePosition = 13
170 @setvar! recallHomeGumpResponse 112
171 elseif recallHomeRunePosition = 14
172 @setvar! recallHomeGumpResponse 113
173 elseif recallHomeRunePosition = 15
174 @setvar! recallHomeGumpResponse 114
175 elseif recallHomeRunePosition = 16
176 @setvar! recallHomeGumpResponse 115
177 elseif recallHomeRunePosition = 16
178 @setvar! recallHomeGumpResponse 115
179 elseif recallHomeRunePosition = 17
180 @setvar! recallHomeGumpResponse 116
181 elseif recallHomeRunePosition = 18
182 @setvar! recallHomeGumpResponse 117
183 elseif recallHomeRunePosition = 19
184 @setvar! recallHomeGumpResponse 118
185 elseif recallHomeRunePosition = 20
186 @setvar! recallHomeGumpResponse 119
187 elseif recallHomeRunePosition = 21
188 @setvar! recallHomeGumpResponse 120
189 elseif recallHomeRunePosition = 22
190 @setvar! recallHomeGumpResponse 121
191 elseif recallHomeRunePosition = 23
192 @setvar! recallHomeGumpResponse 122
193 elseif recallHomeRunePosition = 24
194 @setvar! recallHomeGumpResponse 123
195 elseif recallHomeRunePosition = 25
196 @setvar! recallHomeGumpResponse 124
197 elseif recallHomeRunePosition = 26
198 @setvar! recallHomeGumpResponse 125
199 else
200 overhead "Update recallHomeRunePosition to 1 through 26" 34
201 wait 1000
202 replay
203 endif
204 endif
205
206
207 @setvar! escapePlanGumpId 167090027
208elseif "runebook" in desc
209
210 if escapePlanUseMagery = 1
211 if recallHomeRunePosition = 1
212 @setvar! recallHomeGumpResponse 5
213 elseif recallHomeRunePosition = 2
214 @setvar! recallHomeGumpResponse 11
215 elseif recallHomeRunePosition = 3
216 @setvar! recallHomeGumpResponse 17
217 elseif recallHomeRunePosition = 4
218 @setvar! recallHomeGumpResponse 23
219 elseif recallHomeRunePosition = 5
220 @setvar! recallHomeGumpResponse 29
221 elseif recallHomeRunePosition = 6
222 @setvar! recallHomeGumpResponse 35
223 elseif recallHomeRunePosition = 7
224 @setvar! recallHomeGumpResponse 41
225 elseif recallHomeRunePosition = 8
226 @setvar! recallHomeGumpResponse 47
227 elseif recallHomeRunePosition = 9
228 @setvar! recallHomeGumpResponse 53
229 elseif recallHomeRunePosition = 10
230 @setvar! recallHomeGumpResponse 59
231 elseif recallHomeRunePosition = 11
232 @setvar! recallHomeGumpResponse 65
233 elseif recallHomeRunePosition = 12
234 @setvar! recallHomeGumpResponse 71
235 elseif recallHomeRunePosition = 13
236 @setvar! recallHomeGumpResponse 77
237 elseif recallHomeRunePosition = 14
238 @setvar! recallHomeGumpResponse 83
239 elseif recallHomeRunePosition = 15
240 @setvar! recallHomeGumpResponse 89
241 elseif recallHomeRunePosition = 16
242 @setvar! recallHomeGumpResponse 95
243 else
244 overhead "Update recallHomeRunePosition to 1 through 16" 34
245 wait 1000
246 replay
247 endif
248
249 else
250 if recallHomeRunePosition = 1
251 @setvar! recallHomeGumpResponse 2
252 elseif recallHomeRunePosition = 2
253 @setvar! recallHomeGumpResponse 8
254 elseif recallHomeRunePosition = 3
255 @setvar! recallHomeGumpResponse 14
256 elseif recallHomeRunePosition = 4
257 @setvar! recallHomeGumpResponse 20
258 elseif recallHomeRunePosition = 5
259 @setvar! recallHomeGumpResponse 26
260 elseif recallHomeRunePosition = 6
261 @setvar! recallHomeGumpResponse 32
262 elseif recallHomeRunePosition = 7
263 @setvar! recallHomeGumpResponse 38
264 elseif recallHomeRunePosition = 8
265 @setvar! recallHomeGumpResponse 44
266 elseif recallHomeRunePosition = 9
267 @setvar! recallHomeGumpResponse 50
268 elseif recallHomeRunePosition = 10
269 @setvar! recallHomeGumpResponse 56
270 elseif recallHomeRunePosition = 11
271 @setvar! recallHomeGumpResponse 62
272 elseif recallHomeRunePosition = 12
273 @setvar! recallHomeGumpResponse 68
274 elseif recallHomeRunePosition = 13
275 @setvar! recallHomeGumpResponse 74
276 elseif recallHomeRunePosition = 14
277 @setvar! recallHomeGumpResponse 80
278 elseif recallHomeRunePosition = 15
279 @setvar! recallHomeGumpResponse 86
280 elseif recallHomeRunePosition = 16
281 @setvar! recallHomeGumpResponse 92
282 else
283 overhead "Update recallHomeRunePosition to 1 through 16" 34
284 wait 1000
285 replay
286 endif
287 endif
288else
289 overhead "Unknown escape plan" 34
290 unsetvar myEscapePlan
291 replay
292endif
293
294hotkey '> Interrupt'
295while targetexists
296 hotkey 'Cancel Current Target'
297 wait 200
298endwhile
299
300while not gumpexists escapePlanGumpId
301 dclick myEscapePlan
302 wait 200
303endwhile
304gumpresponse recallHomeGumpResponse escapePlanGumpId
305if secondaryGumpResponse > 0
306 waitforgump escapePlanGumpId 5000
307 gumpresponse secondaryGumpResponse escapePlanGumpId
308endif
309wait 200
310gumpclose escapePlanGumpId
311if insysmsg "There are no charges left on that item."
312 overhead "Oh no! Out of charges!" 34
313endif
314
315
316if varexist jase_recall_right_hand and not findlayer self righthand and jase_recall_right_hand != 0
317 overhead "will requip hands in 2 seconds" 88
318 wait 2200
319elseif varexist jase_recall_left_hand and not findlayer self lefthand and jase_recall_left_hand != 0
320 overhead "will requip hands in 2 seconds" 88
321 wait 2200
322endif
323
324
325if varexist jase_recall_right_hand
326 if not findlayer self righthand and jase_recall_right_hand != 0
327 dclick jase_recall_right_hand
328 wait 650
329 endif
330endif
331
332if varexist jase_recall_left_hand
333 if not findlayer self lefthand and jase_recall_left_hand != 0
334 dclick jase_recall_left_hand
335 wait 650
336 endif
337endif
338
339if name = "of Time"
340 hotkey "Play Script: Utility\InnRoom\index"
341endif