Flu Mining by flutschi
Related: Mining
1#its basescript is jasonowns one, just edited for my taste
2
3#create the cooldown 'summons' for keeping up the elementals!
4#create cooldown 'afk' and 'walk' (walk needs to be set to walk in the settings!)
5
6hotkey 'cancel current target'
7
8@setvar! enableRecall 1
9@setvar! enableSummons 0
10@setvar! enableAFK 1
11
12# use >info on ur woodbag and copy the serial and insert into line 12
13@setvar! woodBag 0x49B39EA9
14
15@setvar! hatchet 3908
16@setvar! pickaxe 3718
17
18@setvar! tool hatchet
19# 7127 for logs (aka lumber) and 6585 for ore (aka miner)
20@setvar! ressources 6585
21
22clearsysmsg
23
24#this is when u want to summon something
25while casting
26 overhead 'casting..'
27 pause 1000
28endwhile
29
30
31if rhandempty ?? 0
32 if findtype "pickaxe" backpack
33 dclicktype 'pickaxe' backpack
34 wait 500
35 endif
36endif
37
38if rhandempty ?? 0
39 overhead "No more pickaxe!" 34
40 wait 500
41 replay
42endif
43
44# Smelter Part
45
46if findtype "forge" ground -1 -1 12 as forge
47 overhead "Forge..." 88 forge
48endif
49
50# AFK PART
51
52@setvar! afkTime 180000
53@setvar! afkAlert 24000
54@setvar! afkTooLong 5000
55
56if enableAFK = 1
57
58 if cooldown 'afk' < 500
59 cooldown 'afk' afkTime
60 endif
61
62 if cooldown 'walk'
63 cooldown 'afk' afkTime
64 endif
65
66 if cooldown 'afk' < afkAlert
67 overhead 'timer runs out..' 33
68 dclicktype 3834 backpack
69 pause 1500
70 endif
71
72 if cooldown 'afk' < afkTooLong
73 overhead 'afk too long..' 33
74
75 #use runebook
76 dclicktype 8901 backpack
77 waitforgump 1551740969
78 gumpresponse 5
79
80 stop
81
82 script 'recallHome'
83 stop
84 endif
85
86endif
87
88
89# different Chars stuff
90
91if name == 'Flu Miner'
92 @setvar! woodBag 0x49B39EA9
93endif
94if name == 'Flu Logger'
95 @setvar! woodBag 0x44CC0C8C
96endif
97if name == 'Flutschi'
98 @setvar! woodBag 0x40FFC28F
99endif
100if name == 'Flu Log'
101 @setvar! woodBag 0x46281849
102endif
103
104if findtype 7133 backpack as log
105 lift log 999
106 drop woodBag -1 -1 -1
107 pause 200
108endif
109
110if findtype 7133 backpack as log
111 dclick log
112endif
113
114# check for summons
115
116#casttime with summoners tome is 2500, else put 5000
117@setvar! castTime 5200
118
119if enableSummons = 1
120
121 if followers < 1 or cooldown 'summons' < 60000 and mana > 50
122 cast 'Earth Elemental'
123 pause castTime
124 pause 500
125 say 'all guard me'
126 cooldown 'summons' 600000
127 endif
128
129endif
130
131
132# ANTI Thieves
133
134clearignore
135
136if counttype 7127 woodBag 0 > 50
137 overhead 'sorting..'
138 while findtype 3705 backpack 38 as pouch
139 if findtype 7127 woodBag 0 as log
140 lift log 10
141 drop pouch -1 -1 -1
142 pause 700
143 endif
144 ignore pouch
145 endwhile
146endif
147
148clearignore
149
150if counttype 7127 woodBag 2419 > 50
151 overhead 'sorting..'
152 while findtype 3705 backpack 38 as pouch
153 if findtype 7127 woodBag 2419 as log
154 lift log 10
155 drop pouch -1 -1 -1
156 pause 700
157 endif
158 ignore pouch
159 endwhile
160endif
161
162clearignore
163
164if counttype 7127 woodBag 2406 > 50
165 overhead 'sorting..'
166 while findtype 3705 backpack 38 as pouch
167 if findtype 7127 woodBag 2406 as log
168 lift log 10
169 drop pouch -1 -1 -1
170 pause 700
171 endif
172 ignore pouch
173 endwhile
174endif
175
176clearignore
177
178if counttype 7127 woodBag 2413 > 50
179 overhead 'sorting..'
180 while findtype 3705 backpack 38 as pouch
181 if findtype 7127 woodBag 2413 as log
182 lift log 10
183 drop pouch -1 -1 -1
184 pause 700
185 endif
186 ignore pouch
187 endwhile
188endif
189
190clearignore
191
192if counttype 7127 woodBag 2418 > 50
193 overhead 'sorting..'
194 while findtype 3705 backpack 38 as pouch
195 if findtype 7127 woodBag 2418 as log
196 lift log 10
197 drop pouch -1 -1 -1
198 pause 700
199 endif
200 ignore pouch
201 endwhile
202endif
203
204clearignore
205
206if counttype 7127 woodBag 2213 > 50
207 overhead 'sorting..'
208 while findtype 3705 backpack 38 as pouch
209 if findtype 7127 woodBag 2213 as log
210 lift log 10
211 drop pouch -1 -1 -1
212 pause 700
213 endif
214 ignore pouch
215 endwhile
216endif
217
218clearignore
219
220if counttype 7127 woodBag 2425 > 50
221 overhead 'sorting..'
222 while findtype 3705 backpack 38 as pouch
223 if findtype 7127 woodBag 2425 as log
224 lift log 10
225 drop pouch -1 -1 -1
226 pause 700
227 endif
228 ignore pouch
229 endwhile
230endif
231
232clearignore
233
234if counttype 7127 woodBag 2207 > 50
235 overhead 'sorting..'
236 while findtype 3705 backpack 38 as pouch
237 if findtype 7127 woodBag 2207 as log
238 lift log 10
239 drop pouch -1 -1 -1
240 pause 700
241 endif
242 ignore pouch
243 endwhile
244endif
245
246clearignore
247
248if counttype 7127 woodBag 2219 > 50
249 overhead 'sorting..'
250 while findtype 3705 backpack 38 as pouch
251 if findtype 7127 woodBag 2219 as log
252 lift log 10
253 drop pouch -1 -1 -1
254 pause 700
255 endif
256 ignore pouch
257 endwhile
258endif
259
260clearignore
261
262if counttype 7127 woodBag 1763 > 50
263 overhead 'sorting..'
264 while findtype 3705 backpack 38 as pouch
265 if findtype 7127 woodBag 1763 as log
266 lift log 10
267 drop pouch -1 -1 -1
268 pause 700
269 endif
270 ignore pouch
271 endwhile
272endif
273
274clearignore
275
276#tracking!
277
278
279if not findbuff 'tracking'
280 overhead 'i should track..'
281
282 while not gumpexists 4267467659
283 useskill 'tracking'
284 wait 250
285 endwhile
286
287 if gumpexists 4267467659
288 while not insysmsg "You will now hunt all hostile players."
289 gumpresponse 8 4267467659
290 waitforgump 4267467659 5000
291 endwhile
292 gumpresponse 6 4267467659
293 wait 1000
294 clearsysmsg
295 endif
296 gumpclose 4267467659
297endif
298
299#protection!
300
301if not findbuff 'Magic Reflection'
302 cast 'Magic Reflection'
303 pause 3000
304endif
305
306
307#start chopping
308
309wait 500
310overhead 'Mining' 0
311hotkey 'Use item in hand'
312for 75
313 wait 100
314
315 if enableRecall = 1
316 if insysmsg 'Now tracking' or insysmsg 'Distance'
317 #use runebook
318 dclicktype 8901 backpack
319 waitforgump 1551740969
320 gumpresponse 5
321
322 stop
323
324 #this would be if you have my other script.
325 script 'recallHome'
326 stop
327 endif
328 endif
329
330 if cooldown 'walk'
331 cooldown 'afk' afkTime
332 endif
333
334 if cooldown 'afk' < 18000
335 overhead 'timer runs out..' 33
336 dclicktype 3834 backpack
337 pause 1500
338 endif
339
340 if cooldown 'afk' < 3000
341 overhead 'afk too long..' 33
342 guild 'afk too long..'
343 script 'recallHome'
344 stop
345 endif
346
347 if insysmsg 'world is saving'
348 for 30
349 overhead 'Waiting for world save...'
350 wait 1000
351 if insysmsg 'save complete'
352 overhead 'Save complete - continue on!' 88
353 clearsysmsg
354 wait 250
355 replay
356 endif
357 endfor
358 elseif rhandempty ?? 0
359 overhead "Broke axe" 34
360 replay
361 elseif insysmsg 'You do not see any'
362 overhead 'Move to next spot' 88
363 wait 250
364 replay
365 elseif insysmsg "travel"
366 overhead 'Waiting for travel...'
367 wait 1000
368 replay
369 else
370 if insysmsg "any harvestable"
371 overhead 'Move to next spot' 88
372 replay
373 elseif insysmsg "skillgain" or insysmsg "harvesting is not allowed"
374 replay
375 elseif insysmsg "world is saving" or insysmsg 'World save complete'
376 replay
377 elseif insysmsg "You hack"
378 replay
379 elseif insysmsg "You chop"
380 replay
381 elseif insysmsg "You must wait"
382 overhead 'You must wait..' 34
383 wait 500
384 replay
385 endif
386 endif
387endfor
388
389if insysmsg "You must wait"
390 wait 500
391 replay
392endif
393
394
395overhead 'Stopping script' 34
396replay