Need help with Mage macro

intered

Premium Member
Joined
Nov 25, 2022
Messages
5
Reaction score
0
Points
1
Hey guys,

So, I got a mage macro that works decent. I want the macro:
  1. to cast a DMG shield on the main tank and refresh it when it wears off.
  2. Assist the MT with auto attack and DMG spells
  3. stop auto attacking / casting spells when no mobs in camp
  4. Keeps himself buffed (not added in the code yet)
  5. Use a mod rot when mana percentage is below 90%
  6. summon pet when the mage has no pet.
Just was wondering if there was a better way to do all of this then I wrote with my basic knowledge?

Code:
#Event TooFar "Your target is out of range, get closer!"
sub main
:Loop
    /doevents
/if (${Me.XTarget} < 1 ) {
/attack off
/stick off
}

    /if (!${Me.Pet.ID}) {
        /UseItem 13
        /delay 8s
        /target ${Spawn[MainTank].Pet}
        /delay 1s
        /cast 5
    }

    /if (!${Me.Combat}) {
        /target MainTank
        /delay 1s
            /if (${Me.SpellReady[Iceflame Barricade Rk. II]} && !${Target.Buff[Iceflame Barricade Rk. II].ID})  {
            /delay 2
            /cast "Iceflame Barricade Rk. II"
        }
    }
    /if (${Me.SpellReady[Rain of Jerikor]} && ${Me.Combat} ) {
        /delay 1
        /cast "Rain of Jerikor"
    }
    /if (${Me.SpellReady[Firebound Conjunction Rk. III]} && ${Me.Combat} ) {
        /delay 1
        /cast "Firebound Conjunction Rk. III"
    }
    /if (${Me.SpellReady[Spear of Molten Luclinite Rk. III]} && ${Me.Combat} ) {
        /cast "Spear of Molten Luclinite Rk. III"
    }
    /if (${Me.PctMana} < 90) {
        /UseItem Summoned: Large Modulation Shard
        /delay 5
    }
    /if (${Me.XTarget} < 1 ) {
        /attack off
    }
/goto :Loop

/return
#event Death "You have been slain#*#"
Sub Event_Death
/delay 1s
/end
/return