I'm not very experienced at this, I still have alot to learn about coding in this language so if theres anything funky then keep that in mind.
Before I had written this macro I really hadn't found anything that suited what I was looking for (WH being the closest, however I found it to be quite buggy). I 6-box toons while playing my warrior manually to do the pulling and tanking, this macro is designed to be an assistant rather than a complete automation of the warrior.
Hopefully someone will find this useful.
v1.0 Features:
Targetting Information - Telling you what class, race etc. Useful for knowing if you're dealing with a cleric type mob or a mob that could potentially gate.
Auto Taunt/Kick - Will only do this if the mob if close enough and attack is on, the distance can be adjusted in the macro.
Move Back After Summon - One problem I've always hated is when a mob summons you, the mob will turn around. This macro will move you back a few steps after a summon which will help keep the mob from moving around too much (Rogues like this). I found this to be very useful in places like Riftseekers where the mobs have a very small combat range and tend to summon you lots after being pushed a little.
Enrage Handling - Turns attack off and on with mob enrage.
Assist Calling - You can specify the macro to call assist when mob gets to a certain percentage of health, this can be turned on and off with a parameter.
Camp Check Warning - Notifies you in the MQ window when someone calls a camp check and at what time (obviously this won't catch all cases due to misspellings and odd abbreviations).
Mob CHing/Gating Warning - Notifies in MQ window when a mob is attempting to gate or cast Complete Healing. Having trouble with the CH catch, I'll do some testing.
Built in Wait4rez
Mob Death Handling - Checks MobID rather than watching for an exp message like some macros do, this hopefully prevents the macro from getting stuck like some macros do that check for exp messages to figure out when a mob is dead.
Stand After Feign - When the macro detects that a mob has proc'd an FD spell on you the macro will immediately stand and continue attacking. Havn't been able to test this.
Furious Activation - Macro will automatically hit furious when you get to a percentage of health. You may want to adjust the percentage for your warrior based on hitpoints etc, I think I have it set to around 7% which has saved my 13k tank from dying in RS a few times.
Let me know if you have any feedback, problems or suggestions.
Code: Select all
#Event GotSummoned "You have been summoned!"
#Event Enraged "#*#|${Target.CleanName}| has become ENRAGED#*#"
#Event EnragedOff "#*#|${Target.CleanName}| is no longer enraged#*#"
#Event ImDead "You have been slain by#*#"
#Event ImDead "You died."
#Event MobGate "|${Target.CleanName}| begins to cast the gate spell#*#"
#Event MobCH "|${Target.CleanName}| begins to cast the complete healing spell#*#"
#Event CampCheck "#*#out of character#*#camp#*#check#*#"
#Event CampCheck "#*#out of character#*#cc#*#"
#Event CampCheck "#*#shout#*#camp#*#check#*#"
#Event CampCheck "#*#shout#*#cc#*#"
Sub Main
/declare AssistPct int outer ${Param0}
/declare MyTarget int outer
/declare UseAssist int outer
/declare TargetInfo int outer
/echo Warrior Macro Loaded.
| *********************
| *Checking Parameters*
| *********************
/if (${Defined[Param0]}) {
/if (${Param0}>=1 && ${Param0}<=99) {
/echo Calling Assist is: ON
/echo Assist Will be Called at: ${AssistPct}
/varset AssistPct ${AssistPct}
/varset UseAssist 1
} else {
/echo Assist PCT Needs to be a Number Between 0 and 100
/endmac
}
} else {
/echo Calling Assist is: OFF
/echo To Set Assist Calling, Use Format: /mac mywarrior <PCT to Call Assist>
/echo Ex: /mac mywarrior 97
}
| ***********
| *Main Loop*
| ***********
:Mainloop
/call CheckAssist
/call CheckHealth
/call NewTarget
/call TauntKick
/call CheckFeigned
/doevents
/goto :Mainloop
| ***************************************
| *Check To See If I Need To Call Assist*
| ***************************************
Sub CheckAssist
/if (${UseAssist}>0 && ${Target.Type.Equal[NPC]} && ${MyTarget}!=${Target.ID} && ${Target.PctHPs}<=${AssistPct} && ${Me.Combat}) {
/varset MyTarget ${Target.ID}
/g Assist me now on -[[ %t ]]-
/rs Assist me now on -[[ %t ]]-
}
/return
| **************************************
| *Check To See If My Health Is Too Low*
| **************************************
Sub CheckHealth
/if (${Me.PctHPs}<=9) {
/disc Furious
/echo Health too low! Hitting Furious!
/g HEAL ME!
/delay 2s
}
/return
| ******************************
| *Display Target's Information*
| ******************************
Sub NewTarget
/if (${TargetInfo}!=${Target.ID} && ${Target.ID}) {
/varset TargetInfo ${Target.ID}
/echo Target Information:
/echo [ ${Target.Level} ${Target.Race} ${Target.Class} ] ${Target} ${Target.Surname} ( ${Target.Type} )
}
/return
| ******************************************
| *Check To See If I Need To Taunt And Kick*
| ******************************************
Sub TauntKick
/if (${Me.Combat}) {
/if (${Me.AbilityReady[Kick]} && ${Target.Distance}<=25) {
/doability kick
}
/if (${Me.AbilityReady[Taunt]} && ${Target.Distance}<=25) {
/doability taunt
}
}
/return
| ************************************
| *Am I Feigning? If So Then Stand Up*
| ************************************
Sub CheckFeigned
/if (${Me.Feigning}) {
/stand
/attack on
/echo Mob made me feign, Standing!
}
/return
| ********
| *Events*
| ********
Sub Event_GotSummoned
/keypress back hold
/delay 4
/keypress back
/return
Sub Event_Enraged
/attack off
/echo Mob is Enraged, turning off attack and waiting!
/return
Sub Event_EnragedOff
/attack on
/echo Enrage off, attacking..
/return
Sub Event_MobGate
/echo ** WARNING ** ${Target.CleanName} is Attempting to Gate!
/return
Sub Event_MobCH
/echo ** WARNING ** ${Target.CleanName} is Attempting to Cast Complete Heal!
/return
Sub Event_CampCheck
/echo ** Camp Check Called at ${Time} **
/return
Sub Event_ImDead
/if (!${Defined[t]}) /declare t int outer 0
/if (!${Defined[loottotal]}) /declare loottotal int outer
/if (!${Defined[lootslot]}) /declare lootslot int outer
/if (!${Defined[lootleft]}) /declare lootleft int outer 0
/call Consent
/echo Awaiting rez: will auto-accept, then loot leaving ${lootleft} item/s on corpse
:waitforrez
/if (!${Window[ConfirmationDialogBox].Open}) {
/delay 1s ${Window[ConfirmationDialogBox].Open}
/goto :waitforrez
}
/if (${Window[ConfirmationDialogBox].Open}) /notify ConfirmationDialogBox Yes_Button leftmouseup
:zonein
/delay 5
/target mycorpse
/delay 5 ${Target.CleanName.Equal[${Me}'s corpse]}
/if (${Target.CleanName.NotEqual[${Me}'s corpse]}) /goto :zonein
/if (${Target.CleanName.Equal[${Me}'s corpse]}) {
/delay 3s
/call Loot
} else /goto :zonein
/return
Sub Consent
/consent group
/delay 25
/consent raid
/delay 25
/consent guild
/return
Sub Loot
:corpsepull
/target mycorpse
/delay 5 ${Target.CleanName.Equal[${Me}'s corpse]}
/if (${Target.CleanName.NotEqual[${Me}'s corpse]}) {
/echo No corpse in this zone
/return
}
/delay 3s
/corpse
/delay 1s ${Target.Distance}<20
/if (${Target.Distance}>20) {
/echo Corpse is too far away
/return
}
/if (${Target.CleanName.Equal[${Me}'s corpse]}) {
/loot
} else {
/echo where did my corpse go?
/return
}
/delay 5s ${Me.State.Equal[BIND]}
/if (${Me.State.NotEqual[BIND]}) /goto :corpsepull
/varset loottotal 0
:LootLag
/if (${loottotal}!=${Corpse.Items}) {
/varset loottotal ${Corpse.Items}
/delay 1s
/goto :LootLag
}
/if (${loottotal}<=${lootleft}) {
/echo Looting aborted. Error in number items to be left on corpse.
/notify LootWnd DoneButton leftmouseup
/return
}
/varset loottotal ${Math.Calc[${Corpse.Items}-${lootleft}]}
/echo Looting all but ${lootleft} item(s)
/for lootslot 1 to ${loottotal}
:LootItem
/itemnotify loot${lootslot} rightmouseup
/delay 5 !${Corpse.Item[${lootslot}].ID}
/if (!${Corpse.Item[${lootslot}].ID}) {
/next lootslot
} else /goto :LootItem
/if (${Math.Calc[${Corpse.Items}-${lootleft}]}>0) /goto :LootLag
:DoneLooting
/notify LootWnd DoneButton leftmouseup
/echo Done looting. ${lootleft} Item(s) left on your corpse.
/return
