Back to "mager" tags

SUPER Auto Mage Attacker by dennozz

Description: Works with Arcane Mages, Mages Necro Poison, Mage Summoners

Warning: This is potentially a huge script, skipping formatting.

You can still click [Copy Script] but you may want use [Download Script] as a file instead.

#Auto-mage attack 3.07.3 #********** INFORMATION **********# #Made by @dennozz on discord. #Inspired/learned by other scrips in https://outlands.uorazorscripts.com/ #This script will auto attacking using magery/necromancy spells. Script will auto heal and auto summon pets if needed. #This script will work with full Mage Arcanes, Necro Mages, Mage Summoners. #--- *!*!* SCRIPT IS UNDER DEVELOPMENT. *!*!*!* ---# # !!!VERSION 3.00+ IS IN HEAVY TESTING SINCE IT INCLUDED AUTO-SUMMONING !!! # # !!! IMPORTANT !!! DISABLE: `Filter repeating system messages` ON RAZOR !!! # ### Changes Log ### # ** IF SCRIPT IS ATTACKING OR HEALING MAY EXPERIENCE ISSUE AFTER WORLD SAVING ** # # Ver 3.07 Added a new auto target mode activating war mode to attack or reset the target selection # Ver 3.06 Changes to the auto healing mechanic and variables # Ver 3.05 Added variables to activate mini spells when mana below `X amount` # Ver 3.04 Code restructure, add variable to break attacking and summon elemental if needed || added mindrot necro spell on regular casting # Ver 3.00 Added auto-summoning and FIX on script stopping suddenly # Ver.2.84 fixes and changes to the healing trigger mechanism # Ver.2.77 fixes and changes to casting and targetting spells # Ver.2.61 added spirit speak skill use # Ver.2.60 fixes to manual targetting # Ver.2.59 Set last target can be activated while fighting a mob to change targets ### Changes Log ### #********** SET YOUR SETTINGS **********# #--- Set Target Mode ---# # 0 - Auto Target Selection # 1 - Auto Target Selection in warmode only (while warmode = on then will auto attack) # 2 - Manual selection using hotkey `set last target` @setvar! targetSelectionMode 0 @setvar! switchTargetWhenToggleWarMode 1 #--- Set Elementals Count ---# @setvar! earthElementals 1 @setvar! waterElementals 1 @setvar! airElementals 0 @setvar! fireElementals 0 @setvar! summonDaemons 0 @setvar! summonCreature 0 @setvar! minimumFollowers 4 #--- Set Followers Necromancy Spells ---# @setvar! NecroVengefulSpirit 0 @setvar! NecroBloodOath 0 @setvar! NecroWither 0 #--- Set Mage attack spells ---# @setvar! castMagicArrow 1 @setvar! castHarm 1 @setvar! castFireball 1 @setvar! castLightning 1 @setvar! activateMagicArrowWhenManaBelow 200 @setvar! activateHarmWhenManaBelow 200 @setvar! activateFireballWhenManaBelow 200 @setvar! activateLightningWhenManaBelow 200 #- Big spells prioritize order -# @setvar! castFlamestrike 1 @setvar! castEnergyBolt 0 @setvar! castExplosion 0 @setvar! castMindblast 1 #--- Poison ---# @setvar! castPoison 0 #- Poison Level # 0 - Greater or lesser # 1 - Deadly # 2 - Lethal @setvar! poisonLevel 1 @setvar! castCurse 1 @setvar! castManaDrain 0 #--- Set Mage attack cooldowns ---# @setvar! magicArrowCD 20000 @setvar! harmCD 20000 @setvar! fireballCD 60000 @setvar! lightningCD 20000 @setvar! miniSpellsWithoutWizardGrimoreCD 10000 #--- Set Damage Necromancy Spells ---# @setvar! NecroMindRot 1 @setvar! NecroEvilOmen 1 @setvar! NecroCorpseSkin 1 @setvar! NecroStrangle 0 @setvar! minManaToUseDamageBuffNecroSpells 40 #- Poison Strike -# # 0 - Disabled # 1 - Apply in 1 ticks left or less # 2 - Apply in 2 ticks left or less # 3 - Apply in 3 ticks left or less # 4 - Apply in 4 ticks left or less # 5 - Apply in 5 ticks left or less # 6 - Apply in 6 ticks left or less # 7 - Apply in 7 ticks left or less # 8 - Apply in 8 ticks left or less # 9 - Apply in 9 ticks left or less # 10 - Apply in 10 ticks left or less @setvar! NecroPoisonStrike 7 #--- Set Mage Buffs ---# @setvar! magicReflect 1 @setvar! bless 1 @setvar! armorReflect 1 @setvar! protectionSpell 1 @setvar! miniumManaToBuff 50 #--- Set mushrooms ---# @setvar! mushroomCount 3 @setvar! eatMushWhenManaLowerThan 50 l @setvar! mushroomTimerCD 60000 #--- Set potions ---# @setvar! drinkStr 1 @setvar! strengthLowerThan 100 @setvar! drinkAgility 0 @setvar! drinkMagicResist 0 @setvar! drinkHeal 1 @setvar! drinkCure 1 @setvar! drinkRefresh 1 @setvar! staminaLowerThan 15 #--- Set Mage auto heals ---# @setvar! miniHeal 1 @setvar! greaterHeal 1 @setvar! cureSpell 1 #--- Auto healing hp diffs ---# #--- All variables refer to hit points differences ---# #--- When below certain hit points it will trigger ---# @setvar! activateAutoHealDiff 30 @setvar! startCastMiniHealDiff 60 @setvar! endCastMiniHealDiff 200 @setvar! castEmergencyMiniHealDiff 60 @setvar! startCastGreaterHealDiff 30 @setvar! endCastGreaterHealDiff 200 @setvar! drinkHealPotDiff 30 @setvar! interruptCastingDiff 40 #--- Arcane Weapon Ability ---# @setvar! useWeaponAbility 2 @setvar useAbilityWhenManaLowerThan 65 #--- Meditation ---# @setvar! useMeditationSkill 0 @setvar! meditateWhenManaBelow 14 @setvar! meditateUntilManaReach 65 @setvar! lowManaWarningMessageWhenBelow 40 #--- Drop Gold When Overweight ---# @setvar! amountOfGoldToDrop 500 #--- Optional : Have a cooldown named `Heal Pot` ---# @setvar! healingPotCD 11000 #********** DO NOT EDIT FROM HERE UNLESS YOU KNOW HOW TO SCRIPT **********# clearsysmsg @setvar! castStrike 0 @setvar! repeatCastingPoison 0 if 2 = targetSelectionMode @setvar! currentTarget 0 @setvar! foundTarget 0 @setvar! tempTarget 0 endif @setvar! necroGump 622436516 @setvar! unholyPoints 0 if castExplosion = 1 @setvar! bigSpellCounter 2 elseif castEnergyBolt = 1 @setvar! bigSpellCounter 1 endif if not varexist previousTarget @setvar! previousTarget 0 endif @setvar! maxwaittimeinms 650 if not timerexists mushroomTimer settimer mushroomTimer mushroomTimerCD endif @setvar! curseCD 60000 @setvar! manaDrainCD 60000 if not timerexists curseTimer settimer curseTimer curseCD endif if not timerexists manaDrainTimer settimer manaDrainTimer manaDrainCD endif #--- Necro spells timers ---# @setvar! necroMarginErrorCD 28000 @setvar! evilOmenCD 30000 if not timerexists evilOmenTimer settimer evilOmenTimer evilOmenCD endif @setvar! corpseSkinCD 30000 if not timerexists corpseSkinTimer settimer corpseSkinTimer corpseSkinCD endif @setvar! strangleCD 30000 if not timerexists strangleTimer settimer strangleTimer strangleCD endif @setvar! mindRotCD 30000 if not timerexists mindRotTimer settimer mindRotTimer mindRotCD endif @setvar! poisonStrikeCD 30000 if not timerexists poisonStrikeTimer settimer poisonStrikeTimer poisonStrikeCD endif #--- Script msgs timers ---# @setvar! overweightMessageCD 3000 settimer overweightMessageTimer overweightMessageCD @setvar! noTargetMessageCD 3000 settimer noTargetMessageTimer noTargetMessageCD @setvar! poisonLabelCD 5000 settimer poisonLabelTimer poisonLabelCD @setvar! targetSelectCD 3000 settimer targetSelectTimer targetSelectCD @setvar! noRegsMessageCD 3000 settimer noRegsMessageTimer noRegsMessageCD #--- Summons timers ---# @setvar! globalMessageCD 5000 settimer globalMessageTimer globalMessageCD @setvar! summonMsgCD 1500 settimer summonMsgTimer summonMsgCD @setvar! manaMsgCD 2500 settimer manaMsgTimer manaMsgCD #--- Resources timers ---# @setvar! pouchMessageCD 2000 settimer pouchMessageTimer pouchMessageCD @setvar! aidsMessageCD 2500 settimer aidsMessageTimer aidsMessageCD @setvar! whiteMessageCD 3000 settimer whiteMessageTimer whiteMessageCD @setvar! blueMessageCD 3500 settimer blueMessageTimer blueMessageCD @setvar! blackMessageCD 4000 settimer blackMessageTimer blackMessageCD @setvar! orangeMessageCD 4500 settimer orangeMessageTimer orangeMessageCD @setvar! yellowMessageCD 5000 settimer yellowMessageTimer yellowMessageCD @setvar! redMessageCD 5500 settimer redMessageTimer redMessageCD #--- Magery buffs timers ---# @setvar! magicReflectCD 15000 settimer magicReflectTimer magicReflectCD @setvar! armorReflectCD 15000 settimer armorReflectTimer armorReflectCD @setvar! protectionCD 15000 settimer protectionTimer protectionCD @setvar! manaMessageCD 2222 settimer manaMessageTimer manaMessageCD #--- Skills timers ---# @setvar! spiritSpeakCD 60000 if not timerexists spiritSpeakTimer settimer spiritSpeakTimer spiritSpeakCD endif #--- Magery attack spells timers ---# if not timerexists magicArrowTimer settimer magicArrowTimer magicArrowCD endif if not timerexists harmTimer settimer harmTimer harmCD endif if not timerexists fireballTimer settimer fireballTimer fireballCD endif if not timerexists lightningTimer settimer lightningTimer lightningCD endif if skill "Arcane" >= 80 @setvar! weaponAbilityCD 5000 settimer weaponAbilityTimer weaponAbilityCD if not gumpexists 3954121934 yell '[abilitieshotbar' endif endif if not varexist castingEarth @setvar! castingEarth 0 endif if not varexist castingWater @setvar! castingWater 0 endif if not varexist castingFire @setvar! castingFire 0 endif if not varexist castingAir @setvar! castingAir 0 endif if not varexist castingDaemon @setvar! castingDaemon 0 endif if not varexist castingCreature @setvar! castingCreature 0 endif #-- elementals variables --# @setvar! maxFollowers 0 @setvar! currentFollowers 0 removelist maxFollowersList createlist maxFollowersList if earthElementals = 1 pushlist maxFollowersList x pushlist maxFollowersList x elseif earthElementals = 2 pushlist maxFollowersList x pushlist maxFollowersList x pushlist maxFollowersList x pushlist maxFollowersList x endif if waterElementals = 1 pushlist maxFollowersList x pushlist maxFollowersList x elseif waterElementals = 2 pushlist maxFollowersList x pushlist maxFollowersList x pushlist maxFollowersList x pushlist maxFollowersList x endif if airElementals = 1 pushlist maxFollowersList x pushlist maxFollowersList x elseif airElementals = 2 pushlist maxFollowersList x pushlist maxFollowersList x pushlist maxFollowersList x pushlist maxFollowersList x endif if fireElementals = 1 pushlist maxFollowersList x pushlist maxFollowersList x elseif fireElementals = 2 pushlist maxFollowersList x pushlist maxFollowersList x pushlist maxFollowersList x pushlist maxFollowersList x endif if summonDaemons = 1 pushlist maxFollowersList x pushlist maxFollowersList x elseif summonDaemons = 2 pushlist maxFollowersList x pushlist maxFollowersList x pushlist maxFollowersList x pushlist maxFollowersList x endif if summonCreature = 1 pushlist maxFollowersList x elseif summonCreature = 2 pushlist maxFollowersList x pushlist maxFollowersList x elseif summonCreature = 3 pushlist maxFollowersList x pushlist maxFollowersList x pushlist maxFollowersList x elseif summonCreature = 4 pushlist maxFollowersList x pushlist maxFollowersList x pushlist maxFollowersList x pushlist maxFollowersList x elseif summonCreature = 5 pushlist maxFollowersList x pushlist maxFollowersList x pushlist maxFollowersList x pushlist maxFollowersList x pushlist maxFollowersList x endif if list maxFollowersList = 0 @setvar! maxFollowers 0 elseif list maxFollowersList = 1 @setvar! maxFollowers 1 elseif list maxFollowersList = 2 @setvar! maxFollowers 2 elseif list maxFollowersList = 3 @setvar! maxFollowers 3 elseif list maxFollowersList = 4 @setvar! maxFollowers 4 else @setvar! maxFollowers 5 endif if not varexist earthFirsty or followers = 0 @setvar! earthFirsty 0 endif if not varexist earthSecondly or followers = 0 @setvar! earthSecondly 0 endif if not varexist waterFirsty or followers = 0 @setvar! waterFirsty 0 endif if not varexist waterSecondly or followers = 0 @setvar! waterSecondly 0 endif if not varexist airFirsty or followers = 0 @setvar! airFirsty 0 endif if not varexist airSecondly or followers = 0 @setvar! airSecondly 0 endif if not varexist fireFirsty or followers = 0 @setvar! fireFirsty 0 endif if not varexist fireSecondly or followers = 0 @setvar! fireSecondly 0 endif if not varexist daemonFirsty or followers = 0 @setvar! daemonFirsty 0 endif if not varexist daemonSecondly or followers = 0 @setvar! daemonSecondly 0 endif if not varexist creatureFirsty or followers = 0 @setvar! creatureFirsty 0 endif if not varexist creatureSecondly or followers = 0 @setvar! creatureSecondly 0 endif if not varexist creatureThirdy or followers = 0 @setvar! creatureThirdy 0 endif if not varexist creatureFourthy or followers = 0 @setvar! creatureFourthy 0 endif if not varexist creatureFithy or followers = 0 @setvar! creatureFithy 0 endif #-- list creation --# if not listexists earthListy or followers = 0 removelist earthListy createlist earthListy endif if not listexists waterListy or followers = 0 removelist waterListy createlist waterListy endif if not listexists airListy or followers = 0 removelist airListy createlist airListy endif if not listexists fireListy or followers = 0 removelist fireListy createlist fireListy endif if not listexists daemonListy or followers = 0 removelist daemonListy createlist daemonListy endif if not listexists creatureListy or followers = 0 removelist creatureListy createlist creatureListy endif #********** ACTIVATE NECROMANCER BAR IF USING ANY NECRO SPELLS **********# if skill 'necromancy' >= 50 if findtype 'necromancer book' backpack yell '[necromancyhotbar' while not gumpexists 622436516 yell '[necromancyhotbar' waitforgump 622436516 maxwaittimeinms endwhile else overhead "Necro Book NOT Found!" 34 wait 1000 endif endif while not dead @setvar! currentlyAttacking 0 #********* DROP GOLD IF OVERWEIGHT ********* if weight > maxweight if timer overweightMessageTimer > overweightMessageCD overhead "Overweight !!" 34 settimer overweightMessageTimer 0 endif if 0 != amountOfGoldToDrop while weight > maxweight if findtype "gold coin" backpack as item lift item amountOfGoldToDrop droprelloc 0 0 getlabel backpack xxx wait 200 if insysmsg "cannot drop anything" drop backpack -1 -1 -1 endif wait maxwaittimeinms overhead "* Gold Dropped *" 55 endif endwhile endif endif #********** AUTO HEALING START **********# while diffhits >= activateAutoHealDiff or paralyzed or poisoned if dead stop endif @setvar! castingInterrupted 0 sysmsg "auto-healing activated" 11 if not findbuff "food" and findtype "tray" backpack as fody dclick fody wait 200 endif #--- Drink str pot ---# if drinkStr = 1 and str < strengthLowerThan if not findbuff "Strength" if findtype "White Potion" self dclicktype "White Potion" wait 200 else if timer whiteMessageTimer > whiteMessageCD overhead "Out of str pots" 34 settimer whiteMessageTimer 0 endif endif endif endif #--- Drink agility pot ---# if drinkAgility = 1 if not findbuff "Agility" if findtype "Blue Potion" self dclicktype "Blue Potion" wait 200 else if timer blueMessageTimer > blueMessageCD overhead "Out of agility pots" 34 settimer blueMessageTimer 0 endif endif endif endif #--- Drink magic resist pot ---# if drinkMagicResist = 1 if not findbuff "Magic Resist" if findtype "Black Potion" self dclicktype "Black Potion" wait 200 else if timer blackMessageTimer > blackMessageCD overhead "Out of resist pots" 34 settimer blackMessageTimer 0 endif endif endif endif #--- Drink red pot ---# if stam < staminaLowerThan and 1 = drinkRefresh if findtype "Red Potion" self dclicktype "Red Potion" wait 200 else if timer redMessageTimer > redMessageCD overhead "Out of refresh pots" 34 settimer redMessageTimer 0 endif endif endif #--- Trapped ---# if paralyzed if findtype "pouch" backpack 38 yell "[pouch" wait 200 else if timer pouchMessageTimer > pouchMessageCD overhead "Out of Pouches!" 34 settimer pouchMessageTimer 0 endif endif endif #--- Self bandage ---# if diffhits >= 1 and not bandaging if skill 'healing' >= 50 or skill "veterinary" >= 50 if findtype 'clean bandage%s%' backpack if targetexists hotkey 'cancel current target' endif dclicktype 'clean bandage%s%' waitfortarget maxwaittimeinms target 'self' wait 200 else if timer aidsMessageTimer > aidsMessageCD overhead "Out of bandages" 34 settimer aidsMessageTimer 0 endif endif endif endif #--- Poisoned ---# if 1 = drinkCure or 1 = cureSpell while poisoned if findtype "Orange Potion" self dclicktype "Orange Potion" wait 200 else if timer orangeMessageTimer > orangeMessageCD overhead "Out of cure pots" 34 settimer orangeMessageTimer 0 endif if diffhits >= 30 or not findtype 3972 self or not findtype 3973 self break endif if skill 'magery' >= 40 and mana >= 6 and 1 = cureSpell and not casting cast 'cure' wait 50 while not casting if targetexists hotkey 'cancel current target' endif cast 'cure' wait 50 endwhile while not targetexists and casting endwhile waitfortarget maxwaittimeinms target 'self' wait 200 else break endif endif endwhile endif #--- Drink Heal Pot ---# if diffhits >= drinkHealPotDiff and 1 = drinkHeal if findtype "Yellow Potion" self as hPot getlabel hPot potLabel if "next" in potLabel #do nothing else @setvar! ch 0 if counttype 3852 self as c @setvar! ch c endif if insysmsg "potion satchel used" endif dclicktype 3852 getlabel backpack xxx wait 200 if ch != counttype 3852 self or insysmsg "potion satchel used" cooldown "Heal Pot" healingPotCD endif endif else if timer yellowMessageTimer > yellowMessageCD overhead "Out of heals pots" 34 settimer yellowMessageTimer 0 endif endif endif #--- Cast heals ---# if skill 'magery' >= 40 and diffhits >= startCastMiniHealDiff and diffhits < endCastMiniHealDiff and mana >= 4 and miniHeal = 1 and not casting if insysmsg "Your concentration is disturbed" endif sysmsg 'mini heal' 11 cast 'heal' while not casting if targetexists hotkey 'cancel current target' endif cast 'heal' endwhile while not targetexists if insysmsg "Your concentration is disturbed" interrupt @setvar! castingInterrupted 1 break endif endwhile if 0 = castingInterrupted target 'self' endif elseif skill 'magery' >= 40 and diffhits >= castEmergencyMiniHealDiff and mana >= 4 and miniHeal = 1 and not casting if insysmsg "Your concentration is disturbed" endif sysmsg 'mini heal' 11 cast 'heal' while not casting if targetexists hotkey 'cancel current target' endif cast 'heal' endwhile while not targetexists if insysmsg "Your concentration is disturbed" interrupt @setvar! castingInterrupted 1 break endif endwhile if 0 = castingInterrupted target 'self' endif elseif skill 'magery' >= 60 and diffhits >= startCastGreaterHealDiff and diffhits < endCastGreaterHealDiff and mana >= 11 and greaterHeal = 1 and not casting if insysmsg "Your concentration is disturbed" endif sysmsg "greater heal" 11 cast 'greater heal' while not casting if targetexists hotkey 'cancel current target' endif cast 'greater heal' endwhile @settimer! spellTimer 0 @setvar! spellCD 800 while not targetexists if insysmsg "Your concentration is disturbed" interrupt @setvar! castingInterrupted 1 break endif if timer spellTimer < spellCD #--- Poisoned ---# if 1 = drinkCure while poisoned and casting and not targetexists if findtype "Orange Potion" self dclicktype "Orange Potion" wait 200 else if timer orangeMessageTimer > orangeMessageCD overhead "Out of cure pots" 34 settimer orangeMessageTimer 0 endif break endif endwhile endif #--- Drink Heal Pot ---# if diffhits >= drinkHealPotDiff and 1 = drinkHeal and casting and not targetexists if findtype "Yellow Potion" self as hPot getlabel hPot potLabel if "next" in potLabel #do nothing else @setvar! ch 0 if counttype 3852 self as c @setvar! ch c endif if insysmsg "potion satchel used" endif dclicktype 3852 getlabel backpack xxx wait 200 if ch != counttype 3852 self or insysmsg "potion satchel used" cooldown "Heal Pot" healingPotCD if diffhits < activateAutoHealDiff interrupt if targetexists hotkey 'cancel current target' endif endif endif endif else if timer yellowMessageTimer > yellowMessageCD overhead "Out of heals pots" 34 settimer yellowMessageTimer 0 endif endif endif endif endwhile if 0 = castingInterrupted target 'self' endif endif endwhile #--- Create mushroom ---# if counttype 29012 backpack = 0 while counttype 29012 backpack < mushroomCount and mana > 3 and diffhits < activateAutoHealDiff if not casting cast 'create food' endif endwhile endif #--- Eat Mushroom ---# if mana < eatMushWhenManaLowerThan and mushroomCount > 0 and timer mushroomTimer > mushroomTimerCD if counttype 29012 backpack if insysmsg "You consume a magic mushroom" endif sysmsg "Eating mush." 44 dclicktype 29012 backpack getlabel backpack xxx wait 200 if insysmsg "You consume a magic mushroom" settimer mushroomTimer 0 endif else overhead "No mushrooms found!" 34 endif endif #********** AUTO-MAGERY BUFFS IF NEEDED ********** @setvar! castingInterrupted 0 if magicReflect = 1 and skill 'magery' >= 70 and not findbuff "Magic Reflection" and mana >= miniumManaToBuff and diffhits < activateAutoHealDiff if timer magicReflectTimer > magicReflectCD cast 'Magic Reflection' while not casting getlabel backpack xxx wait 200 if insysmsg "that spell will not" or insysmsg "that spell is already" settimer magicReflectTimer 0 break endif if targetexists hotkey 'cancel current target' endif cast 'Magic Reflection' endwhile while casting if diffhits >= interruptCastingDiff interrupt @setvar! castingInterrupted 1 break endif #--- Poisoned ---# if 1 = drinkCure while poisoned and casting and not targetexists if findtype "Orange Potion" self sysmsg "pot cure - reflect" 11 dclicktype "Orange Potion" wait 200 else if timer orangeMessageTimer > orangeMessageCD overhead "Out of cure pots" 34 settimer orangeMessageTimer 0 endif break endif endwhile endif #--- Drink Heal Pot ---# if diffhits >= drinkHealPotDiff and 1 = drinkHeal and casting and not targetexists if findtype "Yellow Potion" self as hPot getlabel hPot potLabel if "next" in potLabel #do nothing else @setvar! ch 0 if counttype 3852 self as c @setvar! ch c endif if insysmsg "potion satchel used" endif sysmsg "pot heal - reflect" 11 dclicktype 3852 getlabel backpack xxx wait 200 if ch != counttype 3852 self or insysmsg "potion satchel used" cooldown "Heal Pot" healingPotCD endif endif else if timer yellowMessageTimer > yellowMessageCD overhead "Out of heals pots" 34 settimer yellowMessageTimer 0 endif endif endif endwhile wait 200 endif endif if armorReflect = 1 and skill 'magery' >= 30 and not findbuff "Reactive Armor" and mana >= miniumManaToBuff and diffhits < activateAutoHealDiff if timer magicReflectTimer > magicReflectCD cast 'Reactive Armor' while not casting getlabel backpack xxx wait 200 if insysmsg "that spell will not" or insysmsg "that spell is already" settimer armorReflectTimer 0 break endif if targetexists hotkey 'cancel current target' endif cast 'Reactive Armor' endwhile while casting endwhile getlabel backpack xxx wait 200 endif endif if protectionSpell = 1 and skill 'magery' >= 40 and not findbuff "Protection" and mana >= miniumManaToBuff and diffhits < activateAutoHealDiff cast 'Protection' while not casting if targetexists hotkey 'cancel current target' endif cast 'Protection' endwhile while casting endwhile wait 200 endif if bless = 1 and skill 'magery' >= 50 and not findbuff "Cunning" and mana >= miniumManaToBuff and diffhits < activateAutoHealDiff cast 'Bless' while not casting if targetexists hotkey 'cancel current target' endif cast 'Bless' wait 50 endwhile while not targetexists and casting endwhile waitfortarget maxwaittimeinms target 'self' wait 200 endif #********** START AUTO SUMMONING **********# while followers < maxFollowers and diffhits < activateAutoHealDiff #--- Eat Food ---# if not findbuff "food" and findtype "tray" backpack as fody dclick fody wait 200 endif #--- Drink str pot ---# if drinkStr = 1 and str < strengthLowerThan if not findbuff "Strength" if findtype "White Potion" self dclicktype "White Potion" wait 200 else if timer whiteMessageTimer > whiteMessageCD overhead "Out of str pots" 34 settimer whiteMessageTimer 0 endif endif endif endif #--- Drink agility pot ---# if drinkAgility = 1 if not findbuff "Agility" if findtype "Blue Potion" self dclicktype "Blue Potion" wait 200 else if timer blueMessageTimer > blueMessageCD overhead "Out of agility pots" 34 settimer blueMessageTimer 0 endif endif endif endif #--- Drink magic resist pot ---# if drinkMagicResist = 1 if not findbuff "Magic Resist" if findtype "Black Potion" self dclicktype "Black Potion" wait 200 else if timer blackMessageTimer > blackMessageCD overhead "Out of resist pots" 34 settimer blackMessageTimer 0 endif endif endif endif #--- Drink red pot ---# if stam < staminaLowerThan and 1 = drinkRefresh if findtype "Red Potion" self dclicktype "Red Potion" wait 200 else if timer redMessageTimer > redMessageCD overhead "Out of refresh pots" 34 settimer redMessageTimer 0 endif endif endif #--- Create mushroom ---# if counttype 29012 backpack = 0 while counttype 29012 backpack < mushroomCount and mana > 3 and diffhits < activateAutoHealDiff if not casting cast 'create food' endif endwhile endif #--- Eat Mushroom ---# if mana < eatMushWhenManaLowerThan and mushroomCount > 0 and timer mushroomTimer > mushroomTimerCD if counttype 29012 backpack if insysmsg "You consume a magic mushroom" endif sysmsg "Eating mush." 44 dclicktype 29012 backpack getlabel backpack xxx wait 200 if insysmsg "You consume a magic mushroom" settimer mushroomTimer 0 endif else overhead "No mushrooms found!" 34 endif endif #--- Use Meditation ---# if 1 = useMeditationSkill and mana < 50 and not findbuff "meditating" skill 'meditation' getlabel backpack xxx wait 200 if findbuff 'meditating' overhead '* meditating *' 88 while mana < meditateUntilManaReach and diffhits < activateAutoHealDiff if not findbuff 'meditating' break endif endwhile endif endif #--- Check for new elementals ---# if 1 = castingEarth sysmsg "fixing earth" 44 while findtype 158|14 ground -1 -1 12 as ele menu ele 1 waitfortarget maxwaittimeinms if targetexists if ele != earthFirsty and ele != earthSecondly hotkey 'cancel current target' if earthFirsty = 0 @setvar! earthFirsty ele sysmsg "add earth 1" 11 overhead "Earth 1" 634 ele else @setvar! earthSecondly ele sysmsg "add earth 2" 11 overhead "Earth 2" 634 ele endif break endif endif @ignore ele endwhile @clearignore @setvar! castingEarth 0 elseif 1 = castingWater sysmsg "fixing water" 44 while findtype 740|16 ground -1 -1 12 as ele menu ele 1 waitfortarget maxwaittimeinms if targetexists if ele != waterFirsty and ele != waterSecondly hotkey 'cancel current target' if waterFirsty = 0 @setvar! waterFirsty ele sysmsg "add water 1" 11 overhead "Water 1" 399 ele else @setvar! waterSecondly ele sysmsg "add water 2" 11 overhead "Water 2" 399 ele endif break endif endif @ignore ele endwhile @clearignore @setvar! castingWater 0 elseif 1 = castingAir while findtype 306|13 ground -1 -1 12 as ele menu ele 1 waitfortarget maxwaittimeinms if targetexists if ele != airFirsty and ele != airSecondly hotkey 'cancel current target' if airFirsty = 0 @setvar! airFirsty ele sysmsg "add air 1" 11 overhead "Air 1" 933 ele else @setvar! airSecondly ele sysmsg "add air 2" 11 overhead "Air 2" 933 ele endif break endif endif @ignore ele endwhile @clearignore @setvar! castingAir 0 elseif 1 = castingFire while findtype 24|15 ground -1 -1 12 as ele menu ele 1 waitfortarget maxwaittimeinms if targetexists if ele != fireFirsty and ele != fireSecondly hotkey 'cancel current target' if fireFirsty = 0 @setvar! fireFirsty ele sysmsg "add fire 1" 11 overhead "Fire 1" 353 ele else @setvar! fireSecondly ele sysmsg "add fire 2" 11 overhead "Fire 2" 353 ele endif break endif endif @ignore ele endwhile @clearignore @setvar! castingFire 0 elseif 1 = castingDaemon while findtype 9|722 ground -1 -1 12 as ele menu ele 1 waitfortarget maxwaittimeinms if targetexists if ele != daemonFirsty and ele != daemonSecondly hotkey 'cancel current target' if daemonFirsty = 0 @setvar! daemonFirsty ele sysmsg "add daemon 1" 11 overhead "Daemon 1" 11 ele else @setvar! daemonSecondly ele sysmsg "add daemon 2" 235 overhead "Daemon 2" 235 ele endif break endif endif @ignore ele endwhile @clearignore @setvar! castingDaemon 0 elseif 1 = castingCreature while findtype 215|211|302|317|225|212|202|213|716|729|51|74|214|206|776|737|718|739|718|29|776|317|302|39|56|26|3|57|50|382 ground -1 -1 12 as ele menu ele 1 waitfortarget maxwaittimeinms if targetexists if ele != creatureFirsty and ele != creatureSecondly and ele != creatureThirdy and ele != creatureFourthy and ele != creatureFithy hotkey 'cancel current target' if creatureFirsty = 0 @setvar! creatureFirsty ele sysmsg "Creature 1" 11 overhead "Creature 1" 11 ele elseif creatureSecondly = 0 @setvar! creatureSecondly ele sysmsg "add creature 2" 11 overhead "Creature 2" 11 ele elseif creatureThirdy = 0 @setvar! creatureThirdy ele sysmsg "add creature 3" 11 overhead "Creature 3" 11 ele elseif creatureFourthy = 0 @setvar! creatureFourthy ele sysmsg "add creature 4" 11 overhead "Creature 4" 11 ele elseif creatureFithy = 0 @setvar! creatureFithy ele sysmsg "add creature 5" 11 overhead "Creature 5" 11 ele endif break endif endif @ignore ele endwhile @clearignore @setvar! castingCreature 0 endif #--- Check for dead elementals ---# if earthFirsty != 0 and dead earthFirsty if list earthListy != 0 poplist earthListy 'front' sysmsg "pop earth 1" endif @setvar! earthFirsty 0 endif if earthSecondly != 0 and dead earthSecondly if list earthListy != 0 poplist earthListy 'front' sysmsg "pop earth 2" endif @setvar! earthSecondly 0 endif if waterFirsty != 0 and dead waterFirsty if list waterListy != 0 poplist waterListy 'front' sysmsg "pop water 1" endif @setvar! waterFirsty 0 endif if waterSecondly != 0 and dead waterSecondly if list waterListy != 0 poplist waterListy 'front' sysmsg "pop water 2" endif @setvar! waterSecondly 0 endif if airFirsty != 0 and dead airFirsty if list airListy != 0 poplist airListy 'front' endif @setvar! airFirsty 0 endif if airSecondly != 0 and dead airSecondly if list airListy != 0 poplist airListy 'front' endif @setvar! airSecondly 0 endif if fireFirsty != 0 and dead fireFirsty if list fireListy != 0 poplist fireListy 'front' endif @setvar! fireFirsty 0 endif if fireSecondly != 0 and dead fireSecondly if list fireListy != 0 poplist fireListy 'front' endif @setvar! fireSecondly 0 endif if daemonFirsty != 0 and dead daemonFirsty if list daemonListy != 0 poplist daemonListy 'front' endif @setvar! daemonFirsty 0 endif if daemonSecondly != 0 and dead daemonSecondly if list daemonListy != 0 poplist daemonListy 'front' endif @setvar! daemonSecondly 0 endif if creatureFirsty != 0 and dead creatureFirsty if list creatureListy != 0 poplist creatureListy 'front' sysmsg "pop creature 1" endif @setvar! creatureFirsty 0 endif if creatureSecondly != 0 and dead creatureSecondly if list creatureListy != 0 poplist creatureListy 'front' sysmsg "pop creature 2" endif @setvar! creatureSecondly 0 endif if creatureThirdy != 0 and dead creatureThirdy if list creatureListy != 0 poplist creatureListy 'front' sysmsg "pop creature 3" endif @setvar! creatureThirdy 0 endif if creatureFourthy != 0 and dead creatureFourthy if list creatureListy != 0 poplist creatureListy 'front' sysmsg "pop creature 4" endif @setvar! creatureFourthy 0 endif if creatureFithy != 0 and dead creatureFithy if list creatureListy != 0 poplist creatureListy 'front' sysmsg "pop creature 5" endif @setvar! creatureFithy 0 endif @clearsysmsg @setvar! wasInterrupted 0 #********** ACTIVATE NECROMANCER BAR IF USING ANY NECRO SPELLS **********# if NecroVengefulSpirit = 1 or NecroBloodOath = 1 if findtype 'necromancer book' backpack yell '[necromancyhotbar' while not gumpexists 622436516 yell '[necromancyhotbar' waitforgump 622436516 maxwaittimeinms endwhile endif endif #********** ACTIVATE NECROMANCER VENGEFUL SPIRIT SPELL **********# if ingump "20/" 622436516 @setvar! unholyPoints 20 elseif ingump "19/" 622436516 @setvar! unholyPoints 19 elseif ingump "18/" 622436516 @setvar! unholyPoints 18 elseif ingump "17/" 622436516 @setvar! unholyPoints 17 elseif ingump "16/" 622436516 @setvar! unholyPoints 16 elseif ingump "15/" 622436516 @setvar! unholyPoints 15 elseif ingump "14/" 622436516 @setvar! unholyPoints 14 elseif ingump "13/" 622436516 @setvar! unholyPoints 13 elseif ingump "12/" 622436516 @setvar! unholyPoints 12 elseif ingump "11/" 622436516 @setvar! unholyPoints 11 elseif ingump "10/" 622436516 @setvar! unholyPoints 10 elseif ingump "9/" 622436516 @setvar! unholyPoints 9 elseif ingump "8/" 622436516 @setvar! unholyPoints 8 elseif ingump "7/" 622436516 @setvar! unholyPoints 7 elseif ingump "6/" 622436516 @setvar! unholyPoints 6 elseif ingump "5/" 622436516 @setvar! unholyPoints 5 elseif ingump "4/" 622436516 @setvar! unholyPoints 4 elseif ingump "3/" 622436516 @setvar! unholyPoints 3 elseif ingump "2/" 622436516 @setvar! unholyPoints 2 elseif ingump "1/" 622436516 @setvar! unholyPoints 1 else @setvar unholyPoints 0 endif if 1 = NecroVengefulSpirit and 0 < unholyPoints clearsysmsg yell '[vengefulspirit' wait 200 while not insysmsg! "unholy symbols remaining" and not insysmsg! "you must wait another" yell '[vengefulspirit' wait 200 endwhile if insysmsg "unholy symbols" overhead '[>Vengeful Spirits<]' 44 endif endif #********** ACTIVATE NECROMANCER BLOOD OATH SPELL **********# if ingump "20/" 622436516 @setvar! unholyPoints 20 elseif ingump "19/" 622436516 @setvar! unholyPoints 19 elseif ingump "18/" 622436516 @setvar! unholyPoints 18 elseif ingump "17/" 622436516 @setvar! unholyPoints 17 elseif ingump "16/" 622436516 @setvar! unholyPoints 16 elseif ingump "15/" 622436516 @setvar! unholyPoints 15 elseif ingump "14/" 622436516 @setvar! unholyPoints 14 elseif ingump "13/" 622436516 @setvar! unholyPoints 13 elseif ingump "12/" 622436516 @setvar! unholyPoints 12 elseif ingump "11/" 622436516 @setvar! unholyPoints 11 elseif ingump "10/" 622436516 @setvar! unholyPoints 10 elseif ingump "9/" 622436516 @setvar! unholyPoints 9 elseif ingump "8/" 622436516 @setvar! unholyPoints 8 elseif ingump "7/" 622436516 @setvar! unholyPoints 7 elseif ingump "6/" 622436516 @setvar! unholyPoints 6 elseif ingump "5/" 622436516 @setvar! unholyPoints 5 elseif ingump "4/" 622436516 @setvar! unholyPoints 4 elseif ingump "3/" 622436516 @setvar! unholyPoints 3 elseif ingump "2/" 622436516 @setvar! unholyPoints 2 elseif ingump "1/" 622436516 @setvar! unholyPoints 1 else @setvar unholyPoints 0 endif if 1 = NecroBloodOath and 3 < unholyPoints clearsysmsg yell '[bloodoath' wait 200 while not insysmsg! "unholy symbols remaining" and not insysmsg! "you must wait another" yell '[bloodoath' wait 200 endwhile if insysmsg "unholy symbols" overhead '[>Blood Oath<]' 55 endif endif #********** ACTIVATE NECROMANCER WITHER SPELL **********# if ingump "20/" 622436516 @setvar! unholyPoints 20 elseif ingump "19/" 622436516 @setvar! unholyPoints 19 elseif ingump "18/" 622436516 @setvar! unholyPoints 18 elseif ingump "17/" 622436516 @setvar! unholyPoints 17 elseif ingump "16/" 622436516 @setvar! unholyPoints 16 elseif ingump "15/" 622436516 @setvar! unholyPoints 15 elseif ingump "14/" 622436516 @setvar! unholyPoints 14 elseif ingump "13/" 622436516 @setvar! unholyPoints 13 elseif ingump "12/" 622436516 @setvar! unholyPoints 12 elseif ingump "11/" 622436516 @setvar! unholyPoints 11 elseif ingump "10/" 622436516 @setvar! unholyPoints 10 elseif ingump "9/" 622436516 @setvar! unholyPoints 9 elseif ingump "8/" 622436516 @setvar! unholyPoints 8 elseif ingump "7/" 622436516 @setvar! unholyPoints 7 elseif ingump "6/" 622436516 @setvar! unholyPoints 6 elseif ingump "5/" 622436516 @setvar! unholyPoints 5 elseif ingump "4/" 622436516 @setvar! unholyPoints 4 elseif ingump "3/" 622436516 @setvar! unholyPoints 3 elseif ingump "2/" 622436516 @setvar! unholyPoints 2 elseif ingump "1/" 622436516 @setvar! unholyPoints 1 else @setvar unholyPoints 0 endif if 1 = NecroWither and 4 < unholyPoints and skill 'necromancy' >= 90 clearsysmsg yell '[wither' wait 200 while not insysmsg! "unholy symbols remaining" and not insysmsg! "you must wait another" yell '[wither' wait 200 endwhile if insysmsg "unholy symbols" overhead '[>Wither<]' 66 endif endif if list earthListy = 0 #sysmsg "Earth List = 0" elseif list earthListy = 1 #sysmsg "Earth List = 1" elseif list earthListy = 2 #sysmsg "Earth List = 2" endif if list waterListy = 0 #sysmsg "Water List = 0" elseif list waterListy = 1 #sysmsg "Water List = 1" elseif list waterListy = 2 #sysmsg "Water List = 2" endif if list creatureListy = 0 #sysmsg "Creature List = 0" elseif list creatureListy = 1 #sysmsg "Creature List = 1" elseif list creatureListy = 2 #sysmsg "Creature List = 2" elseif list creatureListy = 2 #sysmsg "Creature List = 2" elseif list creatureListy = 2 #sysmsg "Creature List = 2" endif @setvar! summoningSucessful 0 @setvar! missingRegs 0 if not findtype 3963 self or not findtype 3974 self or not findtype 3981 self @setvar! missingRegs 1 if timer noRegsMessageTimer > noRegsMessageCD overhead 'Out of regs!' 34 sysmsg 'Out of regs!' 34 settimer noRegsMessageTimer 0 endif wait noRegsMessageCD elseif not findtype 3980 self if fireElementals != 0 or summonDaemons != 0 @setvar! missingRegs 1 if timer noRegsMessageTimer > noRegsMessageCD overhead 'Out of regs!' 34 sysmsg 'Out of regs!' 34 settimer noRegsMessageTimer 0 endif wait noRegsMessageCD endif elseif mana < 50 if timer noRegsMessageTimer > noRegsMessageCD overhead "* low mana to summon *" 34 settimer noRegsMessageTimer 0 endif endif #********** CAST EARTH ELEMENTAL **********# if earthElementals != 0 and list earthListy < earthElementals and followers < 4 and diffhits < activateAutoHealDiff and not casting and missingRegs = 0 and mana > 49 cast 'Earth Elemental' @setvar! castingEarth 1 while not casting cast 'Earth Elemental' if targetexists hotkey 'cancel current target' endif endwhile while not dead if diffhits >= interruptCastingDiff @setvar! wasInterrupted 1 sysmsg "interrupted low health" 33 interrupt break endif if not casting getlabel backpack xxx wait 200 if insysmsg "Your concentration" @setvar! wasInterrupted 1 sysmsg "interrupted concentration" 33 else sysmsg "casting finished" 11 endif break endif if timer summonMsgTimer > summonMsgCD overhead "* summoning earth... *" 634 sysmsg "* summoning earth... *" 634 settimer summonMsgTimer 0 settimer globalMessageTimer 0 endif endwhile if 0 = wasInterrupted @setvar! summoningSucessful 1 sysmsg "Summon Earth Successful" pushlist earthListy 'x' 'front' while not dead if findtype 158|14 ground -1 -1 12 as ele menu ele 1 waitfortarget maxwaittimeinms if targetexists if ele != earthFirsty and ele != earthSecondly hotkey 'cancel current target' if earthFirsty = 0 @setvar! earthFirsty ele sysmsg "add earth 1" 11 overhead "Earth 1" 634 ele else @setvar! earthSecondly ele sysmsg "add earth 2" 11 overhead "Earth 2" 634 ele endif break endif endif @ignore ele endif endwhile @clearignore @setvar! castingEarth 0 endif #********** CAST WATER ELEMENTAL **********# elseif waterElementals != 0 and list waterListy < waterElementals and followers < 4 and diffhits < activateAutoHealDiff and not casting and missingRegs = 0 and mana > 49 cast 'Water Elemental' @setvar! castingWater 1 while not casting cast 'Water Elemental' if targetexists hotkey 'cancel current target' endif endwhile while not dead if diffhits >= interruptCastingDiff @setvar! wasInterrupted 1 sysmsg "interrupted low health" 33 interrupt break endif if not casting getlabel backpack xxx wait 200 if insysmsg "Your concentration" @setvar! wasInterrupted 1 sysmsg "interrupted concentration" 33 else sysmsg "casting finished" 11 endif break endif if timer summonMsgTimer > summonMsgCD overhead "* summoning water... *" 399 sysmsg "* summoning water... *" 399 settimer summonMsgTimer 0 settimer globalMessageTimer 0 endif endwhile if 0 = wasInterrupted @setvar! summoningSucessful 1 sysmsg "Summon Water Successful" pushlist waterListy 'x' 'front' while not dead if findtype 740|16 ground -1 -1 12 as ele menu ele 1 waitfortarget maxwaittimeinms if targetexists if ele != waterFirsty and ele != waterSecondly hotkey 'cancel current target' if waterFirsty = 0 @setvar! waterFirsty ele sysmsg "add water 1" 11 overhead "Water 1" 399 ele else @setvar! waterSecondly ele sysmsg "add water 2" 11 overhead "Water 2" 399 ele endif break endif endif @ignore ele endif endwhile @clearignore @setvar! castingWater 0 endif #********** CAST AIR ELEMENTAL **********# elseif airElementals != 0 and list airListy < airElementals and followers < 4 and diffhits < activateAutoHealDiff and not casting and missingRegs = 0 and mana > 49 cast 'Air Elemental' @setvar! castingAir 1 while not casting cast 'Air Elemental' if targetexists hotkey 'cancel current target' endif endwhile while not dead if diffhits >= interruptCastingDiff @setvar! wasInterrupted 1 sysmsg "interrupted low health" 33 interrupt break endif if not casting getlabel backpack xxx wait 200 if insysmsg "Your concentration" @setvar! wasInterrupted 1 sysmsg "interrupted concentration" 33 else sysmsg "casting finished" 11 endif break endif if timer summonMsgTimer > summonMsgCD overhead "* summoning air... *" 933 sysmsg "* summoning air... *" 933 settimer summonMsgTimer 0 settimer globalMessageTimer 0 endif endwhile if 0 = wasInterrupted @setvar! summoningSucessful 1 sysmsg "Summon Air Successful" pushlist airListy 'x' 'front' while not dead if findtype 306|13 ground -1 -1 12 as ele menu ele 1 waitfortarget maxwaittimeinms if targetexists if ele != airFirsty and ele != airSecondly hotkey 'cancel current target' if airFirsty = 0 @setvar! airFirsty ele sysmsg "add air 1" 11 overhead "Air 1" 933 ele else @setvar! airSecondly ele sysmsg "add air 2" 11 overhead "Air 2" 933 ele endif break endif endif @ignore ele endif endwhile @clearignore @setvar! castingAir 0 endif #********** CAST FIRE ELEMENTAL **********# elseif fireElementals != 0 and list fireListy < fireElementals and followers < 4 and diffhits < activateAutoHealDiff and not casting and missingRegs = 0 and mana > 49 cast 'Fire Elemental' @setvar! castingFire 1 while not casting cast 'Fire Elemental' if targetexists hotkey 'cancel current target' endif endwhile while not dead if diffhits >= interruptCastingDiff @setvar! wasInterrupted 1 sysmsg "interrupted low health" 33 interrupt break endif if not casting getlabel backpack xxx wait 200 if insysmsg "Your concentration" @setvar! wasInterrupted 1 sysmsg "interrupted concentration" 33 else sysmsg "casting finished" 11 endif break endif if timer summonMsgTimer > summonMsgCD overhead "* summoning fire... *" 353 sysmsg "* summoning fire... *" 353 settimer summonMsgTimer 0 settimer globalMessageTimer 0 endif endwhile if 0 = wasInterrupted @setvar! summoningSucessful 1 sysmsg "Summon Fire Successful" pushlist fireListy 'x' 'front' while not dead if findtype 24|15 ground -1 -1 12 as ele menu ele 1 waitfortarget maxwaittimeinms if targetexists if ele != fireFirsty and ele != fireSecondly hotkey 'cancel current target' if fireFirsty = 0 @setvar! fireFirsty ele sysmsg "add fire 1" 11 overhead "Fire 1" 353 ele else @setvar! fireSecondly ele sysmsg "add fire 2" 11 overhead "Fire 2" 353 ele endif break endif endif @ignore ele endif endwhile @clearignore @setvar! castingFire 0 endif #********** CAST DAEMON **********# elseif summonDaemons != 0 and list daemonListy < summonDaemons and followers < 4 and diffhits < activateAutoHealDiff and not casting and missingRegs = 0 and mana > 49 cast 'Summon Daemon' @setvar! castingDaemon 1 while not casting cast 'Summon Daemon' if targetexists hotkey 'cancel current target' endif endwhile while not dead if diffhits >= interruptCastingDiff @setvar! wasInterrupted 1 sysmsg "interrupted low health" 33 interrupt break endif if not casting getlabel backpack xxx wait 200 if insysmsg "Your concentration" @setvar! wasInterrupted 1 sysmsg "interrupted concentration" 33 else sysmsg "casting finished" 11 endif break endif if timer summonMsgTimer > summonMsgCD overhead "* summoning daemon... *" 235 sysmsg "* summoning daemon... *" 235 settimer summonMsgTimer 0 settimer globalMessageTimer 0 endif endwhile if 0 = wasInterrupted @setvar! summoningSucessful 1 sysmsg "Summon Daemon Successful" pushlist daemonListy 'x' 'front' while not dead if findtype 9|722 ground -1 -1 12 as ele menu ele 1 waitfortarget maxwaittimeinms if targetexists if ele != daemonFirsty and ele != daemonSecondly hotkey 'cancel current target' if daemonFirsty = 0 @setvar! daemonFirsty ele sysmsg "add daemon 1" 11 overhead "Daemon 1" 11 ele else @setvar! daemonSecondly ele sysmsg "add daemon 2" 235 overhead "Daemon 2" 235 ele endif break endif endif @ignore ele endif endwhile @clearignore @setvar! castingDaemon 0 endif #********** CAST SUMMON CREATURE **********# elseif summonCreature != 0 and list creatureListy < summonCreature and followers < 5 and diffhits < activateAutoHealDiff and not casting and missingRegs = 0 and mana > 13 cast 'Summ. Creature' @setvar! castingCreature 1 while not casting cast 'Summ. Creature' if targetexists hotkey 'cancel current target' endif endwhile while not dead if diffhits >= interruptCastingDiff @setvar! wasInterrupted 1 sysmsg "interrupted low health" 33 interrupt break endif if not casting getlabel backpack xxx wait 200 if insysmsg "Your concentration" @setvar! wasInterrupted 1 sysmsg "interrupted concentration" 33 else sysmsg "casting finished" 11 endif break endif if timer summonMsgTimer > summonMsgCD overhead "* summon creature... *" 881 sysmsg "* summon creature... *" 881 settimer summonMsgTimer 0 settimer globalMessageTimer 0 endif endwhile if 0 = wasInterrupted @setvar! summoningSucessful 1 sysmsg "Summon Creature Successful" pushlist creatureListy 'x' 'front' while not dead if findtype 215|211|302|317|225|212|202|213|716|729|51|74|214|206|776|737|718|739|718|29|776|317|302|39|56|26|3|57|50|382 ground -1 -1 12 as ele menu ele 1 waitfortarget maxwaittimeinms if targetexists if ele != creatureFirsty and ele != creatureSecondly and ele != creatureThirdy and ele != creatureFourthy and ele != creatureFithy hotkey 'cancel current target' if creatureFirsty = 0 @setvar! creatureFirsty ele sysmsg "add creature 1" 11 overhead "Creature 1" 11 ele elseif creatureSecondly = 0 @setvar! creatureSecondly ele sysmsg "add creature 2" 11 overhead "Creature 2" 11 ele elseif creatureThirdy = 0 @setvar! creatureThirdy ele sysmsg "add creature 3" 11 overhead "Creature 3" 11 ele elseif creatureFourthy = 0 @setvar! creatureFourthy ele sysmsg "add creature 4" 11 overhead "Creature 4" 11 ele elseif creatureFithy = 0 @setvar! creatureFithy ele sysmsg "add creature 5" 11 overhead "Creature 5" 11 ele endif break endif endif @ignore ele endif endwhile @clearignore @setvar! castingCreature 0 endif endif if 1 = summoningSucessful say 'ALL Guard ME' 44 endif endwhile #********* MANUAL-SELECT NEW TARGET ********* if 2 = targetSelectionMode if insysmsg "target a new" @setvar! currentTarget 0 @setvar! foundTarget 0 if targetexists hotkey 'cancel current target' endif if insysmsg "Select" endif overhead "Select Target: " 55 @setvar! tempTarget getlabel backpack xxx wait 200 endif if insysmsg "Select" if not find tempTarget ground -1 -1 12 overhead "* Target Not Found *" 34 endif endif if find tempTarget ground -1 -1 12 and not dead tempTarget if previousTarget != tempTarget sysmsg "Resetting timers" 15 settimer curseTimer curseCD settimer manaDrainTimer manaDrainCD endif @setvar! foundTarget 1 @setvar! currentTarget tempTarget @setvar! previousTarget currentTarget attack currentTarget getlabel currentTarget myLabel sysmsg "Target: {{myLabel}}" 55 else if timer targetSelectTimer > targetSelectCD overhead "* Waiting for Target *" 11 settimer targetSelectTimer 0 endif endif wait 200 elseif 0 = targetSelectionMode or warmode on #********* AUTO-SELECT NEW TARGET ********* #if timer targetSelectTimer > targetSelectCD # overhead "Looking for target.." 55 # settimer targetSelectTimer 0 #endif if not find currentTarget ground -1 -1 12 @setvar! currentTarget 0 @setvar! foundTarget 0 hotkey 'target closest grey monster' if not find lasttarget ground -1 -1 12 if timer noTargetMessageTimer > noTargetMessageCD overhead 'No target nearby' 33 settimer noTargetMessageTimer 0 endif else @setvar! tempTarget lasttarget while index != 20 @setvar! tempTarget lasttarget if index != 0 hotkey "next non-friendly monster target" @setvar! tempTarget lasttarget #overhead "*{{index}}*" 34 tempTarget if index = 1 @setvar! firstTarget lasttarget elseif firstTarget = tempTarget @setvar! foundTarget 2 break endif endif if find tempTarget ground -1 -1 12 clearsysmsg skill 'begging' waitfortarget maxwaittimeinms target tempTarget getlabel backpack xxx wait 200 if insysmsg "Target cannot be seen" sysmsg "*Not visible* [{{index}}]" 44 overhead "*Not visible* [{{index}}]" 44 tempTarget elseif insysmsg "That is too far away." overhead "*Too far* [{{index}}]" 44 tempTarget #elseif insysmsg "You must wait" #overhead "*Skill cooldown*" 11 #sysmsg "*Skill cooldown*" 11 #break elseif insysmsg "Perhaps" or insysmsg "You are too far away from them." or insysmsg "They do not appear to have anything to offer you." or insysmsg! "You must wait" if insysmsg "You must wait" sysmsg "* target skill cooldown targetting closest mob *" 34 hotkey 'target closest grey monster' @setvar! tempTarget lasttarget endif if previousTarget != tempTarget sysmsg "Resetting timers" 15 settimer curseTimer curseCD settimer manaDrainTimer manaDrainCD endif @setvar! foundTarget 1 @setvar! currentTarget tempTarget @setvar! previousTarget currentTarget attack currentTarget getlabel currentTarget myLabel sysmsg "Target: {{myLabel}}" 55 overhead "Target found!" 66 break endif endif endwhile endif if targetexists hotkey 'cancel current target' endif endif endif #********** BEGIN AUTO ATTACKING LOOP **********# while 1 = foundTarget and not dead currentTarget and find currentTarget ground -1 -1 12 and diffhits < activateAutoHealDiff #--- Eat food ---# if not findbuff "food" and findtype "tray" backpack as fody dclick fody wait 200 endif #--- Drink str pot ---# if drinkStr = 1 and str < strengthLowerThan if not findbuff "Strength" if findtype "White Potion" self dclicktype "White Potion" wait 200 else if timer whiteMessageTimer > whiteMessageCD overhead "Out of str pots" 34 settimer whiteMessageTimer 0 endif endif endif endif #--- Drink agility pot ---# if drinkAgility = 1 if not findbuff "Agility" if findtype "Blue Potion" self dclicktype "Blue Potion" wait 200 else if timer blueMessageTimer > blueMessageCD overhead "Out of agility pots" 34 settimer blueMessageTimer 0 endif endif endif endif #--- Drink magic resist pot ---# if drinkMagicResist = 1 if not findbuff "Magic Resist" if findtype "Black Potion" self dclicktype "Black Potion" wait 200 else if timer blackMessageTimer > blackMessageCD overhead "Out of resist pots" 34 settimer blackMessageTimer 0 endif endif endif endif #--- Drink red pot ---# if stam < staminaLowerThan and 1 = drinkRefresh if findtype "Red Potion" self dclicktype "Red Potion" wait 200 else if timer redMessageTimer > redMessageCD overhead "Out of refresh pots" 34 settimer redMessageTimer 0 endif endif endif @setvar! castingInterrupted 0 #sysmsg 'found target' 55 if targetexists hotkey 'cancel current target' endif if followers > 0 and 0 = currentlyAttacking say 'ALL Guard ME' 11 endif #--- Create mushroom ---# if counttype 29012 backpack = 0 while counttype 29012 backpack < mushroomCount and mana > 3 and diffhits < activateAutoHealDiff if not casting cast 'create food' endif endwhile endif #--- Eat Mushroom ---# if mana < eatMushWhenManaLowerThan and mushroomCount > 0 and timer mushroomTimer > mushroomTimerCD if counttype 29012 backpack if insysmsg "You consume a magic mushroom" endif sysmsg "Eating mush." 44 dclicktype 29012 backpack getlabel backpack xxx wait 200 if insysmsg "You consume a magic mushroom" settimer mushroomTimer 0 endif else overhead "No mushrooms found!" 34 endif endif #--- Use Meditation ---# if 1 = useMeditationSkill and mana < meditateWhenManaBelow and not findbuff "meditating" skill 'meditation' getlabel backpack xxx wait 200 if findbuff 'meditating' overhead '* meditating *' 88 while mana < meditateUntilManaReach and diffhits < activateAutoHealDiff #interrupt here if hp is low if not findbuff 'meditating' break endif endwhile endif endif @setvar! currentlyAttacking 1 if 2 = targetSelectionMode if insysmsg! "target a new" sysmsg "Breaking to set last target!" 44 break endif endif #********** CHECK POISONING STATUS **********# if castPoison = 1 and not dead currentTarget and find currentTarget ground -1 -1 12 @setvar! repeatCastingPoison 1 while not dead currentTarget and find currentTarget ground -1 -1 12 getlabel currentTarget targetLabel #sysmsg "#1" if "-" in targetLabel getlabel currentTarget targetLabel #sysmsg targetLabel 34 else #sysmsg targetLabel 65 break endif endwhile if "Ticks" in targetLabel or "resists" in targetLabel if timer poisonLabelTimer > poisonLabelCD overhead targetLabel 44 overhead targetLabel 44 currentTarget settimer poisonLabelTimer 0 endif if 2 = poisonLevel if "Lethal" in targetLabel @setvar! repeatCastingPoison 0 endif elseif 1 = poisonLevel if "Lethal" in targetLabel or "Deadly" in targetLabel @setvar! repeatCastingPoison 0 endif else @setvar! repeatCastingPoison 0 endif if 0 = repeatCastingPoison and 0 != NecroPoisonStrike @setvar! castStrike 0 if ingump "20/" 622436516 @setvar! unholyPoints 20 elseif ingump "19/" 622436516 @setvar! unholyPoints 19 elseif ingump "18/" 622436516 @setvar! unholyPoints 18 elseif ingump "17/" 622436516 @setvar! unholyPoints 17 elseif ingump "16/" 622436516 @setvar! unholyPoints 16 elseif ingump "15/" 622436516 @setvar! unholyPoints 15 elseif ingump "14/" 622436516 @setvar! unholyPoints 14 elseif ingump "13/" 622436516 @setvar! unholyPoints 13 elseif ingump "12/" 622436516 @setvar! unholyPoints 12 elseif ingump "11/" 622436516 @setvar! unholyPoints 11 elseif ingump "10/" 622436516 @setvar! unholyPoints 10 elseif ingump "9/" 622436516 @setvar! unholyPoints 9 elseif ingump "8/" 622436516 @setvar! unholyPoints 8 elseif ingump "7/" 622436516 @setvar! unholyPoints 7 elseif ingump "6/" 622436516 @setvar! unholyPoints 6 elseif ingump "5/" 622436516 @setvar! unholyPoints 5 elseif ingump "4/" 622436516 @setvar! unholyPoints 4 elseif ingump "3/" 622436516 @setvar! unholyPoints 3 elseif ingump "2/" 622436516 @setvar! unholyPoints 2 elseif ingump "1/" 622436516 @setvar! unholyPoints 1 else @setvar unholyPoints 0 endif if 1 = NecroPoisonStrike if "[1" in targetLabel @setvar! castStrike 1 endif elseif 2 = NecroPoisonStrike if "[2" in targetLabel @setvar! castStrike 1 endif elseif 3 = NecroPoisonStrike if "[2" in targetLabel or "[3" in targetLabel @setvar! castStrike 1 endif elseif 4 = NecroPoisonStrike if "[2" in targetLabel or "[3" in targetLabel or "[4" in targetLabel @setvar! castStrike 1 endif elseif 5 = NecroPoisonStrike if "[2" in targetLabel or "[3" in targetLabel or "[4" in targetLabel or "[5" in targetLabel @setvar! castStrike 1 endif elseif 6 = NecroPoisonStrike if "[2" in targetLabel or "[3" in targetLabel or "[4" in targetLabel or "[5" in targetLabel or "[6" in targetLabel @setvar! castStrike 1 endif elseif 7 = NecroPoisonStrike if "[2" in targetLabel or "[3" in targetLabel or "[4" in targetLabel or "[5" in targetLabel or "[6" in targetLabel or "[7" in targetLabel @setvar! castStrike 1 endif elseif 8 = NecroPoisonStrike if "[2" in targetLabel or "[3" in targetLabel or "[4" in targetLabel or "[5" in targetLabel or "[6" in targetLabel or "[7" in targetLabel or "[8" in targetLabel @setvar! castStrike 1 endif elseif 9 = NecroPoisonStrike if "[2" in targetLabel or "[3" in targetLabel or "[4" in targetLabel or "[5" in targetLabel or "[6" in targetLabel or "[7" in targetLabel or "[8" in targetLabel or "[9" in targetLabel @setvar! castStrike 1 endif elseif 10 = NecroPoisonStrike if "[2" in targetLabel or "[3" in targetLabel or "[4" in targetLabel or "[5" in targetLabel or "[6" in targetLabel or "[7" in targetLabel or "[8" in targetLabel or "[9" in targetLabel or "[10" in targetLabel @setvar! castStrike 1 endif endif endif endif endif if ingump "20/" 622436516 @setvar! unholyPoints 20 elseif ingump "19/" 622436516 @setvar! unholyPoints 19 elseif ingump "18/" 622436516 @setvar! unholyPoints 18 elseif ingump "17/" 622436516 @setvar! unholyPoints 17 elseif ingump "16/" 622436516 @setvar! unholyPoints 16 elseif ingump "15/" 622436516 @setvar! unholyPoints 15 elseif ingump "14/" 622436516 @setvar! unholyPoints 14 elseif ingump "13/" 622436516 @setvar! unholyPoints 13 elseif ingump "12/" 622436516 @setvar! unholyPoints 12 elseif ingump "11/" 622436516 @setvar! unholyPoints 11 elseif ingump "10/" 622436516 @setvar! unholyPoints 10 elseif ingump "9/" 622436516 @setvar! unholyPoints 9 elseif ingump "8/" 622436516 @setvar! unholyPoints 8 elseif ingump "7/" 622436516 @setvar! unholyPoints 7 elseif ingump "6/" 622436516 @setvar! unholyPoints 6 elseif ingump "5/" 622436516 @setvar! unholyPoints 5 elseif ingump "4/" 622436516 @setvar! unholyPoints 4 elseif ingump "3/" 622436516 @setvar! unholyPoints 3 elseif ingump "2/" 622436516 @setvar! unholyPoints 2 elseif ingump "1/" 622436516 @setvar! unholyPoints 1 else @setvar unholyPoints 0 endif #********** CAST POISON **********# if repeatCastingPoison = 1 and diffhits < activateAutoHealDiff and mana >= 9 and not dead currentTarget and find currentTarget ground -1 -1 12 if insysmsg "Your concentration is disturbed" endif if insysmsg "target cannot be seen" endif sysmsg "poison" 11 cast 'Poison' while not casting if targetexists hotkey 'cancel current target' endif cast 'Poison' endwhile while not targetexists if dead currentTarget and not find currentTarget ground -1 -1 12 interrupt @setvar! castingInterrupted 1 break endif if insysmsg "Your concentration is disturbed" interrupt @setvar! castingInterrupted 1 break endif endwhile if 0 = castingInterrupted and 1 = NecroMindRot and 2 < unholyPoints and timer mindRotTimer > mindRotCD and skill 'necromancy' >= 75 if insysmsg "unholy symbols remaining" endif if insysmsg "seconds before you may use that ability again." endif while not insysmsg "unholy symbols remaining" sysmsg "mindrot" 66 yell '[mindrot' getlabel backpack xxx wait 200 if insysmsg "seconds before you may use that ability again." @setvar! castingInterrupted 1 settimer mindRotTimer necroMarginErrorCD sysmsg "necro margin error 1" 44 break endif endwhile if 0 = castingInterrupted overhead '[>Mind Rot<]' 44 settimer mindRotTimer 0 endif endif target currentTarget getlabel backpack xxx wait 200 if insysmsg "target cannot be seen" @setvar! foundTarget 0 @setvar! currentTarget 0 break endif #********* CAST NECRO POISON STRIKE ********* elseif 1 = castStrike and 0 < unholyPoints and timer poisonStrikeTimer > poisonStrikeCD and skill 'necromancy' >= 55 and diffhits < activateAutoHealDiff and not dead currentTarget and find currentTarget ground -1 -1 12 if insysmsg "unholy symbols remaining" endif if insysmsg "seconds before you may use that ability again." endif while not insysmsg! "unholy symbols remaining" if dead currentTarget and not find currentTarget ground -1 -1 12 break endif sysmsg "strike" 66 yell '[poisonstrike' waitfortarget maxwaittimeinms target currentTarget getlabel backpack xxx wait 200 if insysmsg "seconds before you may use that ability again." sysmsg "necro margin error 0" 44 settimer poisonStrikeTimer necroMarginErrorCD break endif endwhile if insysmsg "unholy symbols remaining" overhead '[>Poison Strike<]' 44 settimer poisonStrikeTimer 0 endif #********** CAST CURSE **********# elseif 1 = castCurse and timer curseTimer > curseCD and mana >= 11 and diffhits < activateAutoHealDiff and not dead currentTarget and find currentTarget ground -1 -1 12 if insysmsg "Your concentration is disturbed" endif if insysmsg "target cannot be seen" endif sysmsg "Curse" 11 cast 'Curse' while not casting if targetexists hotkey 'cancel current target' endif cast 'Curse' endwhile @settimer! spellTimer 0 @setvar! spellCD 800 while not targetexists if diffhits >= interruptCastingDiff interrupt @setvar! castingInterrupted 1 break endif if dead currentTarget and not find currentTarget ground -1 -1 12 interrupt @setvar! castingInterrupted 1 break endif if insysmsg "Your concentration is disturbed" interrupt @setvar! castingInterrupted 1 break endif if timer spellTimer < spellCD #--- Poisoned ---# if 1 = drinkCure while poisoned and casting and not targetexists if findtype "Orange Potion" self sysmsg "pot cure - curse" 11 dclicktype "Orange Potion" wait 200 else if timer orangeMessageTimer > orangeMessageCD overhead "Out of cure pots" 34 settimer orangeMessageTimer 0 endif break endif endwhile endif #--- Drink Heal Pot ---# if diffhits >= drinkHealPotDiff and 1 = drinkHeal and casting and not targetexists if findtype "Yellow Potion" self as hPot getlabel hPot potLabel if "next" in potLabel #do nothing else @setvar! ch 0 if counttype 3852 self as c @setvar! ch c endif if insysmsg "potion satchel used" endif sysmsg "pot heal - curse" 11 dclicktype 3852 getlabel backpack xxx wait 200 if ch != counttype 3852 self or insysmsg "potion satchel used" cooldown "Heal Pot" healingPotCD endif if not casting break endif endif else if timer yellowMessageTimer > yellowMessageCD overhead "Out of heals pots" 34 settimer yellowMessageTimer 0 endif endif endif endif endwhile if 0 = castingInterrupted settimer curseTimer 0 target currentTarget getlabel backpack xxx wait 200 if insysmsg "target cannot be seen" @setvar! foundTarget 0 @setvar! currentTarget 0 break endif endif #********** CAST MANA DRAIN **********# elseif 1 = castManaDrain and timer manaDrainTimer > manaDrainCD and mana >= 11 and diffhits < activateAutoHealDiff and not dead currentTarget and find currentTarget ground -1 -1 12 if insysmsg "Your concentration is disturbed" endif if insysmsg "target cannot be seen" endif sysmsg "Drain" 11 cast 'Mana Drain' while not casting if targetexists hotkey 'cancel current target' endif cast 'Mana Drain' endwhile @settimer! spellTimer 0 @setvar! spellCD 800 while not targetexists if diffhits >= interruptCastingDiff interrupt @setvar! castingInterrupted 1 break endif if dead currentTarget and not find currentTarget ground -1 -1 12 interrupt @setvar! castingInterrupted 1 break endif if insysmsg "Your concentration is disturbed" interrupt @setvar! castingInterrupted 1 break endif if timer spellTimer < spellCD #--- Poisoned ---# if 1 = drinkCure while poisoned and casting and not targetexists if findtype "Orange Potion" self sysmsg "pot cure - drain" 11 dclicktype "Orange Potion" wait 200 else if timer orangeMessageTimer > orangeMessageCD overhead "Out of cure pots" 34 settimer orangeMessageTimer 0 endif break endif endwhile endif #--- Drink Heal Pot ---# if diffhits >= drinkHealPotDiff and 1 = drinkHeal and casting and not targetexists if findtype "Yellow Potion" self as hPot getlabel hPot potLabel if "next" in potLabel #do nothing else @setvar! ch 0 if counttype 3852 self as c @setvar! ch c endif if insysmsg "potion satchel used" endif sysmsg "pot heal - drain" 11 dclicktype 3852 getlabel backpack xxx wait 200 if ch != counttype 3852 self or insysmsg "potion satchel used" cooldown "Heal Pot" healingPotCD endif if not casting break endif endif else if timer yellowMessageTimer > yellowMessageCD overhead "Out of heals pots" 34 settimer yellowMessageTimer 0 endif endif endif endif endwhile if 0 = castingInterrupted settimer manaDrainTimer 0 target currentTarget getlabel backpack xxx wait 200 if insysmsg "target cannot be seen" @setvar! foundTarget 0 @setvar! currentTarget 0 break endif endif #********* CAST NECRO STRANGLE ********* elseif 1 = NecroStrangle and 3 < unholyPoints and timer strangleTimer > strangleCD and skill 'necromancy' >= 85 and mana >= minManaToUseDamageBuffNecroSpells and diffhits < activateAutoHealDiff and not dead currentTarget and find currentTarget ground -1 -1 12 if insysmsg "unholy symbols remaining" endif if insysmsg "seconds before you may use that ability again." endif while not insysmsg "unholy symbols remaining" sysmsg "strangle" 66 yell '[strangle' getlabel backpack xxx wait 200 if insysmsg "seconds before you may use that ability again." sysmsg "necro margin error 1" 44 @setvar! castingInterrupted 1 settimer strangleTimer necroMarginErrorCD break endif endwhile if 0 = castingInterrupted overhead '[>Strangle<]' 44 settimer strangleTimer 0 endif #********* CAST NECRO CORPSE SKIN ********* elseif 1 = NecroCorpseSkin and 1 < unholyPoints and timer corpseSkinTimer > corpseSkinCD and skill 'necromancy' >= 65 and mana >= minManaToUseDamageBuffNecroSpells and diffhits < activateAutoHealDiff and not dead currentTarget and find currentTarget ground -1 -1 12 if insysmsg "unholy symbols remaining" endif if insysmsg "seconds before you may use that ability again." endif while not insysmsg "unholy symbols remaining" sysmsg "corpseskin" 66 yell '[corpseskin' getlabel backpack xxx wait 200 if insysmsg "seconds before you may use that ability again." sysmsg "necro margin error 2" 44 @setvar! castingInterrupted 1 settimer corpseSkinTimer necroMarginErrorCD break endif endwhile if 0 = castingInterrupted overhead '[>Corpse Skin<]' 44 settimer corpseSkinTimer 0 endif #********* CAST NECRO EVIL OMEN ********* elseif 1 = NecroEvilOmen and 1 < unholyPoints and timer evilOmenTimer > evilOmenCD and skill 'necromancy' >= 60 and mana >= minManaToUseDamageBuffNecroSpells and diffhits < activateAutoHealDiff and not dead currentTarget and find currentTarget ground -1 -1 12 if insysmsg "unholy symbols remaining" endif if insysmsg "seconds before you may use that ability again." endif while not insysmsg "unholy symbols remaining" sysmsg "evilomen" 66 yell '[evilomen' getlabel backpack xxx wait 200 if insysmsg "seconds before you may use that ability again." sysmsg "necro margin error 3" 44 @setvar! castingInterrupted 1 settimer evilOmenTimer necroMarginErrorCD break endif endwhile if 0 = castingInterrupted overhead '[>Evil Omen<]' 44 settimer evilOmenTimer 0 endif #********* CAST NECRO MIND ROT ********* elseif 1 = NecroMindRot and 4 < unholyPoints and timer mindRotTimer > mindRotCD and skill 'necromancy' >= 75 and mana >= minManaToUseDamageBuffNecroSpells and diffhits < activateAutoHealDiff and not dead currentTarget and find currentTarget ground -1 -1 12 if insysmsg "unholy symbols remaining" endif if insysmsg "seconds before you may use that ability again." endif while not insysmsg "unholy symbols remaining" sysmsg "mindrot" 66 yell '[mindrot' getlabel backpack xxx wait 200 if insysmsg "seconds before you may use that ability again." sysmsg "necro margin error 4" 44 @setvar! castingInterrupted 1 settimer mindRotTimer necroMarginErrorCD break endif endwhile if 0 = castingInterrupted overhead '[>Mind Rot<]' 44 settimer mindRotTimer 0 endif #********** CAST MAGIC ARROW **********# elseif castMagicArrow = 1 and timer magicArrowTimer > magicArrowCD and diffhits < activateAutoHealDiff and mana >= 4 and mana < activateMagicArrowWhenManaBelow and not dead currentTarget and find currentTarget ground -1 -1 12 if insysmsg "Your concentration is disturbed" endif if insysmsg "target cannot be seen" endif sysmsg "arrow" 11 cast 'magic arrow' while not casting if targetexists hotkey 'cancel current target' endif cast 'magic arrow' endwhile while not targetexists if dead currentTarget and not find currentTarget ground -1 -1 12 interrupt @setvar! castingInterrupted 1 break endif if insysmsg "Your concentration is disturbed" interrupt @setvar! castingInterrupted 1 break endif endwhile if 0 = castingInterrupted target currentTarget getlabel backpack xxx wait 200 if insysmsg "wizardry" settimer magicArrowTimer 0 elseif insysmsg "target cannot be seen" @setvar! foundTarget 0 @setvar! currentTarget 0 break else settimer magicArrowTimer miniSpellsWithoutWizardGrimoreCD endif endif #********** CAST HARM **********# elseif castHarm = 1 and timer harmTimer > harmCD and diffhits < activateAutoHealDiff and mana >= 6 and mana < activateHarmWhenManaBelow and not dead currentTarget and find currentTarget ground -1 -1 12 if insysmsg "Your concentration is disturbed" endif if insysmsg "target cannot be seen" endif sysmsg "harm" 11 cast 'harm' while not casting if targetexists hotkey 'cancel current target' endif cast 'harm' endwhile while not targetexists if dead currentTarget and not find currentTarget ground -1 -1 12 interrupt @setvar! castingInterrupted 1 break endif if insysmsg "Your concentration is disturbed" interrupt @setvar! castingInterrupted 1 break endif endwhile if 0 = castingInterrupted target currentTarget getlabel backpack xxx wait 200 if insysmsg "wizardry" settimer harmTimer 0 elseif insysmsg "target cannot be seen" @setvar! foundTarget 0 @setvar! currentTarget 0 break else settimer harmTimer miniSpellsWithoutWizardGrimoreCD endif endif #********** CAST FIREBALL **********# elseif castFireball = 1 and timer fireballTimer > fireballCD and diffhits < activateAutoHealDiff and mana >= 9 and mana < activateFireballWhenManaBelow and not dead currentTarget and find currentTarget ground -1 -1 12 sysmsg "fireball" 11 if insysmsg "Your concentration is disturbed" endif if insysmsg "target cannot be seen" endif cast 'fireball' while not casting if targetexists hotkey 'cancel current target' endif cast 'fireball' endwhile while not targetexists if dead currentTarget and not find currentTarget ground -1 -1 12 interrupt @setvar! castingInterrupted 1 break endif if insysmsg "Your concentration is disturbed" interrupt @setvar! castingInterrupted 1 break endif endwhile if 0 = castingInterrupted target currentTarget getlabel backpack xxx wait 200 if insysmsg "wizardry" settimer fireballTimer 0 elseif insysmsg "target cannot be seen" @setvar! foundTarget 0 @setvar! currentTarget 0 break else settimer fireballTimer miniSpellsWithoutWizardGrimoreCD endif endif #********** CAST LIGHTNING **********# elseif castLightning = 1 and timer lightningTimer > lightningCD and diffhits < activateAutoHealDiff and mana >= 11 and mana < activateLightningWhenManaBelow and not dead currentTarget and find currentTarget ground -1 -1 12 sysmsg "lightning" 11 if insysmsg "Your concentration is disturbed" endif if insysmsg "target cannot be seen" endif cast 'lightning' while not casting if targetexists hotkey 'cancel current target' endif cast 'lightning' endwhile @settimer! spellTimer 0 @setvar! spellCD 800 while not targetexists if diffhits >= interruptCastingDiff interrupt @setvar! castingInterrupted 1 break endif if dead currentTarget and not find currentTarget ground -1 -1 12 interrupt @setvar! castingInterrupted 1 break endif if insysmsg "Your concentration is disturbed" interrupt @setvar! castingInterrupted 1 break endif if timer spellTimer < spellCD #--- Poisoned ---# if 1 = drinkCure while poisoned and casting and not targetexists if findtype "Orange Potion" self sysmsg "pot cure - lightning" 11 dclicktype "Orange Potion" wait 200 else if timer orangeMessageTimer > orangeMessageCD overhead "Out of cure pots" 34 settimer orangeMessageTimer 0 endif break endif endwhile endif #--- Drink Heal Pot ---# if diffhits >= drinkHealPotDiff and 1 = drinkHeal and casting and not targetexists if findtype "Yellow Potion" self as hPot getlabel hPot potLabel if "next" in potLabel #do nothing else @setvar! ch 0 if counttype 3852 self as c @setvar! ch c endif if insysmsg "potion satchel used" endif sysmsg "pot heal - lightning" 11 dclicktype 3852 getlabel backpack xxx wait 200 if ch != counttype 3852 self or insysmsg "potion satchel used" cooldown "Heal Pot" healingPotCD endif if not casting break endif endif else if timer yellowMessageTimer > yellowMessageCD overhead "Out of heals pots" 34 settimer yellowMessageTimer 0 endif endif endif endif endwhile if 0 = castingInterrupted target currentTarget getlabel backpack xxx wait 200 if insysmsg "wizardry" settimer lightningTimer 0 elseif insysmsg "target cannot be seen" @setvar! foundTarget 0 @setvar! currentTarget 0 break else settimer lightningTimer miniSpellsWithoutWizardGrimoreCD endif endif #********** CAST BIG SPELLS **********# elseif castExplosion = 1 or castFlamestrike = 1 or castEnergyBolt = 1 or castMindblast = 1 if diffhits < activateAutoHealDiff if insysmsg "Your concentration is disturbed" endif if insysmsg "target cannot be seen" endif @setvar! spellCD 0 if castFlamestrike = 1 and mana >= 40 sysmsg "flamestrike" 11 cast 'flamestrike' while not casting if targetexists hotkey 'cancel current target' endif cast 'flamestrike' endwhile @settimer! spellTimer 0 @setvar! spellCD 1400 elseif castEnergyBolt = 1 and bigSpellCounter = 1 and mana >= 20 sysmsg "energy" 11 cast 'energy bolt' while not casting if targetexists hotkey 'cancel current target' endif cast 'energy bolt' endwhile @settimer! spellTimer 0 @setvar! spellCD 1200 elseif castExplosion = 1 and bigSpellCounter = 2 and mana >= 20 sysmsg "explo" 11 cast 'Explosion' while not casting if targetexists hotkey 'cancel current target' endif cast 'Explosion' endwhile @settimer! spellTimer 0 @setvar! spellCD 1200 elseif castMindblast = 1 and mana >= 14 sysmsg "mind" 11 cast 'mind blast' while not casting if targetexists hotkey 'cancel current target' endif cast 'mind blast' endwhile @settimer! spellTimer 0 @setvar! spellCD 1000 endif while not targetexists and spellCD != 0 if mana < 14 interrupt @setvar! castingInterrupted 1 break endif if diffhits >= interruptCastingDiff interrupt @setvar! castingInterrupted 1 break endif if dead currentTarget and not find currentTarget ground -1 -1 12 interrupt @setvar! castingInterrupted 1 break endif if insysmsg "Your concentration is disturbed" interrupt @setvar! castingInterrupted 1 break endif if timer spellTimer < spellCD #--- Poisoned ---# if 1 = drinkCure while poisoned and casting and not targetexists if findtype "Orange Potion" self sysmsg "pot cure - big spells" 11 dclicktype "Orange Potion" wait 200 else if timer orangeMessageTimer > orangeMessageCD overhead "Out of cure pots" 34 settimer orangeMessageTimer 0 endif break endif endwhile endif #--- Drink Heal Pot ---# if diffhits >= drinkHealPotDiff and 1 = drinkHeal and casting and not targetexists if findtype "Yellow Potion" self as hPot getlabel hPot potLabel if "next" in potLabel #do nothing else @setvar! ch 0 if counttype 3852 self as c @setvar! ch c endif if insysmsg "potion satchel used" endif sysmsg "pot heal - big spells" 11 dclicktype 3852 getlabel backpack xxx wait 200 if ch != counttype 3852 self or insysmsg "potion satchel used" cooldown "Heal Pot" healingPotCD endif if not casting break endif endif else if timer yellowMessageTimer > yellowMessageCD overhead "Out of heals pots" 34 settimer yellowMessageTimer 0 endif endif endif endif endwhile if 0 = castingInterrupted and spellCD != 0 target currentTarget getlabel backpack xxx wait 200 if insysmsg "target cannot be seen" @setvar! foundTarget 0 @setvar! currentTarget 0 break endif if bigSpellCounter = 1 if castExplosion = 1 @setvar! bigSpellCounter 2 endif elseif bigSpellCounter = 2 if castEnergyBolt = 1 @setvar! bigSpellCounter 1 endif endif endif endif endif #********** USE WEAPON ABILITY **********# if skill "Arcane" >= 80 if timer weaponAbilityTimer > weaponAbilityCD if useWeaponAbility = 1 if mana < useAbilityWhenManaLowerThan yell '[weaponAbility2' wait 50 yell '[weaponAbility1' settimer weaponAbilityTimer 0 endif elseif useWeaponAbility = 2 if mana < useAbilityWhenManaLowerThan yell '[weaponAbility1' wait 50 yell '[weaponAbility2' settimer weaponAbilityTimer 0 endif elseif useWeaponAbility = 3 if mana < useAbilityWhenManaLowerThan yell '[weaponAbility2' wait 50 yell '[weaponAbility3' settimer weaponAbilityTimer 0 endif endif endif endif if mana < lowManaWarningMessageWhenBelow and timer manaMessageTimer > manaMessageCD overhead "Low mana warning" 34 settimer manaMessageTimer 0 endif if earthElementals != 0 or waterElementals != 0 or fireElementals != 0 or airElementals != 0 or summonDaemons != 0 or summonCreature != 0 if followers < minimumFollowers break endif endif if 0 = targetSelectionMode and 1 = switchTargetWhenToggleWarMode if warmode warmode off @setvar! foundTarget 0 @setvar! currentTarget 0 sysmsg "0-Switching Targets" 34 endif elseif 1 = targetSelectionMode and 1 = switchTargetWhenToggleWarMode if not warmode warmode on @setvar! foundTarget 0 @setvar! currentTarget 0 sysmsg "1-Switching Targets" 34 endif endif endwhile #********* ^ AUTO ATTACKING ENDS ^ ********* if followers > 0 and 1 = currentlyAttacking and diffhits < activateAutoHealDiff say 'ALL Guard ME' 65 if skill 'spirit' >= 50 and timer spiritSpeakTimer > spiritSpeakCD and findtype 'corpse' ground -1 -1 18 and dead currentTarget and not find currentTarget ground -1 -1 12 if insysmsg "you establish contact" endif if insysmsg "you fail your attempt" endif skill 'spiritspeak' getlabel backpack xxx wait 200 if insysmsg "you establish contact" or insysmsg "you fail your attempt" settimer spiritSpeakTimer 0 endif endif endif endwhile