Back to "treasure mapping" tags

Witcher Tome Auto Teleporter by jfrostp

Description: Automatically finds the correct Witcher tome and rune to recall to using nearby rune tomes

1# This script recalls using nearby Witcher tomes
2# To make the script run faster, set your own witcher tome serial numbers instead of using the nearby tome search
3# Your tomes must have the name "witcher" or "Witcher" in them, and must be numbered like "1-5", "1 - 5", or "1 to 5" (e.g. Witcher Tome 1-22a or Witcher Tome 23 to 47)
4#------------------------------------------------------------------
5#------------------------------------------------------------------
6
7# SET YOUR RUNE HERE
8setvar! rune 123
9# CHANGE THIS TO 1 IF THE RUNE # ENDS IN "a", OTHERWISE LEAVE AS 0
10setvar! runeHasASuffix 0
11
12#------------------------------------------------------------------
13#------------------------------------------------------------------
14#------------------------------------------------------------------
15# Set this to 1 if you want to use regs instead of recall scrolls
16setvar! useMageryInsteadOfScrolls 1
17
18setvar! isFrostsHouse 0
19setvar! isEEGuildhouse 0
20
21setvar! pingDelay 100
22setvar! runebook 0
23setvar! slot 0
24setvar! checkbox 0
25setvar! page 0
26
27if isFrostsHouse = 0 and isEEGuildhouse = 0
28    # Find nearby tomes
29    while findtype 29103 true as tome
30        getlabel tome tomeName
31        if "itcher" in tomeName
32            if " 1-" in tomeName or " 1 -" in tomeName or " 1 to" in tomeName
33                setvar! 1to22 tome
34            elseif " 23-" in tomeName or " 23 -" in tomeName or " 23 to" in tomeName
35                setvar! 23to47 tome
36            elseif " 48-" in tomeName or " 48 -" in tomeName or " 48 to" in tomeName
37                setvar! 48to68 tome
38            elseif " 69-" in tomeName or " 69 -" in tomeName or " 69 to" in tomeName
39                setvar! 69to92 tome
40            elseif " 93-" in tomeName or " 93 -" in tomeName or " 93 to" in tomeName
41                setvar! 93to114 tome
42            elseif " 115-" in tomeName or " 115 -" in tomeName or " 115 to" in tomeName
43                setvar! 115to140 tome
44            elseif " 141-" in tomeName or " 141 -" in tomeName or " 141 to" in tomeName
45                setvar! 141to161 tome
46            elseif " 162-" in tomeName or " 162 -" in tomeName or " 162 to" in tomeName
47                setvar! 162to181 tome
48            elseif " 182-" in tomeName or " 182 -" in tomeName or " 182 to" in tomeName
49                setvar! 182to205 tome
50            elseif " 206-" in tomeName or " 206 -" in tomeName or " 206 to" in tomeName
51                setvar! 206to230 tome
52            elseif " 231-" in tomeName or " 231 -" in tomeName or " 231 to" in tomeName
53                setvar! 231to249 tome
54            elseif " 250-" in tomeName or " 250 -" in tomeName or " 250 to" in tomeName
55                setvar! 250to275 tome
56            elseif " 276-" in tomeName or " 276 -" in tomeName or " 276 to" in tomeName
57                setvar! 276to301 tome
58            elseif " 302-" in tomeName or " 302 -" in tomeName or " 302 to" in tomeName
59                setvar! 302to327 tome
60            elseif " 328-" in tomeName or " 328 -" in tomeName or " 328 to" in tomeName
61                setvar! 328to353 tome
62            endif
63        endif
64        ignore! tome
65    endwhile
66    clearignore
67elseif isFrostsHouse = 1
68    setvar! 1to22 0x45848ED6
69    setvar! 23to47 0x45849B50
70    setvar! 48to68 0x45D97A36
71    setvar! 69to92 0x45D99BE9
72    setvar! 93to114 0x45FDA32D
73    setvar! 115to140 0x45FD9ED4
74    setvar! 141to161 0x45D9849B
75    setvar! 162to181 0x45D97ED8
76    setvar! 182to205 0x45FDBC4A
77    setvar! 206to230 0x45FDB85D
78    setvar! 231to249 0x4C65F109
79    setvar! 250to275 0x557C1443
80    setvar! 276to301 0x4C65D714
81    setvar! 302to327 0x4D5DF949
82    setvar! 328to353 0x4D602108
83elseif isEEGuildhouse = 1
84    setvar! 1to22 0x4A0FE582
85    setvar! 23to47 0x4A101116
86    setvar! 48to68 0x4A10075D
87    setvar! 69to92 0x4A0FDF2C
88    setvar! 93to114 0x4A100C4E
89    setvar! 115to140 0x4A0FD875
90    setvar! 141to161 0x4A0FF597
91    setvar! 162to181 0x4A0FEB11
92    setvar! 182to205 0x4A10022C
93    setvar! 206to230 0x4A0FFCCF
94    setvar! 231to249 0x4A0FF06F
95    setvar! 250to275 0x4A39A7DA
96    setvar! 276to301 0x4A39B6A2
97    setvar! 302to327 0x4A39A7DA
98    setvar! 328to353 0x4A39B6A2
99endif
100
101if rune = 1 or rune = 2 or rune = 3 or rune = 4 or rune = 5 or rune = 6 or rune = 7 or rune = 8 or rune = 9 or rune = 10 or rune = 11 or rune = 12 or rune = 13 or rune = 14 or rune = 15 or rune = 16 or rune = 17 or rune = 18 or rune = 19 or rune = 20 or rune = 21 or rune = 22
102    setvar! runebook 1to22
103elseif rune = 23 or rune = 24 or rune = 25 or rune = 26 or rune = 27 or rune = 28 or rune = 29 or rune = 30 or rune = 31 or rune = 32 or rune = 33 or rune = 34 or rune = 35 or rune = 36 or rune = 37 or rune = 38 or rune = 39 or rune = 40 or rune = 41 or rune = 42 or rune = 43 or rune = 44 or rune = 45 or rune = 46 or rune = 47
104    setvar! runebook 23to47
105elseif rune = 48 or rune = 49 or rune = 50 or rune = 51 or rune = 52 or rune = 53 or rune = 54 or rune = 55 or rune = 56 or rune = 57 or rune = 58 or rune = 59 or rune = 60 or rune = 61 or rune = 62 or rune = 63 or rune = 64 or rune = 65 or rune = 66 or rune = 67 or rune = 68
106    setvar! runebook 48to68
107elseif rune = 69 or rune = 70 or rune = 71 or rune = 72 or rune = 73 or rune = 74 or rune = 75 or rune = 76 or rune = 77 or rune = 78 or rune = 79 or rune = 80 or rune = 81 or rune = 82 or rune = 83 or rune = 84 or rune = 85 or rune = 86 or rune = 87 or rune = 88 or rune = 89 or rune = 90 or rune = 91 or rune = 92
108    setvar! runebook 69to92
109elseif rune = 93 or rune = 94 or rune = 95 or rune = 96 or rune = 97 or rune = 98 or rune = 99 or rune = 100 or rune = 101 or rune = 102 or rune = 103 or rune = 104 or rune = 105 or rune = 106 or rune = 107 or rune = 108 or rune = 109 or rune = 110 or rune = 111 or rune = 112 or rune = 113 or rune = 114
110    setvar! runebook 93to114
111elseif rune = 115 or rune = 116 or rune = 117 or rune = 118 or rune = 119 or rune = 120 or rune = 121 or rune = 122 or rune = 123 or rune = 124 or rune = 125 or rune = 126 or rune = 127 or rune = 128 or rune = 129 or rune = 130 or rune = 131 or rune = 132 or rune = 133 or rune = 134 or rune = 135 or rune = 136 or rune = 137 or rune = 138 or rune = 139 or rune = 140
112    setvar! runebook 115to140
113elseif rune = 141 or rune = 142 or rune = 143 or rune = 144 or rune = 145 or rune = 146 or rune = 147 or rune = 148 or rune = 149 or rune = 150 or rune = 151 or rune = 152 or rune = 153 or rune = 154 or rune = 155 or rune = 156 or rune = 157 or rune = 158 or rune = 159 or rune = 160 or rune = 161
114    setvar! runebook 141to161
115elseif rune = 162 or rune = 163 or rune = 164 or rune = 165 or rune = 166 or rune = 167 or rune = 168 or rune = 169 or rune = 170 or rune = 171 or rune = 172 or rune = 173 or rune = 174 or rune = 175 or rune = 176 or rune = 177 or rune = 178 or rune = 179 or rune = 180 or rune = 181
116    setvar! runebook 162to181
117elseif rune = 182 or rune = 183 or rune = 184 or rune = 185 or rune = 186 or rune = 187 or rune = 188 or rune = 189 or rune = 190 or rune = 191 or rune = 192 or rune = 193 or rune = 194 or rune = 195 or rune = 196 or rune = 197 or rune = 198 or rune = 199 or rune = 200 or rune = 201 or rune = 202 or rune = 203 or rune = 204 or rune = 205
118    setvar! runebook 182to205
119elseif rune = 206 or rune = 207 or rune = 207 or rune = 208 or rune = 209 or rune = 210 or rune = 211 or rune = 212 or rune = 213 or rune = 214 or rune = 215 or rune = 216 or rune = 217 or rune = 218 or rune = 219 or rune = 220 or rune = 221 or rune = 222 or rune = 223 or rune = 224 or rune = 225 or rune = 226 or rune = 227 or rune = 228 or rune = 229 or rune = 230
120    setvar! runebook 206to230
121elseif rune = 231 or rune = 232 or rune = 233 or rune = 234 or rune = 235 or rune = 236 or rune = 237 or rune = 238 or rune = 239 or rune = 240 or rune = 241 or rune = 242 or rune = 243 or rune = 244 or rune = 245 or rune = 246 or rune = 247 or rune = 248 or rune = 249
122    setvar! runebook 231to249
123elseif rune = 250 or rune = 251 or rune = 252 or rune = 253 or rune = 254 or rune = 255 or rune = 256 or rune = 257 or rune = 258 or rune = 259 or rune = 260 or rune = 261 or rune = 262 or rune = 263 or rune = 264 or rune = 265 or rune = 266 or rune = 267 or rune = 268 or rune = 269 or rune = 270 or rune = 271 or rune = 272 or rune = 273 or rune = 274 or rune = 275
124    setvar! runebook 250to275
125elseif rune = 276 or rune = 277 or rune = 278 or rune = 279 or rune = 280 or rune = 281 or rune = 282 or rune = 283 or rune = 284 or rune = 285 or rune = 286 or rune = 287 or rune = 288 or rune = 289 or rune = 290 or rune = 291 or rune = 292 or rune = 293 or rune = 294 or rune = 295 or rune = 296 or rune = 297 or rune = 298 or rune = 299 or rune = 300 or rune = 301
126    setvar! runebook 276to301
127elseif rune = 302 or rune = 303 or rune = 304 or rune = 305 or rune = 306 or rune = 307 or rune = 308 or rune = 309 or rune = 310 or rune = 311 or rune = 312 or rune = 313 or rune = 314 or rune = 315 or rune = 316 or rune = 317 or rune = 318 or rune = 319 or rune = 320 or rune = 321 or rune = 322 or rune = 323 or rune = 324 or rune = 325 or rune = 326 or rune = 327
128    setvar! runebook 302to327
129else
130    setvar! runebook 328to353
131endif
132
133if     rune = 328 or rune = 302 or rune = 276 or rune = 250 or rune = 231 or rune = 206 or rune = 182 or rune = 162 or rune = 141 or rune = 115 or rune = 93 or rune = 69 or rune = 48 or rune = 23 or rune = 1
134    setvar! slot 100
135    setvar! checkbox 200
136    setvar! page 1
137elseif rune = zzz or rune = 303 or rune = 277 or rune = 251 or rune = 232 or rune = 207 or rune = 183 or rune = 163 or rune = 142 or rune = 116 or rune = 94 or rune = 70 or rune = 49 or rune = 24 or rune = 2
138    setvar! slot 101
139    setvar! checkbox 201
140    setvar! page 2
141elseif rune = 330 or rune = 304 or rune = 278 or rune = 252 or rune = 233 or rune = 208 or rune = 184 or rune = 164 or rune = 143 or rune = 117 or rune = 95 or rune = 71 or rune = 50 or rune = 25 or rune = 3
142    setvar! slot 102
143    setvar! checkbox 202
144    setvar! page 1 
145elseif rune = 331 or rune = 305  or rune = 279 or rune = 253 or rune = 234 or rune = 209 or rune = 185 or rune = 165 or rune = 144 or rune = 118 or rune = 96 or rune = 72 or rune = 51 or rune = 26 or rune = 4
146    setvar! slot 103
147    setvar! checkbox 203
148    setvar! page 2
149elseif rune = 332 or rune = 306 or rune = 280 or rune = 254 or rune = 235 or rune = 210 or rune = 186 or rune = 166 or rune = 145 or rune = 119 or rune = 97 or rune = 73 or rune = 52 or rune = 27 or rune = 4
150    setvar! slot 104
151    setvar! checkbox 204
152    setvar! page 1
153elseif rune = 333 or rune = 307 or rune = 281 or rune = 255 or rune = 236 or rune = 211 or rune = 187 or rune = 167 or rune = 146 or rune = 120 or rune = 98 or rune = 74 or rune = 53 or rune = 28 or rune = 5
154    setvar! slot 105
155    setvar! checkbox 205
156    setvar! page 2
157elseif rune = 334 or rune = 308 or rune = 282 or rune = 256 or rune = 237 or rune = 212 or rune = 188 or rune = 168 or rune = 147 or rune = 121 or rune = 99 or rune = 75 or rune = 54 or rune = 29 or rune = 6
158    setvar! slot 106
159    setvar! checkbox 206
160    setvar! page 1
161elseif rune = 335 or rune = 309 or rune = 283 or rune = 257 or rune = 238 or rune = 213 or rune = 189 or rune = 169 or rune = 148 or rune = 122 or rune = 100 or rune = 76 or rune = 55 or rune = 30 or rune = 7
162    setvar! slot 107
163    setvar! checkbox 207
164    setvar! page 2
165elseif rune = 336 or rune = 310 or rune = 284 or rune = 258 or rune = 239 or rune = 214 or rune = 190 or rune = 170 or rune = 149 or rune = 123 or rune = 101 or rune = 77 or rune = 56 or rune = 31 or rune = 8
166    setvar! slot 108
167    setvar! checkbox 208
168    setvar! page 1
169elseif rune = 337 or rune = 311 or rune = 285 or rune = 259 or rune = 240 or rune = 215 or rune = 191 or rune = 171 or rune = 150 or rune = 124 or rune = 102 or rune = 78 or rune = 57 or rune = 32 or rune = 9
170    setvar! slot 109
171    setvar! checkbox 209
172    setvar! page 2
173elseif rune = 338 or rune = 312 or rune = 286 or rune = 260 or rune = 241 or rune = 216 or rune = 192 or rune = 172 or rune = 151 or rune = 125 or rune = 103 or rune = 79 or rune = 58 or rune = 33 or rune = 10
174    setvar! slot 110
175    setvar! checkbox 210
176    setvar! page 1
177elseif rune = 339 or rune = 313 or rune = 287 or rune = 261 or rune = 242 or rune = 217 or rune = 193 or rune = 173 or rune = 152 or rune = 126 or rune = 104 or rune = 80 or rune = 59 or rune = 34 or rune = 11
178    setvar! slot 111
179    setvar! checkbox 211
180    setvar! page 2
181elseif rune = 340 or rune = 314 or rune = 288 or rune = 262 or rune = 243 or rune = 218 or rune = 194 or rune = 174 or rune = 153 or rune = 127 or rune = 104 or rune = 80 or rune = 60 or rune = 35 or rune = 12
182    setvar! slot 112
183    setvar! checkbox 212
184    setvar! page 1
185elseif rune = 341 or rune = 315 or rune = 289 or rune = 263 or rune = 244 or rune = 219 or rune = 195 or rune = 175 or rune = 154 or rune = 128 or rune = 105 or rune = 81 or rune = 61 or rune = 36 or rune = 13
186    setvar! slot 113
187    setvar! checkbox 213
188    setvar! page 2
189elseif rune = 342 or rune = 316 or rune = 290 or rune = 264 or rune = 245 or rune = 220 or rune = 196 or rune = 176 or rune = 155 or rune = 129 or rune = 106 or rune = 81 or rune = 62 or rune = 37 or rune = 14
190    setvar! slot 114
191    setvar! checkbox 214
192    setvar! page 1
193elseif rune = 343 or rune = 317 or rune = 291 or rune = 265 or rune = 246 or rune = 221 or rune = 197 or rune = 177 or rune = 156 or rune = 130 or rune = 107 or rune = 82 or rune = 63 or rune = 38 or rune = 15
194    setvar! slot 115
195    setvar! checkbox 215
196    setvar! page 2
197elseif rune = 344 or rune = 318 or rune = 292 or rune = 266 or rune = 247 or rune = 222 or rune = 198 or rune = 178 or rune = 157 or rune = 131 or rune = 108 or rune = 83 or rune = 64 or rune = 39 or rune = 16
198    setvar! slot 116
199    setvar! checkbox 216
200    setvar! page 1
201elseif rune = 345 or rune = 319 or rune = 293 or rune = 267 or rune = 248 or rune = 223 or rune = 199 or rune = 179 or rune = 158 or rune = 132 or rune = 109 or rune = 84 or rune = 65 or rune = 40 or rune = 17
202    setvar! slot 117
203    setvar! checkbox 217
204    setvar! page 2
205elseif rune = 346 or rune = 320 or rune = 294 or rune = 268 or rune = 249 or rune = 224 or rune = 200 or rune = 180 or rune = 159 or rune = 133 or rune = 110 or rune = 85 or rune = 66 or rune = 41 or rune = 18
206    setvar! slot 118
207    setvar! checkbox 218
208    setvar! page 1
209elseif rune = 347 or rune = 321 or rune = 295 or rune = 269 or               rune = 225 or rune = 201 or rune = 181 or rune = 160 or rune = 134 or rune = 111 or rune = 86 or rune = 67 or rune = 42 or rune = 19
210    setvar! slot 119
211    setvar! checkbox 219
212    setvar! page 2
213elseif rune = 348 or rune = 322 or rune = 296 or rune = 270 or               rune = 226 or rune = 202               or rune = 161 or rune = 135 or rune = 112 or rune = 87 or rune = 68 or rune = 43 or rune = 20
214    setvar! slot 120
215    setvar! checkbox 220
216    setvar! page 1
217elseif rune = 349 or rune = 323 or rune = 297 or rune = 271 or               rune = 227 or rune = 203                             or rune = 136 or rune = 113 or rune = 88              or rune = 44 or rune = 21
218    setvar! slot 121
219    setvar! checkbox 221
220    setvar! page 2
221elseif rune = 350 or rune = 324 or rune = 298 or rune = 272 or               rune = 228 or rune = 204                         or rune = 137 or rune = 114 or rune = 89              or rune = 44 or rune = 22
222    setvar! slot 122
223    setvar! checkbox 222
224    setvar! page 1
225elseif rune = 351 or rune = 325 or rune = 299 or rune = 273 or               rune = 229 or rune = 205                             or rune = 138               or rune = 90              or rune = 45 or rune = 22
226    setvar! slot 123
227    setvar! checkbox 223
228    setvar! page 2
229elseif rune = 352 or rune = 326 or rune = 300 or rune = 274 or               rune = 230                                           or rune = 139               or rune = 91              or rune = 46
230    setvar! slot 124
231    setvar! checkbox 224
232    setvar! page 1
233elseif rune = 353 or rune = 327 or rune = 301 or rune = 275 or                                                                       rune = 140               or rune = 92              or rune = 47
234    setvar! slot 125
235    setvar! checkbox 225
236    setvar! page 2
237endif
238
239if runeHasASuffix = 1
240    if rune = 104
241        setvar! runebook 93to114
242        setvar! slot 112
243        setvar! checkbox 212
244        setvar! page 1
245    elseif rune = 4 or rune = 22
246        setvar! runebook 1to22
247        if rune = 4
248            setvar! slot 104
249            setvar! checkbox 204
250            setvar! page 1
251        else
252            setvar! slot 123
253            setvar! checkbox 223
254            setvar! page 2
255        endif
256    elseif rune = 80
257        setvar! runebook 69to92
258        setvar! slot 112
259        setvar! checkbox 212
260        setvar! page 1
261    elseif rune = 81
262        setvar! runebook 69to92
263        setvar! slot 114
264        setvar! checkbox 214
265        setvar! page 1
266    elseif rune = 44
267        setvar! runebook 23to47
268        setvar! slot 122
269        setvar! checkbox 222
270        setvar! page 1
271    endif
272endif
273
274dclick runebook
275waitforgump 167090027
276wait pingDelay
277if useMageryInsteadOfScrolls = 1
278    gumpresponse checkbox
279    waitforgump 167090027
280    wait pingDelay
281    if page = 1
282        gumpresponse 10
283    else
284        gumpresponse 20
285    endif
286else
287    gumpresponse slot
288endif
289#overhead slot