Back to "b" tags

Mod: Mage Bot v10.1.0 by Daklue Herding spamable by daklue

Description: Mod: Mage Bot v10.1.0 by Daklue Herding spamable

1# One hotkey mage cycle, nox, poison by Jaseowns
2# UO Outlands - https://outlands.uorazorscripts.com/mage-bot
3#
4# Version: v10.1.0
5#
6#    
7// 8/18/2023
8//  - add new target system - nearest/ next
9#
10##################
11## Always room for improvment, thanks for watching!
12############
13
14
15# continue to fight the same target even after summons
16# target not seen - (warmode maybe?)
17@setvar! minimumWaitForPing 200
18
19# make sure you add a friends list called: IgnoreMobs
20@setvar! didYouSetupIgnoreMobs 0
21
22
23// 0 you choose (all kill)
24// 1 will target nearest
25// 2 will be find type
26// 3 will be target next (newest one 8/14/2023)
27@setvar! useTargetSystem 2
28
29# Do you want to use the new FindType code? Use 1 here
30# Do you want to use the Target Nearest / Next? Use 2 here
31# Else it will use the Target Closest Mon functionality 
32@setvar! useFindTypeToTargetMonster 2
33
34# after a kill you must have this amount of mana to continue to next target
35@setvar! minimumManaToCast 55 
36
37# Set this to one, if you want to cast poison once no matter what
38# If you have 100 poisoning and want Lethal, set this to 0
39@setvar! castPoisonAnyway 0
40
41# This will auto replay this script if you want it too
42@setvar! autoBotEnabled 1
43
44
45# Update this variable to 1 for ALL KILL
46# Update this variable to 0 for target nearest
47@setvar! setThisAsOneIfYouWantToTargetYourOwnKillOrItWillTargetClosestMonster 0
48
49################################
50###### Random abilities
51################
52@setvar! automaticallySkinCorpses 1
53@setvar! manaReserve 50
54@setvar! cdRetryBasedOnTargetNotSeen 2000
55
56# Ultimate Summoner Hotkey Choose your summons by Jaseowns
57# UO Outlands
58# This is part of the mage bot, but you can have it
59# as its own hotkey
60
61###############
62###  Choose your summons
63######
64@setvar! breakSpellCastAndResummonIfLessThanXFollowers 4
65@setvar! renamePets 0
66
67# Earth: 0, 1, 2
68@setvar! castSummonEarthElementalCount 0
69@setvar! castSummonMummyCount 1
70
71# Fire: 0, 1, 2
72@setvar! castSummonFireElementalCount 0
73@setvar! castSummonLichCount 1
74
75# Demon: 0, 1, 2
76@setvar! castSummonDemonCount 0
77@setvar! castSummonThrallCount 0
78
79# Air: 0, 1, 2
80@setvar! castSummonAirCount 0
81@setvar! castSummonFiendCount 0
82
83# Water: 0, 1, 2
84@setvar! castSummonWaterCount 0
85@setvar! castSummonRagWitchCount 0
86
87# Creature: 0, 1, 2, 3, 4, 5
88@setvar! castSummonCreatureCount 0
89
90# Energy Vortex: 0, 1
91@setvar! castEnergyVortexCount 0
92@setvar! castJackalSpiritCount 0
93
94# Blade Spirit: 0, 1
95@setvar! castBladeSpiritCount 0
96@setvar! castSkeletalHuskCount 0
97
98###############
99###  Choose your spells
100######
101@setvar! castCurse 1
102@setvar! castManadrain 0
103@setvar! castManaVampire 0
104@setvar! castLightning 1
105@setvar! castChainLightning 0
106@setvar! castFireball 1
107@setvar! castHarm 1
108@setvar! castMagicArrow 1
109# When other spells are on cooldown, do you want to cast Ebolt, MindBlast, Flamestrike or all three
110@setvar! castEbolt 1
111@setvar! castMindBlast 1
112@setvar! castFlamestrike 0
113
114
115################################
116###### Heal Controllers
117################
118@setvar! hpCheckToTriggerGreaterHealSpell 30
119@setvar! hpCheckToTriggerMiniEmergencyHealSpell 60
120@setvar! hpCheckToTriggerHealPotion 45
121        
122################################
123###### Potion Controllers
124################
125@setvar! automaticallyDrinkStrPotIfOverWeight 1
126# Drink Magic resist potion (only if magic shield buff not found)
127@setvar! automaticallyDrinkMagicPot 1
128@setvar! automaticallyDrinkHealPot 1
129@setvar! automaticallyDrinkCurePot 1
130#@setvar! automaticallyDrinkRefreshPot 1
131
132@setvar! hpCheckToTriggerCurePotion 45
133#@setvar! stamDiffCheckToTriggerRedPotion 10
134
135
136### Buffs
137@setvar! castBless 0
138@setvar! castArchProtection 0
139@setvar! castMagicShield 1
140@setvar! castReactiveArmor 1
141
142if skill "Inscription" >= 50
143    @setvar! castBless 1
144    @setvar! castArchProtection 1
145endif
146
147
148###############
149###  Choose your necro spells (ignored if less then required necro skill)
150######
151@setvar! castEvilOmen 1
152@setvar! castCorpseSkin 1
153@setvar! castVampiricEmbrace 1
154@setvar! castMindRot 1
155@setvar! castPoisonStrike 1
156@setvar! castBloodOath 1
157@setvar! castPainSpike 1
158@setvar! requireWitherBeforeSummons 0
159
160###############
161### Edit these cooldowns to match your wizard grimoire
162######
163@setvar! canYouMakeAMushroom 1
164@setvar! cdLightning 20000
165@setvar! cdChainLightning 60000
166@setvar! cdMagicArrow 20000
167@setvar! cdHarm 20000
168@setvar! cdFireball 20000
169
170@setvar! cdAutoHealTamerPet 15000
171
172###############
173### Necro Cooldowns
174######
175@setvar! cdEvilOmen 30500
176@setvar! cdVampiricEmbrace 30500
177@setvar! cdCorpseSkin 30500
178@setvar! cdMindRot 30500
179@setvar! cdWither 30500
180@setvar! cdVengefulSpirit 30500
181@setvar! cdBloodOath 30500
182@setvar! cdPainSpike 30500
183@setvar! cdPoisonStrike 30500
184
185#### Buff Cooldowns
186@setvar! cdMushroom 61000
187@setvar! cdMagicShield 61000
188@setvar! cdReactiveArmor 61000
189@setvar! cdMeditation 10000
190@setvar! cdMeditationMini 3000
191@setvar! cdKillTarget 60000
192
193#### Random cooldowns
194@setvar! cdPreventOverheadSpam 2000
195@setvar! cdSkinningCheck 3000
196@setvar! cdCleansingBrew 125000
197@setvar! cdHerdingTimer 4000 
198
199#### Mushroom count (I like a lot of shroomies)
200@setvar! makeThisManyMushroomsCount 15
201@setvar! butOnlyIHaveLessThenThisCount 5
202
203#### This will send in pet for out of range targets
204@setvar! patrolPetEvenIfLastTargetIsBeyondEightTiles 1
205
206if counttype "gold coin" backpack as total
207    if diffweight < 10 and 10000 < total
208        overhead "Warning: {{total}} gold and no weight!" 34
209    endif
210endif
211    
212#### Pet Names, unique to you
213if not listexists petNameList
214    createlist petNameList
215endif
216if list petNameList = 0
217    pushlist petNameList "jaseneccy"
218    pushlist petNameList "jaseyoutube"
219    pushlist petNameList "jaseytfollow"
220    pushlist petNameList "jaseytfollower"
221    pushlist petNameList "jasesubscribed"
222    pushlist petNameList "jaseoutlands"
223    pushlist petNameList "jaseuorazorscripts"
224    pushlist petNameList "jaseyoutuber"
225    pushlist petNameList "jasefunez"
226    pushlist petNameList "jasetwitch"
227    pushlist petNameList "jasesubscribe"
228    pushlist petNameList "jasefueoz"
229endif
230
231@setvar! jaseDebugMode 0
232
233##################################################################
234# 
235#   Hopefully you do not have to edit after this :)
236#
237##################################################################
238
239if didYouSetupIgnoreMobs = 0 and useFindTypeToTargetMonster = 0
240    overhead "For this script to work, make sure you add a friends list called: IgnoreMobs" 34
241    sysmsg  "For this script to work, make sure you add a friends list called: IgnoreMobs" 34
242    wait 1500
243    overhead "Click Friends Tab -> [checkmark] enabled -> [checkmark] Next/Prev Target ignores 'IgnoreMobs'" 88
244    sysmsg "Click Friends Tab -> [checkmark] enabled -> [checkmark] Next/Prev Target ignores 'IgnoreMobs'" 88
245    wait 5000
246    overhead "If everything is setup, update didYouSetupIgnoreMobs to 1"
247    sysmsg "If everything is setup, update didYouSetupIgnoreMobs to 1"
248    wait 5000
249    replay
250endif
251
252if dead 
253    overhead "Rip" 34
254    for 10
255        if gumpexists 2957810225
256            gumpresponse 1 2957810225
257            break
258        endif        
259        wait 500
260    endfor
261    replay
262endif
263
264@setvar! tamerModeEngaged 0
265
266if skill "Animal Taming" > 50
267    @setvar! tamerModeEngaged 1
268    if not varexist jaseTankPet or not find jaseTankPet ground -1 -1 12
269        overhead "Select your tank pet" 88
270        @setvar! jaseTankPet    
271    endif
272endif
273 
274if weight >= maxweight and not findbuff "strength" and automaticallyDrinkStrPotIfOverWeight = 1 and findtype "white potion" backpack as pot
275    dclick pot
276    wait 200
277endif
278
279if not gumpexists 622436516 and skill "Necromancy" >= 50
280    say '[NecromancyHotbar'
281    wait 500
282endif
283
284if skill "Tracking" > 0
285    if not findbuff "tracking"
286        clearsysmsg
287        while not gumpexists 4267467659
288            useskill 'tracking'
289            wait minimumWaitForPing
290        endwhile
291        if gumpexists 4267467659
292            while not insysmsg "You will now hunt all hostile players."
293                gumpresponse 8 4267467659
294                waitforgump 4267467659 5000
295            endwhile
296            gumpresponse 6 4267467659
297            wait minimumWaitForPing
298        endif
299        gumpclose 4267467659
300    endif
301endif
302
303if not timerexists skinningCheckTimer
304    settimer skinningCheckTimer cdSkinningCheck
305endif
306
307if not timerexists retryBasedOnTargetNotSeenTimer
308    settimer retryBasedOnTargetNotSeenTimer cdRetryBasedOnTargetNotSeen
309endif
310
311
312if automaticallySkinCorpses = 1 and findtype "corpse" ground -1 -1 2 as jorpse
313    if findtype "Elven Spellblade" backpack and timer skinningCheckTimer >= cdSkinningCheck 
314        while not targetexists 
315            useskill 'forensicevaluation'
316        endwhile
317        if targetexists beneficial or targetexists neutral
318            hotkey "Target Self"
319            wait minimumWaitForPing
320            settimer skinningCheckTimer 0
321            @ignore jorpse
322        endif
323    endif
324endif
325
326// Make sure we have a spell book attached
327if findlayer self righthand as item
328    // do nothing
329elseif findtype "3834" backpack as item
330    getlabel item spellBookDesc
331    if "blessed" in spellBookDesc
332        @ignore item
333    else
334        dclick item    
335    endif
336else 
337    overhead "No book bro!" 34
338endif
339
340// Setting current necro symbols - checks again it the attack loop
341@setvar! necroSymbols 12
342if gumpexists 622436516 and skill "Necromancy" >= 50
343    if ingump "12/" 622436516
344        @setvar! necroSymbols 12
345    elseif ingump "13/" 622436516
346        @setvar! necroSymbols 13
347    elseif ingump "14/" 622436516
348        @setvar! necroSymbols 14
349    elseif ingump "15/" 622436516
350        @setvar! necroSymbols 15
351    elseif ingump "16/" 622436516
352        @setvar! necroSymbols 16
353    elseif ingump "17/" 622436516
354        @setvar! necroSymbols 17
355    elseif ingump "18/" 622436516
356        @setvar! necroSymbols 18
357    elseif ingump "19/" 622436516
358        @setvar! necroSymbols 19
359    elseif ingump "20/" 622436516
360        @setvar! necroSymbols 20
361    elseif ingump "21/" 622436516
362        @setvar! necroSymbols 21
363    elseif ingump "11/" 622436516
364        @setvar! necroSymbols 11
365    elseif ingump "10/" 622436516
366        @setvar! necroSymbols 10
367    elseif ingump "9/" 622436516
368        @setvar! necroSymbols 9
369    elseif ingump "8/" 622436516
370        @setvar! necroSymbols 8
371    elseif ingump "7/" 622436516
372        @setvar! necroSymbols 7
373    elseif ingump "6/" 622436516
374        @setvar! necroSymbols 6
375    elseif ingump "5/" 622436516
376        @setvar! necroSymbols 5
377    elseif ingump "4/" 622436516
378        @setvar! necroSymbols 4
379    elseif ingump "3/" 622436516
380        @setvar! necroSymbols 3
381    elseif ingump "2/" 622436516
382        @setvar! necroSymbols 2
383    elseif ingump "1/" 622436516
384        @setvar! necroSymbols 1
385    elseif ingump "0/" 622436516
386        @setvar! necroSymbols 0
387    endif
388endif
389
390if not timerexists reactiveArmorTimer
391    createtimer reactiveArmorTimer
392    settimer reactiveArmorTimer cdMagicShield
393endif
394
395if not timerexists cleansingBrewTimer
396    settimer cleansingBrewTimer cdCleansingBrew
397endif
398
399if not timerexists magicShieldTimer
400    createtimer magicShieldTimer
401    settimer magicShieldTimer cdMagicShield
402endif
403
404if not timerexists magicMushroomTimer
405    createtimer magicMushroomTimer
406    settimer magicMushroomTimer cdMushroom
407endif
408
409if not timerexists magicArrowTimer
410    createtimer magicArrowTimer
411    settimer magicArrowTimer cdMagicArrow
412endif
413
414if not timerexists lightningTimer
415    createtimer lightningTimer
416    settimer lightningTimer cdLightning
417endif
418
419if not timerexists chainLightningTimer
420    settimer chainLightningTimer cdChainLightning
421endif
422
423if not timerexists harmTimer
424    createtimer harmTimer
425    settimer harmTimer cdHarm
426endif
427
428if not timerexists autoHealTamerPet
429    createtimer autoHealTamerPet
430    settimer autoHealTamerPet cdAutoHealTamerPet
431endif
432
433if not timerexists fireballTimer
434    createtimer fireballTimer
435    settimer fireballTimer cdFireball
436endif
437
438if not timerexists evilOmenTimer
439    createtimer evilOmenTimer
440    settimer evilOmenTimer cdEvilOmen
441endif
442
443if not timerexists vampiricEmbraceTimer
444    createtimer vampiricEmbraceTimer
445    settimer vampiricEmbraceTimer cdVampiricEmbrace
446endif
447
448if not timerexists corpseSkinTimer
449    createtimer corpseSkinTimer
450    settimer corpseSkinTimer cdCorpseSkin
451endif
452
453if not timerexists mindRotTimer
454    createtimer mindRotTimer
455    settimer mindRotTimer cdMindRot
456endif
457
458if not timerexists meditiationTimer
459    createtimer meditiationTimer
460    settimer meditiationTimer cdMeditation
461endif
462
463if not timerexists killTargetTimer
464    createtimer killTargetTimer
465    settimer killTargetTimer cdKillTarget
466endif
467
468if not timerexists witherTimer
469    createtimer witherTimer
470    settimer witherTimer cdWither
471endif
472
473if not timerexists vengefulSpiritTimer
474    createtimer vengefulSpiritTimer
475    settimer vengefulSpiritTimer cdVengefulSpirit
476endif
477
478if not timerexists bloodOathTimer
479    createtimer bloodOathTimer
480    settimer bloodOathTimer cdBloodOath
481endif
482
483if not timerexists painSpikeTimer
484    createtimer painSpikeTimer
485    settimer painSpikeTimer cdPainSpike
486endif
487
488if not timerexists poisonStrikeTimer
489    createtimer poisonStrikeTimer
490    settimer poisonStrikeTimer cdPoisonStrike
491endif
492
493if not timerexists preventOverheadSpamTimer
494    createtimer preventOverheadSpamTimer
495    settimer preventOverheadSpamTimer cdPreventOverheadSpam
496endif
497
498if not timerexists HerdTimer
499    createtimer HerdTimer
500    settimer HerdTimer cdHerdingTimer
501endif
502
503@setvar! cdPreventSpamNecroAbilities 750
504if not timerexists preventSpamNecroAbilitiesTimer
505    createtimer preventSpamNecroAbilitiesTimer
506    settimer preventSpamNecroAbilitiesTimer cdPreventSpamNecroAbilities
507endif
508
509if not varexist myEarthPet
510    @setvar! myEarthPet 0
511endif
512
513// make sure we have enough symbols to summon (6 for wither + vengful spirit)
514if skill "Necromancy" >= 90 and requireWitherBeforeSummons = 1
515    while followers < 4 and 6 > necroSymbols
516        // we already have vengeful spirit active, skip the check
517        if timer vengefulSpiritTimer < cdVengefulSpirit
518           break
519        endif
520        if diffhits >= hpCheckToTriggerGreaterHealSpell
521            if targetexists 
522                hotkey 'Cancel Current Target'
523            endif
524            while not targetexists 'beneficial'
525                if diffhits >= hpCheckToTriggerMiniEmergencyHealSpell
526                    cast 'Heal'
527                else
528                    cast 'Greater Heal'                
529                endif
530                wait 50
531                if hp = maxhp
532                    hotkey '> Interrupt'
533                    break
534                endif
535            endwhile
536            if targetexists 'beneficial'
537                hotkey 'Target Self'
538            endif
539        endif
540        if timer preventOverheadSpamTimer >= cdPreventOverheadSpam
541            overhead "waiting for symbols" 88
542            settimer preventOverheadSpamTimer 0
543        endif
544        if gumpexists 622436516 and skill "Necromancy" >= 50
545            if ingump "12/" 622436516
546                @setvar! necroSymbols 12
547            elseif ingump "13/" 622436516
548                @setvar! necroSymbols 13
549            elseif ingump "14/" 622436516
550                @setvar! necroSymbols 14
551            elseif ingump "15/" 622436516
552                @setvar! necroSymbols 15
553            elseif ingump "16/" 622436516
554                @setvar! necroSymbols 16
555            elseif ingump "17/" 622436516
556                @setvar! necroSymbols 17
557            elseif ingump "18/" 622436516
558                @setvar! necroSymbols 18
559            elseif ingump "19/" 622436516
560                @setvar! necroSymbols 19
561            elseif ingump "20/" 622436516
562                @setvar! necroSymbols 20
563            elseif ingump "21/" 622436516
564                @setvar! necroSymbols 21
565            elseif ingump "11/" 622436516
566                @setvar! necroSymbols 11
567            elseif ingump "10/" 622436516
568                @setvar! necroSymbols 10
569            elseif ingump "9/" 622436516
570                @setvar! necroSymbols 9
571            elseif ingump "8/" 622436516
572                @setvar! necroSymbols 8
573            elseif ingump "7/" 622436516
574                @setvar! necroSymbols 7
575            elseif ingump "6/" 622436516
576                @setvar! necroSymbols 6
577            elseif ingump "5/" 622436516
578                @setvar! necroSymbols 5
579            elseif ingump "4/" 622436516
580                @setvar! necroSymbols 4
581            elseif ingump "3/" 622436516
582                @setvar! necroSymbols 3
583            elseif ingump "2/" 622436516
584                @setvar! necroSymbols 2
585            elseif ingump "1/" 622436516
586                @setvar! necroSymbols 1
587            elseif ingump "0/" 622436516
588                @setvar! necroSymbols 0
589            endif
590        endif
591    endwhile
592endif
593
594
595if diffhits >= hpCheckToTriggerGreaterHealSpell
596    if targetexists 
597        hotkey 'Cancel Current Target'
598    endif
599    while not targetexists 'beneficial'
600        if diffhits >= hpCheckToTriggerMiniEmergencyHealSpell
601            cast 'Heal'
602        else
603            cast 'Greater Heal'                
604        endif
605        wait 50
606        if hp = maxhp
607            hotkey '> Interrupt'
608            break
609        endif
610    endwhile
611    if targetexists 'beneficial'
612        hotkey "Target Self"
613    endif
614    replay
615endif
616
617if renamePets = 0
618    clearlist petNameList
619endif
620 
621if castSummonFireElementalCount > 0 and castSummonLichCount > 0
622    overhead "I am not going to do that. Update lich/fire to one or the other." 34
623    sysmsg "I am not going to do that. Update lich/fire to one or the other." 34
624    wait 2000
625    replay
626elseif castSummonEarthElementalCount > 0 and castSummonMummyCount > 0
627    overhead "I am not going to do that. Update earth/mummy to one or the other." 34
628    sysmsg "I am not going to do that. Update earth/mummy to one or the other." 34
629    wait 2000
630    replay
631elseif castSummonDemonCount > 0 and castSummonThrallCount > 0
632    overhead "I am not going to do that. Update demon/thrall to one or the other." 34
633    sysmsg "I am not going to do that. Update demon/thrall to one or the other." 34
634    wait 2000
635    replay
636elseif castSummonAirCount > 0 and castSummonFiendCount > 0
637    overhead "I am not going to do that. Update air/fiend to one or the other." 34
638    sysmsg "I am not going to do that. Update air/fiend to one or the other." 34
639    wait 2000
640    replay
641elseif castSummonWaterCount > 0 and castSummonRagWitchCount > 0
642    overhead "I am not going to do that. Update water/witch to one or the other." 34
643    sysmsg "I am not going to do that. Update water/witch to one or the other." 34
644    wait 2000
645    replay
646endif
647
648if not gumpexists 622436516 and skill "Necromancy" >= 50
649    say '[NecromancyHotbar'
650    wait 500
651endif
652
653if not varexist myMainTankPet
654    @setvar! myMainTankPet 0
655endif
656
657if not varexist fireOne
658    @setvar! fireOne 0
659endif
660
661if not varexist fireTwo
662    @setvar! fireTwo 0
663endif
664
665if not varexist earthOne
666    @setvar! earthOne 0
667endif
668
669if not varexist earthTwo
670    @setvar! earthTwo 0
671endif
672
673if not varexist demonOne
674    @setvar! demonOne 0
675endif
676
677if not varexist demonTwo
678    @setvar! demonTwo 0
679endif
680
681if not varexist airOne
682    @setvar! airOne 0
683endif
684
685if not varexist airTwo
686    @setvar! airTwo 0
687endif
688
689if not varexist waterOne
690    @setvar! waterOne 0
691endif
692
693if not varexist waterTwo
694    @setvar! waterTwo 0
695endif
696
697if not varexist evOne
698    @setvar! evOne 0
699endif
700
701if not varexist bsOne
702    @setvar! bsOne 0
703endif
704
705removelist summonList
706createlist summonList
707    
708if followers = 0
709    @setvar! followCount 0
710elseif followers = 1
711    @setvar! followCount 1
712elseif followers = 2
713    @setvar! followCount 2
714elseif followers = 3
715    @setvar! followCount 3
716elseif followers = 4
717    @setvar! followCount 4
718elseif followers = 5
719    @setvar! followCount 5
720endif
721
722if castSummonEarthElementalCount > 0 or castSummonMummyCount > 0
723    if dead earthOne or not find earthOne ground -1 -1 18
724        if followers < 4
725            pushlist summonList "Earth Elemental"
726            @setvar! earthOne 1
727        endif
728    endif
729    if castSummonEarthElementalCount > 1 or castSummonMummyCount > 1
730        if dead earthTwo or not find earthTwo ground -1 -1 18
731            if followers < 4
732                pushlist summonList "Earth Elemental"
733                @setvar! earthTwo 1
734            endif
735        endif
736    endif
737endif
738
739if castSummonFireElementalCount > 0 or castSummonLichCount > 0
740    if dead fireOne or not find fireOne ground -1 -1 18
741        if followers < 4
742            pushlist summonList "Fire Elemental"
743            @setvar! fireOne 1
744        endif
745    endif
746    if castSummonFireElementalCount > 1 or castSummonLichCount > 1
747        if dead fireTwo or not find fireTwo ground -1 -1 18
748            if followers < 4
749                pushlist summonList "Fire Elemental"
750                @setvar! fireTwo 1
751            endif
752        endif
753    endif
754endif
755
756if castSummonDemonCount > 0 or castSummonThrallCount > 0
757    if dead demonOne or not find demonOne ground -1 -1 18
758        if followers < 4
759            pushlist summonList "Summon Daemon"
760            @setvar! demonOne 1
761        endif
762    endif
763    if castSummonDemonCount > 1 or castSummonThrallCount > 1
764        if dead demonTwo or not find demonTwo ground -1 -1 18
765            if followers < 4
766                pushlist summonList "Summon Daemon"
767                @setvar! demonTwo 1
768            endif
769        endif
770    endif
771endif
772
773if castSummonAirCount > 0 or castSummonFiendCount > 0
774    if dead airOne or not find airOne ground -1 -1 18
775        if followers < 4
776            pushlist summonList "Air Elemental"
777            @setvar! airOne 1
778        endif
779    endif
780    if castSummonAirCount > 1 or castSummonFiendCount > 1
781        if dead airTwo or not find airTwo ground -1 -1 18
782            if followers < 4
783                pushlist summonList "Air Elemental"
784                @setvar! airTwo 1
785            endif
786        endif
787    endif
788endif
789
790if castSummonWaterCount > 0 or castSummonRagWitchCount > 0
791    if dead waterOne or not find waterOne ground -1 -1 18
792        if followers < 4
793            pushlist summonList "Water Elemental"
794            @setvar! waterOne 1
795        endif
796    endif
797    if castSummonWaterCount > 1 or castSummonRagWitchCount > 1
798        if dead waterTwo or not find waterTwo ground -1 -1 18
799            if followers < 4
800                pushlist summonList "Water Elemental"
801                @setvar! waterTwo 1
802            endif
803        endif
804    endif
805endif
806
807if castEnergyVortexCount > 0 or castJackalSpiritCount > 0
808    if dead evOne or not find evOne ground -1 -1 18
809        if followers < 5
810            pushlist summonList "Energy Vortex"
811            @setvar! evOne 1
812        endif
813    endif
814endif
815
816if castBladeSpiritCount > 0 or castSkeletalHuskCount > 0
817    if dead bsOne or not find bsOne ground -1 -1 18
818        if followers < 5
819            pushlist summonList "Blade Spirits"
820            @setvar! bsOne 1
821        endif
822    endif
823endif
824
825if followers < 5
826    if castSummonCreatureCount = 1
827        pushlist summonList "Summ. Creature"
828    elseif castSummonCreatureCount = 2
829        pushlist summonList "Summ. Creature"
830        pushlist summonList "Summ. Creature"
831    elseif castSummonCreatureCount = 3
832        pushlist summonList "Summ. Creature"
833        pushlist summonList "Summ. Creature"
834        pushlist summonList "Summ. Creature"
835    elseif castSummonCreatureCount = 4
836        pushlist summonList "Summ. Creature"
837        pushlist summonList "Summ. Creature"
838        pushlist summonList "Summ. Creature"
839        pushlist summonList "Summ. Creature"
840    elseif castSummonCreatureCount = 5
841        pushlist summonList "Summ. Creature"
842        pushlist summonList "Summ. Creature"
843        pushlist summonList "Summ. Creature"
844        pushlist summonList "Summ. Creature"
845        pushlist summonList "Summ. Creature"
846    endif
847    while targetexists 
848        hotkey 'Cancel Current Target'
849        wait 200
850    endwhile
851endif
852
853foreach summon in summonList
854    if followers < 5
855        overhead "Casting Summon: {{summon}}" 88
856        while mana < 50
857            if timer magicMushroomTimer >= cdMushroom and findtype "mushroom" backpack as mushy
858                overhead "Eating shrooms" 66
859                dclick mushy
860                @setvar! jase_shrooms mushy
861                wait 200
862                if insysmsg "You consume a magic mushroom and restore some mana."
863                    settimer magicMushroomTimer 0    
864                elseif insysmsg "before you may consume another magic mushroom" or insysmsg "been in combat with another"
865                    settimer magicMushroomTimer 30000
866                endif
867            endif
868            if diffhits >= hpCheckToTriggerGreaterHealSpell
869                replay
870            endif
871            if timer preventOverheadSpamTimer >= cdPreventOverheadSpam
872                overhead "waiting for mana" 88
873                settimer preventOverheadSpamTimer 0
874            endif
875            if not findbuff "Actively Meditating"
876                useskill "meditation"
877            endif
878            wait 200
879        endwhile
880        
881        @setvar! needVengefulSpirit 0
882        
883        if summon = "Earth Elemental" and castSummonMummyCount > 0
884            @setvar! needVengefulSpirit 1
885        elseif summon = "Fire Elemental" and castSummonLichCount > 0
886            @setvar! needVengefulSpirit 1
887        elseif summon = "Summon Daemon" and castSummonThrallCount > 0
888            @setvar! needVengefulSpirit 1
889        elseif summon = "Air Elemental" and castSummonFiendCount > 0
890            @setvar! needVengefulSpirit 1
891        elseif summon = "Water Elemental" and castSummonRagWitchCount > 0
892            @setvar! needVengefulSpirit 1
893        elseif summon = "Summ. Creature" and skill "Necromancy" >= 50
894            @setvar! needVengefulSpirit 1
895        elseif summon = "Energy Vortex" and castJackalSpiritCount > 0
896            @setvar! needVengefulSpirit 1
897        elseif summon = "Blade Spirits" and castSkeletalHuskCount > 0
898            @setvar! needVengefulSpirit 1
899        elseif timer vengefulSpiritTimer <= cdVengefulSpirit and skill "Necromancy" >= 50
900            if timer preventOverheadSpamTimer >= cdPreventOverheadSpam
901                overhead  "Waiting for spirit to go away" 88
902                settimer preventOverheadSpamTimer 0
903            endif
904            replay
905        endif
906        
907        if needVengefulSpirit = 1
908            if timer vengefulSpiritTimer >= cdVengefulSpirit and skill "Necromancy" >= 50
909                yell "[VengefulSpirit"
910                settimer vengefulSpiritTimer 0
911                wait 500
912            endif
913        elseif timer vengefulSpiritTimer <= cdVengefulSpirit and skill "Necromancy" >= 50
914            if timer preventOverheadSpamTimer >= cdPreventOverheadSpam
915                overhead  "Waiting for spirit to go away" 88
916                settimer preventOverheadSpamTimer 0
917            endif
918            replay
919        endif
920
921        if followers = 0
922            @setvar! followCount 0
923        elseif followers = 1
924            @setvar! followCount 1
925        elseif followers = 2
926            @setvar! followCount 2
927        elseif followers = 3
928            @setvar! followCount 3
929        elseif followers = 4
930            @setvar! followCount 4
931        elseif followers = 5
932            @setvar! followCount 5
933        endif
934        
935        if summon = "Summ. Creature" or summon = "Blade Spirits"
936            // these only take 1 - so keep trying to cast
937        elseif followers >= 4
938            // if we already at 4, skip to next summon
939            break
940        endif
941        
942        
943        while followers = followCount
944            if followers = 5
945                break
946            endif
947            cast summon
948            wft 500
949            if targetexists 
950                hotkey "Target Self"
951                wait 200
952            endif
953            if timer witherTimer >= cdWither and skill "Necromancy" >= 95
954                yell "[Wither"
955                settimer witherTimer 0
956            endif
957            if diffhits >= hpCheckToTriggerGreaterHealSpell
958                if targetexists 
959                    hotkey "Cancel Current target"
960                endif
961                overhead "Need a heal!"
962                hotkey '> Interrupt'
963                while diffhits >= hpCheckToTriggerGreaterHealSpell and mana > 12
964                    while not targetexists beneficial
965                        if diffhits >= hpCheckToTriggerMiniEmergencyHealSpell
966                            cast 'Heal'
967                        else
968                            cast 'Greater Heal'                
969                        endif
970                        wait 50
971                    endwhile
972                    while targetexists beneficial
973                        hotkey "Target Self"
974                        wait 50
975                    endwhile
976                endwhile
977            endif
978        endwhile
979        wait 200
980        
981        @setvar! myFreshlySummonedPet 0
982
983        // 158 - an ancient mummy
984        // 14 - an earth elemental
985        if summon = "Earth Elemental" and findtype 158|14 ground -1 -1 2 as myPet
986            @setvar! myFreshlySummonedPet myPet
987            if earthOne = 1
988                @setvar! earthOne myPet
989            elseif earthTwo = 1
990                @setvar! earthTwo myPet
991            endif
992        // 24 - a lich
993        // 15 - a fire elemental
994        elseif summon = "Fire Elemental" and findtype 24|15 ground -1 -1 2 as myPet
995            @setvar! myFreshlySummonedPet myPet
996            if fireOne = 1
997                @setvar! fireOne myPet
998            elseif fireTwo = 1
999                @setvar! fireTwo myPet
1000            endif
1001        // 9 - a deamon
1002        // 722 - a vampire thrall
1003        elseif summon = "Summon Daemon" and findtype 9|722 ground -1 -1 2 as myPet
1004            @setvar! myFreshlySummonedPet myPet
1005            if demonOne = 1
1006                @setvar! demonOne myPet
1007            elseif demonTwo = 1
1008                @setvar! demonTwo myPet
1009            endif
1010        // 16 - water elemental
1011        // 740 - a rage witch
1012        elseif summon = "Water Elemental" and findtype 16|740 ground -1 -1 2 as myPet
1013            @setvar! myFreshlySummonedPet myPet
1014            if waterOne = 1
1015                @setvar! waterOne myPet
1016            elseif waterTwo = 1
1017                @setvar! waterTwo myPet
1018            endif
1019        // 13 - air elemental
1020        // 306 - a skeletal fiend
1021        elseif summon = "Air Elemental" and findtype 13|306 ground -1 -1 2 as myPet
1022            @setvar! myFreshlySummonedPet myPet
1023            if airOne = 1
1024                @setvar! airOne myPet
1025            elseif airTwo = 1
1026                @setvar! airTwo myPet
1027            endif
1028        elseif summon = "Summ. Creature"
1029            // TODO: gather all summon creature types
1030            
1031        // 13 - an energy vortex
1032        // 391 - a jackal spirit
1033        elseif summon = "Energy Vortex" and findtype 13|391 ground -1 -1 2 as myPet
1034            @setvar! myFreshlySummonedPet myPet
1035            if evOne = 1
1036                @setvar! evOne myPet
1037            endif
1038        // 574 - a blade spirit
1039        // 309 - a skeletal husk
1040        elseif summon = "Blade Spirits" and findtype 574|309 ground -1 -1 2 as myPet
1041            @setvar! myFreshlySummonedPet myPet
1042            if bsOne = 1
1043                @setvar! bsOne myPet
1044            endif
1045        endif
1046        
1047        if summon = "Summ. Creature"
1048           overhead "Creature summoned!" 88
1049        elseif myFreshlySummonedPet = 0
1050           overhead "Not found" 88
1051        else
1052            if noto myFreshlySummonedPet = "friend" and list petNameList > 0
1053                overhead "Renaming..." 77
1054                foreach petName in petNameList
1055                    overhead "Rename to {{petName}}..." 66 myFreshlySummonedPet
1056                    rename myFreshlySummonedPet petName
1057                    wait 200
1058                    if insysmsg "That name is unacceptable."
1059                        overhead "Unable to name pet: {{petName}}" 34
1060                        sysmsg "Unable to name pet: {{petName}}" 34
1061                    endif
1062                    break
1063                endfor
1064                poplist petNameList "front"
1065            endif
1066            overhead "New Pet: {{summon}}" 88 myFreshlySummonedPet
1067            if summon = "Energy Vortex" or summon = "Blade Spirits"
1068                // do nothing
1069            elseif skill "herding" > 0
1070                // guard
1071                menu myFreshlySummonedPet 4
1072            else
1073                // guard
1074                menu myFreshlySummonedPet 3
1075            endif
1076            @ignore myFreshlySummonedPet
1077        endif
1078        wait 500
1079    else
1080        break
1081    endif
1082endfor
1083
1084if dead myMainTankPet
1085    if not dead earthOne
1086        @setvar! myMainTankPet earthOne
1087    elseif not dead earthTwo
1088        @setvar! myMainTankPet earthTwo
1089    elseif not dead waterOne
1090        @setvar! myMainTankPet waterOne
1091    elseif not dead waterTwo
1092        @setvar! myMainTankPet waterTwo
1093    elseif not dead demonOne
1094        @setvar! myMainTankPet demonOne
1095    elseif not dead demonTwo
1096        @setvar! myMainTankPet demonTwo
1097    elseif not dead fireOne
1098        @setvar! myMainTankPet fireOne
1099    elseif not dead fireTwo
1100        @setvar! myMainTankPet fireTwo
1101    elseif not dead airOne
1102        @setvar! myMainTankPet airOne
1103    elseif not dead airTwo
1104        @setvar! myMainTankPet airTwo
1105    endif
1106endif
1107
1108if not varexist lastCannotBeSeen
1109    @setvar! lastCannotBeSeen 0
1110endif
1111
1112if lastCannotBeSeen != 0 and dead lastCannotBeSeen
1113    @setvar! lastCannotBeSeen 0
1114    @setvar! lastCannotBeSeenLoopIndex 0
1115endif
1116
1117# Eat food if we got it
1118if not findbuff "food" and findtype "tray" backpack as jood
1119    dclick jood
1120    wait 200
1121endif
1122
1123if targetexists harmful
1124    hotkey "Cancel current target"
1125endif
1126
1127if useTargetSystem = 0
1128    say "all kill"
1129    wait 200
1130    while targetexists 
1131        // wait
1132        wait 50
1133    endwhile
1134    
1135    @setvar myKillTarget lasttarget 
1136elseif useTargetSystem = 1
1137    hotkey 'Target Closest Non-Friendly Monster'
1138    wait 200
1139    if insysmsg "No one matching that was found"
1140        if timer preventOverheadSpamTimer >= cdPreventOverheadSpam
1141            overhead "found no one" 34
1142            settimer preventOverheadSpamTimer 0
1143        endif
1144        if autoBotEnabled = 1
1145            wait 500
1146            replay
1147        endif
1148        stop
1149    elseif not find lasttarget ground -1 -1 10
1150    
1151        @setvar checkForSummons lasttarget 
1152        getlabel checkForSummons checkForSummonsDesc
1153    
1154        if "(summoned" in checkForSummonsDesc or "(bonded" in checkForSummonsDesc or "the battle trainer" in checkForSummonsDesc
1155            overhead "▼ Player pet - IGNORE ▼" 77 lasttarget
1156            while not targetexists 
1157                hotkey 'Add Target To: IgnoreMobs'
1158                wait 200
1159            endwhile
1160            target myKillTarget 
1161            replay
1162        endif    
1163    
1164        overhead "● ▼ OUT OF RANGE ▼ ●" 88 lasttarget
1165        if timer preventOverheadSpamTimer >= cdPreventOverheadSpam
1166            overhead "Move closer, more then 8 tiles away" 34
1167            settimer preventOverheadSpamTimer 0
1168        endif
1169        if autoBotEnabled = 1
1170            wait 500
1171            replay
1172        endif
1173        stop
1174    else
1175        
1176        @setvar checkForSummons lasttarget 
1177        getlabel checkForSummons checkForSummonsDesc
1178    
1179        if "(summoned" in checkForSummonsDesc or "(bonded" in checkForSummonsDesc or "the battle trainer" in checkForSummonsDesc
1180            overhead "▼ Player pet - IGNORE ▼" 77 lasttarget
1181            while not targetexists 
1182                hotkey 'Add Target To: IgnoreMobs'
1183                wait 200
1184            endwhile
1185            target myKillTarget 
1186            replay
1187        endif    
1188        
1189        overhead "● ▼▼ HERE ▼▼ ●" 88 lasttarget
1190    endif    
1191    
1192    @setvar myKillTarget lasttarget 
1193    
1194elseif useTargetSystem = 2
1195
1196    // do find type     
1197    if jaseDebugMode = 1
1198        overhead "do find type"
1199    endif
1200    
1201    //@setvar! mobDiff 0
1202    
1203    // should we cast spells
1204    // should our pets kill it only?
1205    // do we need to debuff the mob?
1206        // boss - do we want to do manadrain vs mana vampire
1207        
1208        // targeting 
1209        
1210    @setvar! myFindTypeMob 0
1211    
1212    if findtype 141|34|843|1081|44|42|68|88|28|159|11|631|612|281|280|313|385|21|727|689|735|74|400|732|24|776|39|400|215|717|51|716|14|12|60|37|37|21|155|14|138|787|787|395|79|259|783|782|781|58|715|738|727|1419|1504|310|99|113|214|736|204|158|29|75|9|59|61|16|303|306|30|241|730|393|17|314|48|21|721|53|42|1069|287|59|58|401|16|778|715|47|725|169|317|213|384|373|734|23|27|25|705|728|37|779|775|173|92|98|80|388|98|287|302|73|720|252|8|392|9|14|319|4|386|22|9|16|400|400|401|401|401|401|49|96|8|315|303|309|386|169|37|777|59|718|61|718|9|104|266|12|60|12|60|393|721|31|400|401|12|60|778|393|251|12|60|37|826|154|264|39|9|128|176|374|738|169|315|393|776|734|317|13|720|225|305|401|131|94|93|244|16|318|392|393|310|372|309|49|130|83|130|753|59|114|116|830|26|778|400|401|26|81|48|732|779|723|4|387|150|334|385|261|1069|390|304|379|307|729|384|160|74|400|400|400|9|4|784|400|400|400|400|401|4|391|214|13|724|206|16|293|40|43|24|24|285|705|199|199|829|256|160|573|259|400|776|263|375|9|241|39|39|206|202|380|13|30|8|51|4|154|16|312|79|148|401|204|1069|73|748|86|85|87|86|782|781|400|401|401|400|401|400|400|401|401|401|401|401|400|789|316|401|120|832|108|396|393|401|401|757|401|400|401|756|401|763|730|716|16|16|787|740|3|401|75|9|59|400|401|401|401|401|400|400|401|401|400|400|401|21|970|92|16|270|970|400|401|401|401|37|270|37|1419|1504|251|315|51|741|37|169|717|740|715|14|74|206|242|778|739|776|16|51|304|3|300|29|382|104|306|309|57|50|56|302|59|61|1503|24|14|13|51|252|31|400|390|23|27|400|400|704|689|383|25|293|371|21|705|30|36|8|1419|1504|721|12|60|736|788|69|71|738|72|70|780|242|400|37|737|199|401|400|401|722|317|258|229|300|380|22|59|61|15|42|45|394|1419|1504|47|97|47|285|65|225|73|30|382|739|743|62|733|17|80|18|55|41|317|81|215|31|24|35|400|225|30|3|390|72|9|384|41|58|400|400|119 ground -1 -1 2 as daklue
1213        @setvar! myFindTypeMob daklue
1214        getlabel myFindTypeMob helperDesc
1215        overhead "● ▼▼ HERE ▼▼ ●" 88 myFindTypeMob    
1216
1217        if jaseDebugMode = 1
1218            overhead "● block 1 {{helperDesc}}" 88   
1219            hotkey "Get InfoGump"
1220            wft 500
1221            target myFindTypeMob
1222        endif
1223        
1224    elseif findtype 141|34|843|1081|44|42|68|88|28|159|11|631|612|281|280|313|385|21|727|689|735|74|400|732|24|776|39|400|215|717|51|716|14|12|60|37|37|21|155|14|138|787|787|395|79|259|783|782|781|58|715|738|727|1419|1504|310|99|113|214|736|204|158|29|75|9|59|61|16|303|306|30|241|730|393|17|314|48|21|721|53|42|1069|287|59|58|401|16|778|715|47|725|169|317|213|384|373|734|23|27|25|705|728|37|779|775|173|92|98|80|388|98|287|302|73|720|252|8|392|9|14|319|4|386|22|9|16|400|400|401|401|401|401|49|96|8|315|303|309|386|169|37|777|59|718|61|718|9|104|266|12|60|12|60|393|721|31|400|401|12|60|778|393|251|12|60|37|826|154|264|39|9|128|176|374|738|169|315|393|776|734|317|13|720|225|305|401|131|94|93|244|16|318|392|393|310|372|309|49|130|83|130|753|59|114|116|830|26|778|400|401|26|81|48|732|779|723|4|387|150|334|385|261|1069|390|304|379|307|729|384|160|74|400|400|400|9|4|784|400|400|400|400|401|4|391|214|13|724|206|16|293|40|43|24|24|285|705|199|199|829|256|160|573|259|400|776|263|375|9|241|39|39|206|202|380|13|30|8|51|4|154|16|312|79|148|401|204|1069|73|748|86|85|87|86|782|781|400|401|401|400|401|400|400|401|401|401|401|401|400|789|316|401|120|832|108|396|393|401|401|757|401|400|401|756|401|763|730|716|16|16|787|740|3|401|75|9|59|400|401|401|401|401|400|400|401|401|400|400|401|21|970|92|16|270|970|400|401|401|401|37|270|37|1419|1504|251|315|51|741|37|169|717|740|715|14|74|206|242|778|739|776|16|51|304|3|300|29|382|104|306|309|57|50|56|302|59|61|1503|24|14|13|51|252|31|400|390|23|27|400|400|704|689|383|25|293|371|21|705|30|36|8|1419|1504|721|12|60|736|788|69|71|738|72|70|780|242|400|37|737|199|401|400|401|722|317|258|229|300|380|22|59|61|15|42|45|394|1419|1504|47|97|47|285|65|225|73|30|382|739|743|62|733|17|80|18|55|41|317|81|215|31|24|35|400|225|30|3|390|72|9|384|41|58|400|400|119 ground -1 -1 4 as daklue
1225        @setvar! myFindTypeMob daklue
1226        getlabel myFindTypeMob helperDesc
1227        overhead "● ▼▼ HERE ▼▼ ●" 88 myFindTypeMob
1228        if jaseDebugMode = 1
1229            overhead "● block 2 {{helperDesc}}" 88   
1230            hotkey "Get InfoGump"
1231            wft 500
1232            target myFindTypeMob
1233        endif
1234        elseif findtype 141|34|843|1081|44|42|68|88|28|159|11|631|612|281|280|313|385|21|727|689|735|74|400|732|24|776|39|400|215|717|51|716|14|12|60|37|37|21|155|14|138|787|787|395|79|259|783|782|781|58|715|738|727|1419|1504|310|99|113|214|736|204|158|29|75|9|59|61|16|303|306|30|241|730|393|17|314|48|21|721|53|42|1069|287|59|58|401|16|778|715|47|725|169|317|213|384|373|734|23|27|25|705|728|37|779|775|173|92|98|80|388|98|287|302|73|720|252|8|392|9|14|319|4|386|22|9|16|400|400|401|401|401|401|49|96|8|315|303|309|386|169|37|777|59|718|61|718|9|104|266|12|60|12|60|393|721|31|400|401|12|60|778|393|251|12|60|37|826|154|264|39|9|128|176|374|738|169|315|393|776|734|317|13|720|225|305|401|131|94|93|244|16|318|392|393|310|372|309|49|130|83|130|753|59|114|116|830|26|778|400|401|26|81|48|732|779|723|4|387|150|334|385|261|1069|390|304|379|307|729|384|160|74|400|400|400|9|4|784|400|400|400|400|401|4|391|214|13|724|206|16|293|40|43|24|24|285|705|199|199|829|256|160|573|259|400|776|263|375|9|241|39|39|206|202|380|13|30|8|51|4|154|16|312|79|148|401|204|1069|73|748|86|85|87|86|782|781|400|401|401|400|401|400|400|401|401|401|401|401|400|789|316|401|120|832|108|396|393|401|401|757|401|400|401|756|401|763|730|716|16|16|787|740|3|401|75|9|59|400|401|401|401|401|400|400|401|401|400|400|401|21|970|92|16|270|970|400|401|401|401|37|270|37|1419|1504|251|315|51|741|37|169|717|740|715|14|74|206|242|778|739|776|16|51|304|3|300|29|382|104|306|309|57|50|56|302|59|61|1503|24|14|13|51|252|31|400|390|23|27|400|400|704|689|383|25|293|371|21|705|30|36|8|1419|1504|721|12|60|736|788|69|71|738|72|70|780|242|400|37|737|199|401|400|401|722|317|258|229|300|380|22|59|61|15|42|45|394|1419|1504|47|97|47|285|65|225|73|30|382|739|743|62|733|17|80|18|55|41|317|81|215|31|24|35|400|225|30|3|390|72|9|384|41|58|400|400|119 ground -1 -1 10 as daklue
1235        @setvar! myFindTypeMob daklue
1236        getlabel myFindTypeMob helperDesc
1237        overhead "● ▼▼ HERE ▼▼ ●" 88 myFindTypeMob
1238        if jaseDebugMode = 1
1239            overhead "● block 3 {{helperDesc}}" 88   
1240            hotkey "Get InfoGump"
1241            wft 500
1242            target myFindTypeMob
1243        endif
1244    elseif findtype 141|34|843|1081|44|42|68|88|28|159|11|631|612|281|280|313|385|21|727|689|735|74|400|732|24|776|39|400|215|717|51|716|14|12|60|37|37|21|155|14|138|787|787|395|79|259|783|782|781|58|715|738|727|1419|1504|310|99|113|214|736|204|158|29|75|9|59|61|16|303|306|30|241|730|393|17|314|48|21|721|53|42|1069|287|59|58|401|16|778|715|47|725|169|317|213|384|373|734|23|27|25|705|728|37|779|775|173|92|98|80|388|98|287|302|73|720|252|8|392|9|14|319|4|386|22|9|16|400|400|401|401|401|401|49|96|8|315|303|309|386|169|37|777|59|718|61|718|9|104|266|12|60|12|60|393|721|31|400|401|12|60|778|393|251|12|60|37|826|154|264|39|9|128|176|374|738|169|315|393|776|734|317|13|720|225|305|401|131|94|93|244|16|318|392|393|310|372|309|49|130|83|130|753|59|114|116|830|26|778|400|401|26|81|48|732|779|723|4|387|150|334|385|261|1069|390|304|379|307|729|384|160|74|400|400|400|9|4|784|400|400|400|400|401|4|391|214|13|724|206|16|293|40|43|24|24|285|705|199|199|829|256|160|573|259|400|776|263|375|9|241|39|39|206|202|380|13|30|8|51|4|154|16|312|79|148|401|204|1069|73|748|86|85|87|86|782|781|400|401|401|400|401|400|400|401|401|401|401|401|400|789|316|401|120|832|108|396|393|401|401|757|401|400|401|756|401|763|730|716|16|16|787|740|3|401|75|9|59|400|401|401|401|401|400|400|401|401|400|400|401|21|970|92|16|270|970|400|401|401|401|37|270|37|1419|1504|251|315|51|741|37|169|717|740|715|14|74|206|242|778|739|776|16|51|304|3|300|29|382|104|306|309|57|50|56|302|59|61|1503|24|14|13|51|252|31|400|390|23|27|400|400|704|689|383|25|293|371|21|705|30|36|8|1419|1504|721|12|60|736|788|69|71|738|72|70|780|242|400|37|737|199|401|400|401|722|317|258|229|300|380|22|59|61|15|42|45|394|1419|1504|47|97|47|285|65|225|73|30|382|739|743|62|733|17|80|18|55|41|317|81|215|31|24|35|400|225|30|3|390|72|9|384|41|58|400|400|119 ground -1 -1 12 as daklue
1245        @setvar! myFindTypeMob daklue
1246        overhead "● ▼ OUT OF RANGE ▼ ●" 88 daklue
1247        getlabel daklue helperDesc
1248        if jaseDebugMode = 1
1249            overhead "● block 4 {{helperDesc}}" 88   
1250            hotkey "Get InfoGump"
1251            wft 500
1252            target myFindTypeMob
1253        endif
1254        if "(summoned" in helperDesc or "(bonded" in helperDesc or "(tamed" in helperDesc or "the battle trainer" in helperDesc
1255            overhead "▼ Player pet - IGNORE ▼" 77 daklue
1256            ignore daklue
1257            replay
1258        endif  
1259        wait 200
1260        
1261        if patrolPetEvenIfLastTargetIsBeyondEightTiles = 1
1262            
1263            if not timerexists myPatrolPetTimer
1264                settimer myPatrolPetTimer 5000
1265            endif
1266        
1267            if not varexist myPatrolPet
1268                @setvar! myPatrolPet 0
1269            endif
1270
1271            if find myPatrolPet ground -1 -1 10
1272                // do nothing
1273            elseif find earthOne ground -1 -1 10
1274                @setvar! myPatrolPet earthOne
1275            elseif find earthTwo ground -1 -1 10
1276                @setvar! myPatrolPet earthTwo
1277            elseif find fireOne ground -1 -1 10
1278                @setvar! myPatrolPet fireOne
1279            elseif find fireTwo ground -1 -1 10
1280                @setvar! myPatrolPet fireTwo
1281            elseif find demonOne ground -1 -1 10
1282                @setvar! myPatrolPet demonOne
1283            elseif find demonTwo ground -1 -1 10
1284                @setvar! myPatrolPet demonTwo
1285            elseif find airOne ground -1 -1 10
1286                @setvar! myPatrolPet airOne
1287            elseif find airTwo ground -1 -1 10
1288                @setvar! myPatrolPet airTwo
1289            elseif find waterOne ground -1 -1 10
1290                @setvar! myPatrolPet waterOne
1291            elseif find waterTwo ground -1 -1 10
1292                @setvar! myPatrolPet waterTwo
1293            else
1294                 @setvar! myPatrolPet 0
1295            endif
1296
1297            if myPatrolPet = 0
1298                // do nothing
1299            elseif timer myPatrolPetTimer >= 5000
1300                overhead "● SEND IN PATROL PET ●" 77 myFindTypeMob    
1301                if skill "Herding" > 0
1302                    menu myPatrolPet 3
1303                else
1304                    menu myPatrolPet 2
1305                endif
1306                wft 500
1307                target myFindTypeMob
1308                settimer myPatrolPetTimer 0
1309            endif
1310        
1311        endif 
1312        
1313        replay
1314    else
1315        if jaseDebugMode = 1
1316            overhead "● block 5" 88   
1317        endif
1318        if timer preventOverheadSpamTimer >= cdPreventOverheadSpam
1319            overhead "Found type found no one" 34
1320            settimer preventOverheadSpamTimer 0
1321        endif
1322        wait 200
1323        replay
1324    endif
1325    
1326    if myFindTypeMob = 0
1327        wait 200 
1328        replay
1329    elseif dead myFindTypeMob
1330        wait 200 
1331        replay
1332    else
1333        getlabel myFindTypeMob checkForSummonsDesc
1334        overhead "Found: {{checkForSummonsDesc}}" 88 myFindTypeMob
1335
1336        if "(summoned" in checkForSummonsDesc or "(bonded" in checkForSummonsDesc or "(tamed" in checkForSummonsDesc or "the battle trainer" in checkForSummonsDesc
1337            overhead "▼ Player pet - IGNORE ▼" 77 myFindTypeMob
1338            @ignore myFindTypeMob
1339            replay
1340        endif    
1341
1342        if noto myFindTypeMob = "friend"
1343            @ignore myFindTypeMob
1344            replay
1345        elseif noto myFindTypeMob = "innocent"
1346            @ignore myFindTypeMob
1347            replay
1348        elseif noto myFindTypeMob = "hostile" or noto myFindTypeMob = "criminal"
1349            //overhead "Gray" 88
1350        elseif noto myFindTypeMob = "murderer"
1351            //overhead "Red" 34
1352        elseif noto myFindTypeMob = "enemy"
1353            //overhead "Orange" 34
1354        elseif noto daklue = "invulnerable"
1355            @ignore myFindTypeMob
1356            replay
1357        else
1358            overhead "Unknown" 34
1359            wait 500
1360            @ignore myFindTypeMob
1361            replay
1362        endif
1363                
1364        @setvar! myKillTarget myFindTypeMob
1365    endif
1366elseif useTargetSystem = 3
1367    
1368    hotkey 'Next Non-Friendly Monster Target'
1369    wait 200
1370    if insysmsg "No one matching that was found"
1371        if timer preventOverheadSpamTimer >= cdPreventOverheadSpam
1372            overhead "found no one" 34
1373            settimer preventOverheadSpamTimer 0
1374        endif
1375        if autoBotEnabled = 1
1376            wait 500
1377            replay
1378        endif
1379        stop
1380    else
1381        
1382        @setvar checkForSummons lasttarget 
1383        getlabel checkForSummons checkForSummonsDesc
1384        
1385        if "(summoned" in checkForSummonsDesc or "(bonded" in checkForSummonsDesc or "the battle trainer" in checkForSummonsDesc
1386            overhead "▼ Player pet - IGNORE ▼" 77 lasttarget
1387            replay
1388        endif    
1389    
1390        if find lasttarget ground -1 -1 8
1391            // we ready
1392            overhead "● ▼▼ HERE ▼▼ ●" 88 lasttarget 
1393        elseif find lasttarget ground -1 -1 12
1394            if timer preventOverheadSpamTimer >= cdPreventOverheadSpam
1395                overhead "Move closer, more then 8 tiles away" 34
1396                settimer preventOverheadSpamTimer 0
1397            endif
1398            overhead "● ▼ OUT OF RANGE ▼ ●" 88 lasttarget
1399            
1400            if patrolPetEvenIfLastTargetIsBeyondEightTiles = 1
1401                
1402                if not timerexists myPatrolPetTimer
1403                    settimer myPatrolPetTimer 5000
1404                endif
1405            
1406                if not varexist myPatrolPet
1407                    @setvar! myPatrolPet 0
1408                endif
1409
1410                if find myPatrolPet ground -1 -1 10
1411                    // do nothing
1412                elseif find earthOne ground -1 -1 10
1413                    @setvar! myPatrolPet earthOne
1414                elseif find earthTwo ground -1 -1 10
1415                    @setvar! myPatrolPet earthTwo
1416                elseif find fireOne ground -1 -1 10
1417                    @setvar! myPatrolPet fireOne
1418                elseif find fireTwo ground -1 -1 10
1419                    @setvar! myPatrolPet fireTwo
1420                elseif find demonOne ground -1 -1 10
1421                    @setvar! myPatrolPet demonOne
1422                elseif find demonTwo ground -1 -1 10
1423                    @setvar! myPatrolPet demonTwo
1424                elseif find airOne ground -1 -1 10
1425                    @setvar! myPatrolPet airOne
1426                elseif find airTwo ground -1 -1 10
1427                    @setvar! myPatrolPet airTwo
1428                elseif find waterOne ground -1 -1 10
1429                    @setvar! myPatrolPet waterOne
1430                elseif find waterTwo ground -1 -1 10
1431                    @setvar! myPatrolPet waterTwo
1432                else
1433                     @setvar! myPatrolPet 0
1434                endif
1435
1436                if myPatrolPet = 0
1437                    // do nothing
1438                elseif timer myPatrolPetTimer >= 5000
1439                    overhead "● SEND IN PATROL PET ●" 77 myFindTypeMob    
1440                    if skill "Herding" > 0
1441                        menu myPatrolPet 3
1442                    else
1443                        menu myPatrolPet 2
1444                    endif
1445                    wft 500
1446                    target lasttarget
1447                    settimer myPatrolPetTimer 0
1448                endif
1449            
1450            endif 
1451            
1452            if autoBotEnabled = 1
1453                wait 500
1454                replay
1455            endif
1456            stop
1457        else
1458            if timer preventOverheadSpamTimer >= cdPreventOverheadSpam
1459                overhead "Next mob too far" 34
1460                settimer preventOverheadSpamTimer 0
1461            endif
1462            wait 200
1463            replay
1464        endif
1465    endif    
1466    
1467    @setvar myKillTarget lasttarget 
1468endif
1469
1470
1471if not varexist myPreviousKillTarget
1472    @setvar myPreviousKillTarget 0     
1473endif
1474
1475getlabel myKillTarget desc
1476overhead desc
1477
1478if "(summoned" in desc or "(bonded" in desc or "(tame" in desc or "the battle trainer" in desc
1479    overhead "▼ Player pet - IGNORE ▼" 77 lasttarget
1480    while not targetexists 
1481        hotkey 'Add Target To: IgnoreMobs'
1482        wait 200
1483    endwhile
1484    target myKillTarget 
1485    replay
1486endif    
1487
1488if not varexist myEarthPet or dead myEarthPet
1489    if not dead earthOne
1490        @setvar! myEarthPet earthOne
1491    elseif not dead earthTwo
1492        @setvar! myEarthPet earthTwo
1493    endif
1494endif
1495
1496if tamerModeEngaged = 1
1497    // jaseTankPet patrol maybe
1498    // overhead "We are a tamer"
1499elseif find myEarthPet ground -1 -1 12
1500    menu myEarthPet 2
1501    wft 500
1502    target myKillTarget
1503    wait 200
1504    if insysmsg "Target cannot be seen." 
1505        if lastCannotBeSeen = 0
1506            @setvar! lastCannotBeSeen myKillTarget
1507        endif
1508    else
1509        @setvar! lastCannotBeSeen 0
1510    endif
1511endif
1512
1513if diffhits >= hpCheckToTriggerGreaterHealSpell and mana > 12
1514    while not targetexists beneficial
1515        if diffhits >= hpCheckToTriggerMiniEmergencyHealSpell
1516            cast 'Heal'
1517        else
1518            cast 'Greater Heal'                
1519        endif
1520        wait 50
1521        if hp = maxhp
1522            hotkey '> Interrupt'
1523            break
1524        endif
1525    endwhile
1526    if targetexists beneficial
1527        hotkey "Target Self"
1528    endif
1529elseif castArchProtection = 1 and not findbuff "protection" and followers >= 4 
1530    while not targetexists
1531        cast 'Arch Protection'
1532        wait 50
1533        if diffhits >= hpCheckToTriggerGreaterHealSpell
1534            hotkey '> Interrupt'
1535            break
1536        endif
1537    endwhile
1538    if targetexists
1539        target self
1540    endif
1541elseif castBless = 1 and str <= 100 and followers >= 4 
1542    while not targetexists beneficial
1543        cast 'Bless'
1544        wait 50
1545        if diffhits >= hpCheckToTriggerGreaterHealSpell
1546            hotkey '> Interrupt'
1547            break
1548        endif
1549    endwhile
1550    if targetexists beneficial
1551        target self
1552    endif
1553endif
1554
1555if not listexists myCursedTargets
1556    createlist myCursedTargets
1557endif
1558
1559if not listexists myManaDrainTargets
1560    createlist myManaDrainTargets
1561endif
1562
1563if not listexists myManaVampireTargets
1564    createlist myManaVampireTargets
1565endif
1566
1567
1568if not varexist lastCannotBeSeenLoopIndex
1569    @setvar! lastCannotBeSeenLoopIndex 0
1570endif
1571
1572
1573if lastCannotBeSeen = myKillTarget
1574    if timer preventOverheadSpamTimer >= cdPreventOverheadSpam
1575        overhead "Target not seen, waiting.."  34
1576        settimer preventOverheadSpamTimer 0
1577    endif
1578    wait 200
1579    //overhead "{{lastCannotBeSeenLoopIndex}} : {{retryBasedOnTargetNotSeenTimer}}"
1580    if lastCannotBeSeenLoopIndex = 0
1581        @setvar! lastCannotBeSeenLoopIndex 1
1582    endif
1583    if timer retryBasedOnTargetNotSeenTimer >= cdRetryBasedOnTargetNotSeen
1584        settimer retryBasedOnTargetNotSeenTimer 0    
1585        @setvar! lastCannotBeSeen 0
1586    else
1587        replay
1588    endif
1589    
1590elseif find myKillTarget -1 -1 12 as killy
1591    if myKillTarget = myPreviousKillTarget
1592        // do nothing
1593    else
1594        
1595        // Herding using crook
1596        if skill "Herding" > 0 and findtype 3713 backpack as jrook
1597            dclick jrook
1598            wft 500
1599            target killy
1600        endif
1601
1602        if inlist myManaVampireTargets myKillTarget
1603            overhead "We already mana vampired this guy" 88
1604            // do nothing
1605        elseif castManaVampire = 0
1606            // do nothing 
1607        elseif followers >= 4 and mana >= manaReserve
1608            while not targetexists harmful
1609                if dead myKillTarget
1610                    hotkey '> Interrupt'
1611                    break
1612                elseif diffhits < 30
1613                    if skill "Herding" > 0 and isHerded = 0 and timer meditiationTimer >= 11000 and findtype 3713 backpack as jrook
1614                        dclick jrook
1615                        wft 500
1616                        target myKillTarget
1617                        settimer meditiationTimer 8000
1618                        @setvar! isHerded 1
1619                    endif
1620                    cast 'mana vampire'
1621                    wait 50
1622                elseif diffhits >= hpCheckToTriggerGreaterHealSpell or dead myKillTarget
1623                    hotkey '> Interrupt'
1624                    break
1625                endif
1626            endwhile
1627            if targetexists harmful
1628                target myKillTarget
1629                pushlist myManaVampireTargets myKillTarget
1630                settimer killTargetTimer 0
1631                wait 500
1632                if insysmsg "Target cannot be seen." 
1633                    @setvar! lastCannotBeSeen myKillTarget
1634                    overhead "CANNOT BE SEEN MOVE TO NEXT TARGET" 34
1635                    replay
1636                endif
1637            endif
1638            if targetexists harmful
1639                hotkey "Cancel current target"
1640            endif
1641        endif
1642        
1643        if inlist myManaDrainTargets myKillTarget
1644            overhead "We already mana drained this guy" 88
1645            // do nothing
1646        elseif castManadrain = 0
1647            // do nothing 
1648        elseif followers >= 4 and mana >= manaReserve
1649            while not targetexists harmful
1650                if dead myKillTarget
1651                    hotkey '> Interrupt'
1652                    break
1653                elseif diffhits < 30
1654                     if skill "Herding" > 0 and isHerded = 0 and timer meditiationTimer >= 11000 and findtype 3713 backpack as jrook
1655                        dclick jrook
1656                        wft 500
1657                        target myKillTarget
1658                        settimer meditiationTimer 8000
1659                        @setvar! isHerded 1
1660                    endif
1661                    cast 'mana drain'
1662                    wait 50
1663                elseif diffhits >= hpCheckToTriggerGreaterHealSpell or dead myKillTarget
1664                    hotkey '> Interrupt'
1665                    break
1666                endif
1667            endwhile
1668            if targetexists harmful
1669                target myKillTarget
1670                pushlist myManaDrainTargets myKillTarget
1671                settimer killTargetTimer 0
1672                wait 500
1673                if insysmsg "Target cannot be seen." 
1674                    @setvar! lastCannotBeSeen myKillTarget
1675                    overhead "CANNOT BE SEEN MOVE TO NEXT TARGET" 34
1676                    replay
1677                endif
1678            endif
1679            if targetexists harmful
1680                hotkey "Cancel current target"
1681            endif
1682        endif
1683        
1684        if inlist myCursedTargets myKillTarget
1685            overhead "We already cursed this guy" 88
1686            // do nothing
1687        elseif castCurse = 0
1688            // do nothing
1689        elseif followers >= 4 and mana >= manaReserve
1690            while not targetexists harmful and not dead myKillTarget
1691                if diffhits < 30
1692                     if skill "Herding" > 0 and isHerded = 0 and timer meditiationTimer >= 11000 and findtype 3713 backpack as jrook
1693                        dclick jrook
1694                        wft 500
1695                        target myKillTarget
1696                        settimer meditiationTimer 8000
1697                        @setvar! isHerded 1
1698                    endif
1699                    cast 'Curse'
1700                    wait 50
1701                elseif diffhits >= hpCheckToTriggerGreaterHealSpell
1702                    hotkey '> Interrupt'
1703                    break
1704                endif
1705            endwhile
1706            if targetexists harmful
1707                target myKillTarget
1708                pushlist myCursedTargets myKillTarget
1709                settimer killTargetTimer 0
1710                wait 500
1711                if insysmsg "Target cannot be seen." 
1712                    @setvar! lastCannotBeSeen myKillTarget
1713                    overhead "CANNOT BE SEEN MOVE TO NEXT TARGET" 34
1714                    replay
1715                endif
1716            else
1717                hotkey '> Interrupt'
1718            endif
1719            if targetexists harmful
1720                hotkey "Cancel current target"
1721            endif
1722        endif
1723        @setvar myPreviousKillTarget myKillTarget
1724    endif
1725else
1726    overhead "Out of range" 34
1727endif
1728
1729
1730clearsysmsg 
1731
1732say "all guard"
1733
1734@setvar! isLethalPoison 0
1735@setvar! isHerded 0
1736
1737if skill "Peacemaking" >= 50 
1738    @setvar! isPeaced 0
1739else
1740    @setvar! isPeaced 1    
1741endif
1742
1743if skill "Discordance" >= 50 
1744  @setvar! isDiscorded 0
1745else
1746  @setvar! isDiscorded 1  
1747endif
1748
1749while not dead myKillTarget and find myKillTarget -1 -1 12 as killy
1750
1751    for 5
1752
1753        if findbuff "bleed" or findbuff "disease"
1754            if timer cleansingBrewTimer >= cdCleansingBrew and findtype 50675 backpack 2935 as jrew
1755                dclick jrew
1756                wait minimumWaitForPing 
1757                settimer cleansingBrewTimer 0
1758            endif
1759        endif
1760
1761        // lost a follower
1762        if followers < breakSpellCastAndResummonIfLessThanXFollowers
1763            replay
1764        endif
1765        
1766        if weight >= maxweight and not findbuff "strength" and automaticallyDrinkStrPotIfOverWeight = 1 and findtype "white potion" backpack as pot
1767            dclick pot
1768            wait 200
1769        endif
1770    
1771        if dead myKillTarget
1772            break
1773        elseif insysmsg "Target cannot be seen." 
1774            @setvar! lastCannotBeSeen myKillTarget
1775            overhead "CANNOT BE SEEN MOVE TO NEXT TARGET" 34
1776            replay
1777        elseif find myKillTarget -1 -1 12 as killy
1778            // do nothing - in range to kill
1779        else
1780            break
1781        endif
1782    
1783        if skill "Herding" > 0 and isHerded = 0 and timer meditiationTimer >= 11000 and findtype 3713 backpack as jrook
1784            dclick jrook
1785            wft 500
1786            target myKillTarget
1787            settimer meditiationTimer 8000
1788            @setvar! isHerded 1
1789        endif
1790        
1791        if gumpexists 622436516 and skill "Necromancy" >= 50
1792            if ingump "12/" 622436516
1793                @setvar! necroSymbols 12
1794            elseif ingump "13/" 622436516
1795                @setvar! necroSymbols 13
1796            elseif ingump "14/" 622436516
1797                @setvar! necroSymbols 14
1798            elseif ingump "15/" 622436516
1799                @setvar! necroSymbols 15
1800            elseif ingump "16/" 622436516
1801                @setvar! necroSymbols 16
1802            elseif ingump "17/" 622436516
1803                @setvar! necroSymbols 17
1804            elseif ingump "18/" 622436516
1805                @setvar! necroSymbols 18
1806            elseif ingump "19/" 622436516
1807                @setvar! necroSymbols 19
1808            elseif ingump "20/" 622436516
1809                @setvar! necroSymbols 20
1810            elseif ingump "21/" 622436516
1811                @setvar! necroSymbols 21
1812            elseif ingump "11/" 622436516
1813                @setvar! necroSymbols 11
1814            elseif ingump "10/" 622436516
1815                @setvar! necroSymbols 10
1816            elseif ingump "9/" 622436516
1817                @setvar! necroSymbols 9
1818            elseif ingump "8/" 622436516
1819                @setvar! necroSymbols 8
1820            elseif ingump "7/" 622436516
1821                @setvar! necroSymbols 7
1822            elseif ingump "6/" 622436516
1823                @setvar! necroSymbols 6
1824            elseif ingump "5/" 622436516
1825                @setvar! necroSymbols 5
1826            elseif ingump "4/" 622436516
1827                @setvar! necroSymbols 4
1828            elseif ingump "3/" 622436516
1829                @setvar! necroSymbols 3
1830            elseif ingump "2/" 622436516
1831                @setvar! necroSymbols 2
1832            elseif ingump "1/" 622436516
1833                @setvar! necroSymbols 1
1834            elseif ingump "0/" 622436516
1835                @setvar! necroSymbols 0
1836            endif
1837        endif
1838        
1839        if skill "Discordance" >= 50 
1840            if isDiscorded = 0
1841                getlabel myKillTarget discordDesc
1842                if "discord" in discordDesc
1843                    @setvar! isDiscorded 1
1844                elseif timer meditiationTimer >= 11000 
1845                    useskill 'Discordance'
1846                    wft 500
1847                    if insysmsg "What instrument"
1848                        if findtype "bamboo flute" backpack as inny
1849                            target inny
1850                        elseif findtype "tambourine" backpack as inny
1851                            target inny
1852                        elseif findtype "drum" backpack as inny
1853                            target inny
1854                        elseif findtype "lute" backpack as inny
1855                            target inny
1856                        elseif findtype "harp" backpack as inny
1857                            target inny
1858                        elseif findtype "lap harp" backpack as inny
1859                            target inny
1860                        else
1861                            overhead "I do not have an inny" 34
1862                            @setvar! isDiscorded 1
1863                        endif
1864                        wft 500
1865                    endif
1866                    if targetexists 
1867                        target myKillTarget
1868                        overhead "Discorded" 88 myKillTarget
1869                    endif
1870                    settimer meditiationTimer 5000
1871                endif
1872            endif
1873            
1874            if not findbuff "song of discordance" and timer meditiationTimer >= 11000
1875                useskill 'Discordance'
1876                wft 500
1877                if insysmsg "What instrument"
1878                    if findtype "bamboo flute" backpack as inny
1879                        target inny
1880                    elseif findtype "tambourine" backpack as inny
1881                        target inny
1882                    elseif findtype "drum" backpack as inny
1883                        target inny
1884                    elseif findtype "lute" backpack as inny
1885                        target inny
1886                    elseif findtype "harp" backpack as inny
1887                        target inny
1888                    elseif findtype "lap harp" backpack as inny
1889                        target inny
1890                    else
1891                        overhead "I do not have an inny" 34
1892                        @setvar! isDiscorded 1
1893                    endif
1894                    wft 500
1895                endif
1896                target backpack
1897                settimer meditiationTimer 0
1898            endif    
1899        endif
1900        
1901        if skill "Peacemaking" >= 50 
1902            if isPeaced = 0
1903                getlabel myKillTarget peaceDesc
1904                if "pacified" in peaceDesc
1905                    @setvar! isPeaced 1
1906                elseif timer meditiationTimer >= 11000 
1907                    useskill 'Peacemaking'
1908                    wft 500
1909                    if insysmsg "What instrument"
1910                        if findtype "bamboo flute" backpack as inny
1911                            target inny
1912                        elseif findtype "tambourine" backpack as inny
1913                            target inny
1914                        elseif findtype "drum" backpack as inny
1915                            target inny
1916                        elseif findtype "lute" backpack as inny
1917                            target inny
1918                        elseif findtype "harp" backpack as inny
1919                            target inny
1920                        elseif findtype "lap harp" backpack as inny
1921                            target inny
1922                        else
1923                            overhead "I do not have an inny" 34
1924                            @setvar! isPeaced 1
1925                        endif
1926                        wft 500
1927                    endif
1928                    if targetexists 
1929                        target myKillTarget
1930                        overhead "Peacemaed" 88 myKillTarget
1931                    endif
1932                    settimer meditiationTimer 5000
1933                endif
1934            endif
1935            
1936            if not findbuff "song of peacemaking" and timer meditiationTimer >= 11000
1937                useskill 'Peacemaking'
1938                wft 500
1939                if insysmsg "What instrument"
1940                    if findtype "bamboo flute" backpack as inny
1941                        target inny
1942                    elseif findtype "tambourine" backpack as inny
1943                        target inny
1944                    elseif findtype "drum" backpack as inny
1945                        target inny
1946                    elseif findtype "lute" backpack as inny
1947                        target inny
1948                    elseif findtype "harp" backpack as inny
1949                        target inny
1950                    elseif findtype "lap harp" backpack as inny
1951                        target inny
1952                    else
1953                        overhead "I do not have an inny" 34
1954                        @setvar! isPeaced 1
1955                    endif
1956                    wft 500
1957                endif
1958                target backpack
1959                settimer meditiationTimer 0
1960            endif    
1961        endif
1962
1963        if castMagicShield = 1 and timer magicShieldTimer >= cdMagicShield and not findbuff "Magic Reflection"
1964            if mana >= manaReserve
1965                cast "Magic Reflection"
1966                wait 1000
1967            endif
1968        elseif automaticallyDrinkMagicPot = 1 and not findbuff "Magic Reflection" and not findbuff "Magic Resist Potion" and findtype "Black Potion" backpack as pot
1969            dclick pot
1970            wait 200
1971        endif
1972
1973        if findbuff "Magic Reflection"
1974            settimer magicShieldTimer 0
1975        endif
1976        
1977        if castReactiveArmor = 1 and timer reactiveArmorTimer >= cdReactiveArmor and not findbuff "Reactive Armor"
1978            if mana >= manaReserve
1979                cast "Reactive Armor"
1980                wait 200
1981            endif
1982        endif
1983
1984        if findbuff "Reactive Armor"
1985            settimer reactiveArmorTimer 0
1986        endif
1987        
1988        if skill "poisoning" >= 100 or castPoisonAnyway = 1
1989            if timer meditiationTimer >= cdMeditationMini and mana >= manaReserve
1990                if castMindRot = 1 and timer preventSpamNecroAbilitiesTimer >= cdPreventSpamNecroAbilities and timer mindRotTimer >= cdMindRot and skill "Necromancy" >= 75 and 3 < necroSymbols 
1991                    yell "[MindRot"
1992                    settimer preventSpamNecroAbilitiesTimer 0
1993                    settimer mindRotTimer 0
1994                    wait 500
1995                    if gumpexists 622436516
1996                        if ingump "12/" 622436516
1997                            @setvar! necroSymbols 12
1998                        elseif ingump "13/" 622436516
1999                            @setvar! necroSymbols 13
2000                        elseif ingump "14/" 622436516
2001                            @setvar! necroSymbols 14
2002                        elseif ingump "15/" 622436516
2003                            @setvar! necroSymbols 15
2004                        elseif ingump "16/" 622436516
2005                            @setvar! necroSymbols 16
2006                        elseif ingump "17/" 622436516
2007                            @setvar! necroSymbols 17
2008                        elseif ingump "18/" 622436516
2009                            @setvar! necroSymbols 18
2010                        elseif ingump "19/" 622436516
2011                            @setvar! necroSymbols 19
2012                        elseif ingump "20/" 622436516
2013                            @setvar! necroSymbols 20
2014                        elseif ingump "21/" 622436516
2015                            @setvar! necroSymbols 21
2016                        elseif ingump "11/" 622436516
2017                            @setvar! necroSymbols 11
2018                        elseif ingump "10/" 622436516
2019                            @setvar! necroSymbols 10
2020                        elseif ingump "9/" 622436516
2021                            @setvar! necroSymbols 9
2022                        elseif ingump "8/" 622436516
2023                            @setvar! necroSymbols 8
2024                        elseif ingump "7/" 622436516
2025                            @setvar! necroSymbols 7
2026                        elseif ingump "6/" 622436516
2027                            @setvar! necroSymbols 6
2028                        elseif ingump "5/" 622436516
2029                            @setvar! necroSymbols 5
2030                        elseif ingump "4/" 622436516
2031                            @setvar! necroSymbols 4
2032                        elseif ingump "3/" 622436516
2033                            @setvar! necroSymbols 3
2034                        elseif ingump "2/" 622436516
2035                            @setvar! necroSymbols 2
2036                        elseif ingump "1/" 622436516
2037                            @setvar! necroSymbols 1
2038                        elseif ingump "0/" 622436516
2039                            @setvar! necroSymbols 0
2040                        endif
2041                    endif
2042                endif
2043                
2044                                
2045                getlabel myKillTarget desc2
2046                overhead desc2
2047                
2048                if castPoisonStrike = 1 and timer preventSpamNecroAbilitiesTimer >= cdPreventSpamNecroAbilities and timer poisonStrikeTimer >= cdPoisonStrike and skill "Necromancy" >= 55 and 1 < necroSymbols 
2049                    if "Ticks" in desc2
2050                        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 
2051                            yell "[PoisonStrike"
2052                            wft 500
2053                            target myKillTarget
2054                            wait 200
2055                            settimer preventSpamNecroAbilitiesTimer 0
2056                            settimer poisonStrikeTimer 0
2057                            wait 500
2058                            if gumpexists 622436516
2059                                if ingump "12/" 622436516
2060                                    @setvar! necroSymbols 12
2061                                elseif ingump "13/" 622436516
2062                                    @setvar! necroSymbols 13
2063                                elseif ingump "14/" 622436516
2064                                    @setvar! necroSymbols 14
2065                                elseif ingump "15/" 622436516
2066                                    @setvar! necroSymbols 15
2067                                elseif ingump "16/" 622436516
2068                                    @setvar! necroSymbols 16
2069                                elseif ingump "17/" 622436516
2070                                    @setvar! necroSymbols 17
2071                                elseif ingump "18/" 622436516
2072                                    @setvar! necroSymbols 18
2073                                elseif ingump "19/" 622436516
2074                                    @setvar! necroSymbols 19
2075                                elseif ingump "20/" 622436516
2076                                    @setvar! necroSymbols 20
2077                                elseif ingump "21/" 622436516
2078                                    @setvar! necroSymbols 21
2079                                elseif ingump "11/" 622436516
2080                                    @setvar! necroSymbols 11
2081                                elseif ingump "10/" 622436516
2082                                    @setvar! necroSymbols 10
2083                                elseif ingump "9/" 622436516
2084                                    @setvar! necroSymbols 9
2085                                elseif ingump "8/" 622436516
2086                                    @setvar! necroSymbols 8
2087                                elseif ingump "7/" 622436516
2088                                    @setvar! necroSymbols 7
2089                                elseif ingump "6/" 622436516
2090                                    @setvar! necroSymbols 6
2091                                elseif ingump "5/" 622436516
2092                                    @setvar! necroSymbols 5
2093                                elseif ingump "4/" 622436516
2094                                    @setvar! necroSymbols 4
2095                                elseif ingump "3/" 622436516
2096                                    @setvar! necroSymbols 3
2097                                elseif ingump "2/" 622436516
2098                                    @setvar! necroSymbols 2
2099                                elseif ingump "1/" 622436516
2100                                    @setvar! necroSymbols 1
2101                                elseif ingump "0/" 622436516
2102                                    @setvar! necroSymbols 0
2103                                endif
2104                            endif
2105                        endif
2106                    endif
2107                endif
2108                
2109                if isLethalPoison = 0
2110                    
2111                    if diffmana >= 30 and timer magicMushroomTimer >= cdMushroom and findtype "mushroom" backpack as mushy
2112                        overhead "Eating shrooms" 66
2113                        dclick mushy
2114                        @setvar! jase_shrooms mushy
2115                        wait 200
2116                        if insysmsg "You consume a magic mushroom and restore some mana."
2117                            settimer magicMushroomTimer 0  
2118                        elseif insysmsg "before you may consume another magic mushroom" or insysmsg "been in combat with another"
2119                            settimer magicMushroomTimer 30000
2120                        endif
2121                    endif
2122                
2123                    if insysmsg "Target cannot be seen." 
2124                        @setvar! lastCannotBeSeen myKillTarget
2125                        overhead "CANNOT BE SEEN MOVE TO NEXT TARGET" 34
2126                        replay
2127                    endif 
2128
2129                    // poison lethal
2130                    if "Lethal" in desc2
2131                        @setvar! isLethalPoison 1
2132                        break
2133                    elseif castPoisonAnyway = 1 and "Ticks" in desc2
2134                        @setvar! isLethalPoison 1
2135                        break
2136                    elseif castPoisonAnyway = 1 and "Poison" in desc2
2137                        @setvar! isLethalPoison 1
2138                        break
2139                    elseif diffhits >= hpCheckToTriggerGreaterHealSpell 
2140                        // need a heal
2141                        break
2142                    elseif mana >= 9
2143                        while not targetexists harmful
2144                            cast 'poison'
2145                            wait 50
2146                            if dead myKillTarget
2147                                hotkey '> Interrupt'
2148                                replay
2149                            endif
2150                        endwhile
2151                        target myKillTarget
2152                        wait 200
2153                        if insysmsg "Target cannot be seen." 
2154                            @setvar! lastCannotBeSeen myKillTarget
2155                             overhead "CANNOT BE SEEN MOVE TO NEXT TARGET" 34
2156                             @setvar! isLethalPoison 1
2157                        endif 
2158                    else
2159                        wait 200
2160                    endif
2161                endif
2162            endif
2163        endif
2164        
2165        if castCorpseSkin = 1 and timer preventSpamNecroAbilitiesTimer >= cdPreventSpamNecroAbilities and timer corpseSkinTimer >= cdCorpseSkin and skill "Necromancy" >= 65 and timer meditiationTimer >= cdMeditationMini and 2 < necroSymbols and mana >= manaReserve
2166            yell "[CorpseSkin"
2167            settimer preventSpamNecroAbilitiesTimer 0
2168            settimer corpseSkinTimer 0
2169            cooldown CorpseSkin cdCorpseSkin
2170            wait 500
2171            if gumpexists 622436516
2172                if ingump "12/" 622436516
2173                    @setvar! necroSymbols 12
2174                elseif ingump "13/" 622436516
2175                    @setvar! necroSymbols 13
2176                elseif ingump "14/" 622436516
2177                    @setvar! necroSymbols 14
2178                elseif ingump "15/" 622436516
2179                    @setvar! necroSymbols 15
2180                elseif ingump "16/" 622436516
2181                    @setvar! necroSymbols 16
2182                elseif ingump "17/" 622436516
2183                    @setvar! necroSymbols 17
2184                elseif ingump "18/" 622436516
2185                    @setvar! necroSymbols 18
2186                elseif ingump "19/" 622436516
2187                    @setvar! necroSymbols 19
2188                elseif ingump "20/" 622436516
2189                    @setvar! necroSymbols 20
2190                elseif ingump "21/" 622436516
2191                    @setvar! necroSymbols 21
2192                elseif ingump "11/" 622436516
2193                    @setvar! necroSymbols 11
2194                elseif ingump "10/" 622436516
2195                    @setvar! necroSymbols 10
2196                elseif ingump "9/" 622436516
2197                    @setvar! necroSymbols 9
2198                elseif ingump "8/" 622436516
2199                    @setvar! necroSymbols 8
2200                elseif ingump "7/" 622436516
2201                    @setvar! necroSymbols 7
2202                elseif ingump "6/" 622436516
2203                    @setvar! necroSymbols 6
2204                elseif ingump "5/" 622436516
2205                    @setvar! necroSymbols 5
2206                elseif ingump "4/" 622436516
2207                    @setvar! necroSymbols 4
2208                elseif ingump "3/" 622436516
2209                    @setvar! necroSymbols 3
2210                elseif ingump "2/" 622436516
2211                    @setvar! necroSymbols 2
2212                elseif ingump "1/" 622436516
2213                    @setvar! necroSymbols 1
2214                elseif ingump "0/" 622436516
2215                    @setvar! necroSymbols 0
2216                endif
2217            endif
2218        endif
2219            
2220        if castBloodOath = 1 and timer preventSpamNecroAbilitiesTimer >= cdPreventSpamNecroAbilities and skill "Necromancy" >= 80 and timer bloodOathTimer >= cdBloodOath and 5 < necroSymbols and mana >= manaReserve
2221            yell "[BloodOath"
2222            settimer preventSpamNecroAbilitiesTimer 0
2223            settimer bloodOathTimer 0
2224            if gumpexists 622436516
2225                if ingump "12/" 622436516
2226                    @setvar! necroSymbols 12
2227                elseif ingump "13/" 622436516
2228                    @setvar! necroSymbols 13
2229                elseif ingump "14/" 622436516
2230                    @setvar! necroSymbols 14
2231                elseif ingump "15/" 622436516
2232                    @setvar! necroSymbols 15
2233                elseif ingump "16/" 622436516
2234                    @setvar! necroSymbols 16
2235                elseif ingump "17/" 622436516
2236                    @setvar! necroSymbols 17
2237                elseif ingump "18/" 622436516
2238                    @setvar! necroSymbols 18
2239                elseif ingump "19/" 622436516
2240                    @setvar! necroSymbols 19
2241                elseif ingump "20/" 622436516
2242                    @setvar! necroSymbols 20
2243                elseif ingump "21/" 622436516
2244                    @setvar! necroSymbols 21
2245                elseif ingump "11/" 622436516
2246                    @setvar! necroSymbols 11
2247                elseif ingump "10/" 622436516
2248                    @setvar! necroSymbols 10
2249                elseif ingump "9/" 622436516
2250                    @setvar! necroSymbols 9
2251                elseif ingump "8/" 622436516
2252                    @setvar! necroSymbols 8
2253                elseif ingump "7/" 622436516
2254                    @setvar! necroSymbols 7
2255                elseif ingump "6/" 622436516
2256                    @setvar! necroSymbols 6
2257                elseif ingump "5/" 622436516
2258                    @setvar! necroSymbols 5
2259                elseif ingump "4/" 622436516
2260                    @setvar! necroSymbols 4
2261                elseif ingump "3/" 622436516
2262                    @setvar! necroSymbols 3
2263                elseif ingump "2/" 622436516
2264                    @setvar! necroSymbols 2
2265                elseif ingump "1/" 622436516
2266                    @setvar! necroSymbols 1
2267                elseif ingump "0/" 622436516
2268                    @setvar! necroSymbols 0
2269                endif
2270            endif
2271        endif
2272        
2273        if castEvilOmen = 1 and timer preventSpamNecroAbilitiesTimer >= cdPreventSpamNecroAbilities and timer evilOmenTimer >= cdEvilOmen and skill "Necromancy" >= 60 and timer meditiationTimer >= cdMeditationMini and 2 < necroSymbols and mana >= manaReserve
2274            yell "[EvilOmen"
2275            settimer evilOmenTimer 0
2276            settimer preventSpamNecroAbilitiesTimer 0
2277            cooldown EvilOmen cdEvilOmen
2278            wait 500
2279            if gumpexists 622436516
2280                if ingump "12/" 622436516
2281                    @setvar! necroSymbols 12
2282                elseif ingump "13/" 622436516
2283                    @setvar! necroSymbols 13
2284                elseif ingump "14/" 622436516
2285                    @setvar! necroSymbols 14
2286                elseif ingump "15/" 622436516
2287                    @setvar! necroSymbols 15
2288                elseif ingump "16/" 622436516
2289                    @setvar! necroSymbols 16
2290                elseif ingump "17/" 622436516
2291                    @setvar! necroSymbols 17
2292                elseif ingump "18/" 622436516
2293                    @setvar! necroSymbols 18
2294                elseif ingump "19/" 622436516
2295                    @setvar! necroSymbols 19
2296                elseif ingump "20/" 622436516
2297                    @setvar! necroSymbols 20
2298                elseif ingump "21/" 622436516
2299                    @setvar! necroSymbols 21
2300                elseif ingump "11/" 622436516
2301                    @setvar! necroSymbols 11
2302                elseif ingump "10/" 622436516
2303                    @setvar! necroSymbols 10
2304                elseif ingump "9/" 622436516
2305                    @setvar! necroSymbols 9
2306                elseif ingump "8/" 622436516
2307                    @setvar! necroSymbols 8
2308                elseif ingump "7/" 622436516
2309                    @setvar! necroSymbols 7
2310                elseif ingump "6/" 622436516
2311                    @setvar! necroSymbols 6
2312                elseif ingump "5/" 622436516
2313                    @setvar! necroSymbols 5
2314                elseif ingump "4/" 622436516
2315                    @setvar! necroSymbols 4
2316                elseif ingump "3/" 622436516
2317                    @setvar! necroSymbols 3
2318                elseif ingump "2/" 622436516
2319                    @setvar! necroSymbols 2
2320                elseif ingump "1/" 622436516
2321                    @setvar! necroSymbols 1
2322                elseif ingump "0/" 622436516
2323                    @setvar! necroSymbols 0
2324                endif
2325            endif
2326        endif
2327        
2328        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
2329            yell "[VampiricEmbrace"
2330            wft 500
2331            target jorpse
2332            settimer preventSpamNecroAbilitiesTimer 0
2333            settimer vampiricEmbraceTimer 0
2334            cooldown VampiricEmbrace cdVampiricEmbrace
2335            wait 500
2336            if gumpexists 622436516
2337                if ingump "12/" 622436516
2338                    @setvar! necroSymbols 12
2339                elseif ingump "13/" 622436516
2340                    @setvar! necroSymbols 13
2341                elseif ingump "14/" 622436516
2342                    @setvar! necroSymbols 14
2343                elseif ingump "15/" 622436516
2344                    @setvar! necroSymbols 15
2345                elseif ingump "16/" 622436516
2346                    @setvar! necroSymbols 16
2347                elseif ingump "17/" 622436516
2348                    @setvar! necroSymbols 17
2349                elseif ingump "18/" 622436516
2350                    @setvar! necroSymbols 18
2351                elseif ingump "19/" 622436516
2352                    @setvar! necroSymbols 19
2353                elseif ingump "20/" 622436516
2354                    @setvar! necroSymbols 20
2355                elseif ingump "21/" 622436516
2356                    @setvar! necroSymbols 21
2357                elseif ingump "11/" 622436516
2358                    @setvar! necroSymbols 11
2359                elseif ingump "10/" 622436516
2360                    @setvar! necroSymbols 10
2361                elseif ingump "9/" 622436516
2362                    @setvar! necroSymbols 9
2363                elseif ingump "8/" 622436516
2364                    @setvar! necroSymbols 8
2365                elseif ingump "7/" 622436516
2366                    @setvar! necroSymbols 7
2367                elseif ingump "6/" 622436516
2368                    @setvar! necroSymbols 6
2369                elseif ingump "5/" 622436516
2370                    @setvar! necroSymbols 5
2371                elseif ingump "4/" 622436516
2372                    @setvar! necroSymbols 4
2373                elseif ingump "3/" 622436516
2374                    @setvar! necroSymbols 3
2375                elseif ingump "2/" 622436516
2376                    @setvar! necroSymbols 2
2377                elseif ingump "1/" 622436516
2378                    @setvar! necroSymbols 1
2379                elseif ingump "0/" 622436516
2380                    @setvar! necroSymbols 0
2381                endif
2382            endif
2383        endif
2384        
2385        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
2386            yell "[PainSpike"
2387            wft 500
2388            target myKillTarget
2389            wait 200
2390            settimer preventSpamNecroAbilitiesTimer 0
2391            if insysmsg "You do not see any corpses"
2392                // do nothing
2393            else
2394                settimer painSpikeTimer 0
2395                cooldown PainSpike cdPainSpike            
2396            endif
2397            if gumpexists 622436516
2398                if ingump "12/" 622436516
2399                    @setvar! necroSymbols 12
2400                elseif ingump "13/" 622436516
2401                    @setvar! necroSymbols 13
2402                elseif ingump "14/" 622436516
2403                    @setvar! necroSymbols 14
2404                elseif ingump "15/" 622436516
2405                    @setvar! necroSymbols 15
2406                elseif ingump "16/" 622436516
2407                    @setvar! necroSymbols 16
2408                elseif ingump "17/" 622436516
2409                    @setvar! necroSymbols 17
2410                elseif ingump "18/" 622436516
2411                    @setvar! necroSymbols 18
2412                elseif ingump "19/" 622436516
2413                    @setvar! necroSymbols 19
2414                elseif ingump "20/" 622436516
2415                    @setvar! necroSymbols 20
2416                elseif ingump "21/" 622436516
2417                    @setvar! necroSymbols 21
2418                elseif ingump "11/" 622436516
2419                    @setvar! necroSymbols 11
2420                elseif ingump "10/" 622436516
2421                    @setvar! necroSymbols 10
2422                elseif ingump "9/" 622436516
2423                    @setvar! necroSymbols 9
2424                elseif ingump "8/" 622436516
2425                    @setvar! necroSymbols 8
2426                elseif ingump "7/" 622436516
2427                    @setvar! necroSymbols 7
2428                elseif ingump "6/" 622436516
2429                    @setvar! necroSymbols 6
2430                elseif ingump "5/" 622436516
2431                    @setvar! necroSymbols 5
2432                elseif ingump "4/" 622436516
2433                    @setvar! necroSymbols 4
2434                elseif ingump "3/" 622436516
2435                    @setvar! necroSymbols 3
2436                elseif ingump "2/" 622436516
2437                    @setvar! necroSymbols 2
2438                elseif ingump "1/" 622436516
2439                    @setvar! necroSymbols 1
2440                elseif ingump "0/" 622436516
2441                    @setvar! necroSymbols 0
2442                endif
2443            endif
2444        endif
2445        
2446        if diffhits >= hpCheckToTriggerHealPotion 
2447            if findtype "Yellow Potion" backpack as pot 
2448                getlabel pot desc
2449                if "next usable" in desc
2450                    // do nothing
2451                else
2452                    dclick pot
2453                    wait 500
2454                endif
2455            endif
2456        endif
2457        
2458        if diffhits >= hpCheckToTriggerGreaterHealSpell and mana >= 12
2459            while not targetexists beneficial
2460                if diffhits >= hpCheckToTriggerMiniEmergencyHealSpell
2461                    cast 'Heal'
2462                else
2463                    cast 'Greater Heal'                
2464                endif
2465                wait 50
2466                if hp = maxhp
2467                    hotkey '> Interrupt'
2468                    break
2469                endif
2470            endwhile
2471            if targetexists beneficial
2472                hotkey "Target Self"
2473                wait 50
2474            endif
2475        endif
2476        
2477        if poisoned
2478            if automaticallyDrinkCurePot = 1 and diffhits >= hpCheckToTriggerCurePotion and findtype "Orange Potion" backpack as pot 
2479                dclick pot
2480                wait 200
2481            endif
2482            
2483            while not targetexists beneficial
2484                if not poisoned
2485                    hotkey '> Interrupt'
2486                    break
2487                else
2488                    cast 'Cure'
2489                    wait 50
2490                endif 
2491            endwhile
2492            if targetexists beneficial
2493                hotkey "Target Self"
2494                wait 500
2495            endif
2496        endif
2497
2498        if diffmana >= 30 and timer magicMushroomTimer >= cdMushroom and findtype "mushroom" backpack as mushy
2499            overhead "Eating shrooms" 66
2500            dclick mushy
2501            @setvar! jase_shrooms mushy
2502            wait 200
2503            if insysmsg "You consume a magic mushroom and restore some mana."
2504                settimer magicMushroomTimer 0    
2505            elseif insysmsg "before you may consume another magic mushroom" or insysmsg "been in combat with another"
2506                settimer magicMushroomTimer 30000
2507            endif
2508        endif
2509        
2510        
2511        
2512        if index = 0
2513                    
2514            if castLightning = 1 and diffhits < 30 and mana >= 12 and timer lightningTimer >= cdLightning and timer meditiationTimer >= cdMeditationMini and mana >= manaReserve
2515                while not targetexists harmful
2516                    if followers < breakSpellCastAndResummonIfLessThanXFollowers or dead myKillTarget or diffhits >= hpCheckToTriggerGreaterHealSpell
2517                        hotkey '> Interrupt'
2518                        break
2519                    else
2520                        if skill "Herding" > 0 and timer HerdTimer >= cdHerdingTimer and timer meditiationTimer >= 11000 and findtype 3713 backpack as jrook
2521                            dclick jrook
2522                            wft 500
2523                            target myKillTarget
2524                            settimer meditiationTimer 8000
2525                            settimer HerdTimer 0
2526                            cooldown Herding cdHerdingTimer
2527                        endif
2528                        cast 'Lightning'
2529                        wait 50
2530                    endif 
2531                endwhile
2532                if targetexists harmful
2533                    target myKillTarget
2534                    settimer lightningTimer 0
2535                    cooldown Lightning cdLightning
2536                    wait 500
2537                endif
2538            endif
2539        
2540        elseif index = 1
2541        
2542            if castMagicArrow = 1 and diffhits < 30 and mana >= 5 and timer magicArrowTimer >= cdMagicArrow and timer meditiationTimer >= cdMeditationMini and mana >= manaReserve
2543                while not targetexists harmful
2544                    if followers < breakSpellCastAndResummonIfLessThanXFollowers or dead myKillTarget or diffhits >= hpCheckToTriggerGreaterHealSpell
2545                        hotkey '> Interrupt'
2546                        break
2547                    else
2548                         if skill "Herding" > 0 and timer HerdTimer >= cdHerdingTimer and timer meditiationTimer >= 11000 and findtype 3713 backpack as jrook
2549                            dclick jrook
2550                            wft 500
2551                            target myKillTarget
2552                            settimer meditiationTimer 8000
2553                            settimer HerdTimer 0
2554                            cooldown Herding cdHerdingTimer
2555                        endif
2556                        cast 'magic arrow'
2557                        wait 50
2558                    endif 
2559                endwhile
2560                if targetexists harmful
2561                    target myKillTarget
2562                    settimer magicArrowTimer 0
2563                    cooldown MagicArrow cdMagicArrow
2564                    wait 500
2565                endif
2566            endif
2567            
2568        elseif index = 2
2569                
2570            if castHarm = 1 and diffhits < 30 and mana >= 9 and timer harmTimer >= cdHarm and timer meditiationTimer >= cdMeditationMini and mana >= manaReserve
2571                while not targetexists harmful
2572                    if followers < breakSpellCastAndResummonIfLessThanXFollowers or dead myKillTarget or diffhits >= hpCheckToTriggerGreaterHealSpell
2573                        hotkey '> Interrupt'
2574                        break
2575                    else
2576                        if skill "Herding" > 0 and timer HerdTimer >= cdHerdingTimer and timer meditiationTimer >= 11000 and findtype 3713 backpack as jrook
2577                            dclick jrook
2578                            wft 500
2579                            target myKillTarget
2580                            settimer meditiationTimer 8000
2581                            settimer HerdTimer 0
2582                            cooldown Herding cdHerdingTimer
2583                        endif
2584                        cast 'harm'
2585                        wait 50
2586                    endif 
2587                endwhile
2588                if targetexists harmful
2589                    target myKillTarget
2590                    settimer harmTimer 0
2591                    cooldown Harm cdHarm
2592                    wait 500
2593                endif
2594            endif
2595            
2596        elseif index = 3
2597                
2598            if castFireball = 1 and diffhits < 30 and mana >= 12 and timer fireballTimer >= cdFireball and timer meditiationTimer >= cdMeditationMini and mana >= manaReserve
2599                while not targetexists harmful
2600                    if followers < breakSpellCastAndResummonIfLessThanXFollowers or dead myKillTarget or diffhits >= hpCheckToTriggerGreaterHealSpell
2601                        hotkey '> Interrupt'
2602                        break
2603                    else
2604                        if skill "Herding" > 0 and timer HerdTimer >= cdHerdingTimer and timer meditiationTimer >= 11000 and findtype 3713 backpack as jrook
2605                            dclick jrook
2606                            wft 500
2607                            target myKillTarget
2608                            settimer meditiationTimer 8000
2609                            settimer HerdTimer 0
2610                            cooldown Herding cdHerdingTimer
2611                        endif
2612                        cast 'fireball'
2613                        wait 50
2614                    endif 
2615                endwhile
2616                if targetexists harmful
2617                    target myKillTarget
2618                    settimer fireballTimer 0
2619                    cooldown Fireball cdFireball
2620                    wait 500
2621                endif
2622            endif
2623
2624        endif
2625        
2626        if tamerModeEngaged = 1
2627                
2628            if timer autoHealTamerPet >= cdAutoHealTamerPet
2629                if not dead jaseTankPet
2630                    while not targetexists beneficial
2631                        hotkey 'Greater Heal'
2632                        wft 200
2633                    endwhile
2634                else
2635                   while not targetexists beneficial
2636                        hotkey 'Resurrection'
2637                        wft 200
2638                        if diffhits >= hpCheckToTriggerGreaterHealSpell
2639                            break
2640                        endif
2641                    endwhile
2642                    if targetexists beneficial
2643                        target jaseTankPet
2644                    endif
2645                    while not targetexists beneficial
2646                        hotkey 'Greater Heal'
2647                        wft 200
2648                    endwhile
2649                endif
2650                if targetexists beneficial
2651                    target jaseTankPet
2652                    settimer autoHealTamerPet 0
2653                    cooldown AutoPetHeal cdAutoHealTamerPet
2654                endif
2655            endif
2656            
2657        endif
2658    
2659    endfor
2660   
2661    if find myKillTarget -1 -1 12 as killy
2662       // do nothing
2663    else
2664        overhead "Out of range" 34
2665        break
2666    endif
2667    
2668    
2669    if diffhits >= hpCheckToTriggerGreaterHealSpell
2670            
2671        if diffhits >= hpCheckToTriggerHealPotion and findtype "Yellow Potion" backpack as pot 
2672            getlabel pot desc
2673            if "next usable" in desc
2674                // do nothing
2675            else
2676                dclick pot
2677                wait 500
2678            endif
2679        endif
2680
2681        if diffhits >= hpCheckToTriggerGreaterHealSpell and mana >= 12
2682            while not targetexists beneficial
2683                if diffhits >= hpCheckToTriggerMiniEmergencyHealSpell
2684                    cast 'Heal'
2685                else
2686                    cast 'Greater Heal'                
2687                endif
2688                wait 50
2689                if hp = maxhp
2690                    hotkey '> Interrupt'
2691                    break
2692                endif
2693            endwhile
2694            if targetexists beneficial
2695                hotkey "Target Self"
2696                wait 50
2697            endif
2698        endif
2699    elseif mana < 55 and findbuff "actively meditating" 
2700        // wait for mana
2701    elseif timer meditiationTimer < cdMeditationMini and findbuff "actively meditating" 
2702        // wait for mana
2703    elseif castChainLightning = 1 and timer chainLightningTimer >= cdChainLightning
2704        while not targetexists and mana > 40 and mana >= manaReserve
2705            if diffmana >= 30 and timer magicMushroomTimer >= cdMushroom and findtype "mushroom" backpack as mushy
2706                overhead "Eating shrooms" 66
2707                dclick mushy
2708                @setvar! jase_shrooms mushy
2709                wait 200
2710                if insysmsg "You consume a magic mushroom and restore some mana."
2711                    settimer magicMushroomTimer 0    
2712                elseif insysmsg "before you may consume another magic mushroom" or insysmsg "been in combat with another"
2713                    settimer magicMushroomTimer 30000
2714                endif
2715            endif
2716            if followers < breakSpellCastAndResummonIfLessThanXFollowers or dead myKillTarget or diffhits >= hpCheckToTriggerGreaterHealSpell
2717                hotkey '> Interrupt'
2718                break
2719            else
2720                if skill "Herding" > 0 and timer HerdTimer >= cdHerdingTimer and timer meditiationTimer >= 11000 and findtype 3713 backpack as jrook
2721                            dclick jrook
2722                            wft 500
2723                            target myKillTarget
2724                            settimer meditiationTimer 8000
2725                            settimer HerdTimer 0
2726                            cooldown Herding cdHerdingTimer
2727                        endif
2728                cast 'Chain Lightning'
2729                wait 50
2730            endif 
2731        endwhile
2732        if targetexists
2733            target myKillTarget
2734            wait 500
2735            if insysmsg "Target cannot be seen." 
2736                @setvar! lastCannotBeSeen myKillTarget
2737                overhead "CANNOT BE SEEN MOVE TO NEXT TARGET" 34
2738                replay
2739            endif
2740            settimer chainLightningTimer 0
2741            cooldown ChainLightning cdChainLightning
2742        endif
2743    elseif castEbolt = 1 and mana >= 32 and mana >= manaReserve
2744        while not targetexists harmful and mana > 30 and mana >= manaReserve
2745            if diffmana >= 30 and timer magicMushroomTimer >= cdMushroom and findtype "mushroom" backpack as mushy
2746                overhead "Eating shrooms" 66
2747                dclick mushy
2748                @setvar! jase_shrooms mushy
2749                wait 200
2750                if insysmsg "You consume a magic mushroom and restore some mana."
2751                    settimer magicMushroomTimer 0    
2752                elseif insysmsg "before you may consume another magic mushroom" or insysmsg "been in combat with another"
2753                    settimer magicMushroomTimer 30000
2754                endif
2755            endif
2756            if followers < breakSpellCastAndResummonIfLessThanXFollowers or dead myKillTarget or diffhits >= hpCheckToTriggerGreaterHealSpell
2757                hotkey '> Interrupt'
2758                break
2759            else
2760                if skill "Herding" > 0 and timer HerdTimer >= cdHerdingTimer and timer meditiationTimer >= 11000 and findtype 3713 backpack as jrook
2761                            dclick jrook
2762                            wft 500
2763                            target myKillTarget
2764                            settimer meditiationTimer 8000
2765                            settimer HerdTimer 0
2766                            cooldown Herding cdHerdingTimer
2767                        endif
2768                cast 'Energy Bolt'
2769                wait 50
2770            endif 
2771        endwhile
2772        if targetexists harmful
2773            target myKillTarget
2774            wait 500
2775            if insysmsg "Target cannot be seen." 
2776                @setvar! lastCannotBeSeen myKillTarget
2777                overhead "CANNOT BE SEEN MOVE TO NEXT TARGET" 34
2778                replay
2779            endif
2780        endif
2781    
2782        if castMindBlast = 1 and mana >= 32 and mana >= manaReserve
2783            while not targetexists harmful and mana > 30
2784                if diffmana >= 30 and timer magicMushroomTimer >= cdMushroom and findtype "mushroom" backpack as mushy
2785                    overhead "Eating shrooms" 66
2786                    dclick mushy
2787                    @setvar! jase_shrooms mushy
2788                    wait 200
2789                    if insysmsg "You consume a magic mushroom and restore some mana."
2790                        settimer magicMushroomTimer 0    
2791                    elseif insysmsg "before you may consume another magic mushroom" or insysmsg "been in combat with another"
2792                        settimer magicMushroomTimer 30000
2793                    endif
2794                endif
2795                if followers < breakSpellCastAndResummonIfLessThanXFollowers or dead myKillTarget or diffhits >= hpCheckToTriggerGreaterHealSpell
2796                    hotkey '> Interrupt'
2797                    break
2798                else
2799                    if skill "Herding" > 0 and timer HerdTimer >= cdHerdingTimer and timer meditiationTimer >= 11000 and findtype 3713 backpack as jrook
2800                        dclick jrook
2801                        wft 500
2802                        target myKillTarget
2803                        settimer meditiationTimer 8000
2804                        settimer HerdTimer 0
2805                        cooldown Herding cdHerdingTimer
2806                    endif
2807                    cast 'Mind Blast'
2808                    wait 50
2809                endif 
2810            endwhile
2811            if targetexists harmful
2812                target myKillTarget
2813                wait 500
2814                if insysmsg "Target cannot be seen." 
2815                    @setvar! lastCannotBeSeen myKillTarget
2816                    overhead "CANNOT BE SEEN MOVE TO NEXT TARGET" 34
2817                    replay
2818                endif
2819            endif
2820        endif
2821        if castFlamestrike = 1 and mana > 42 and mana >= manaReserve
2822            while not targetexists harmful and mana > 40
2823            
2824                if diffmana >= 30 and timer magicMushroomTimer >= cdMushroom and findtype "mushroom" backpack as mushy
2825                    overhead "Eating shrooms" 66
2826                    dclick mushy
2827                    @setvar! jase_shrooms mushy
2828                    wait 200
2829                    if insysmsg "You consume a magic mushroom and restore some mana."
2830                        settimer magicMushroomTimer 0
2831                    elseif insysmsg "before you may consume another magic mushroom" or insysmsg "been in combat with another"
2832                        settimer magicMushroomTimer 30000    
2833                    endif
2834                endif
2835        
2836                if followers < breakSpellCastAndResummonIfLessThanXFollowers or dead myKillTarget or diffhits >= hpCheckToTriggerGreaterHealSpell
2837                    hotkey '> Interrupt'
2838                    break
2839                else
2840                    if skill "Herding" > 0 and timer HerdTimer >= cdHerdingTimer and timer meditiationTimer >= 11000 and findtype 3713 backpack as jrook
2841                        dclick jrook
2842                        wft 500
2843                        target myKillTarget
2844                        settimer meditiationTimer 8000
2845                        settimer HerdTimer 0
2846                        cooldown Herding cdHerdingTimer
2847                    endif
2848                    cast 'Flamestrike'
2849                    wait 50
2850                endif 
2851            endwhile
2852            if targetexists harmful
2853                target myKillTarget
2854                wait 500
2855                if insysmsg "Target cannot be seen." 
2856                    @setvar! lastCannotBeSeen myKillTarget
2857                    overhead "CANNOT BE SEEN MOVE TO NEXT TARGET" 34
2858                    replay
2859                endif
2860            endif
2861        endif
2862    elseif castMindBlast = 1 and mana >= 32 and mana >= manaReserve
2863        while not targetexists harmful and mana > 30
2864            if diffmana >= 30 and timer magicMushroomTimer >= cdMushroom and findtype "mushroom" backpack as mushy
2865                overhead "Eating shrooms" 66
2866                dclick mushy
2867                @setvar! jase_shrooms mushy
2868                wait 200
2869                if insysmsg "You consume a magic mushroom and restore some mana."
2870                    settimer magicMushroomTimer 0    
2871                elseif insysmsg "before you may consume another magic mushroom" or insysmsg "been in combat with another"
2872                    settimer magicMushroomTimer 30000
2873                endif
2874            endif
2875            if followers < breakSpellCastAndResummonIfLessThanXFollowers or dead myKillTarget or diffhits >= hpCheckToTriggerGreaterHealSpell
2876                hotkey '> Interrupt'
2877                break
2878            else
2879                if skill "Herding" > 0 and timer HerdTimer >= cdHerdingTimer and timer meditiationTimer >= 11000 and findtype 3713 backpack as jrook
2880                    dclick jrook
2881                    wft 500
2882                    target myKillTarget
2883                    settimer meditiationTimer 8000
2884                    settimer HerdTimer 0
2885                    cooldown Herding cdHerdingTimer
2886                endif
2887                cast 'Mind Blast'
2888                wait 50
2889            endif 
2890        endwhile
2891        if targetexists harmful
2892            target myKillTarget
2893            wait 500
2894            if insysmsg "Target cannot be seen." 
2895                @setvar! lastCannotBeSeen myKillTarget
2896                overhead "CANNOT BE SEEN MOVE TO NEXT TARGET" 34
2897                replay
2898            endif
2899        endif
2900        if castFlamestrike = 1 and mana > 42 and mana >= manaReserve
2901            while not targetexists harmful and mana > 40
2902            
2903                if diffmana >= 30 and timer magicMushroomTimer >= cdMushroom and findtype "mushroom" backpack as mushy
2904                    overhead "Eating shrooms" 66
2905                    dclick mushy
2906                    @setvar! jase_shrooms mushy
2907                    wait 200
2908                    if insysmsg "You consume a magic mushroom and restore some mana."
2909                        settimer magicMushroomTimer 0    
2910                    elseif insysmsg "before you may consume another magic mushroom" or insysmsg "been in combat with another"
2911                        settimer magicMushroomTimer 30000
2912                    endif
2913                endif
2914        
2915                if followers < breakSpellCastAndResummonIfLessThanXFollowers or dead myKillTarget or diffhits >= hpCheckToTriggerGreaterHealSpell
2916                    hotkey '> Interrupt'
2917                    break
2918                else
2919                    if skill "Herding" > 0 and timer HerdTimer >= cdHerdingTimer and timer meditiationTimer >= 11000 and findtype 3713 backpack as jrook
2920                        dclick jrook
2921                        wft 500
2922                        target myKillTarget
2923                        settimer meditiationTimer 8000
2924                        settimer HerdTimer 0
2925                        cooldown Herding cdHerdingTimer
2926                    endif
2927                    cast 'Flamestrike'
2928                    wait 50
2929                endif 
2930            endwhile
2931            if targetexists harmful
2932                target myKillTarget
2933                wait 500
2934                if insysmsg "Target cannot be seen." 
2935                    @setvar! lastCannotBeSeen myKillTarget
2936                    overhead "CANNOT BE SEEN MOVE TO NEXT TARGET" 34
2937                    replay
2938                endif
2939            endif
2940        endif
2941    elseif castFlamestrike = 1 and mana > 42 and mana >= manaReserve
2942        while not targetexists harmful and mana > 40
2943        
2944            if diffmana >= 30 and timer magicMushroomTimer >= cdMushroom and findtype "mushroom" backpack as mushy
2945                overhead "Eating shrooms" 66
2946                dclick mushy
2947                @setvar! jase_shrooms mushy
2948                wait 200
2949                if insysmsg "You consume a magic mushroom and restore some mana."
2950                    settimer magicMushroomTimer 0    
2951                elseif insysmsg "before you may consume another magic mushroom" or insysmsg "been in combat with another"
2952                    settimer magicMushroomTimer 30000
2953                endif
2954            endif
2955    
2956            if followers < breakSpellCastAndResummonIfLessThanXFollowers or dead myKillTarget or diffhits >= hpCheckToTriggerGreaterHealSpell
2957                hotkey '> Interrupt'
2958                break
2959            else
2960                 if skill "Herding" > 0 and timer HerdTimer >= cdHerdingTimer and timer meditiationTimer >= 11000 and findtype 3713 backpack as jrook
2961                        dclick jrook
2962                        wft 500
2963                        target myKillTarget
2964                        settimer meditiationTimer 8000
2965                        settimer HerdTimer 0
2966                        cooldown Herding cdHerdingTimer
2967                    endif
2968                cast 'Flamestrike'
2969                wait 50
2970            endif 
2971        endwhile
2972        if targetexists harmful
2973            target myKillTarget
2974            wait 500
2975            if insysmsg "Target cannot be seen." 
2976                @setvar! lastCannotBeSeen myKillTarget
2977                overhead "CANNOT BE SEEN MOVE TO NEXT TARGET" 34
2978                replay
2979            endif
2980        endif
2981    elseif not findbuff "actively meditating" and timer magicMushroomTimer >= cdMushroom and findtype "mushroom" backpack as mushy
2982        overhead "Eating shrooms" 66
2983        dclick mushy
2984        @setvar! jase_shrooms mushy
2985        wait 200
2986        if insysmsg "You consume a magic mushroom and restore some mana."
2987            settimer magicMushroomTimer 0    
2988        elseif insysmsg "before you may consume another magic mushroom" or insysmsg "been in combat with another"
2989            settimer magicMushroomTimer 30000
2990        endif
2991        elseif not findbuff "actively meditating" and timer meditiationTimer >= cdMeditation and isDiscorded = 1 and isPeaced = 1
2992        if followers > 0
2993            say "all guard me"
2994        endif
2995        useskill 'meditation'
2996        settimer meditiationTimer 0
2997        wait 500
2998    endif
2999    wait 50
3000endwhile
3001wait 500
3002if targetexists 
3003    hotkey 'Cancel Current Target'
3004endif
3005if not findbuff "actively meditating" 
3006    if automaticallySkinCorpses = 1 and findtype "corpse" ground -1 -1 2 as jorpse
3007        if findtype "Elven Spellblade" backpack
3008            while not targetexists neutral
3009                useskill 'forensicevaluation'
3010            endwhile
3011            if targetexists neutral
3012                hotkey "Target Self"
3013                wait minimumWaitForPing
3014                @ignore jorpse
3015            endif
3016        endif
3017    endif
3018    if followers > 0
3019        say "all guard me"
3020    endif
3021endif
3022while mana < minimumManaToCast
3023    if setThisAsOneIfYouWantToTargetYourOwnKillOrItWillTargetClosestMonster = 0
3024        hotkey 'Target Closest Non-Friendly Monster'
3025        wait 200
3026        if insysmsg "No one matching that was found"
3027            if timer preventOverheadSpamTimer >= cdPreventOverheadSpam
3028                overhead "no next target" 34
3029                settimer preventOverheadSpamTimer 0
3030            endif
3031        elseif not find lasttarget ground -1 -1 8
3032            overhead "▼ NEXT TARGET HERE ▼" 88 lasttarget
3033            if timer preventOverheadSpamTimer >= cdPreventOverheadSpam
3034                overhead "Move closer, more then 8 tiles away" 34
3035                settimer preventOverheadSpamTimer 0
3036            endif
3037        else
3038            overhead "▼ NEXT TARGET HERE ▼" 88 lasttarget
3039            attack lasttarget
3040        endif    
3041    endif
3042    if diffhits >= hpCheckToTriggerGreaterHealSpell
3043        if diffhits >= hpCheckToTriggerHealPotion and findtype "Yellow Potion" backpack as pot 
3044            getlabel pot desc
3045            if "next usable" in desc
3046                // do nothing
3047            else
3048                dclick pot
3049                wait 650
3050            endif
3051        endif
3052        if diffhits >= hpCheckToTriggerGreaterHealSpell and mana >= 12
3053            while not targetexists beneficial
3054                if diffhits >= hpCheckToTriggerMiniEmergencyHealSpell
3055                    cast 'Heal'
3056                else
3057                    cast 'Greater Heal'                
3058                endif
3059                wait 50
3060                if hp = maxhp
3061                    hotkey '> Interrupt'
3062                    break
3063                endif
3064            endwhile
3065            if targetexists beneficial
3066                hotkey "Target Self"
3067                wait 50
3068            endif
3069        endif
3070    endif
3071    if not findbuff "actively meditating" 
3072        useskill 'meditation'
3073    endif
3074    wait 500
3075endwhile
3076if canYouMakeAMushroom = 1 and counttype "mushroom" backpack < butOnlyIHaveLessThenThisCount
3077    if mana >= manaReserve
3078        while counttype "mushroom" backpack < makeThisManyMushroomsCount
3079            cast "Create Food"
3080            wait 200
3081            if diffhits >= 20 or counttype "mushroom" backpack = 0
3082                break
3083            endif
3084        endwhile
3085    endif
3086endif
3087if castVampiricEmbrace = 1 and timer vampiricEmbraceTimer >= cdVampiricEmbrace and skill "Necromancy" >= 70 and findtype 8198 ground -1 -1 4 as jorpse
3088    say "[VampiricEmbrace"
3089    wft 500
3090    target jorpse
3091    settimer vampiricEmbraceTimer 0
3092    cooldown VampiricEmbrace cdVampiricEmbrace
3093endif
3094if castSummonEarthElementalCount = 1 or castSummonFireElementalCount = 1 or castSummonDemonCount = 1 or castSummonAirCount = 1 or castSummonWaterCount = 1
3095    useskill "spiritspeak"
3096    settimer meditiationTimer 8000
3097endif
3098if timer killTargetTimer >= cdKillTarget
3099    overhead "We cleared curse and mana drain targets" 34
3100    removelist myCursedTargets      
3101    removelist myManaDrainTargets
3102    removelist myManaVampireTargets
3103endif
3104   
3105if autoBotEnabled = 1
3106    replay
3107endif
3108