Another Magician auto macro

Post your completed (working) macros here. Only for macros using MQ2Data syntax!

Moderator: MacroQuest Developers

showme1
a ghoul
a ghoul
Posts: 138
Joined: Wed Dec 17, 2003 5:51 pm

Another Magician auto macro

Post by showme1 » Tue Jun 29, 2004 5:40 am

This is my first macro and I'm very happy with the results from it! It is some pieces that I have found here and there and some ideas of my own included, but with the gear I have it works 100% the way I want it to. Do NOT use this while AFK FFS! I made this cause I love to chat more then concentrate and this allows me to not be so slack in groups hehe.

Thanks goes out to everyone who helped me on some bits of code here and there! If you recognize something you wrote I in no way take credit for it, I just prolly used it a bit different.

Any suggestions are most certainly welcome, as well as requests!

To do list: Add an ini file and clean up some useless code

Here ya go!

Code: Select all

|mage.mac
|Version 1.0
|Usage: /mac mage (MA/Tank name) (fire/magic/bolt)
|When starting this macro you need to assign your main assist and your type of nuke!
|fire: will cast "sun vortex" ... example /mac mage maintankname fire
|magic: will cast "rock of taelosia" ... example /mac mage maintankname magic
|bolt: will cast "firebolt of tallon" ... example /mac mage maintankname bolt
|-----------------------------------------------------------------------------------
|Will add ini support to this eventually
|
|code is taken from here and there and some is my own thinking
|but right now this works exactly as I wanted it to. Thank you 
|to those who helped me in the help forum!
|-----------------------------------------------------------------------------------
|what this does when you start it is cast a pet then buff yourself up with everything
|you can cast. It also sets you up with your first rod. At 97% you will begin battle
|and nuke up to 4 times per fight with whatever spell you pick. you will also debuff 
|the mob with malosinia.
|-----------------------------------------------------------------------------------
|DO NOT USE THIS WHILE AFK FFS!!!!!!!!
|-----------------------------------------------------------------------------------


#Event exp "#*#experience!!#*#"    
#Event rageon "#*#has become ENRAGED#*#" 
#Event rageoff "#*#is no longer enraged#*#" 
#Event burn "#*#burnout V spell has worn off#*#" 

#include spellcast.inc 

Sub Main

/deletevar spellname
/deletevar _param1 

/declare assist outer 
/echo Assisting ${Param0} 

/declare sentpet outer 
/varset sentpet 0 

/declare MaloCast outer 
/varset MaloCast 0 

/declare BoltCast outer 
/varset BoltCast 0 

/declare BoltCastB outer 
/varset BoltCastB 0 

/declare BoltCastC outer 
/varset BoltCastC 0

/declare BoltCastD outer 
/varset BoltCastD 0 
 
/declare BurnOut outer 
/varset BurnOut 0 

/declare NukeAmount outer 
/varset NukeAmount 4

/declare RodTimer timer outer 0
/varset RodTimer 0

/declare ModRod outer
/varset ModRod 0

/declare spellname string global 
/declare _param1 string global

/varset _param1 ${Param1}

/call choose
/echo ${Param0} is the main tank and I'll be casting ${spellname}  

:MainLoop
/if (!${Me.Pet.ID}) /call SumPet
/delay 3
/call BuffCheck 
/assist ${Param0}  
/if (${String[${BurnOut}].Equal[0]}) { 
  /echo Casting Burnout V 
  /if (${String[${Me.State}].Equal[SIT]}) { 
    /stand 
    /delay 1s 
  } 
  /delay 3 
  /call cast "Burnout V" 
  /delay 5 
  /doevents 
  /varset BurnOut 1  
} 
/call ManaCheck 
/if (${Target.ID} && ${Target.PctHPs}<=97) { 
  /if (${String[${Target.Type}].Equal[NPC]}) { 
    /if (${sentpet}==0) { 
      /pet attack 
      /varset sentpet 1 
      /echo Pet Sent 
    } 
      /if (${MaloCast}==0) { 
        /call Malo 
    }
  }
}
  /if (${Target.PctHPs}<=97 && ${Target.PctHPs}>=90 && ${String[${Target.Type}].Equal[NPC]}) { 
    /if (${BoltCast}==0) { 
      /if (${String[${Me.State}].Equal[SIT]}) { 
        /stand 
        /delay 1s 
      }
      /echo this is cast 1  
      /call cast ${spellname} 
      /varset BoltCast 1 
      /doevents 
    } 
  } 
  
  /if (${Target.PctHPs}<=70 && ${Target.PctHPs}>=60 && ${String[${NukeAmount}].Equal[4]}) { 
    /if (${BoltCastB}==0) { 
      /if (${String[${Me.State}].Equal[SIT]}) { 
        /stand 
        /delay 1s 
      }
      /echo this is cast 2 
      /call cast ${spellname} 
      /varset BoltCastB 1  
      /doevents 
    } 
  }

  /if (${Target.PctHPs}<=40 && ${Target.PctHPs}>=30 && ${String[${NukeAmount}].Equal[4]}) { 
    /if (${BoltCastC}==0) { 
      /if (${String[${Me.State}].Equal[SIT]}) { 
        /stand 
        /delay 1s 
      }
      /echo this is cast 3 
      /call cast ${spellname} 
      /varset BoltCastC 1  
      /doevents 
    } 
  }

  /if (${Target.PctHPs}<=13 && ${Target.PctHPs}>=5 && ${String[${NukeAmount}].Equal[4]}) { 
    /if (${BoltCastD}==0) { 
      /if (${String[${Me.State}].Equal[SIT]}) { 
        /stand 
        /delay 1s 
      }
      /echo this is cast 4 
      /call cast ${spellname} 
      /varset BoltCastD 1 
      /doevents 
    } 
  }  
  
} 
/doevents 
/goto :MainLoop 
/return 

Sub Event_exp 
  /varset sentpet 0 
  /varset MaloCast 0 
  /varset BoltCast 0 
  /varset BoltCastB 0
  /varset BoltCastC 0
  /varset BoltCastD 0 
  /echo Mob is dead!!! Resetting Variables!!
  /pet hold 
/return

|-----------------------------------------------------------------------------------
|VERY IMPORTANT INFORMATION!! READ SLOWLY AND CAREFULLY!!
|
|I have this portion of the macro set to cast malosinia from
|my face slot item.. NOTE: if you do NOT have the time veil
|you will need to change the line /call cast "Veil of Lost Hopes" item to
|/call cast "Malosinia"
|----------------------------------------------------------------------------------- 
 

Sub Malo 
  /call cast "Veil of Lost Hopes" item
  /if (${Macro.Return.Equal["CAST_SUCCESS"]}) { 
    /echo ${Target.Name} maloed.
    /varset MaloCast 1 
    /return 
  } else /if (${Macro.Return.Equal["CAST_RESISTED"]}) { 
    /delay 1
    /echo trying again with malosinia 
    /call Malo 
  } else 
    /echo check malo logic 
  } 
/return

Sub ManaCheck 
  /if (${Me.PctMana}<=86 && ${RodTimer}<=0) { 
    /call cast "Rod of Mystical Transvergance" item 
    /if (${Macro.Return.Equal["CAST_SUCCESS"]}) {
      /varcalc ModRod ${ModRod} - 1
      /echo Rod timer set to 3200 
      /varset RodTimer 3200 
    } 
  } 
/return 

Sub Event_rageon 
  /echo %t is enraged. Backing pet off. 
  /pet back off
  /delay 2
  /pet hold 
/return 

Sub Event_rageoff 
  /doevents flush 
  /echo %t is no longer enraged. Sending pet. 
  /pet attack 
/return

|-----------------------------------------------------------------------------------
|VERY IMPORTANT INFORMATION!! READ SLOWLY AND CAREFULLY!!
|
|NOTE: if you do NOT have elemental legs
|you will need to change the line  /call cast "Magi`kot's Pants of Convergence" item to
|/call cast "Rod of Mystical Transvergence"
|this is located at the BOTTEM of Sub Buffcheck just below
|----------------------------------------------------------------------------------- 
    

Sub BuffCheck 
  /if (!${Me.Buff[Elemental Siphon Recourse].ID}) { 
    /echo Casting Elemental Siphon 
    /call cast "Elemental Siphon" 
    /delay 5 
    /doevents 
  } 
  /if (!${Me.Buff[Khura's Focusing].ID} && !${Me.Buff[Focus of Soul].ID} && !${Me.Buff[Focus of the Seventh].ID} && !${Me.Buff[Talisman of Kragg].ID} && !${Me.Buff[Shield of Maelin].ID}) { 
  /echo Casting Shield of Maelin 
  /call cast "Shield of Maelin" 
} 
/doevents 
  /if (!${Me.Buff[Xegony's Phantasmal Guard].ID} && !${Me.Buff[Blessing of the Nine].ID} && !${Me.Buff[Protection of the Nine].ID}) { 
    /echo Casting Xegony's Phantasmal Guard 
    /call cast "Xegony's Phantasmal Guard" 
    /delay 5 
    /doevents 
    }
  /if (!${Me.Buff[Maelstrom of Ro].ID}) {
  /call cast "Maelstrom of Ro"
  }
  /if (${ModRod}==0) {
  /target myself
  /call cast "Magi`kot's Pants of Convergence" item
  /delay 2
  /echo Setting ModRod to 3
  /varset ModRod 3
  /autoinv
  }
/return 

Sub Event_burn
  /target ${Me.Pet.CleanName}
  /delay 2s
  /call cast "burnout V"
/return

|-----------------------------------------------------------------------------------
|VERY IMPORTANT INFORMATION!! READ SLOWLY AND CAREFULLY!!
|
|NOTE: if you do NOT have the spell Rock of Taelosia
|you will need to change the line /varset spellname "Rock of Taelosia" to
|/varset spellname "Black Steel" 
|----------------------------------------------------------------------------------- 

Sub choose 
/if (${String[${_param1}].Find["fire"]}>0) { 
   /varset spellname "Sun Vortex" 
   /return 
} 
/if (${String[${_param1}].Find["magic"]}>0) { 
   /varset spellname "Rock of Taelosia" 
   /return 
}
/if (${String[${_param1}].Find["bolt"]}>0) { 
   /varset spellname "Firebolt of Tallon" 
   /return 
}
/return

Sub SumPet
  /echo Summoning a pet to kill with!!
  /call cast "Monster Summoning IV"
/return
Don't forget to grab spellcast.inc from the snippets forum!

Good Luck!

tawth
decaying skeleton
decaying skeleton
Posts: 2
Joined: Mon Nov 22, 2004 2:37 am

Post by tawth » Mon Nov 22, 2004 2:38 am

How would you change this so that the burnoutV section instead of memming and casting clicked the last slot in inventory? (orb of infinite void)

also is it possible to add an auto damage shield refresher on this?

ztrike
a ghoul
a ghoul
Posts: 83
Joined: Fri Mar 26, 2004 1:17 pm
Contact:

Post by ztrike » Mon Nov 22, 2004 4:18 am

/call cast "orb of infinite void" item

... get the idea? :)
Ztrike out

tawth
decaying skeleton
decaying skeleton
Posts: 2
Joined: Mon Nov 22, 2004 2:37 am

Post by tawth » Fri Nov 26, 2004 5:35 am

thanks! got it working.. still kinda new to this =p

Chill
Contributing Member
Contributing Member
Posts: 435
Joined: Fri May 07, 2004 5:06 pm
Location: Erie, PA

Post by Chill » Fri Nov 26, 2004 5:58 am

There is a very good very comprehensive mage macro already written.

Rather than reinventing the wheel, I would suggest donating a couple bucks to the devs (you know they deserve it) and downloading Rusty's mage.mac from the VIP boards.

VertiGOD
a lesser mummy
a lesser mummy
Posts: 66
Joined: Mon Jan 10, 2005 6:19 am

Post by VertiGOD » Mon Jan 10, 2005 6:21 am

How can i make the pet assist the maintank after each killed mob.. tested this macro on my mage and the only problem i have is that the pet only assists the tank the first time i start the macro, than it just stands slacking while myself is standing there newking, and that kinda sux.


Oh and btw,.. how do i become a VIP member so i can download the
Rather than reinventing the wheel, I would suggest donating a couple bucks to the devs (you know they deserve it) and downloading Rusty's mage.mac from the VIP boards.


coz i would much rather do it this way

User avatar
aChallenged1
a grimling bloodguard
a grimling bloodguard
Posts: 1804
Joined: Mon Jun 28, 2004 10:12 pm

Post by aChallenged1 » Mon Jan 10, 2005 6:53 am

If you can't figure it out on your own, perhaps it is best you don't get it at all.
Newking... is that sort of in contrast to oldking?
Fuck writing MQ2 macros. Go with IS scripts; IS Rules!

VertiGOD
a lesser mummy
a lesser mummy
Posts: 66
Joined: Mon Jan 10, 2005 6:19 am

Post by VertiGOD » Mon Jan 10, 2005 7:13 am

yes you were exactly rajt, newking is the new king that is taking over your domain. Well to be honest, i am a newb when it comes to programming, been busting my chops trying to find out how to get the pet to continuously attack each incoming mob. and still need help to find it out.