Back to "musicianship" tags

SenorBorracho by .dave5678

1# Jaseowns scrip edited by Hellzy, includes pet check protection, a few escapes due to poisoning and healing- additional usage of flamestrike. Untested with mindblast.
2# One hotkey mage cycle, nox, poison by Jaseowns 
3# UO Outlands - https://outlands.uorazorscripts.com/mage-bot
4# 
5# Cooldowns are live, so this script now attempts to display those
6# Make cooldowns match the names of skills 
7# (check out for details: https://outlands.uorazorscripts.com/mage-bot)
8#
9# VERISON: v2.2.2
10#
11# 
12// 1/15/2024 - SenorBorracho
13// - fixed discord buff and kill target discordance   
14// 12/26/2022
15// - updated poison strike and how it deals with poison
16// - added earth elemental as pet only instead of mummy
17// 12/21/2022
18// - fixed bug with mindblast and two lich summons
19// 12/17/2022
20// - V2 of AutoBot created.  Idea is to leverage things from mining script
21##################
22## Always room for improvment, thanks for watching!
23############
24
25# Set this to one, if you want to cast poison once no matter what
26# If you have 100 poisoning and want Lethal, set this to 0
27@setvar! castPoisonAnyway 0
28
29# This will auto replay this script if you want it too
30@setvar! autoBotEnabled 1
31
32# Update this variable to 1 for ALL KILL
33# Update this variable to 0 for target nearest
34@setvar! setThisAsOneIfYouWantToTargetYourOwnKillOrItWillTargetClosestMonster 0
35
36###############
37###  Choose your summons
38######
39@setvar! castSummonFireElementalCount 1
40@setvar! castSummonCreatureCount 1
41@setvar! castSummonEarthElementalCount 1
42@setvar! castSummonEarthElementalAsMummy 1
43
44
45
46###############
47###  Choose your spells
48######
49@setvar! castCurse 0
50@setvar! castManadrain 1
51@setvar! castLightning 0
52@setvar! castFireball 0
53@setvar! castHarm 1
54@setvar! castMagicArrow 1
55# When other spells are on cooldown, do you want to cast MindBlast or Flamestrike or both
56@setvar! castMindBlast 0
57@setvar! castFlamestrike 1
58
59### Buffs
60@setvar! castBless 1
61@setvar! castMagicShield 1
62@setvar! castReactiveArmor 1
63# Drink Magic resist potion (only if magic shield buff not found)
64@setvar! drinkMagicResistPot 1
65
66###############
67###  Choose your necro spells (ignored if less then required necro skill)
68######
69@setvar! castEvilOmen 1
70@setvar! castCorpseSkin 1
71@setvar! castVampiricEmbrace 0
72@setvar! castMindRot 1
73@setvar! castPoisonStrike 1
74@setvar! castBloodOath 1
75@setvar! castPainSpike 1
76@setvar! requireWitherBeforeSummons 0
77
78###############
79### Edit these cooldowns to match your wizard grimoire
80######
81@setvar! canYouMakeAMushroom 1
82@setvar! cdLightning 60000
83@setvar! cdMagicArrow 60000
84@setvar! cdHarm 60000
85@setvar! cdFireball 60000
86
87###############
88### Necro Cooldowns
89######
90@setvar! cdEvilOmen 30500
91@setvar! cdVampiricEmbrace 30500
92@setvar! cdCorpseSkin 30500
93@setvar! cdMindRot 30500
94@setvar! cdWither 30500
95@setvar! cdVengefulSpirit 30500
96@setvar! cdBloodOath 30500
97@setvar! cdPainSpike 30500
98@setvar! cdPoisonStrike 30500
99
100
101#### Buff Cooldowns
102@setvar! cdMushroom 61000
103@setvar! cdMagicShield 61000
104@setvar! cdReactiveArmor 61000
105@setvar! cdMeditation 10000
106@setvar! cdMeditationMini 3000
107@setvar! cdKillTarget 60000
108
109#### Random cooldowns
110@setvar! cdPreventOverheadSpam 2000
111
112#### Mushroom count (I like a lot of shroomies)
113@setvar! makeThisManyMushroomsCount 15
114@setvar! butOnlyIHaveLessThenThisCount 5
115
116@setvar! patrolPetEvenIfLastTargetIsBeyondEightTiles 1
117
118if counttype "gold coin" backpack as total
119    if 10000 < total
120        overhead "Warning: {{total}} gold!" 34
121    endif
122endif
123
124if findtype "dungeon torch" backpack as item
125    overhead "Holy crap!" 88    
126    say "I got one!" 88
127    overhead "I got one!" 88
128elseif findtype 30580 backpack as item
129    overhead "Holy crap!" 88    
130    say "I got one!" 88
131    overhead "I got one!" 88
132endif
133    
134
135#### Pet Names, unique to you
136if not listexists petNameList
137    createlist petNameList
138endif
139if list petNameList = 0
140    pushlist petNameList "dude"
141    pushlist petNameList "bro"
142endif
143
144
145##################################################################
146# 
147#   Hopefully you do not have to edit after this :)
148#
149##################################################################
150
151if not gumpexists 622436516 and skill "Necromancy" >= 50
152    say '[NecromancyHotbar'
153    wait 500
154endif
155
156// Make sure we have a spell book attached
157if findlayer self righthand as item
158    // do nothing
159elseif findtype "3834" backpack as item
160    dclick item
161else 
162    overhead "No book bro!" 34
163endif
164#if dead myKillTarget and targetexists and diffhits < 30 and not poisoned
165#    hotkey 'Cancel Current Target'
166#    say 'all guard me'
167#endif
168
169// Setting current necro symbols - checks again it the attack loop
170@setvar! necroSymbols 12
171if gumpexists 622436516 and skill "Necromancy" >= 50
172    if ingump "12/" 622436516
173        @setvar! necroSymbols 12
174    elseif ingump "13/" 622436516
175        @setvar! necroSymbols 13
176    elseif ingump "14/" 622436516
177        @setvar! necroSymbols 14
178    elseif ingump "15/" 622436516
179        @setvar! necroSymbols 15
180    elseif ingump "16/" 622436516
181        @setvar! necroSymbols 16
182    elseif ingump "17/" 622436516
183        @setvar! necroSymbols 17
184    elseif ingump "18/" 622436516
185        @setvar! necroSymbols 18
186    elseif ingump "19/" 622436516
187        @setvar! necroSymbols 19
188    elseif ingump "20/" 622436516
189        @setvar! necroSymbols 20
190    elseif ingump "21/" 622436516
191        @setvar! necroSymbols 21
192    elseif ingump "11/" 622436516
193        @setvar! necroSymbols 11
194    elseif ingump "10/" 622436516
195        @setvar! necroSymbols 10
196    elseif ingump "9/" 622436516
197        @setvar! necroSymbols 9
198    elseif ingump "8/" 622436516
199        @setvar! necroSymbols 8
200    elseif ingump "7/" 622436516
201        @setvar! necroSymbols 7
202    elseif ingump "6/" 622436516
203        @setvar! necroSymbols 6
204    elseif ingump "5/" 622436516
205        @setvar! necroSymbols 5
206    elseif ingump "4/" 622436516
207        @setvar! necroSymbols 4
208    elseif ingump "3/" 622436516
209        @setvar! necroSymbols 3
210    elseif ingump "2/" 622436516
211        @setvar! necroSymbols 2
212    elseif ingump "1/" 622436516
213        @setvar! necroSymbols 1
214    elseif ingump "0/" 622436516
215        @setvar! necroSymbols 0
216    endif
217endif
218
219if not timerexists reactiveArmorTimer
220    createtimer reactiveArmorTimer
221    settimer reactiveArmorTimer cdMagicShield
222endif
223
224if not timerexists magicShieldTimer
225    createtimer magicShieldTimer
226    settimer magicShieldTimer cdMagicShield
227endif
228
229if not timerexists magicMushroomTimer
230    createtimer magicMushroomTimer
231    settimer magicMushroomTimer cdMushroom
232endif
233
234if not timerexists magicArrowTimer
235    createtimer magicArrowTimer
236    settimer magicArrowTimer cdMagicArrow
237endif
238
239if not timerexists lightningTimer
240    createtimer lightningTimer
241    settimer lightningTimer cdLightning
242endif
243
244if not timerexists harmTimer
245    createtimer harmTimer
246    settimer harmTimer cdHarm
247endif
248
249if not timerexists fireballTimer
250    createtimer fireballTimer
251    settimer fireballTimer cdFireball
252endif
253
254if not timerexists evilOmenTimer
255    createtimer evilOmenTimer
256    settimer evilOmenTimer cdEvilOmen
257endif
258
259if not timerexists vampiricEmbraceTimer
260    createtimer vampiricEmbraceTimer
261    settimer vampiricEmbraceTimer cdVampiricEmbrace
262endif
263
264if not timerexists corpseSkinTimer
265    createtimer corpseSkinTimer
266    settimer corpseSkinTimer cdCorpseSkin
267endif
268
269if not timerexists mindRotTimer
270    createtimer mindRotTimer
271    settimer mindRotTimer cdMindRot
272endif
273
274if not timerexists meditiationTimer
275    createtimer meditiationTimer
276    settimer meditiationTimer cdMeditation
277endif
278
279if not timerexists killTargetTimer
280    createtimer killTargetTimer
281    settimer killTargetTimer cdKillTarget
282endif
283
284if not timerexists witherTimer
285    createtimer witherTimer
286    settimer witherTimer cdWither
287endif
288
289if not timerexists vengefulSpiritTimer
290    createtimer vengefulSpiritTimer
291    settimer vengefulSpiritTimer cdVengefulSpirit
292endif
293
294if not timerexists bloodOathTimer
295    createtimer bloodOathTimer
296    settimer bloodOathTimer cdBloodOath
297endif
298
299if not timerexists painSpikeTimer
300    createtimer painSpikeTimer
301    settimer painSpikeTimer cdPainSpike
302endif
303
304if not timerexists poisonStrikeTimer
305    createtimer poisonStrikeTimer
306    settimer poisonStrikeTimer cdPoisonStrike
307endif
308
309if not timerexists preventOverheadSpamTimer
310    createtimer preventOverheadSpamTimer
311    settimer preventOverheadSpamTimer cdPreventOverheadSpam
312endif
313
314@setvar! cdPreventSpamNecroAbilities 750
315if not timerexists preventSpamNecroAbilitiesTimer
316    createtimer preventSpamNecroAbilitiesTimer
317    settimer preventSpamNecroAbilitiesTimer cdPreventSpamNecroAbilities
318endif
319
320if not varexist myEarthPet
321    @setvar! myEarthPet 0
322endif
323if diffhits >= 30
324            if targetexists 
325                hotkey 'Cancel Current Target'
326            endif
327            while not targetexists 'beneficial'
328                if diffhits >= 60
329                    cast 'Heal'
330                else
331                    cast 'Greater Heal'                
332                endif
333                wait 50
334                if hp = maxhp
335                    hotkey '> Interrupt'
336                    break
337                endif
338            endwhile
339            if targetexists 'beneficial'
340                hotkey 'Target Self'
341            endif
342        endif
343        
344        if poisoned
345            #overhead "Were poisoned"
346            if findtype "Orange Potion" backpack
347                while poisoned and findtype "Orange Potion" backpack kpot 
348                dclick pot
349                wait 100
350                endwhile
351            else
352                
353                if not poisoned
354                      hotkey '> Interrupt'
355                      replay
356                else
357                    overhead "Casting Cure"
358                   while poisoned and diffhits <= 30 and not targetexists 
359                        cast 'Cure'
360                        wait 50
361                    endwhile
362                endif 
363                
364                if targetexists
365                    target self
366                    wait 500
367                endif
368                
369            endif
370        endif
371// make sure we have enough symbols to summon (6 for wither + vengful spirit)
372if skill "Necromancy" >= 90 and requireWitherBeforeSummons = 1
373    while followers < 4 and 6 > necroSymbols
374        // we already have vengeful spirit active, skip the check
375        if timer vengefulSpiritTimer < cdVengefulSpirit
376           break
377        endif
378        
379        
380            
381        if timer preventOverheadSpamTimer >= cdPreventOverheadSpam
382            overhead "waiting for symbols" 88
383            settimer preventOverheadSpamTimer 0
384        endif
385        if gumpexists 622436516 and skill "Necromancy" >= 50
386            if ingump "12/" 622436516
387                @setvar! necroSymbols 12
388            elseif ingump "13/" 622436516
389                @setvar! necroSymbols 13
390            elseif ingump "14/" 622436516
391                @setvar! necroSymbols 14
392            elseif ingump "15/" 622436516
393                @setvar! necroSymbols 15
394            elseif ingump "16/" 622436516
395                @setvar! necroSymbols 16
396            elseif ingump "17/" 622436516
397                @setvar! necroSymbols 17
398            elseif ingump "18/" 622436516
399                @setvar! necroSymbols 18
400            elseif ingump "19/" 622436516
401                @setvar! necroSymbols 19
402            elseif ingump "20/" 622436516
403                @setvar! necroSymbols 20
404            elseif ingump "21/" 622436516
405                @setvar! necroSymbols 21
406            elseif ingump "11/" 622436516
407                @setvar! necroSymbols 11
408            elseif ingump "10/" 622436516
409                @setvar! necroSymbols 10
410            elseif ingump "9/" 622436516
411                @setvar! necroSymbols 9
412            elseif ingump "8/" 622436516
413                @setvar! necroSymbols 8
414            elseif ingump "7/" 622436516
415                @setvar! necroSymbols 7
416            elseif ingump "6/" 622436516
417                @setvar! necroSymbols 6
418            elseif ingump "5/" 622436516
419                @setvar! necroSymbols 5
420            elseif ingump "4/" 622436516
421                @setvar! necroSymbols 4
422            elseif ingump "3/" 622436516
423                @setvar! necroSymbols 3
424            elseif ingump "2/" 622436516
425                @setvar! necroSymbols 2
426            elseif ingump "1/" 622436516
427                @setvar! necroSymbols 1
428            elseif ingump "0/" 622436516
429                @setvar! necroSymbols 0
430            endif
431        endif
432    endwhile
433endif
434
435
436if not varexist lichOne
437    @setvar! lichOne 0
438endif
439
440if not varexist lichTwo
441    @setvar! lichTwo 0
442endif
443
444if not varexist earthOne
445    @setvar! earthOne 0
446endif
447
448if not varexist earthTwo
449    @setvar! earthTwo 0
450endif
451
452if lichOne = creatureOne or lichTwo = creatureOne or earthOne = creatureOne or earthTwo = creatureOne
453    overhead "Duplicated"
454    unsetvar creatureOne
455endif
456
457if diffhits >= 30
458    if targetexists 
459        hotkey 'Cancel Current Target'
460    endif
461    while not targetexists 'beneficial'
462        if diffhits >= 60
463            cast 'Heal'
464        else
465            cast 'Greater Heal'                
466        endif
467        wait 50
468        if hp = maxhp
469            hotkey '> Interrupt'
470            break
471        endif
472    endwhile
473    if targetexists 'beneficial'
474        target self
475    endif
476    replay
477endif
478
479
480if castSummonEarthElementalCount > 0
481    if diffhits < 30
482        if followers = 0
483            @setvar! followCount 0
484        elseif followers = 1
485            @setvar! followCount 1
486        elseif followers = 2
487            @setvar! followCount 2
488        elseif followers = 3
489            @setvar! followCount 3
490        elseif followers = 4
491            @setvar! followCount 4
492        elseif followers = 5
493            @setvar! followCount 5
494        endif
495        if dead earthOne or not find earthOne ground -1 -1 12
496            if followers < 4
497                while mana < 50
498                    if diffhits >= 30
499                        replay
500                    endif
501                    if timer preventOverheadSpamTimer >= cdPreventOverheadSpam
502                        overhead "waiting for mana" 88
503                        settimer preventOverheadSpamTimer 0
504                    endif
505                    if not findbuff "Actively Meditating"
506                        useskill "meditation"
507                    endif
508                    wait 200
509                endwhile
510                
511                if castSummonEarthElementalAsMummy = 1
512                    if timer vengefulSpiritTimer >= cdVengefulSpirit and skill "Necromancy" >= 50
513                        yell "[VengefulSpirit"
514                        settimer vengefulSpiritTimer 0
515                        wait 500
516                    endif
517                elseif timer vengefulSpiritTimer <= cdVengefulSpirit and skill "Necromancy" >= 50
518                    overhead  "Waiting for spirit to go away" 
519                    replay
520                endif
521                while followers = followCount
522                    cast "Earth elemental"
523                    wait 500
524                    if timer witherTimer >= cdWither and skill "Necromancy" >= 95
525                        yell "[Wither"
526                        settimer witherTimer 0
527                    endif
528                    if diffhits >= 30
529                        hotkey '> Interrupt'
530                        break
531                    endif
532                endwhile
533                // 158 - an ancient mummy
534                // 14 - an earth elemental
535                if findtype 158|14 ground -1 -1 6 as myPet
536                    if noto myPet = "friend" and list petNameList > 0
537                        overhead "Renaming..."
538                        foreach petName in petNameList
539                            rename myPet petName
540                            break
541                        endfor
542                        poplist petNameList "front"
543                    endif
544                    @setvar! earthOne myPet
545                    say "all guard me"
546                    replay
547                endif
548            endif
549        endif
550    endif
551    
552    if diffhits < 30 and castSummonEarthElementalCount > 1
553        if followers = 0
554            @setvar! followCount 0
555        elseif followers = 1
556            @setvar! followCount 1
557        elseif followers = 2
558            @setvar! followCount 2
559        elseif followers = 3
560            @setvar! followCount 3
561        elseif followers = 4
562            @setvar! followCount 4
563        elseif followers = 5
564            @setvar! followCount 5
565        endif
566        if dead earthTwo or not find earthTwo ground -1 -1 12
567            if followers < 4
568                while mana < 50
569                    if diffhits >= 30
570                        replay
571                    endif
572                    if timer preventOverheadSpamTimer >= cdPreventOverheadSpam
573                        overhead "waiting for mana" 88
574                        settimer preventOverheadSpamTimer 0
575                    endif
576                    if not findbuff "Actively Meditating"
577                        useskill "meditation"
578                    endif
579                    wait 200
580                endwhile
581                if timer vengefulSpiritTimer >= cdVengefulSpirit and skill "Necromancy" >= 50
582                    yell "[VengefulSpirit"
583                    settimer vengefulSpiritTimer 0
584                    wait 500
585                endif
586                while followers = followCount
587                    cast "Earth elemental"
588                    wait 500
589                    if timer witherTimer >= cdWither and skill "Necromancy" >= 95
590                        yell "[Wither"
591                        settimer witherTimer 0
592                    endif
593                    if diffhits >= 30
594                        hotkey '> Interrupt'
595                        break
596                    endif
597                endwhile
598                // 158 - an ancient mummy
599                // 14 - an earth elemental
600                if findtype 158|14 ground -1 -1 6 as myPet
601                    if noto myPet = "friend" and list petNameList > 0
602                        overhead "Renaming..."
603                        foreach petName in petNameList
604                            rename myPet petName
605                            break
606                        endfor
607                        poplist petNameList "front"
608                    endif
609                    @setvar! earthTwo myPet
610                    say "all guard me"
611                    #replay
612                endif
613            endif
614        endif
615    endif
616endif
617
618
619if castSummonFireElementalCount > 0
620    if diffhits < 30
621    
622        if lichOne = 0 
623            // do nothing
624        elseif lichOne = lichTwo
625            overhead "Duplicated"
626            unsetvar lichOne
627        endif
628        
629        if followers = 0
630            @setvar! followCount 0
631        elseif followers = 1
632            @setvar! followCount 1
633        elseif followers = 2
634            @setvar! followCount 2
635        elseif followers = 3
636            @setvar! followCount 3
637        elseif followers = 4
638            @setvar! followCount 4
639        elseif followers = 5
640            @setvar! followCount 5
641        endif
642        if dead lichOne or not find lichOne ground -1 -1 12 or dead lichTwo
643            if followers < 4
644                while mana < 50
645                    if diffhits >= 30
646                        replay
647                    endif
648                    if timer preventOverheadSpamTimer >= cdPreventOverheadSpam
649                        overhead "waiting for mana" 88
650                        settimer preventOverheadSpamTimer 0
651                    endif
652                    if not findbuff "Actively Meditating"
653                        useskill "meditation"
654                    endif
655                    wait 200
656                endwhile
657                if timer vengefulSpiritTimer >= cdVengefulSpirit and skill "Necromancy" >= 50
658                    yell "[VengefulSpirit"
659                    settimer vengefulSpiritTimer 0
660                    wait 500
661                endif
662                @ignore lichTwo
663                while followers = followCount
664                    if targetexists 
665                        hotkey 'Cancel Current Target'
666                endif
667                    cast "fire elemental"
668                    wait 500
669                    if timer witherTimer >= cdWither and skill "Necromancy" >= 95
670                        yell "[Wither"
671                        settimer witherTimer 0
672                    endif
673                    if diffhits >= 30
674                        hotkey '> Interrupt'
675                        break
676                    endif
677                endwhile
678                // 24 - a lich
679                // 15 - a fire elemental
680                if findtype 24|15 ground -1 -1 6 as myPet
681                    if noto myPet = "friend" and list petNameList > 0
682                        overhead "Renaming..."
683                        foreach petName in petNameList
684                            rename myPet petName
685                            break
686                        endfor
687                        poplist petNameList "front"
688                    endif
689                    @setvar! lichOne myPet
690                    overhead "Lich One Set" 88 lichOne
691                    say "all guard me"
692                    @clearignore 
693                    #replay
694                endif
695            endif
696        endif
697    endif
698    
699    if diffhits < 30 and castSummonFireElementalCount > 1
700        if followers = 0
701            @setvar! followCount 0
702        elseif followers = 1
703            @setvar! followCount 1
704        elseif followers = 2
705            @setvar! followCount 2
706        elseif followers = 3
707            @setvar! followCount 3
708        elseif followers = 4
709            @setvar! followCount 4
710        elseif followers = 5
711            @setvar! followCount 5
712        endif
713        if dead lichTwo or not find lichTwo ground -1 -1 12 or dead lichOne
714            if followers < 4
715                while mana < 50
716                    if diffhits >= 30
717                        replay
718                    endif
719                    if timer preventOverheadSpamTimer >= cdPreventOverheadSpam
720                        overhead "waiting for mana" 88
721                        settimer preventOverheadSpamTimer 0
722                    endif
723                    if not findbuff "Actively Meditating"
724                        useskill "meditation"
725                    endif
726                    wait 200
727                endwhile
728                if timer vengefulSpiritTimer >= cdVengefulSpirit and skill "Necromancy" >= 50
729                    yell "[VengefulSpirit"
730                    settimer vengefulSpiritTimer 0
731                    wait 500
732                endif
733                @ignore lichOne
734                while followers = followCount
735                     if targetexists 
736                        hotkey 'Cancel Current Target'
737                     endif
738                    cast "fire elemental"
739                    wait 500
740                    if timer witherTimer >= cdWither and skill "Necromancy" >= 95
741                        yell "[Wither"
742                        settimer witherTimer 0
743                    endif
744                    if diffhits >= 30
745                        hotkey '> Interrupt'
746                        break
747                    endif
748                endwhile
749                // 24 - a lich
750                // 15 - a fire elemental
751                if findtype 24|15 ground -1 -1 6 as myPet
752                    if noto myPet = "friend" and list petNameList > 0
753                        overhead "Renaming..."
754                        foreach petName in petNameList
755                            rename myPet petName
756                            break
757                        endfor
758                        poplist petNameList "front"
759                    endif
760                    @clearignore
761                    @setvar! lichTwo myPet
762                    overhead "Lich Two Set" 88 lichTwo
763                    say "all guard me"
764                    #replay
765                endif
766                
767            endif
768        endif
769    endif
770endif
771
772if castSummonCreatureCount = 0
773    // do nothing
774elseif castSummonCreatureCount = 1 and not dead creatureOne
775    // do nothing
776elseif castSummonCreatureCount = 1
777    if followers = 4 and diffhits < 30
778        if followers = 0
779            @setvar! followCount 0
780        elseif followers = 1
781            @setvar! followCount 1
782        elseif followers = 2
783            @setvar! followCount 2
784        elseif followers = 3
785            @setvar! followCount 3
786        elseif followers = 4
787            @setvar! followCount 4
788        elseif followers = 5
789            @setvar! followCount 5
790        endif
791        while mana < 14
792            if timer preventOverheadSpamTimer >= cdPreventOverheadSpam
793                overhead "waiting for mana" 88
794                settimer preventOverheadSpamTimer 0
795            endif
796            if diffhits >= 30
797                replay
798            endif
799            if not findbuff "Actively Meditating"
800                useskill "meditation"
801            endif
802            wait 200
803        endwhile
804        if timer vengefulSpiritTimer >= cdVengefulSpirit
805            yell "[VengefulSpirit"
806            settimer vengefulSpiritTimer 0
807            wait 200
808        endif
809        while followers = followCount
810                 if targetexists 
811                        hotkey 'Cancel Current Target'
812                endif
813            cast 'Summ. Creature'
814            wait 500
815            if diffhits >= 30
816                hotkey '> Interrupt'
817                replay
818            endif
819        endwhile        
820        say "all guard me"
821    endif
822else
823    for 6
824        if index = 0
825            // do nothing
826        else
827            if diffhits < 30
828                @setvar! needToSummon 0
829                if index = 1
830                    if dead creatureOne or not find creatureOne ground -1 -1 12
831                        @setvar! needToSummon 1
832                    endif
833                elseif index = 2
834                    if dead creatureTwo or not find creatureTwo ground -1 -1 12
835                        @setvar! needToSummon 1
836                    endif
837                elseif index = 3
838                    if dead creatureThree or not find creatureThree ground -1 -1 12
839                        @setvar! needToSummon 1
840                    endif
841                elseif index = 4
842                    if dead creatureFour or not find creatureFour ground -1 -1 12
843                        @setvar! needToSummon 1
844                    endif
845                elseif index = 5
846                    if dead creatureFive or not find creatureFive ground -1 -1 12
847                        @setvar! needToSummon 1
848                    endif
849                endif
850            
851                if needToSummon = 1
852                    if followers = 0
853                        @setvar! followCount 0
854                    elseif followers = 1
855                        @setvar! followCount 1
856                    elseif followers = 2
857                        @setvar! followCount 2
858                    elseif followers = 3
859                        @setvar! followCount 3
860                    elseif followers = 4
861                        @setvar! followCount 4
862                    elseif followers = 5
863                        @setvar! followCount 5
864                    endif
865                   
866                    while mana < 50
867                        if diffhits >= 30
868                            replay
869                        endif
870                        if timer preventOverheadSpamTimer >= cdPreventOverheadSpam
871                            overhead "waiting for mana" 88
872                            settimer preventOverheadSpamTimer 0
873                        endif
874                        if not findbuff "Actively Meditating"
875                            useskill "meditation"
876                        endif
877                        wait 200
878                    endwhile
879                    if timer vengefulSpiritTimer >= cdVengefulSpirit and skill "Necromancy" >= 50
880                        yell "[VengefulSpirit"
881                        settimer vengefulSpiritTimer 0
882                        wait 500
883                    endif
884                    while followers = followCount
885                        cast "Summ. Creature"
886                        wait 500
887                        if timer witherTimer >= cdWither and skill "Necromancy" >= 95
888                            yell "[Wither"
889                            settimer witherTimer 0
890                        endif
891                        if diffhits >= 30
892                            hotkey '> Interrupt'
893                            break
894                        endif
895                    endwhile
896                    hotkey 'Next Friendly Monster Target'
897                    @setvar! checkLastTarget lasttarget
898                    if checkLastTarget = earthOne
899                        hotkey 'Next Friendly Monster Target'
900                        @setvar! checkLastTarget lasttarget 
901                    endif
902                    
903                    if checkLastTarget = earthTwo
904                       hotkey 'Next Friendly Monster Target'
905                       @setvar! checkLastTarget lasttarget 
906                    endif
907                    
908                    if checkLastTarget = lichOne
909                       hotkey 'Next Friendly Monster Target'
910                       @setvar! checkLastTarget lasttarget 
911                    endif
912                    
913                    if checkLastTarget = lichTwo
914                       hotkey 'Next Friendly Monster Target'
915                       @setvar! checkLastTarget lasttarget 
916                    endif
917                    @setvar! creatureOne checkLastTarget
918                    
919                    if find checkLastTarget ground -1 -1 6 as myPet
920                        if noto myPet = "friend" and list petNameList > 0
921                            overhead "Renaming..."
922                            foreach petName in petNameList
923                                rename myPet petName
924                                break
925                            endfor
926                            poplist petNameList "front"
927                        endif
928                        if index = 1
929                            if dead creatureOne or not find creatureOne ground -1 -1 12
930                                @setvar! creatureOne myPet
931                            endif
932                        elseif index = 2
933                            if dead creatureTwo or not find creatureTwo ground -1 -1 12
934                                @setvar! creatureTwo myPet
935                            endif
936                        elseif index = 3
937                            if dead creatureThree or not find creatureThree ground -1 -1 12
938                                @setvar! creatureThree myPet
939                            endif
940                        elseif index = 4
941                            if dead creatureFour or not find creatureFour ground -1 -1 12
942                                @setvar! creatureFour myPet
943                            endif
944                        elseif index = 5
945                            if dead creatureFive or not find creatureFive ground -1 -1 12
946                                @setvar! creatureFive myPet
947                            endif
948                        endif
949                    endif
950                endif
951            endif
952        endif
953        if index = castSummonCreatureCount
954            break
955        endif
956    endfor
957endif
958
959# Eat food if we got it
960if not findbuff "food" and findtype "tray" backpack as jood
961    dclick jood
962    wait 200
963endif
964
965# Use Taste ID if possible
966if skill "Taste Identification" >= 50 and not findbuff "herb" and timer meditiationTimer >= 11000 
967    useskill 'tasteidentification'
968    wft 500
969    target backpack
970    settimer meditiationTimer 0
971endif
972
973if not findbuff "song of discordance" and timer meditiationTimer >= 11000
974    useskill 'Discordance'
975    wft 500
976    if insysmsg "What instrument"
977        if findtype "bamboo flute" backpack as inny
978            target inny
979        elseif findtype "tambourine" backpack as inny
980            target inny
981        elseif findtype "drum" backpack as inny
982            target inny
983        elseif findtype "lute" backpack as inny
984            target inny
985        elseif findtype "harp" backpack as inny
986            target inny
987        elseif findtype "lap harp" backpack as inny
988            target inny
989        else
990            overhead "I do not have an inny" 34
991            @setvar! isDiscorded 1
992        endif
993        wft 500
994    endif
995    target backpack
996    settimer meditiationTimer 0
997endif  
998            
999if setThisAsOneIfYouWantToTargetYourOwnKillOrItWillTargetClosestMonster = 1
1000    say "all kill"
1001    wait 200
1002    while targetexists 
1003        // wait
1004        wait 50
1005    endwhile
1006else
1007    hotkey 'Target Closest Non-Friendly Monster'
1008    wait 200
1009    
1010
1011    if insysmsg "No one matching that was found" 
1012        if timer preventOverheadSpamTimer >= cdPreventOverheadSpam
1013            overhead "found no one" 34
1014            settimer preventOverheadSpamTimer 0
1015        endif
1016        if autoBotEnabled = 1
1017            wait 500
1018            replay
1019        endif
1020        stop
1021            
1022        elseif not find lasttarget ground -1 -1 9
1023        overhead "● ▼ OUT OF RANGE ▼ ●" 88 lasttarget
1024        if timer preventOverheadSpamTimer >= cdPreventOverheadSpam
1025            overhead "Move closer, more then 9 tiles away" 34
1026            settimer preventOverheadSpamTimer 0
1027        endif
1028        if patrolPetEvenIfLastTargetIsBeyondEightTiles = 1 and find myEarthPet ground -1 -1 12
1029            menu myEarthPet 2
1030            wft 500
1031            target lasttarget
1032        endif
1033        
1034        if autoBotEnabled = 1
1035            wait 500
1036            replay
1037        endif
1038        stop
1039    else
1040        overhead "● ▼▼ HERE ▼▼ ●" 88 lasttarget
1041    endif    
1042endif
1043
1044
1045 @setvar myKillTarget lasttarget 
1046
1047
1048getlabel myKillTarget descPet
1049#overhead descPet
1050
1051if "(summoned)" in descPet or "(bonded)" in descPet
1052    overhead "Player pet, replaying..."
1053    replay
1054endif
1055    
1056
1057if not varexist myPreviousKillTarget
1058    @setvar myPreviousKillTarget 0     
1059endif
1060
1061getlabel myKillTarget desc
1062overhead desc myKillTarget
1063
1064
1065if not varexist myEarthPet or dead myEarthPet
1066    if not dead earthOne
1067        @setvar! myEarthPet earthOne
1068    elseif not dead earthTwo
1069        @setvar! myEarthPet earthTwo
1070    endif
1071endif
1072
1073if find myEarthPet ground -1 -1 12
1074    menu myEarthPet 2
1075    wft 500
1076    target myKillTarget
1077endif
1078
1079#target myKillTarget
1080say 'all kill'
1081wft 200
1082target myKillTarget
1083
1084if diffhits >= 30 and mana > 12
1085    while not targetexists
1086        if diffhits >= 60
1087            cast 'Heal'
1088        else
1089            cast 'Greater Heal'                
1090        endif
1091        wait 50
1092        if hp = maxhp
1093            hotkey '> Interrupt'
1094            break
1095        endif
1096    endwhile
1097    if targetexists
1098        target self
1099    endif
1100elseif castBless = 1 and str <= 100 and followers >= 4 
1101    while not targetexists and mana > 12
1102        cast 'Bless'
1103        wait 50
1104        if diffhits >= 30
1105            hotkey '> Interrupt'
1106            break
1107        endif
1108    endwhile
1109    if targetexists
1110        target self
1111    endif
1112endif
1113
1114if not listexists myCursedTargets
1115    createlist myCursedTargets
1116endif
1117
1118if not listexists myManaDrainTargets
1119    createlist myManaDrainTargets
1120endif
1121@setvar! isDiscorded 0
1122
1123if find myKillTarget -1 -1 12 as killy
1124    if myKillTarget = myPreviousKillTarget
1125        // do nothing
1126    else
1127        
1128    #        // Herding using crook
1129    #   if skill "Herding" > 0 and findtype 3713 backpack as jrook
1130    #       dclick jrook
1131    #       wft 500
1132    #       target killy
1133    #   endif
1134        if skill "Discordance" >= 50 
1135            if isDiscorded = 0
1136                getlabel myKillTarget discordDesc
1137                if "discord" in discordDesc
1138                    @setvar! isDiscorded 1
1139                elseif timer meditiationTimer >= 11000 
1140                    useskill 'Discordance'
1141                    wft 500
1142                    if insysmsg "What instrument"
1143                        if findtype "bamboo flute" backpack as inny
1144                            target inny
1145                        elseif findtype "tambourine" backpack as inny
1146                            target inny
1147                        elseif findtype "drum" backpack as inny
1148                            target inny
1149                        elseif findtype "lute" backpack as inny
1150                            target inny
1151                        elseif findtype "harp" backpack as inny
1152                            target inny
1153                        elseif findtype "lap harp" backpack as inny
1154                            target inny
1155                        else
1156                            overhead "I do not have an inny" 34
1157                            @setvar! isDiscorded 1
1158                        endif
1159                        wft 500
1160                    endif
1161                    if targetexists 
1162                        target myKillTarget
1163                        overhead "Discorded" 88 myKillTarget
1164                    endif
1165                    settimer meditiationTimer 5000
1166                endif
1167            endif
1168        if inlist myManaDrainTargets myKillTarget
1169            overhead "We already mana drained this guy" 88
1170            // do nothing
1171        elseif castManadrain = 0
1172            // do nothing 
1173        elseif followers >= 4 
1174            while not targetexists and not dead myKillTarget
1175                if diffhits < 30
1176                    cast 'mana drain'
1177                    wait 50
1178                elseif diffhits >= 30 
1179                    hotkey '> Interrupt'
1180                    break
1181                endif
1182            endwhile
1183            if targetexists
1184                target myKillTarget
1185                pushlist myManaDrainTargets myKillTarget
1186                settimer killTargetTimer 0
1187                wait 500
1188            endif
1189        endif
1190        
1191        if inlist myCursedTargets myKillTarget
1192            overhead "We already cursed this guy" 88
1193            // do nothing
1194        elseif castCurse = 0
1195            // do nothing
1196        elseif followers >= 4 
1197            
1198            if diffhits < 30 
1199            if find myKillTarget ground -1 -1 10
1200                while not targetexists and not dead myKillTarget and diffhits <= 30
1201                        cast 'Curse'
1202                        wait 50
1203                    endwhile
1204                    else
1205                        overhead 'target is more than 10 squares away, get closer to curse'
1206                    endif
1207                elseif diffhits >= 30 
1208                    hotkey '> Interrupt'
1209                    break
1210                endif
1211            
1212            if targetexists
1213                target myKillTarget
1214                pushlist myCursedTargets myKillTarget
1215                settimer killTargetTimer 0
1216                wait 500
1217            endif
1218        endif
1219        @setvar myPreviousKillTarget myKillTarget
1220    endif
1221else
1222    overhead "Out of range" 34
1223endif
1224
1225
1226clearsysmsg 
1227
1228say "all guard"
1229
1230@setvar! isLethalPoison 0
1231
1232@setvar! isHerded 0
1233
1234while not dead myKillTarget and find myKillTarget -1 -1 12 as killy
1235
1236    for 5
1237        // lost a follower
1238        if followers < 4
1239            overhead 'lost a pet'
1240            replay
1241        endif
1242    
1243        if dead myKillTarget
1244            break
1245        elseif insysmsg "Target cannot be seen." 
1246            overhead "CANNOT BE SEEN MOVE TO NEXT TARGET" 34
1247            replay
1248        elseif find myKillTarget -1 -1 12 as killy
1249            // do nothing - in range to kill
1250        else
1251            break
1252        endif
1253    
1254        #    if skill "Herding" > 0 and isHerded = 0 and timer meditiationTimer >= 11000 and findtype 3713 backpack as jrook
1255        #   dclick jrook
1256        #   wft 500
1257        #   target myKillTarget
1258        #   settimer meditiationTimer 8000
1259        #   @setvar! isHerded 1
1260        #   endif
1261        
1262        if gumpexists 622436516 and skill "Necromancy" >= 50
1263            if ingump "12/" 622436516
1264                @setvar! necroSymbols 12
1265            elseif ingump "13/" 622436516
1266                @setvar! necroSymbols 13
1267            elseif ingump "14/" 622436516
1268                @setvar! necroSymbols 14
1269            elseif ingump "15/" 622436516
1270                @setvar! necroSymbols 15
1271            elseif ingump "16/" 622436516
1272                @setvar! necroSymbols 16
1273            elseif ingump "17/" 622436516
1274                @setvar! necroSymbols 17
1275            elseif ingump "18/" 622436516
1276                @setvar! necroSymbols 18
1277            elseif ingump "19/" 622436516
1278                @setvar! necroSymbols 19
1279            elseif ingump "20/" 622436516
1280                @setvar! necroSymbols 20
1281            elseif ingump "21/" 622436516
1282                @setvar! necroSymbols 21
1283            elseif ingump "11/" 622436516
1284                @setvar! necroSymbols 11
1285            elseif ingump "10/" 622436516
1286                @setvar! necroSymbols 10
1287            elseif ingump "9/" 622436516
1288                @setvar! necroSymbols 9
1289            elseif ingump "8/" 622436516
1290                @setvar! necroSymbols 8
1291            elseif ingump "7/" 622436516
1292                @setvar! necroSymbols 7
1293            elseif ingump "6/" 622436516
1294                @setvar! necroSymbols 6
1295            elseif ingump "5/" 622436516
1296                @setvar! necroSymbols 5
1297            elseif ingump "4/" 622436516
1298                @setvar! necroSymbols 4
1299            elseif ingump "3/" 622436516
1300                @setvar! necroSymbols 3
1301            elseif ingump "2/" 622436516
1302                @setvar! necroSymbols 2
1303            elseif ingump "1/" 622436516
1304                @setvar! necroSymbols 1
1305            elseif ingump "0/" 622436516
1306                @setvar! necroSymbols 0
1307            endif
1308        endif
1309        
1310
1311
1312        if castMagicShield = 1 and timer magicShieldTimer >= cdMagicShield and not findbuff "Magic Reflection"
1313            cast "Magic Reflection"
1314            wait 1000
1315        elseif drinkMagicResistPot = 1 and not findbuff "Magic Reflection" and not findbuff "Magic Resist Potion" and findtype "Black Potion" backpack as pot
1316            dclick pot
1317            wait 200
1318        endif
1319
1320        if findbuff "Magic Reflection"
1321            settimer magicShieldTimer 0
1322        endif
1323        
1324        if castReactiveArmor = 1 and timer reactiveArmorTimer >= cdReactiveArmor and not findbuff "Reactive Armor"
1325            cast "Reactive Armor"
1326            wait 200
1327        endif
1328
1329        if findbuff "Reactive Armor"
1330            settimer reactiveArmorTimer 0
1331        endif
1332        
1333        if skill "poisoning" >= 100 or castPoisonAnyway = 1
1334            if timer meditiationTimer >= cdMeditationMini
1335                if castMindRot = 1 and timer preventSpamNecroAbilitiesTimer >= cdPreventSpamNecroAbilities and timer mindRotTimer >= cdMindRot and skill "Necromancy" >= 75 and 3 < necroSymbols 
1336                    yell "[MindRot"
1337                    settimer preventSpamNecroAbilitiesTimer 0
1338                    settimer mindRotTimer 0
1339                    wait 500
1340                    if gumpexists 622436516
1341                        if ingump "12/" 622436516
1342                            @setvar! necroSymbols 12
1343                        elseif ingump "13/" 622436516
1344                            @setvar! necroSymbols 13
1345                        elseif ingump "14/" 622436516
1346                            @setvar! necroSymbols 14
1347                        elseif ingump "15/" 622436516
1348                            @setvar! necroSymbols 15
1349                        elseif ingump "16/" 622436516
1350                            @setvar! necroSymbols 16
1351                        elseif ingump "17/" 622436516
1352                            @setvar! necroSymbols 17
1353                        elseif ingump "18/" 622436516
1354                            @setvar! necroSymbols 18
1355                        elseif ingump "19/" 622436516
1356                            @setvar! necroSymbols 19
1357                        elseif ingump "20/" 622436516
1358                            @setvar! necroSymbols 20
1359                        elseif ingump "21/" 622436516
1360                            @setvar! necroSymbols 21
1361                        elseif ingump "11/" 622436516
1362                            @setvar! necroSymbols 11
1363                        elseif ingump "10/" 622436516
1364                            @setvar! necroSymbols 10
1365                        elseif ingump "9/" 622436516
1366                            @setvar! necroSymbols 9
1367                        elseif ingump "8/" 622436516
1368                            @setvar! necroSymbols 8
1369                        elseif ingump "7/" 622436516
1370                            @setvar! necroSymbols 7
1371                        elseif ingump "6/" 622436516
1372                            @setvar! necroSymbols 6
1373                        elseif ingump "5/" 622436516
1374                            @setvar! necroSymbols 5
1375                        elseif ingump "4/" 622436516
1376                            @setvar! necroSymbols 4
1377                        elseif ingump "3/" 622436516
1378                            @setvar! necroSymbols 3
1379                        elseif ingump "2/" 622436516
1380                            @setvar! necroSymbols 2
1381                        elseif ingump "1/" 622436516
1382                            @setvar! necroSymbols 1
1383                        elseif ingump "0/" 622436516
1384                            @setvar! necroSymbols 0
1385                        endif
1386                    endif
1387                endif
1388                
1389                                
1390                getlabel myKillTarget desc2
1391                overhead desc2
1392                
1393                if castPoisonStrike = 1 and timer preventSpamNecroAbilitiesTimer >= cdPreventSpamNecroAbilities and timer poisonStrikeTimer >= cdPoisonStrike and skill "Necromancy" >= 55 and 1 < necroSymbols 
1394                    if "Ticks" in desc2
1395                        if "[8" in desc2 or "[7" in desc2 or "[6" in desc2  or "[5" in desc2  or "[4" in desc2  or "[3" in desc2  or "[2" in desc2  or "[1 " in desc2 
1396                            yell "[PoisonStrike"
1397                            wft 500
1398                            target myKillTarget
1399                            wait 200
1400                            settimer preventSpamNecroAbilitiesTimer 0
1401                            settimer poisonStrikeTimer 0
1402                            wait 500
1403                            if gumpexists 622436516
1404                                if ingump "12/" 622436516
1405                                    @setvar! necroSymbols 12
1406                                elseif ingump "13/" 622436516
1407                                    @setvar! necroSymbols 13
1408                                elseif ingump "14/" 622436516
1409                                    @setvar! necroSymbols 14
1410                                elseif ingump "15/" 622436516
1411                                    @setvar! necroSymbols 15
1412                                elseif ingump "16/" 622436516
1413                                    @setvar! necroSymbols 16
1414                                elseif ingump "17/" 622436516
1415                                    @setvar! necroSymbols 17
1416                                elseif ingump "18/" 622436516
1417                                    @setvar! necroSymbols 18
1418                                elseif ingump "19/" 622436516
1419                                    @setvar! necroSymbols 19
1420                                elseif ingump "20/" 622436516
1421                                    @setvar! necroSymbols 20
1422                                elseif ingump "21/" 622436516
1423                                    @setvar! necroSymbols 21
1424                                elseif ingump "11/" 622436516
1425                                    @setvar! necroSymbols 11
1426                                elseif ingump "10/" 622436516
1427                                    @setvar! necroSymbols 10
1428                                elseif ingump "9/" 622436516
1429                                    @setvar! necroSymbols 9
1430                                elseif ingump "8/" 622436516
1431                                    @setvar! necroSymbols 8
1432                                elseif ingump "7/" 622436516
1433                                    @setvar! necroSymbols 7
1434                                elseif ingump "6/" 622436516
1435                                    @setvar! necroSymbols 6
1436                                elseif ingump "5/" 622436516
1437                                    @setvar! necroSymbols 5
1438                                elseif ingump "4/" 622436516
1439                                    @setvar! necroSymbols 4
1440                                elseif ingump "3/" 622436516
1441                                    @setvar! necroSymbols 3
1442                                elseif ingump "2/" 622436516
1443                                    @setvar! necroSymbols 2
1444                                elseif ingump "1/" 622436516
1445                                    @setvar! necroSymbols 1
1446                                elseif ingump "0/" 622436516
1447                                    @setvar! necroSymbols 0
1448                                endif
1449                            endif
1450                        endif
1451                    endif
1452                endif
1453                
1454                
1455                
1456                if isLethalPoison = 0
1457                    
1458                    if diffmana >= 30 and timer magicMushroomTimer >= cdMushroom and findtype "mushroom" backpack as mushy
1459                        overhead "Eating shrooms" 66
1460                        dclick mushy
1461                        settimer magicMushroomTimer 0
1462                    endif
1463                
1464                    if insysmsg "Target cannot be seen." 
1465                        overhead "CANNOT BE SEEN MOVE TO NEXT TARGET" 34
1466                        replay
1467                    endif 
1468
1469                    // poison lethal
1470                    if "Lethal" in desc2
1471                        @setvar! isLethalPoison 1
1472                        break
1473                    elseif castPoisonAnyway = 1 and "Ticks" in desc2
1474                        @setvar! isLethalPoison 1
1475                        break
1476                    elseif castPoisonAnyway = 1 and "Poison" in desc2
1477                        @setvar! isLethalPoison 1
1478                        break
1479                    elseif diffhits >= 30 
1480                        // need a heal
1481                        break
1482                    elseif mana >= 9
1483                        while not targetexists
1484                            cast 'poison'
1485                            wait 50
1486                            if dead myKillTarget
1487                                hotkey '> Interrupt'
1488                                replay
1489                            endif
1490                        endwhile
1491                        target myKillTarget
1492                        wait 200
1493                        if insysmsg "Target cannot be seen." 
1494                             overhead "CANNOT BE SEEN MOVE TO NEXT TARGET" 34
1495                             @setvar! isLethalPoison 1
1496                        endif 
1497                    else
1498                        wait 200
1499                    endif
1500                endif
1501            endif
1502        endif
1503        
1504        if castCorpseSkin = 1 and timer preventSpamNecroAbilitiesTimer >= cdPreventSpamNecroAbilities and timer corpseSkinTimer >= cdCorpseSkin and skill "Necromancy" >= 65 and timer meditiationTimer >= cdMeditationMini and 2 < necroSymbols
1505            yell "[CorpseSkin"
1506            settimer preventSpamNecroAbilitiesTimer 0
1507            settimer corpseSkinTimer 0
1508            cooldown CorpseSkin cdCorpseSkin
1509            wait 500
1510            if gumpexists 622436516
1511                if ingump "12/" 622436516
1512                    @setvar! necroSymbols 12
1513                elseif ingump "13/" 622436516
1514                    @setvar! necroSymbols 13
1515                elseif ingump "14/" 622436516
1516                    @setvar! necroSymbols 14
1517                elseif ingump "15/" 622436516
1518                    @setvar! necroSymbols 15
1519                elseif ingump "16/" 622436516
1520                    @setvar! necroSymbols 16
1521                elseif ingump "17/" 622436516
1522                    @setvar! necroSymbols 17
1523                elseif ingump "18/" 622436516
1524                    @setvar! necroSymbols 18
1525                elseif ingump "19/" 622436516
1526                    @setvar! necroSymbols 19
1527                elseif ingump "20/" 622436516
1528                    @setvar! necroSymbols 20
1529                elseif ingump "21/" 622436516
1530                    @setvar! necroSymbols 21
1531                elseif ingump "11/" 622436516
1532                    @setvar! necroSymbols 11
1533                elseif ingump "10/" 622436516
1534                    @setvar! necroSymbols 10
1535                elseif ingump "9/" 622436516
1536                    @setvar! necroSymbols 9
1537                elseif ingump "8/" 622436516
1538                    @setvar! necroSymbols 8
1539                elseif ingump "7/" 622436516
1540                    @setvar! necroSymbols 7
1541                elseif ingump "6/" 622436516
1542                    @setvar! necroSymbols 6
1543                elseif ingump "5/" 622436516
1544                    @setvar! necroSymbols 5
1545                elseif ingump "4/" 622436516
1546                    @setvar! necroSymbols 4
1547                elseif ingump "3/" 622436516
1548                    @setvar! necroSymbols 3
1549                elseif ingump "2/" 622436516
1550                    @setvar! necroSymbols 2
1551                elseif ingump "1/" 622436516
1552                    @setvar! necroSymbols 1
1553                elseif ingump "0/" 622436516
1554                    @setvar! necroSymbols 0
1555                endif
1556            endif
1557        endif
1558            
1559        if castBloodOath = 1 and timer preventSpamNecroAbilitiesTimer >= cdPreventSpamNecroAbilities and timer bloodOathTimer >= cdBloodOath and 5 < necroSymbols
1560            yell "[BloodOath"
1561            settimer preventSpamNecroAbilitiesTimer 0
1562            settimer bloodOathTimer 0
1563            if gumpexists 622436516
1564                if ingump "12/" 622436516
1565                    @setvar! necroSymbols 12
1566                elseif ingump "13/" 622436516
1567                    @setvar! necroSymbols 13
1568                elseif ingump "14/" 622436516
1569                    @setvar! necroSymbols 14
1570                elseif ingump "15/" 622436516
1571                    @setvar! necroSymbols 15
1572                elseif ingump "16/" 622436516
1573                    @setvar! necroSymbols 16
1574                elseif ingump "17/" 622436516
1575                    @setvar! necroSymbols 17
1576                elseif ingump "18/" 622436516
1577                    @setvar! necroSymbols 18
1578                elseif ingump "19/" 622436516
1579                    @setvar! necroSymbols 19
1580                elseif ingump "20/" 622436516
1581                    @setvar! necroSymbols 20
1582                elseif ingump "21/" 622436516
1583                    @setvar! necroSymbols 21
1584                elseif ingump "11/" 622436516
1585                    @setvar! necroSymbols 11
1586                elseif ingump "10/" 622436516
1587                    @setvar! necroSymbols 10
1588                elseif ingump "9/" 622436516
1589                    @setvar! necroSymbols 9
1590                elseif ingump "8/" 622436516
1591                    @setvar! necroSymbols 8
1592                elseif ingump "7/" 622436516
1593                    @setvar! necroSymbols 7
1594                elseif ingump "6/" 622436516
1595                    @setvar! necroSymbols 6
1596                elseif ingump "5/" 622436516
1597                    @setvar! necroSymbols 5
1598                elseif ingump "4/" 622436516
1599                    @setvar! necroSymbols 4
1600                elseif ingump "3/" 622436516
1601                    @setvar! necroSymbols 3
1602                elseif ingump "2/" 622436516
1603                    @setvar! necroSymbols 2
1604                elseif ingump "1/" 622436516
1605                    @setvar! necroSymbols 1
1606                elseif ingump "0/" 622436516
1607                    @setvar! necroSymbols 0
1608                endif
1609            endif
1610        endif
1611        
1612        
1613        if castEvilOmen = 1 and timer preventSpamNecroAbilitiesTimer >= cdPreventSpamNecroAbilities and timer evilOmenTimer >= cdEvilOmen and skill "Necromancy" >= 60 and timer meditiationTimer >= cdMeditationMini and 2 < necroSymbols
1614            yell "[EvilOmen"
1615            settimer evilOmenTimer 0
1616            settimer preventSpamNecroAbilitiesTimer 0
1617            cooldown EvilOmen cdEvilOmen
1618            wait 500
1619            if gumpexists 622436516
1620                if ingump "12/" 622436516
1621                    @setvar! necroSymbols 12
1622                elseif ingump "13/" 622436516
1623                    @setvar! necroSymbols 13
1624                elseif ingump "14/" 622436516
1625                    @setvar! necroSymbols 14
1626                elseif ingump "15/" 622436516
1627                    @setvar! necroSymbols 15
1628                elseif ingump "16/" 622436516
1629                    @setvar! necroSymbols 16
1630                elseif ingump "17/" 622436516
1631                    @setvar! necroSymbols 17
1632                elseif ingump "18/" 622436516
1633                    @setvar! necroSymbols 18
1634                elseif ingump "19/" 622436516
1635                    @setvar! necroSymbols 19
1636                elseif ingump "20/" 622436516
1637                    @setvar! necroSymbols 20
1638                elseif ingump "21/" 622436516
1639                    @setvar! necroSymbols 21
1640                elseif ingump "11/" 622436516
1641                    @setvar! necroSymbols 11
1642                elseif ingump "10/" 622436516
1643                    @setvar! necroSymbols 10
1644                elseif ingump "9/" 622436516
1645                    @setvar! necroSymbols 9
1646                elseif ingump "8/" 622436516
1647                    @setvar! necroSymbols 8
1648                elseif ingump "7/" 622436516
1649                    @setvar! necroSymbols 7
1650                elseif ingump "6/" 622436516
1651                    @setvar! necroSymbols 6
1652                elseif ingump "5/" 622436516
1653                    @setvar! necroSymbols 5
1654                elseif ingump "4/" 622436516
1655                    @setvar! necroSymbols 4
1656                elseif ingump "3/" 622436516
1657                    @setvar! necroSymbols 3
1658                elseif ingump "2/" 622436516
1659                    @setvar! necroSymbols 2
1660                elseif ingump "1/" 622436516
1661                    @setvar! necroSymbols 1
1662                elseif ingump "0/" 622436516
1663                    @setvar! necroSymbols 0
1664                endif
1665            endif
1666        endif
1667        
1668        if castVampiricEmbrace = 1 and timer preventSpamNecroAbilitiesTimer >= cdPreventSpamNecroAbilities and timer vampiricEmbraceTimer >= cdVampiricEmbrace and skill "Necromancy" >= 75 and timer meditiationTimer >= cdMeditationMini and 3 < necroSymbols and findtype 8198 ground -1 -1 4 as jorpse
1669            yell "[VampiricEmbrace"
1670            wft 500
1671            target jorpse
1672            settimer preventSpamNecroAbilitiesTimer 0
1673            settimer vampiricEmbraceTimer 0
1674            cooldown VampiricEmbrace cdVampiricEmbrace
1675            wait 500
1676            if gumpexists 622436516
1677                if ingump "12/" 622436516
1678                    @setvar! necroSymbols 12
1679                elseif ingump "13/" 622436516
1680                    @setvar! necroSymbols 13
1681                elseif ingump "14/" 622436516
1682                    @setvar! necroSymbols 14
1683                elseif ingump "15/" 622436516
1684                    @setvar! necroSymbols 15
1685                elseif ingump "16/" 622436516
1686                    @setvar! necroSymbols 16
1687                elseif ingump "17/" 622436516
1688                    @setvar! necroSymbols 17
1689                elseif ingump "18/" 622436516
1690                    @setvar! necroSymbols 18
1691                elseif ingump "19/" 622436516
1692                    @setvar! necroSymbols 19
1693                elseif ingump "20/" 622436516
1694                    @setvar! necroSymbols 20
1695                elseif ingump "21/" 622436516
1696                    @setvar! necroSymbols 21
1697                elseif ingump "11/" 622436516
1698                    @setvar! necroSymbols 11
1699                elseif ingump "10/" 622436516
1700                    @setvar! necroSymbols 10
1701                elseif ingump "9/" 622436516
1702                    @setvar! necroSymbols 9
1703                elseif ingump "8/" 622436516
1704                    @setvar! necroSymbols 8
1705                elseif ingump "7/" 622436516
1706                    @setvar! necroSymbols 7
1707                elseif ingump "6/" 622436516
1708                    @setvar! necroSymbols 6
1709                elseif ingump "5/" 622436516
1710                    @setvar! necroSymbols 5
1711                elseif ingump "4/" 622436516
1712                    @setvar! necroSymbols 4
1713                elseif ingump "3/" 622436516
1714                    @setvar! necroSymbols 3
1715                elseif ingump "2/" 622436516
1716                    @setvar! necroSymbols 2
1717                elseif ingump "1/" 622436516
1718                    @setvar! necroSymbols 1
1719                elseif ingump "0/" 622436516
1720                    @setvar! necroSymbols 0
1721                endif
1722            endif
1723        endif
1724        
1725        if castPainSpike = 1 and timer preventSpamNecroAbilitiesTimer >= cdPreventSpamNecroAbilities and timer painSpikeTimer >= cdPainSpike and skill "Necromancy" >= 95 and timer meditiationTimer >= cdMeditationMini and 5 < necroSymbols and findtype 8198 ground -1 -1 6 as jorpse
1726            yell "[PainSpike"
1727            wft 500
1728            target myKillTarget
1729            wait 200
1730            settimer preventSpamNecroAbilitiesTimer 0
1731            if insysmsg "You do not see any corpses"
1732                // do nothing
1733            else
1734                settimer painSpikeTimer 0
1735                cooldown PainSpike cdPainSpike            
1736            endif
1737            if gumpexists 622436516
1738                if ingump "12/" 622436516
1739                    @setvar! necroSymbols 12
1740                elseif ingump "13/" 622436516
1741                    @setvar! necroSymbols 13
1742                elseif ingump "14/" 622436516
1743                    @setvar! necroSymbols 14
1744                elseif ingump "15/" 622436516
1745                    @setvar! necroSymbols 15
1746                elseif ingump "16/" 622436516
1747                    @setvar! necroSymbols 16
1748                elseif ingump "17/" 622436516
1749                    @setvar! necroSymbols 17
1750                elseif ingump "18/" 622436516
1751                    @setvar! necroSymbols 18
1752                elseif ingump "19/" 622436516
1753                    @setvar! necroSymbols 19
1754                elseif ingump "20/" 622436516
1755                    @setvar! necroSymbols 20
1756                elseif ingump "21/" 622436516
1757                    @setvar! necroSymbols 21
1758                elseif ingump "11/" 622436516
1759                    @setvar! necroSymbols 11
1760                elseif ingump "10/" 622436516
1761                    @setvar! necroSymbols 10
1762                elseif ingump "9/" 622436516
1763                    @setvar! necroSymbols 9
1764                elseif ingump "8/" 622436516
1765                    @setvar! necroSymbols 8
1766                elseif ingump "7/" 622436516
1767                    @setvar! necroSymbols 7
1768                elseif ingump "6/" 622436516
1769                    @setvar! necroSymbols 6
1770                elseif ingump "5/" 622436516
1771                    @setvar! necroSymbols 5
1772                elseif ingump "4/" 622436516
1773                    @setvar! necroSymbols 4
1774                elseif ingump "3/" 622436516
1775                    @setvar! necroSymbols 3
1776                elseif ingump "2/" 622436516
1777                    @setvar! necroSymbols 2
1778                elseif ingump "1/" 622436516
1779                    @setvar! necroSymbols 1
1780                elseif ingump "0/" 622436516
1781                    @setvar! necroSymbols 0
1782                endif
1783            endif
1784        endif
1785        
1786        if diffhits >= 30
1787            if findtype "Yellow Potion" backpack as pot 
1788                getlabel pot desc
1789                if "next usable" in desc
1790                    // do nothing
1791                else
1792                    dclick pot
1793                    wait 500
1794                endif
1795            endif
1796
1797            if diffhits >= 30 and mana >= 12
1798                while not targetexists
1799                    if diffhits >= 60
1800                        cast 'Heal'
1801                    else
1802                        cast 'Greater Heal'                
1803                    endif
1804                    wait 50
1805                    if hp = maxhp
1806                        hotkey '> Interrupt'
1807                        break
1808                    endif
1809                endwhile
1810                if targetexists
1811                    target self
1812                    wait 50
1813                endif
1814            endif
1815        endif
1816        
1817        if poisoned
1818            overhead "were poisoned"
1819            if findtype "Orange Potion" backpack
1820                while poisoned and findtype "Orange Potion" backpack as kpot 
1821                    dclick kpot
1822                    wait 100
1823                endwhile
1824            else
1825                while poisoned and diffhits <= 30 and not targetexists 
1826                if not poisoned 
1827                        hotkey '> Interrupt'
1828                        break
1829                    else
1830                        cast 'Cure'
1831                        wait 50
1832                    endif 
1833                endwhile
1834                if targetexists
1835                    target self
1836                    wait 500
1837                endif
1838            endif
1839        endif
1840
1841        if diffmana >= 30 and timer magicMushroomTimer >= cdMushroom and findtype "mushroom" backpack as mushy
1842            overhead "Eating shrooms" 66
1843            dclick mushy
1844            settimer magicMushroomTimer 0
1845        endif
1846        
1847        if index = 0
1848            
1849    if castFlamestrike = 1 and mana > 42
1850        #    while not targetexists and mana > 40
1851            
1852    if diffmana >= 30 and timer magicMushroomTimer >= cdMushroom and findtype "mushroom" backpack as mushy and not poisoned and timer meditiationTimer >= cdMeditationMini
1853                    overhead "Eating shrooms" 66
1854                    dclick mushy
1855                    settimer magicMushroomTimer 0
1856                endif
1857        
1858                if followers < 4 or dead myKillTarget or diffhits >= 30
1859                    hotkey '> Interrupt'
1860                    break
1861                else
1862                    if find myKillTarget ground -1 -1 10
1863                    while not targetexists and followers >= 4 and not dead myKillTarget and diffhits <= 30 and find myKillTarget ground -1 -1 10 and mana >= 40
1864                            cast 'Flamestrike'
1865                            wait 50
1866                        endwhile
1867                    else
1868                        overhead 'Too far away get closer to flamestrike'
1869                    endif
1870                endif 
1871                #endwhile
1872            if targetexists
1873                target myKillTarget
1874                wait 500
1875            endif
1876        endif
1877            
1878        elseif index = 1
1879        
1880        if castLightning = 1 and diffhits < 30 and mana >= 12 and timer lightningTimer >= cdLightning and timer meditiationTimer >= cdMeditationMini and not poisoned
1881                
1882                    if followers < 4 or dead myKillTarget or diffhits >= 30
1883                        hotkey '> Interrupt'
1884                        break
1885                    else
1886                        if find myKillTarget ground -1 -1 10
1887                        while not targetexists and followers >= 4 and not dead myKillTarget and diffhits <= 30 and find myKillTarget ground -1 -1 10 and not poisoned and mana >= 11   
1888                                cast 'Lightning'
1889                                wait 50
1890                            endwhile
1891                            else
1892                                overhead 'Too far to cast lightning, get closer'
1893                         endif
1894                    endif 
1895                
1896                if targetexists
1897                    target myKillTarget
1898                    settimer lightningTimer 0
1899                    cooldown Lightning cdLightning
1900                    wait 500
1901                endif
1902            endif
1903        
1904            elseif index = 2
1905        
1906            if castMagicArrow = 1 and diffhits < 30 and mana >= 5 and timer magicArrowTimer >= cdMagicArrow and timer meditiationTimer >= cdMeditationMini
1907                
1908                    if followers < 4 or dead myKillTarget or diffhits >= 30
1909                        hotkey '> Interrupt'
1910                        break
1911                    else
1912                        if find myKillTarget ground -1 -1 10
1913                        while not targetexists and followers >= 4 and not dead myKillTarget and diffhits <= 30 and find myKillTarget ground -1 -1 10 and not poisoned and mana >= 5
1914                            cast 'magic arrow'
1915                            wait 50
1916                            endwhile
1917                         else
1918                             overhead 'too far away for magic arrow, get closer'
1919                         endif
1920                    endif 
1921                
1922                if targetexists
1923                    target myKillTarget
1924                    settimer magicArrowTimer 0
1925                    cooldown MagicArrow cdMagicArrow
1926                    wait 500
1927                endif
1928            endif
1929            
1930            elseif index = 3
1931                
1932            if castHarm = 1 and diffhits < 30 and mana >= 9 and timer harmTimer >= cdHarm and timer meditiationTimer >= cdMeditationMini
1933               
1934                    if followers < 4 or dead myKillTarget or diffhits >= 30
1935                        hotkey '> Interrupt'
1936                        break
1937                    else
1938                        if find myKillTarget ground -1 -1 10
1939                        while not targetexists and followers >= 4 and not dead myKillTarget and diffhits <= 30 and find myKillTarget ground -1 -1 10 and not poisoned and mana >= 6
1940                            cast 'harm'
1941                            wait 50
1942                         endwhile
1943                        else
1944                            overhead 'too far away to cast harm, get closer'
1945                        endif
1946                    endif 
1947                
1948                if targetexists
1949                    target myKillTarget
1950                    settimer harmTimer 0
1951                    cooldown Harm cdHarm
1952                    wait 500
1953                endif
1954            endif
1955            
1956            elseif index = 4
1957                
1958            if castFireball = 1 and diffhits < 30 and mana >= 12 and timer fireballTimer >= cdFireball and timer meditiationTimer >= cdMeditationMini
1959                
1960                    if followers < 4 or dead myKillTarget or diffhits >= 30
1961                        hotkey '> Interrupt'
1962                        break
1963                    else
1964                        
1965                        if find myKillTarget ground -1 -1 10
1966                            while not targetexists and followers >= 4 and not dead myKillTarget and diffhits <= 30 and find myKillTarget ground -1 -1 10 and not poisoned and mana >= 9
1967                                cast 'fireball'
1968                                wait 50
1969                            endwhile
1970                        else
1971                            overhead 'too far away to fireball, get closer two'
1972                        endif
1973                    endif 
1974                
1975                if targetexists
1976                    target myKillTarget
1977                    settimer fireballTimer 0
1978                    cooldown Fireball cdFireball
1979                    wait 500
1980                endif
1981            endif
1982            
1983            elseif index = 5
1984                
1985            if castFireball = 1 and diffhits < 30 and mana >= 12 and timer fireballTimer >= cdFireball and timer meditiationTimer >= cdMeditationMini
1986                
1987                    if followers < 4 or dead myKillTarget or diffhits >= 30
1988                        hotkey '> Interrupt'
1989                        break
1990                    else
1991                        if find myKillTarget ground -1 -1 10
1992                        while not targetexists and followers >= 4 and not dead myKillTarget and diffhits <= 30 and find myKillTarget ground -1 -1 10 and not poisoned and mana >= 9
1993                                cast 'fireball'
1994                                wait 50
1995                            endwhile
1996                          else
1997                              overhead 'too far away to fireball, get closer two'
1998                        endif
1999                    endif 
2000                    
2001                if targetexists
2002                    target myKillTarget
2003                    settimer fireballTimer 0
2004                    cooldown Fireball cdFireball
2005                    wait 500
2006                endif
2007            endif
2008            
2009        endif
2010    
2011    endfor
2012   
2013    if find myKillTarget -1 -1 12 as killy
2014       // do nothing
2015    else
2016        overhead "Out of range" 34
2017        break
2018    endif
2019    
2020    
2021    if diffhits >= 30
2022            
2023        if findtype "Yellow Potion" backpack as pot 
2024            getlabel pot desc
2025            if "next usable" in desc
2026                // do nothing
2027            else
2028                dclick pot
2029                wait 500
2030            endif
2031        endif
2032
2033        if diffhits >= 30 and mana >= 12
2034            while not targetexists
2035                if diffhits >= 60
2036                    cast 'Heal'
2037                else
2038                    cast 'Greater Heal'                
2039                endif
2040                wait 50
2041                if hp = maxhp
2042                    hotkey '> Interrupt'
2043                    break
2044                endif
2045            endwhile
2046            if targetexists
2047                target self
2048                wait 50
2049            endif
2050        endif
2051    elseif mana < 55 and findbuff "actively meditating" 
2052        // wait for mana
2053    elseif timer meditiationTimer < cdMeditationMini and findbuff "actively meditating" 
2054        // wait for mana
2055    elseif castMindBlast = 1 and mana >= 32
2056        while not targetexists and mana > 30
2057            if diffmana >= 30 and timer magicMushroomTimer >= cdMushroom and findtype "mushroom" backpack as mushy
2058                overhead "Eating shrooms" 66
2059                dclick mushy
2060                settimer magicMushroomTimer 0
2061            endif
2062            if followers < 4 or dead myKillTarget or diffhits >= 30
2063                
2064                hotkey '> Interrupt'
2065                break
2066            else
2067                if  find myKillTarget ground -1 -1 10
2068                while not targetexists and followers >= 4 and not dead myKillTarget and diffhits <= 30 and find myKillTarget ground -1 -1 10 and not poisoned and mana >= 14
2069                    cast 'Mind Blast'
2070                    wait 50
2071                endwhile
2072                else 
2073                    overhead "Out of range, get closer to cast Mind Blast"
2074                endif
2075            endif 
2076        endwhile
2077        if targetexists
2078            target myKillTarget
2079            wait 500
2080        endif
2081        if castFlamestrike = 1 and mana > 42
2082            
2083            
2084                if diffmana >= 30 and timer magicMushroomTimer >= cdMushroom and findtype "mushroom" backpack as mushy
2085                    overhead "Eating shrooms" 66
2086                    dclick mushy
2087                    settimer magicMushroomTimer 0
2088                endif
2089        
2090                if followers < 4 or dead myKillTarget or diffhits >= 30
2091                    hotkey '> Interrupt'
2092                    break
2093                else
2094                    if  find myKillTarget ground -1 -1 10
2095                    while not targetexists and followers >= 4 and not dead myKillTarget and diffhits <= 30 and find myKillTarget ground -1 -1 10 and not poisoned and mana >= 40
2096                        cast 'Flamestrike'
2097                        wait 50
2098                    endwhile
2099                    else
2100                        overhead "Out of Range, get closer to cast Flamestrike 2"
2101                    endif
2102                endif 
2103            
2104            if targetexists
2105                target myKillTarget
2106                wait 500
2107            endif
2108        endif
2109    elseif not findbuff "actively meditating" and timer magicMushroomTimer >= cdMushroom and findtype "mushroom" backpack as mushy
2110        overhead "Eating shrooms" 66
2111        dclick mushy
2112        settimer magicMushroomTimer 0
2113    elseif not findbuff "actively meditating" and timer meditiationTimer >= cdMeditation
2114        say "all guard me"
2115        useskill 'meditation'
2116        settimer meditiationTimer 0
2117        wait 500
2118    endif
2119    wait 50
2120endwhile
2121wait 500
2122if targetexists 
2123    hotkey 'Cancel Current Target'
2124endif
2125if not findbuff "actively meditating" 
2126    say "all guard me"
2127endif
2128#while mana < 50
2129#    if setThisAsOneIfYouWantToTargetYourOwnKillOrItWillTargetClosestMonster = 0
2130#    hotkey 'Next Non-Friendly Monster Target'
2131#        wait 400
2132#        @setvar! myKillNext lasttarget 
2133#        getlabel myKillNext descPet2
2134#        overhead descPet2
2135#
2136#        if "(summoned)" in descPet or "(bonded)" in descPet 
2137#            overhead "Player pet, replaying..." 
2138#             replay 
2139#        endif     
2140#        if insysmsg "No one matching that was found"
2141#            if timer preventOverheadSpamTimer >= cdPreventOverheadSpam
2142#                overhead "no next target" 34
2143#                settimer preventOverheadSpamTimer 0
2144#            endif
2145#          elseif not find lasttarget ground -1 -1 9
2146#            overhead "▼ NEXT TARGET HERE ▼" 88 lasttarget
2147#            if timer preventOverheadSpamTimer >= cdPreventOverheadSpam
2148#                overhead "Move closer, more then 9 tiles away" 34
2149#                settimer preventOverheadSpamTimer 0
2150#            endif
2151#          elseif "(summoned)" in descPet or "(bonded)" in descPet
2152#              overhead "Thats a player pet, skipping 2"
2153#          endif
2154#                
2155#        else
2156#            overhead "▼ NEXT TARGET HERE ▼" 88 lasttarget
2157#            say "all guard me"
2158#        #attack lasttarget
2159#        endif    
2160#    endif
2161    if diffhits >= 30 and not dead myKillTarget
2162        if findtype "Yellow Potion" backpack as pot 
2163            getlabel pot desc
2164            if "next usable" in desc
2165                // do nothing
2166            else
2167                dclick pot
2168                wait 200
2169            endif
2170        endif
2171        if diffhits >= 30 and mana >= 12
2172            while not targetexists
2173                if diffhits >= 60
2174                    cast 'Heal'
2175                else
2176                    cast 'Greater Heal'                
2177                endif
2178                wait 50
2179                if hp = maxhp
2180                    hotkey '> Interrupt'
2181                    break
2182                endif
2183            endwhile
2184            if targetexists
2185                target self
2186                wait 50
2187            endif
2188        endif
2189    endif
2190    if not findbuff "actively meditating" 
2191        useskill 'meditation'
2192    endif
2193    wait 500
2194    #endwhile
2195if canYouMakeAMushroom = 1 and counttype "mushroom" backpack < butOnlyIHaveLessThenThisCount
2196    while counttype "mushroom" backpack < makeThisManyMushroomsCount
2197        cast "Create Food"
2198        wait 200
2199        if diffhits >= 20 or counttype "mushroom" backpack = 0
2200            break
2201        endif
2202    endwhile
2203endif
2204if castVampiricEmbrace = 1 and timer vampiricEmbraceTimer >= cdVampiricEmbrace and skill "Necromancy" >= 70 and findtype 8198 ground -1 -1 4 as jorpse
2205    say "[VampiricEmbrace"
2206    wft 500
2207    target jorpse
2208    settimer vampiricEmbraceTimer 0
2209    cooldown VampiricEmbrace cdVampiricEmbrace
2210endif
2211
2212if timer killTargetTimer >= cdKillTarget
2213    overhead "We cleared curse and mana drain targets" 34
2214    removelist myCursedTargets      
2215    removelist myManaDrainTargets
2216endif
2217   
2218if autoBotEnabled = 1
2219    replay
2220endif
2221
2222// thanks for using a Jaseowns script!
2223// https://www.youtube.com/jaseowns
2224    
2225    
2226    
2227    
2228    
2229    
2230    
2231    
2232    
2233    
2234// We did it