This is a hell of a lot less complicated than AFKNuke.mac and I think more practical becuase MA's switch all the time and you don't have to change the .ini file every time.
I think I added automatic MA/SA/TA changes if they don't exsist int he zone(I.E...dead) It works on my necro macro but havn't tested it on my wizard macro
Syntax:
/Macro wizard <Tank Name> <Cast Health> <Stop Casting Health> <*Optional fire|ice|magic>
Code: Select all
|
| Wizard macro 1.8 9.1.04
| by: Eqbot_man
| ----------------------------------------------------------
| QUICK SETUP -- Type /macro wizard PERSON_TO_ASSIST_TO_NUKE 80 30
| ----------------------------------------------------------
|
| Usage: /Macro wizard <Tank Name> <Cast Health> <Stop Casting Health> <*Optional fire|ice|magic>
|
| <Tank Name>
| This is the name of the tank who your wizard will assist for a target
| <Cast Health>
| This is the Health of the mob at which point your wizard will start to cast.
| 80h is fine for most plows and won't get you killed...too much :)
| <Stop Casting Health>
| This is the health of the mob at which you will not start another cast.
| 20 or 30 is fine for most plows
| <*Optional fire|ice|magic>
| This parameter will cast SoS if fire is selected,
| Ice Meteor if ice is selected,
| and Agnarr's Thunder if magic is selected
| If variable is left blank, SoS will be selected by defualt
| If you have GoD or OoW nukes and wish to change the spell to cast, go to "Sub Choose"
| and change the last line in the sub: "/varset spellname "Strike of Solusek""
| to whatever spell you have and when starting the macro, leave the last option blank
| I.E. : /macro wizard Bigtank 80 30
|
|If a mob is lvl 70 or greater this macro will assume a raid encounter mob and will wait until
| the mob is 70h then chain cast whatever spell is selected, if you don't have Ancient conc. If you do
| have Ancient Conc memed it will start Nuking at 85h and cast (or proc if you have EP legs) conc every 3rd
| nuke. You can change this by setting the "/if (${Target.PctHPs}<=70) {" line in "Sub raid" from 70 to
| whatever you want. You can also change it from casting the spell Ancient Conc, to procing legs down in Sub Raid.
|
|If the mob is lvl 69 or below this macro will assume a non-raid encounter (plow mob) and do the following:
| Chain whatever spell is slected (SoS usually) below <Cast Health> health
| Stop casting below <Stop Casting Health> health
| When mob dies wizard will sit if SitBit is set to 1 (Get a Mount)
|
|If you get aggro and start getting hit you will cast Ancient: Greater Concussion, twice, to try to prevent
| death. If you don't have this spell, well sorry I do. Try changing the name of the spell to
| regular Concussion in Sub Event_Conc
|
|Automatic Harvesting Spell: Harvest, and Harvest of Druizzil has been added. You can set the
| percent mana you wish to cast at, Defualt of 75 is fine for msot unattended wizards.
| Set the variable: HarvestMana to 0 to deactivate it
|
|Note: Avatar of Mist in PoA, Warlod Gintolaken in PoEb, and Guardian of Transcendence in Ikkinz
| are special mobs where your wizard will die.when using this macro due to memblur in Mist and
| Warlord, and Guardian starting at less than 100h. If these mobs are detected this macro will
| skip over them, meaning you will have to manually Blast them. This macro will not cast on these mobs
|
|Macro commands for when the macro is running:
|"/echo help" Brings up some help text
|"/echo sit" Turns on/off sitting after casting if you are in a zone where you can not use a mount. Defualt = off
|"/echo face" Turns on/off Faceing the mob before each cast. Defualt = off
|"/echo MA NEW_MA_NAME" Sets a new MA name. e.i: /echo MA Newbigtank, would set the name Newbigtank
| to assist for a target
|
|
| Examples:
| /macro wizard Bigmofo 80 20 fire
| /macro wizard Bigtank 70 30
| Once running:
| /echo help
| /echo MA Newtank
| /echo sit
|
#Event distract "You are too distracted to cast a spell now!"
#Event mezbreak "#*#awakened by ${Me}."
#Event conc "#*#hits you for#*#
#Event help "[MQ2] help"
#Event face "[MQ2] face"
#Event sit "[MQ2] sit"
#Event ManualAAHarvest "You begin casting Harvest of Druzzil#*#"
#Event MAChange "[MQ2] MA |#*#|"
#Event SAChange "[MQ2] SA |#*#|"
#Event TAChange "[MQ2] TA |#*#|"
#Event Event_Status "[MQ2] status"
#Event tell "#*#tells you, '#*#"
Sub Main
/deletevar StopCastHealth
/deletevar CastHealth
/deletevar spellname
/deletevar _param1
/deletevar FollowName
/deletevar RaidConc
/deletevar HarvestMana
/if (!${Defined[MainAssist]}) {
/declare MainAssist string global
/varset MainAssist ${Param0}
} else {
/varset MainAssist ${Param0}
}
/if (!${Defined[SecondAssist]}) {
/echo defin SA
/declare SecondAssist string global
}
/if (!${Defined[TripleAssist]}) {
/echo Defins TA
/declare TripleAssist string global
}
/declare RaidConc int global
/declare spellname string global
/declare _param1 string global
/declare CastHealth int global
/declare StopCastHealth int global
/declare FollowName string global
/declare HarvestMana int global
/varset MainAssist ${Param0}
/varset CastHealth ${Param1}
/varset StopCastHealth ${Param2}
/varset _param1 ${Param3}
/varset RaidConc 0
|------ Set the Name of the person you want to follow, ** Feature not yet implemented ** ---|
|/varset FollowName NAMEHERE
|-------------------------------------------------------------------------------------------|
|------ Set the lower limit of percent Mana at which you want to automatically cast Harvest (AA and spell) ---|
|------ 75 is probably fine. If you are below 75% mana you will cast your Harvest spells/Abilities -----------|
|------ Set to 0 to deactivate automatic Harvesting -----------------------------------------------------------|
/varset HarvestMana 75
|-------------------------------------------------------------------------------------------|
|If the following variables exsisted before (ie You are restarting the macro) it will leave them alone, and the values will transfer when you restart the macro
/if (!${Defined[FaceBit]}) {
/declare FaceBit int global
/varset FaceBit 0
}
/if (!${Defined[SitBit]}) {
/declare SitBit int global
/varset SitBit 0
}
/if (!${Defined[DruzzilTimer]}) {
/declare DruzzilTimer timer global 8m
/echo pron
}
| This calls the function that chooses what spell to cast based on the syntax input
/call choose
/call Event_Status
/assist off
|DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
|MainLoop Start
:MainLoop
/call plow
/call raid
/call oom
/doevents
/delay 5
/mqgoto :MainLoop
|End of MainLoop
|DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
/return
|=============================================
| This sub routine is for casting on a normal plow mob
Sub plow
/if (${Me.Moving}) /return
/if (!${Me.SpellReady[${spellname}]}) /return
/if (${Spawn[${MainAssist}].ID}) {
/assist ${MainAssist}
} else /if (${Spawn[${SecondAssist}].ID}) {
/assist ${SecondAssist}
} else /if (${Spawn[${TripleAssist}].ID}) {
/assist ${TripleAssist}
} else {
/echo You have nothing to assist, pausing for 20 seconds
/delay 20s
}
/delay 5
|________ All the checks to make sure you want to cast on the target or not _______|
| If the target is a raid encounter it will return and go to Sub raid
/if (!${String[${Zone.ShortName}].Find["Potimeb"]}) {
/if (${Target.Level}>=70) /return
}
/if (${SitBit}==1) {
/if (${Target.PctHPs}>${CastHealth} || ${Target.PctHPs}==0) {
/if (${Me.State.Equal["STAND"]}) /sit
/delay 5
/return
}
}
/if (${String[${Target}].Find["corpse"]}>0) /return
/if (!${Target.Type.Equal["NPC"]}) /return
/if (${Target.Distance}>190) /return
/if (!${Target.LineOfSight}) {
/echo You do not have proper line of sight
/delay 5s
/return
}
/if (${Target.PctHPs}<=${StopCastHealth}) /return
|___________________________________________________
/if (${Target.PctHPs}<=${CastHealth}) {
| This is where it will actualy cast on the mob after it passes through all the checks
/delay 2
/if (${FaceBit}==1) /face
/echo Non-Raid Encounter Mob Detected
/cast ${spellname}
/delay 5
}
| After you the spell is cast it will cycle the entire contents of MainLoop until the spell is ready to be cast again.
/return
|=============================================
| This Subroutine is for a raid encounter
Sub raid
/if (!${Me.SpellReady[${spellname}]}) /return
/if (${Me.Moving}) /return
/if (${Spawn[${MainAssist}].ID}) {
/assist ${MainAssist}
} else /if (${Spawn[${SecondAssist}].ID}) {
/assist ${SecondAssist}
} else /if (${Spawn[${TripleAssist}].ID}) {
/assist ${TripleAssist}
} else {
/echo You have nothing to assist, pausing for 20 seconds
/delay 20s
}
/delay 5
|________ All the checks to make sure you want to cast on the target or not _______|
/if (${Target.Level}<=69) /return
/if (${SitBit}==1) {
/if (${Target.PctHPs}>${CastHealth} || ${Target.PctHPs}==0) {
/if (${Me.State.Equal["STAND"]}) /sit
/delay 5
/return
}
}
/if (${String[${Target}].Find["Warlod Gintolaken"]}>0 || ${String[${Target}].Find["Avatar of Mist"]}>0) {
/echo This mob memblurs, you should cast Spell Shiled instead, as this mob procs a spell
/delay 10s
/return
}
/if (${String[${Target}].Find["Guardian of T"]}) {
/echo This mob does not start at full health 4/5 times. Skipping over him. You should cast Spell Shiled instead, as this mob procs a spell
/delay 10s
/return
}
/if (${String[${Target}].Find["NULL"]}>0) /return
/if (${String[${Target}].Find["corpse"]}>0) /return
/if (!${Target.Type.Equal["NPC"]}) /return
/if (${Target.Distance}>190) /return
/if (!${Target.LineOfSight}) {
/echo You do not have proper line of sight
/delay 5s
/return
}
|___________________________________________________
/if (${String[${Spell["Ancient: Greater Concussion"].Name}].Find["Ancient: Greater Concussion"]}>0) {
/if (${Target.PctHPs}<=85) {
| This is where it will actualy cast on the mob after it passes through all the checks
| if you have the spell "Ancient: Greater Concussion"
/delay 2
/if (${FaceBit}==1) /face
/echo Raid Encounter Mob Detected
/cast ${spellname}
/varset RaidConc ${Math.Calc[${RaidConc} + 1]}
/if (${RaidConc}==3) /call Conc
/delay 5
}
} Else {
/if (${Target.PctHPs}<=70) {
| This is where it will actualy cast on the mob after it passes through all the checks
| if you do NOT have the spell "Ancient: Greater Concussion"
/delay 2
/if (${FaceBit}==1) /face
/echo Raid Encounter Mob Detected
/delay 5
}
}
| After you the spell is cast it will cycle the entire contents of MainLoop until the spell is ready to be be cast again.
/return
|=============================================
| If you are below 15m you will Med for 3 min after trying to cast Harvest. You will have to cast Harvest of Drizzuil manually for now
Sub oom
:1
|This will loop during the cast of the spell from raid or plow subroutines
/if (!${Me.SpellReady[${spellname}]}) /mqgoto :1
| This is Harvest of Druzzil which it will activate
/if (${Me.PctMana}<${HarvestMana} && ${DruzzilTimer}==0) {
/echo Casting Harvest of Druzzil
/alt activate 172
/varset DruzzilTimer 4900
/delay 2s
/doevents flush
}
:2
| Pauses script until spells are ready to cast
/if (!${Me.SpellReady[${spellname}]}) /mqgoto :2
/if (${Me.PctMana}<${HarvestMana} && ${Me.SpellReady["Harvest"]}) {
/echo Harvest is up and you can take advantage of it
/cast "Harvest"
/delay 5s
:3
| This loops until Harvest is finished casting
/if (!${Me.SpellReady[${spellname}]}) /mqgoto :3
}
/if (${Me.PctMana}<15) {
/echo waiting 3min for mana
/cast "Harvest"
/delay 20s
/if (${Me.State.Equal["Stand"]}) /sit on
/delay 40s
/echo 2min left
/delay 60s
/echo 1min left
/delay 30s
/echo 30 seconds until resuming script
/delay 30s
/echo resuming script
/popup Resuming script
/if (!${Me.State.Equal["Stand"]}) /stand
}
/return
|=============================================
| This Sub is called before it reaches MainLoop. It determines the spell you will cast for the duration of the macro based on the input syntax
Sub choose
/if (${String[${_param1}].Find["fire"]}>0) {
/varset spellname "Strike of Solusek"
/return
}
/if (${String[${_param1}].Find["ice"]}>0) {
/varset spellname "Ice Meteor"
/return
}
/if (${String[${_param1}].Find["magic"]}>0) {
/varset spellname "Agnarr's Thunder"
/return
}
| If no resist spell is specified (I.E: /macro wizard BigTank 80 30 ), then SoS will be used
/varset spellname "Strike of Solusek"
| When it returns it will enter MainLoop in Sub Main
/return
|=============================================
| If you accidently break a mez you the macro will stop. Don't want to take any chances
Sub Event_mezbreak
/echo You broke a mez, shame on you. This script not intellegent enough to figure out what to do next, ending script.
/endmacro
/return
|=============================================
| If for some reason you are distacted (have spell book opened usually), It will try to get rid of your distractions :)
Sub Event_distract
/stand
/keypress esc
/keypress esc
/keypress esc
/stand
/return
|=============================================
| This subroutine will be called if you get hit. If you don't have ancient Conc...get it
Sub Event_conc
/declare Loopconc int local
/echo You are being hit, casting Ancient: Great Concussion. Hope you have it memed. . .
/if (${String[${Spell["Ancient: Greater Concussion"]}].Find["NULL"]}>0) {
/echo You don't have Spell: Ancient: Great Concussion. memmed, you might die now
/doevents flush
/return
}
|Will try to cast Conc twice just to be safe. Rather decrease DPS for a mob then to have a dead wizard box and have to worry about rebuffing
/for Loopconc 1 to 2
:conc
/if (!${Me.SpellReady["Ancient: Greater Concussion"]}) /mqgoto :conc
/delay 2
| Get rid of the | in front of this line if you have EP legs and put a | in front of the next line.
|/itemnotify legs rightmouseup
/cast "Ancient: Greater Concussion"
/next Loopconc
/doevents flush
/return
|=============================================
| This is called when you type /echo help
Sub Event_help
/echo ----- Macro Information ------
/echo /Macro wizard <Tank Name> <Cast Health> <Stop Casting Health> <*Optional fire|ice|magic>
/echo "/echo sit" Turns on/off sitting after casting if you are in a zone where you can not use a mount. Defualt = off
/echo "/echo face" Turns on/off Faceing the mob before each cast. Defualt = off
/echo "/echo MA NEW_MA_NAME" Sets a new MA name. e.i: /echo MA NewbigTank, would set the name Newbigtank to assist for a target
/echo ------------------------------
/return
|=======================================
| This is called when you type /echo sit, and changes SitBit to the opposite of whatever it currently is
Sub Event_sit
/if (${SitBit}==0) {
/varset SitBit 1
/if (${Me.State.Equal["STAND"]}) /sit
/echo ===================================
/echo ON -- You will now sit when the mob reaches "${StopCastHealth}" health. Your wizard will not try to sit while moving but if he is still for more than 2 seconds he will sit and auto-follow does not work when you are sitting. Type /mqpause on/off to compeltely pause this macro when you want to move your wizard and you don't want him trying to sit every 2 seconds :)
/echo ===================================
} Else /if (${SitBit}==1) {
/varset SitBit 0
/stand
/echo ===================================
/echo OFF -- You will NOT Sit anymore after casting.
/echo ===================================
}
/return
|=======================================
| This is called when you type /echo face, and changes FaceBit to the opposite of whatever it currently is
Sub Event_face
/if (${FaceBit}==0) {
/varset FaceBit 1
/echo ===================================
/echo ON -- You will now face the mob right before you cast on it
/echo ===================================
} Else /if (${FaceBit}==1) {
/varset FaceBit 0
/stand
/echo ===================================
/echo OFF -- You will not face the mob before you cast on it
/echo ===================================
}
/return
|======================================
Sub Event_MAChange(Name)
/echo ============================================
/echo Changing MA to ${String[${Name}].Right[-9]}
/echo ============================================
/varset MainAssist ${String[${Name}].Right[-9]}
/return
|======================================
Sub Event_SAChange(Name)
/echo ============================================
/echo Changing SA to ${String[${Name}].Right[-9]}
/echo ============================================
/varset SecondAssist ${String[${Name}].Right[-9]}
/return
|======================================
Sub Event_TAChange(Name)
/echo ============================================
/echo Changing TA to ${String[${Name}].Right[-9]}
/echo ============================================
/varset TripleAssist ${String[${Name}].Right[-9]}
/return
|======================================
Sub Conc
/delay 2
:NotReady
/if (!${Me.SpellReady[${spellname}]}) /mqgoto :NotReady
/cast "Ancient: Greater Concussion"
/delay 5
/cast "Ancient: Greater Concussion"
/delay 5
/return
|============================================
Sub Event_ManualAAHarvest
/echo Manual Harvest of Druzzil detected. Starting timer over at 8minutes
/varset DruzzilTimer 4900
/return
|===========================================
Sub Event_Status
/echo Status Report:
/echo ~~~~~~ wizard.mac ~~~~~~~~~~~~
/echo /macro wizard <Tank Name> <Cast Health> <Stop Casting Health>
/echo You will cast "${spellname}" between ${CastHealth} and ${StopCastHealth}
/echo Primary assist is set to: "${MainAssist}"
/if (${Defined[SecondAssist]}) {
/echo Secondary assist is set to: "${SecondAssist}"
} else {
/echo Secondary assist is set to: "NULL"
}
/if (${Defined[TripleAssist]}) {
/echo Tertiary assist is set to: "${TripleAssist}"
} else {
/echo Tertiary assist is set to: "NULL"
}
/if (${FaceBit}==0) {
/echo Facing is: "OFF"
} else /if (${FaceBit}==1) {
/echo Facing is: "ON"
}
/if (${SitBit}==0) {
/echo Sitting is: "OFF"
} else /if (${SitBit}==1) {
/echo Sitting is: "ON"
}
/echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/return
|==============================================
Sub Event_tell
/sound 4
/return
|====================================================
Made a bunch of minor modifications to the code including having the wizard sit after the mob dies to avoid sit aggro if you have /echo sit, turned on.
If you guys have any suggestions or features or options you want let me know


