Willobe's edit of Jaseowns Ultimate Magery Summoner Nox Necro script With Summon logic by Willobe

Description: Added in the logic to setup your summon type in the config and summon them. It will also check to see if the pet is dead and re-summon. Added organizer option to the config as well to trigger at the end if you want to use it (i use it to move reagents to a satchel that i loot)

1# One hotkey mage cycle, nox, poison by Jaseowns
2# UO Outlands - https://youtu.be/K3bVPhHcInE
3# - Added Summon logic and organizer - by Willobe    
4
5// Beta client for cooldowns
6// cooldowns for mushrooms, mana vampire and healpots
7// for now using timers
8
9# Set this to one, if you want to cast poison once no matter what
10# If you have 100 poisoning and want Lethal, set this to 0
11@setvar! castPoisonAnyway 1
12
13# We will spam mind blast when other skills are on cooldown
14# If you set this to 0 it will use flamestrike
15@setvar! spamMindBlastOverFlamestrike 1
16
17# This will auto replay this script if you want it too
18@setvar! autoBotEnabled 1
19
20# This will make sure you have bless on
21@setvar! blessYourself 1
22
23# Update this variable to 1 for ALL KILL
24# Update this variable to 0 for target nearest
25@setvar! setThisAsOneIfYouWantToTargetYourOwnKillOrItWillTargetClosestMonster 1
26
27###############
28### Edit these cooldowns to match your wizard grimoire
29######
30@setvar! canYouMakeAMushroom 1
31@setvar! cdLightning 40000
32@setvar! cdMagicArrow 20000
33@setvar! cdHarm 20000
34@setvar! cdFireball 60000
35
36###############
37### Necro Cooldowns
38######
39@setvar! cdEvilOmen 30000
40@setvar! cdVampiricEmbrace 30000
41@setvar! cdCorpseSkin 30000
42@setvar! cdMindRot 30000
43@setvar! cdVengSpirit 30000
44@setvar! cdWither 30000
45#### Necro Symbols
46@setvar! necro_has_enough_symbols 0
47#### Buff Cooldowns
48@setvar! cdMushroom 60000
49@setvar! cdMagicShield 60000
50@setvar! cdReactiveArmor 60000
51
52########
53###### Summon Type  - 2 Larger and 1 small total of 5 follower count
54####
55## Select Larger Summon Type (2 follower slots)
56## 0= none, 1 = Air Elemental(a Skeletal Fiend), 2 = Summon Daemon(A Vampire Thrall), 3 = Earth Elemental(An Ancient Mummy), 4 = Fire Elemental(A Lich), 5 = Water Elemental(A Rag Witch)
57@setvar! summonLargeOne 3
58@setvar! summonLargeTwo 4
59
60##Select Smaller Summon Type (1 Follower slot)
61## 0 = none, 1 = Summon Creature (random undead), 2 = Blade Spirits(A Skeletal Husk) *Only one Allowed* 
62@setvar! summonSmallOne 1
63
64#####
65##### Orangize loot in your back at the end of the loop like to move reagents you loot to your satchel
66##
67## If set to 0 then do not run organizer, otherwise setup your organizer number in razor 1-20
68@setvar! organizerNumber 20
69
70
71
72##################################################################
73# 
74#   Hopefully you do not have to edit after this :)
75#
76##################################################################
77
78
79// Make sure we have a spell book attached
80if findlayer self righthand as item
81    // do nothing
82elseif findtype "3834" backpack as item
83    dclick item
84else 
85    overhead "No book bro!" 34
86endif
87
88if not timerexists reactiveArmorTimer
89    createtimer reactiveArmorTimer
90    settimer reactiveArmorTimer cdMagicShield
91endif
92
93if not timerexists magicShieldTimer
94    createtimer magicShieldTimer
95    settimer magicShieldTimer cdMagicShield
96endif
97
98if not timerexists magicMushroomTimer
99    createtimer magicMushroomTimer
100    settimer magicMushroomTimer cdMushroom
101endif
102
103if not timerexists magicArrowTimer
104    createtimer magicArrowTimer
105    settimer magicArrowTimer cdMagicArrow
106endif
107
108if not timerexists lightningTimer
109    createtimer lightningTimer
110    settimer lightningTimer cdLightning
111endif
112
113if not timerexists harmTimer
114    createtimer harmTimer
115    settimer harmTimer cdHarm
116endif
117
118if not timerexists fireballTimer
119    createtimer fireballTimer
120    settimer fireballTimer cdFireball
121endif
122
123if not timerexists evilOmenTimer
124    createtimer evilOmenTimer
125    settimer evilOmenTimer cdEvilOmen
126endif
127
128if not timerexists vampiricEmbraceTimer
129    createtimer vampiricEmbraceTimer
130    settimer vampiricEmbraceTimer cdVampiricEmbrace
131endif
132
133if not timerexists corpseSkinTimer
134    createtimer corpseSkinTimer
135    settimer corpseSkinTimer cdCorpseSkin
136endif
137
138if not timerexists mindRotTimer
139    createtimer mindRotTimer
140    settimer mindRotTimer cdMindRot
141endif
142
143if not timerexists vengSpiritTimer
144    createtimer vengSpiritTimer
145    settimer vengSpiritTimer cdVengSpirit
146endif
147
148if not timerexists witherTimer
149    createtimer witherTimer
150    settimer witherTimer cdWither
151endif
152
153
154
155# Eat food if we got it  "tray"
156if not findbuff "food" and findtype 2429 backpack as jood
157    dclick jood
158    wait 200
159endif
160
161
162# Use Taste ID if possible
163if skill "Taste Identification" >= 50 and not findbuff "herb"
164    useskill 'tasteidentification'
165    wft 500
166    target backpack
167endif
168
169
170# Check to ensure there are enough unholy symbols 
171if not gumpexists 622436516
172    say "[necromancyhotbar"
173    wait 500
174endif
175
176if ingump "12/" 622436516
177        @setvar! necro_has_enough_symbols 12
178elseif ingump "11/" 622436516
179        @setvar! necro_has_enough_symbols 11
180elseif ingump "10/" 622436516
181        @setvar! necro_has_enough_symbols 10
182elseif ingump "9/" 622436516
183        @setvar! necro_has_enough_symbols 9
184elseif ingump "8/" 622436516
185        @setvar! necro_has_enough_symbols 8
186elseif ingump "7/" 622436516
187        @setvar! necro_has_enough_symbols 7
188elseif ingump "6/" 622436516
189        @setvar! necro_has_enough_symbols 6
190elseif ingump "5/" 622436516
191        @setvar! necro_has_enough_symbols 5
192elseif ingump "4/" 622436516
193        @setvar! necro_has_enough_symbols 4
194elseif ingump "3/" 622436516
195        @setvar! necro_has_enough_symbols 3
196elseif ingump "2/" 622436516
197        @setvar! necro_has_enough_symbols 2
198elseif ingump "1/" 622436516
199        @setvar! necro_has_enough_symbols 1
200elseif ingump "0/" 622436516
201        @setvar! necro_has_enough_symbols 0
202endif
203
204# logic of the Vengeful Spirit ability so you summon when its up to ensure you get an undead
205
206if timer vengSpiritTimer >= cdVengSpirit
207        @setvar! vengSpiritRdy 1
208elseif timer vengSpiritTimer < 25000
209        @setvar! vengSpiritRdy 2
210else 
211    @setvar! vengSpiritRdy 0
212endif
213
214# time to check for our summons
215
216if witherTimer > cdwither and necro_has_enough_symbols >= 6
217        say '[Wither'
218        settimer witherTimer 0
219        wait 650 
220    endif
221
222if poisoned
223        if findtype "Orange Potion" backpack as pot 
224            dclick pot
225            wait 200
226        else
227            while not targetexists
228                if not poisoned
229                    hotkey '> Interrupt'
230                    break
231                else
232                    cast 'Cure'
233                    wait 50
234                endif 
235            endwhile
236            if targetexists
237                target self
238                wait 500
239            endif
240        endif
241endif
242
243if diffhits >= 30 and mana > 12
244    while not targetexists
245        if diffhits >= 60
246            cast 'Heal'
247        else
248            cast 'Greater Heal'                
249        endif
250        wait 50
251        if hp = maxhp
252            hotkey '> Interrupt'
253            break
254        endif
255    endwhile
256    if targetexists
257        target self
258    endif
259endif
260
261if mana < 55
262    if not findbuff "actively meditating" and timer magicMushroomTimer >= cdMushroom and findtype "mushroom" backpack as mushy
263        overhead "Eatting shrooms" 66
264        dclick mushy
265        settimer magicMushroomTimer 0
266    elseif not findbuff "actively meditating"
267        overhead 'Meditating'
268        useskill 'meditation'
269        wait 650
270    endif
271endif
272
273if summonLargeOne > 0
274    
275    if not varexist myFirstSummon or dead myFirstSummon
276        
277        if summonLargeOne = 1
278            
279            if findtype 'a Skeletal Fiend' ground -1 -1 10 as maybePet
280                if noto maybePet = "friend"
281                    overhead 'Found a Skeletal Fiend' 88
282                    @setvar! myFirstSummon maybePet
283                    @ignore maybePet
284                    replay
285                endif
286            endif
287            overhead "Your Skeletal Fiend is dead..." 34
288            
289            if vengSpiritRdy = 0
290                overhead 'Vengeful Spirit not Rdy' 33
291                wait 1000
292                replay   
293            endif
294            
295            if followers < 4
296                if mana > 50 or witherTimer < cdwither
297                    if vengSpiritRdy = 1 and necro_has_enough_symbols > 0
298                        say '[VengefulSpirit'
299                        settimer vengSpiritTimer 0
300                        wait 500
301                        cast 'Air Elemental'
302                        overhead 'Summoning a Skeletal Fiend'
303                        wait 4250
304                        replay
305                    elseif vengSpiritRdy = 2
306                        cast 'Air Elemental'
307                        overhead 'Summoning a Skeletal Fiend'
308                        wait 4250
309                        replay
310                    endif
311                else 
312                    overhead 'Waiting on Mana'
313                    wait 1000
314                    replay   
315                endif
316            endif
317            
318        elseif summonLargeOne = 2
319            
320            if findtype 'A Vampire Thrall' ground -1 -1 10 as maybePet
321                if noto maybePet = "friend"
322                    overhead 'Found a Vampire Thrall' 88
323                    @setvar! myFirstSummon maybePet
324                    @ignore maybePet
325                    replay
326                endif
327            endif
328            
329            overhead "Your Vampire Thrall is dead..." 34
330            
331            if vengSpiritRdy = 0
332                overhead 'Vengeful Spirit not Rdy' 33
333                wait 1000
334                replay   
335            endif
336            
337            if followers < 4
338                if mana > 50 or witherTimer < cdwither
339                    if vengSpiritRdy = 1 and necro_has_enough_symbols > 0
340                        say '[VengefulSpirit'
341                        settimer vengSpiritTimer 0
342                        wait 500
343                        cast 'Summon Daemon'
344                        overhead 'Summoning a Vampire Thrall'
345                        wait 4250
346                        replay
347                    elseif vengSpiritRdy = 2
348                        cast 'Summon Daemon'
349                        overhead 'Summoning a Vampire Thrall'
350                        wait 4250
351                        replay
352                    endif
353                else 
354                    overhead 'Waiting on Mana'
355                    wait 1000
356                    replay   
357                endif
358            endif
359            
360        elseif summonLargeOne = 3
361            
362            if findtype 'an Ancient Mummy' ground -1 -1 10 as maybePet
363                if noto maybePet = "friend"
364                    overhead 'Found an Ancient Mummy' 88
365                    @setvar! myFirstSummon maybePet
366                    @ignore maybePet
367                    replay
368                endif
369            endif    
370            
371            overhead "Your Ancient Mummy is dead..." 34    
372            
373            if vengSpiritRdy = 0
374                overhead 'Vengeful Spirit not Rdy' 33
375                wait 1000
376                replay   
377            endif
378            
379            if followers < 4
380                if mana > 50 or witherTimer < cdwither
381                    if vengSpiritRdy = 1 and necro_has_enough_symbols > 0
382                        say '[VengefulSpirit'
383                        settimer vengSpiritTimer 0
384                        wait 500
385                        cast 'Earth Elemental'
386                        overhead 'Summoning an Ancient Mummy'
387                        wait 4250
388                        replay
389                    elseif vengSpiritRdy = 2
390                        cast 'Earth Elemental'
391                        overhead 'Summoning an Ancient Mummy'
392                        wait 4250
393                        replay
394                    endif
395                else 
396                    overhead 'Waiting on Mana'
397                    wait 1000
398                    replay   
399                endif
400            endif
401            
402        elseif summonLargeOne = 4
403           
404            if findtype 'A Lich' ground -1 -1 10 as maybePet
405                if noto maybePet = "friend"
406                    overhead 'Found a Lich' 88
407                    @setvar! myFirstSummon maybePet
408                    @ignore maybePet
409                    replay
410                endif
411            endif
412            
413            overhead "Your Lich is dead..." 34
414            
415            if vengSpiritRdy = 0
416                overhead 'Vengeful Spirit not Rdy' 33
417                wait 1000
418                replay   
419            endif
420            
421            if followers < 4
422                if mana > 50 or witherTimer < cdwither
423                    if vengSpiritRdy = 1 and necro_has_enough_symbols > 0
424                        say '[VengefulSpirit'
425                        settimer vengSpiritTimer 0
426                        wait 500
427                        cast 'Fire Elemental'
428                        overhead 'Summoning a Lich'
429                        wait 4250
430                        replay
431                    elseif vengSpiritRdy = 2
432                        cast 'Fire Elemental'
433                        overhead 'Summoning a Lich'
434                        wait 4250
435                        replay
436                    endif
437                else 
438                    overhead 'Waiting on Mana'
439                    wait 1000
440                    replay   
441                endif
442            endif
443           
444        elseif summonLargeOne = 5
445            
446            if findtype 'a Rag Witch' ground -1 -1 10 as maybePet
447                if noto maybePet = "friend"
448                    overhead 'Found a Rag Witch' 88
449                    @setvar! myFirstSummon maybePet
450                    @ignore maybePet
451                    replay
452                endif
453            endif
454            
455            overhead "Your Rag Witch is dead..." 34
456            
457            if vengSpiritRdy = 0
458                overhead 'Vengeful Spirit not Rdy' 33
459                wait 1000
460                replay   
461            endif
462            
463            if followers < 4
464                if mana > 50 or witherTimer < cdwither
465                    if vengSpiritRdy = 1 and necro_has_enough_symbols > 0
466                        say '[VengefulSpirit'
467                        settimer vengSpiritTimer 0
468                        wait 500
469                        cast 'Water Elemental'
470                        overhead 'Summoning a Rag Witch'
471                        wait 4250
472                        replay
473                    elseif vengSpiritRdy = 2
474                        cast 'Water Elemental'
475                        overhead 'Summoning a Rag Witch'
476                        wait 4250
477                        replay
478                    endif
479                else 
480                    overhead 'Waiting on Mana'
481                    wait 1000
482                    replay   
483                endif
484            endif           
485        endif
486    else
487        menu myFirstSummon 3
488        wft 750
489    endif
490        
491endif
492
493if summonLargeTwo > 0
494
495    if not varexist mySecondSummon or dead mySecondSummon
496        
497        if summonLargeTwo = 1
498            if findtype 'a Skeletal Fiend' ground -1 -1 10 as maybePet
499                if noto maybePet = "friend"
500                    overhead 'Found a Skeletal Fiend' 88
501                    @setvar! mySecondSummon maybePet
502                    @ignore maybePet
503                    replay
504                endif
505            endif
506            
507            overhead "Your Skeletal Fiend is dead..." 34
508            
509            if vengSpiritRdy = 0
510                overhead 'Vengeful Spirit not Rdy' 33
511                wait 1000
512                replay   
513            endif
514            
515            if followers < 4
516                if mana > 50 or witherTimer < cdwither
517                    if vengSpiritRdy = 1 and necro_has_enough_symbols > 0
518                        say '[VengefulSpirit'
519                        settimer vengSpiritTimer 0
520                        wait 500
521                        cast 'Air Elemental'
522                        overhead 'Summoning a Skeletal Fiend'
523                        wait 4250
524                        replay
525                    elseif vengSpiritRdy = 2
526                        cast 'Air Elemental'
527                        overhead 'Summoning a Skeletal Fiend'
528                        wait 4250
529                        replay
530                    endif
531                else 
532                    overhead 'Waiting on Mana'
533                    wait 1000
534                    replay   
535                endif
536            endif
537            
538        elseif summonLargeTwo = 2
539            
540            if findtype 'A Vampire Thrall' ground -1 -1 10 as maybePet
541                if noto maybePet = "friend" 
542                    overhead 'Found a Vampire Thrall' 88
543                    @setvar! mySecondSummon maybePet
544                    @ignore maybePet
545                    replay
546                endif
547            endif
548            
549            overhead "Your Vampire Thrall is dead..." 34
550            
551            if vengSpiritRdy = 0
552                overhead 'Vengeful Spirit not Rdy' 33
553                wait 1000
554                replay   
555            endif
556            
557            if followers < 4
558                if mana > 50 or witherTimer < cdwither
559                    if vengSpiritRdy = 1 and necro_has_enough_symbols > 0
560                        say '[VengefulSpirit'
561                        settimer vengSpiritTimer 0
562                        wait 500
563                        cast 'Summon Daemon'
564                        overhead 'Summoning a Vampire Thrall'
565                        wait 4250
566                        replay
567                    elseif vengSpiritRdy = 2
568                        cast 'Summon Daemon'
569                        overhead 'Summoning a Vampire Thrall'
570                        wait 4250
571                        replay
572                    endif
573                else 
574                    overhead 'Waiting on Mana'
575                    wait 1000
576                    replay   
577                endif
578            endif
579            
580        elseif summonLargeTwo = 3
581            if findtype 'an Ancient Mummy' ground -1 -1 10 as maybePet
582                if noto maybePet = "friend" 
583                    overhead 'Found an Ancient Mummy' 88
584                    @setvar! mySecondSummon maybePet
585                    @ignore maybePet
586                    replay
587                endif
588            endif
589            
590            overhead "Your Ancient Mummy is dead..." 34
591            
592            if vengSpiritRdy = 0
593                overhead 'Vengeful Spirit not Rdy' 33
594                wait 1000
595                replay   
596            endif
597            
598            if followers < 4
599                if mana > 50 or witherTimer < cdwither
600                    if vengSpiritRdy = 1 and necro_has_enough_symbols > 0
601                        say '[VengefulSpirit'
602                        settimer vengSpiritTimer 0
603                        wait 500
604                        cast 'Earth Elemental'
605                        overhead 'Summoning an Ancient Mummy'
606                        wait 4250
607                        replay
608                    elseif vengSpiritRdy = 2
609                        cast 'Earth Elemental'
610                        overhead 'Summoning an Ancient Mummy'
611                        wait 4250
612                        replay
613                    endif
614                else 
615                    overhead 'Waiting on Mana'
616                    wait 1000
617                    replay   
618                endif
619            endif
620            
621        elseif summonLargeTwo = 4
622
623            if findtype 'A Lich' ground -1 -1 10 as maybePet
624                if noto maybePet = "friend" 
625                    overhead 'Found a Lich' 88
626                    @setvar! mySecondSummon maybePet
627                    @ignore maybePet
628                    replay
629                endif
630            endif
631            overhead "Your Lich is dead..." 34
632            if vengSpiritRdy = 0
633                overhead 'Vengeful Spirit not Rdy' 33
634                wait 1000
635                replay   
636            endif
637            
638            if followers < 4
639                if mana > 50 or witherTimer < cdwither
640                    if vengSpiritRdy = 1 and necro_has_enough_symbols > 0
641                        say '[VengefulSpirit'
642                        settimer vengSpiritTimer 0
643                        wait 500
644                        cast 'Fire Elemental'
645                        overhead 'Summoning a Lich'
646                        wait 4250
647                        replay
648                    elseif vengSpiritRdy = 2
649                        cast 'Fire Elemental'
650                        overhead 'Summoning a Lich'
651                        wait 4250
652                        replay
653                    endif
654                else 
655                    overhead 'Waiting on Mana'
656                    wait 1000
657                    replay   
658                endif
659            endif
660            
661        elseif summonLargeTwo = 5
662
663            if findtype 'a Rag Witch' ground -1 -1 10 as maybePet
664                if noto maybePet = "friend" 
665                    overhead 'Found a Rag Witch' 88
666                    @setvar! mySecondSummon maybePet
667                    @ignore maybePet
668                    replay
669                endif
670            endif
671            overhead "Your Rag Witch is dead..." 34
672            if vengSpiritRdy = 0
673                overhead 'Vengeful Spirit not Rdy' 33
674                wait 1000
675                replay   
676            endif
677            
678            if followers < 4
679                if mana > 50 or witherTimer < cdwither
680                    if vengSpiritRdy = 1 and necro_has_enough_symbols > 0
681                        say '[VengefulSpirit'
682                        settimer vengSpiritTimer 0
683                        wait 500
684                        cast 'Water Elemental'
685                        overhead 'Summoning a Rag Witch'
686                        wait 4250
687                        replay
688                    elseif vengSpiritRdy = 2
689                        cast 'Water Elemental'
690                        overhead 'Summoning a Rag Witch'
691                        wait 4250
692                        replay
693                    endif
694                else 
695                    overhead 'Waiting on Mana'
696                    wait 1000
697                    replay   
698                endif
699            endif
700            
701        endif
702    else
703        //say 'All Guard Me'
704        menu mySecondSummon 3
705        wft 750
706        target self //myKillTarget
707    endif
708        
709endif
710
711if summonSmallOne > 0 
712    if not varexist mySmallSummon or dead mySmallSummon
713        if summonSmallOne = 1
714            if findtype "a ghoul" ground -1 -1 10 as maybePet
715                overhead "Found a small undead.. maybe?" 88
716                if noto maybePet = "friend"
717                    @setvar! mySmallSummon maybePet
718                    replay
719                endif
720            elseif findtype "a skeleton" ground -1 -1 10 as maybePet
721                if noto maybePet = "friend"
722                @setvar! mySmallSummon maybePet
723                replay
724            endif
725            elseif findtype "a zombie" ground -1 -1 10 as maybePet
726                overhead "Found a small undead.. maybe?" 88
727                if noto maybePet = "friend"
728                    @setvar! mySmallSummon maybePet
729                    replay
730                endif
731            elseif findtype "a corpse eater" ground -1 -1 10 as maybePet
732                overhead "Found a small undead.. maybe?" 88
733                if noto maybePet = "friend"
734                    @setvar! mySmallSummon maybePet
735                    replay
736                endif
737            elseif findtype "a skeletal knight" ground -1 -1 10 as maybePet
738                overhead "Found a small undead.. maybe?" 88
739                if noto maybePet = "friend"
740                    @setvar! mySmallSummon maybePet
741                    replay
742                endif    
743            elseif findtype "a skeletal mage" ground -1 -1 10 as maybePet
744                overhead "Found a small undead.. maybe?" 88
745                if noto maybePet = "friend"
746                    @setvar! mySmallSummon maybePet
747                    replay
748                endif    
749            endif
750            
751            overhead "Your Small Summon is dead..." 34
752            
753            if vengSpiritRdy = 0
754                overhead 'Vengeful Spirit not Rdy' 33
755                wait 1000
756                replay   
757            endif
758            
759            if followers < 5
760                if mana > 25 or witherTimer < cdwither
761                    if vengSpiritRdy = 1  and necro_has_enough_symbols > 0
762                        say '[VengefulSpirit'
763                        settimer vengSpiritTimer 0
764                        wait 500
765                        cast 'Summ. Creature'
766                        overhead 'Summoning Small Undead'
767                        wait 4250
768                        replay
769                    elseif vengSpiritRdy = 2
770                        cast 'Summ. Creature'
771                        overhead 'Summoning Small Undead'
772                        wait 4250
773                        replay
774                    endif
775                else 
776                    overhead 'Waiting on Mana'
777                    wait 1000
778                    replay   
779                endif
780                
781        elseif summonSmallOne = 2
782            if findtype "a Skeletal Husk" ground -1 -1 10 as maybePet
783                overhead "Found a Skeletal Husk" 88
784                if noto maybePet = "friend"
785                    @setvar! mySmallSummon maybePet
786                    replay
787                endif    
788            endif
789            
790            overhead "Your Skeletal Husk is dead..." 34
791            
792            if vengSpiritRdy = 0
793                overhead 'Vengeful Spirit not Rdy' 33
794                wait 1000
795                replay   
796            endif
797            
798            if followers < 5
799                if mana > 25 or witherTimer < cdwither
800                    if vengSpiritRdy = 1  and necro_has_enough_symbols > 0
801                        say '[VengefulSpirit'
802                        settimer vengSpiritTimer 0
803                        wait 500
804                        cast 'Blade Spirits'
805                        overhead 'Summoning a Skeletal Husk'
806                        wait 4250
807                        replay
808                    elseif vengSpiritRdy = 2
809                        cast 'Blade Spirits'
810                        overhead 'Summoning a Skeletal Husk'
811                        wait 4250
812                        replay
813                    endif
814                else 
815                    overhead 'Waiting on Mana'
816                    wait 1000
817                    replay   
818                endif
819            endif
820        endif
821    else
822        menu mySmallSummon 3
823        wft 650
824        target self
825    endif
826endif
827
828wait 250
829@clearignore
830
831###### end summon logic
832########################################
833if mana < 55
834    if not findbuff "actively meditating" and timer magicMushroomTimer >= cdMushroom and findtype "mushroom" backpack as mushy
835        overhead "Eatting shrooms" 66
836        dclick mushy
837        settimer magicMushroomTimer 0
838    elseif not findbuff "actively meditating"
839        useskill 'meditation'
840        wait 1000
841    endif
842endif
843
844
845if setThisAsOneIfYouWantToTargetYourOwnKillOrItWillTargetClosestMonster = 1
846    say "All Kill"
847    wait 200
848    while targetexists 
849        // wait
850        wait 50
851    endwhile
852    //set lasttarget
853else
854    hotkey 'Target Closest Non-Friendly Monster'
855    wait 200
856    if insysmsg "No one matching that was found"
857        overhead "Found No One" 34
858        if autoBotEnabled = 1
859            wait 500
860            replay
861        endif
862        stop
863    endif    
864endif
865
866@setvar myKillTarget lasttarget 
867
868if not varexist myPreviousKillTarget
869    @setvar myPreviousKillTarget 0     
870endif
871
872getlabel myKillTarget desc
873overhead desc
874
875
876if poisoned
877        if findtype "Orange Potion" backpack as pot 
878            dclick pot
879            wait 200
880        else
881            while not targetexists
882                if not poisoned
883                    hotkey '> Interrupt'
884                    break
885                else
886                    cast 'Cure'
887                    wait 50
888                endif 
889            endwhile
890            if targetexists
891                target self
892                wait 500
893            endif
894        endif
895endif
896
897if diffhits >= 30 and mana > 12
898    while not targetexists
899        if diffhits >= 60
900            cast 'Heal'
901        else
902            cast 'Greater Heal'                
903        endif
904        wait 50
905        if hp = maxhp
906            hotkey '> Interrupt'
907            break
908        endif
909    endwhile
910    if targetexists
911        target self
912    endif
913elseif blessYourself = 1 and str <= 100
914    while not targetexists
915        cast 'Bless'
916        wait 50
917        if diffhits >= 30
918            hotkey '> Interrupt'
919            break
920        endif
921    endwhile
922    if targetexists
923        target self
924    endif
925endif
926
927if find myKillTarget -1 -1 12 as killy
928    if myKillTarget = myPreviousKillTarget
929    // do nothing
930    else
931        
932        // Herding using crook
933        if skill "Herding" > 0 and findtype 3713 backpack as jrook
934            dclick jrook
935            wft 500
936            target killy
937        endif
938        
939        while not targetexists and not dead myKillTarget
940            if diffhits < 30
941                cast 'Curse'
942                wait 50
943            elseif diffhits >= 30 
944                hotkey '> Interrupt'
945                break
946            endif
947        endwhile
948        if targetexists
949            target myKillTarget
950            wait 500
951        endif
952
953
954        while not targetexists and not dead myKillTarget
955            if diffhits < 30
956                cast 'mana drain'
957                wait 50
958            elseif diffhits >= 30 
959                hotkey '> Interrupt'
960                break
961            endif 
962        endwhile
963        if targetexists
964            target myKillTarget
965            wait 500
966        endif
967        @setvar myPreviousKillTarget myKillTarget
968    endif
969else
970    overhead "Out of range" 34
971endif
972
973clearsysmsg 
974
975say "All Guard Me"
976
977@setvar! isLethalPoison 0
978
979while not dead myKillTarget and find myKillTarget -1 -1 12 as killy
980
981    if insysmsg "Target cannot be seen." 
982        overhead "CANNOT BE SEEN MOVE TO NEXT TARGET" 34
983        replay
984    endif 
985    
986    if timer magicShieldTimer >= cdMagicShield and not findbuff "Magic Reflection"
987        cast "Magic Reflection"
988        wait 1000
989    elseif not findbuff "Magic Reflection" and not findbuff "Magic Resist Potion" and findtype "Black Potion" backpack as pot
990        dclick pot
991        wait 200
992    endif
993
994    if findbuff "Magic Reflection"
995        settimer magicShieldTimer 0
996    endif
997    
998    if timer reactiveArmorTimer >= cdReactiveArmor and not findbuff "Reactive Armor"
999        cast "Reactive Armor"
1000        wait 200
1001    endif
1002
1003    if findbuff "Reactive Armor"
1004        settimer reactiveArmorTimer 0
1005    endif
1006
1007    if timer corpseSkinTimer >= cdCorpseSkin and skill "Necromancy" >= 65
1008        overhead "Should be CorpseSkin!" 34
1009        say "[CorpseSkin"
1010        settimer corpseSkinTimer 0
1011        wait 500
1012    endif
1013    
1014    if skill "poisoning" >= 100 or castPoisonAnyway = 1
1015
1016        if timer mindRotTimer >= cdMindRot and skill "Necromancy" >= 75
1017            overhead "Should be mind rotting!" 34
1018            say "[MindRot"
1019            settimer mindRotTimer 0
1020            wait 500
1021        endif
1022        
1023        while isLethalPoison = 0
1024            
1025            if insysmsg "Target cannot be seen." 
1026                overhead "CANNOT BE SEEN MOVE TO NEXT TARGET" 34
1027                replay
1028            endif 
1029        
1030            getlabel myKillTarget desc2
1031            overhead desc2 66
1032            // poison lethal
1033            if "Lethal" in desc2
1034                @setvar! isLethalPoison 1
1035                break
1036            elseif castPoisonAnyway = 1 and "Ticks" in desc2
1037                @setvar! isLethalPoison 1
1038                break
1039            elseif castPoisonAnyway = 1 and "Poison" in desc2
1040                @setvar! isLethalPoison 1
1041                break
1042            elseif diffhits >= 30 
1043                // need a heal
1044                break
1045            elseif mana >= 9
1046                while not targetexists
1047                    cast 'poison'
1048                    wait 50
1049                    if dead myKillTarget
1050                        hotkey '> Interrupt'
1051                        replay
1052                    endif
1053                endwhile
1054                target myKillTarget
1055                wait 200
1056                if insysmsg "Target cannot be seen." 
1057                     overhead "CANNOT BE SEEN MOVE TO NEXT TARGET" 34
1058                     @setvar! isLethalPoison 1
1059                endif 
1060            else
1061                wait 200
1062            endif
1063        endwhile
1064    endif
1065    if timer evilOmenTimer >= cdEvilOmen and skill "Necromancy" >= 60
1066        say "[EvilOmen"
1067        settimer evilOmenTimer 0
1068        wait 200
1069    endif
1070
1071    if timer vampiricEmbraceTimer >= cdVampiricEmbrace and skill "Necromancy" >= 75 and findtype 8198 ground -1 -1 4 as jorpse
1072        say "[VampiricEmbrace"
1073        wft 500
1074        target jorpse
1075        settimer vampiricEmbraceTimer 0
1076    endif
1077   
1078    if find myKillTarget -1 -1 12 as killy
1079       // do nothing
1080    else
1081        overhead "Out of range" 34
1082        break
1083    endif
1084    
1085    if poisoned
1086        if findtype "Orange Potion" backpack as pot 
1087            dclick pot
1088            wait 200
1089        else
1090            while not targetexists
1091                if not poisoned
1092                    hotkey '> Interrupt'
1093                    break
1094                else
1095                    cast 'Cure'
1096                    wait 50
1097                endif 
1098            endwhile
1099            if targetexists
1100                target self
1101                wait 500
1102            endif
1103        endif
1104    endif
1105
1106    
1107    if diffhits < 30 and mana >= 12 and timer lightningTimer >= cdLightning
1108        while not targetexists
1109            if dead myKillTarget or diffhits >= 30
1110                hotkey '> Interrupt'
1111                break
1112            else
1113                cast 'Lightning'
1114                wait 50
1115            endif 
1116        endwhile
1117        if targetexists
1118            target myKillTarget
1119            settimer lightningTimer 0
1120            wait 500
1121        endif
1122    endif
1123
1124    if diffhits < 30 and mana >= 5 and timer magicArrowTimer >= cdMagicArrow
1125        while not targetexists
1126            if dead myKillTarget or diffhits >= 30
1127                hotkey '> Interrupt'
1128                break
1129            else
1130                cast 'magic arrow'
1131                wait 50
1132            endif 
1133        endwhile
1134        if targetexists
1135            target myKillTarget
1136            settimer magicArrowTimer 0
1137            wait 500
1138        endif
1139    endif
1140
1141    if diffhits < 30 and mana >= 9 and timer harmTimer >= cdHarm
1142        while not targetexists
1143            if dead myKillTarget or diffhits >= 30
1144                hotkey '> Interrupt'
1145                break
1146            else
1147                cast 'harm'
1148                wait 50
1149            endif 
1150        endwhile
1151        if targetexists
1152            target myKillTarget
1153            settimer harmTimer 0
1154            wait 500
1155        endif
1156    endif
1157
1158    if diffhits < 30 and mana >= 12 and timer fireballTimer >= cdFireball
1159        while not targetexists
1160            if dead myKillTarget or diffhits >= 30
1161                hotkey '> Interrupt'
1162                break
1163            else
1164                cast 'fireball'
1165                wait 50
1166            endif 
1167        endwhile
1168        if targetexists
1169            target myKillTarget
1170            settimer fireballTimer 0
1171            wait 500
1172        endif
1173    endif
1174    
1175    if diffhits >= 30
1176            
1177        if findtype "Yellow Potion" backpack as pot 
1178            getlabel pot desc
1179            if "next usable" in desc
1180                // do nothing
1181            else
1182                dclick pot
1183                wait 200
1184            endif
1185        endif
1186
1187        if diffhits >= 30 and mana >= 12
1188            while not targetexists
1189                if diffhits >= 60
1190                    cast 'Heal'
1191                else
1192                    cast 'Greater Heal'                
1193                endif
1194                wait 50
1195                if hp = maxhp
1196                    hotkey '> Interrupt'
1197                    break
1198                endif
1199            endwhile
1200            if targetexists
1201                target self
1202                wait 50
1203            endif
1204        endif
1205    elseif mana < 55 and findbuff "actively meditating" 
1206        // wait for mana
1207    elseif spamMindBlastOverFlamestrike = 1 mana > 42
1208        while not targetexists and mana > 40
1209            if dead myKillTarget or diffhits >= 30
1210                hotkey '> Interrupt'
1211                break
1212            else
1213                cast 'Mind Blast'
1214                wait 50
1215            endif 
1216        endwhile
1217        if targetexists
1218            target myKillTarget
1219            wait 500
1220        endif
1221    elseif mana > 42
1222        while not targetexists and mana > 40
1223            if dead myKillTarget or diffhits >= 30
1224                hotkey '> Interrupt'
1225                break
1226            else
1227                cast 'Flamestrike'
1228                wait 50
1229            endif 
1230        endwhile
1231        if targetexists
1232            target myKillTarget
1233            wait 500
1234        endif
1235    elseif not findbuff "actively meditating" and timer magicMushroomTimer >= cdMushroom and findtype "mushroom" backpack as mushy
1236        overhead "Eatting shrooms" 66
1237        dclick mushy
1238        settimer magicMushroomTimer 0
1239    elseif not findbuff "actively meditating" 
1240        useskill 'meditation'
1241        wait 500
1242    endif
1243    wait 50
1244
1245########
1246###    If your summons die restart to resummon
1247
1248    if summonLargeOne > 0 and dead myFirstSummon
1249        //replay
1250        overhead 'Summon Large One Dead'
1251    elseif summonLargeTwo > 0 and dead mySecondSummon
1252        //replay
1253        overhead 'Summon Large Two Dead'
1254    elseif summonSmallOne > 0 and dead mySmallSummon
1255        //replay
1256        overhead 'Summon Small Dead'
1257    endif
1258    
1259###
1260####### 
1261
1262endwhile
1263
1264wait 500
1265if targetexists 
1266    hotkey 'Cancel Current Target'
1267endif
1268say "All Guard Me"
1269if canYouMakeAMushroom = 1 and counttype "mushroom" backpack < 5
1270    while counttype "mushroom" backpack < 15
1271        cast "Create Food"
1272        wait 200
1273        if counttype "mushroom" backpack = 0
1274            break
1275        endif
1276    endwhile
1277endif
1278
1279if timer vampiricEmbraceTimer >= cdVampiricEmbrace and skill "Necromancy" >= 70 and findtype 8198 ground -1 -1 4 as jorpse
1280    say "[VampiricEmbrace"
1281    wft 500
1282    target //self jorpse
1283    settimer vampiricEmbraceTimer 0
1284endif
1285
1286##########
1287### Organizer
1288
1289if organizerNumber > 0
1290    organizer organizerNumber
1291endif
1292
1293###
1294##########
1295
1296while mana < 50
1297    if not findbuff "actively meditating" and timer magicMushroomTimer >= cdMushroom and findtype "mushroom" backpack as mushy
1298        overhead "Eatting shrooms" 66
1299        dclick mushy
1300        settimer magicMushroomTimer 0
1301    elseif not findbuff "actively meditating"
1302        overhead 'Meditating'
1303        useskill 'meditation'
1304        wait 500
1305    endif
1306endwhile
1307   
1308if autoBotEnabled = 1
1309    replay
1310endif