It requires spell_routines.inc and MQ2MoveUtils
The macro will:
- Buff selected spells for both self, group and single buffs on certain classes.
Heal int casters... with the damage the mobs do in MPG/RSS etc, keeping your chanter up is everyone's business with a heal.
Follow the main tank, make a new camp spot when told
Autoaccept rez and loot the corpse. (Important for rangers)
It also snares of course, and retries on fail.
If the mob gets too close, the ranger will switch to hand to hand and stick to the mob.
Pause attacking when told in /group or /raid and resume when told so... seems like a lot of raid strategies use this tactic.
Things I might do: Add buff requests via /group and /tell
Code: Select all
#Event FollowMe "#1# tells the group, 'follow me'"
#Event AutofireOn "#*#Auto fire on#*#"
#Event AutofireOff "#*#Auto fire off#*#"
#event MobGating "#*# begins to cast the gate spell#*#"
#event SnareIt "#*# tells the group, 'snare#*#"
#Event MobDead "#*#You have slain#*#"
#Event MobDead "#*#has been slain by#*#"
#Event gohome "#*#must be standing#*#spell#*#"
#Event Outdoors "#*#You can only cast this spell in the outdoors#*#"
#Event Outdoors "#*#This spell does not work here#*#"
#Event Zoned "#*#You have entered#*#"
#Event ImDead "You have been slain by#*#"
#Event SnareCall "#1# tells the group, 'PET OFF!! snare/malo pls!#*#"
#Event NoSnare "#*#is immune to changes in its#*#"
#Event BackOff "#1# tells the raid, 'BACK OFF#*#"
#Event BackOff "#1# tells the group, 'BACK OFF#*#"
#Event KillIt "#1# tells the raid, 'KILL#*#"
#Event KillIt "#1# tells the group, 'KILL#*#"
#Event TSnare "[MQ2] toggle snare#*#"
#Event TSnare "#1# tells the group, 'toggle snare#*#"
#Event TooFarAway "#*#Your target is too far away, get closer#*#"
#Event GotHit "#*#hits YOU for#*#"
#Event GotHit "#*#slashes YOU for#*#"
#Event GotHit "#*#crushes YOU for#*#"
#Event GotHit "#*#bashes YOU for#*#"
#Event GotHit "#*#kicks YOU for#*#"
#Event GotHit "#*#smashes YOU for#*#"
#Event GotHit "#*#mauls YOU for#*#"
#Event GotHit "#*#gores YOU for#*#"
#Event GotHit "#*#pierces YOU for#*#"
#Event GotHit "#*#kicks YOU for#*#"
#Event GotHit "#*#bashes YOU for#*#"
#Event NotStanding "#*#You must be standing to attack!#*#"
#Event NoSeeTarget "#*#You cannot see your target.#*#
#Event NoSeeTarget "#*#You can't hit them from here#*#
#Event Enrageon "#*#|${Target.CleanName}| has become ENRAGED#*#"
#Event Enrageoff "#*#|${Target.CleanName}| is no longer enraged#*#"
#include spell_routines.inc
#include irc.inc
#include wait4rez.inc
Sub Main
/echo Running RangerHelper...
/declare MasterList string outer "IRCMASTer"
/declare MasterOnly outer TRUE
|# Calling IRC Declares and joining channel...
/call IRCDeclares
/declare DefaultMT string outer MAINTANK
/declare AssistDistance int outer 200
/declare AssistAt int outer 99
/declare Closeness int outer 50
/declare SnareMobs outer TRUE
/declare Snared outer FALSE
/declare DEBUG outer FALSE
/declare MovingCamp outer FALSE
/declare Following outer FALSE
/declare Outside outer TRUE
/declare StaticCamp outer TRUE
/declare HomeX int outer ${Me.X}
/declare HomeY int outer ${Me.Y}
/declare TankName string outer ${Target}
/declare Engaged outer FALSE
/declare GroupMobs outer TRUE
/declare JustZoned outer FALSE
/declare AutoFire outer FALSE
/declare TargetArray[4] string outer
/declare SnareTimer timer outer 0
/declare Paused outer FALSE
/declare CasterHeals int outer 80
/declare SpellHeal string outer "Chloroblast"
/declare SingleBuffGem int outer 3
/declare GroupBuffGem int outer 4
/declare SpellHealGem int outer 5
/declare SelfBuffGem int outer 6
/declare SingleBuffTimer timer outer 0
| ############ Group Buff List.
/declare SpellGroupBuff[1] string outer
/varset SpellGroupBuff[1] "Spirit of the Predator"
| ############ Single Buff List.
/declare SpellSingleBuff[1] string outer
/varset SpellSingleBuff[1] "Call of the Rathe"
| ############ Self Buff List.
/declare SpellSelfBuff[4] string outer
/varset SpellSelfBuff[1] "Eagle Eye"
/varset SpellSelfBuff[2] "Cry of Thunder"
/varset SpellSelfBuff[3] "Mask of the Stalker"
/varset SpellSelfBuff[4] "Bladecoat"
/squelch /memspellset spells
/squelch /alias /snare /echo toggle snare
/if (!${Target.ID} || ${Target.Type.NotEqual[PC]} || ${Target.Type.Equal[Corpse]} || ${Target.Type.Equal[PET]} || ${Target.ID} == ${Me.ID}) {
/varset TankName ${DefaultMT}
} else {
/varset TankName ${Target}
}
/echo Now Assisting: [ ${TankName} ]
/memspellset spells
/delay 5s
:Main_Loop
/delay 1
/doevents
/call Check_grpHPs
/if (${Me.PctMana} < 80 && ${Me.Standing} && !${Following} && ${NearestSpawn[1,npc].Distance} > 50) /sit
/if (${Me.Sitting} && ${NearestSpawn[1,npc].Distance} < 50) /stand
/if (!${Engaged} && !${Paused}) /call AssistTank
/if (${Engaged} && ${TargetArray[4]} && !${Paused} && ${Target.PctHPs} < ${AssistAt}) {
/if (${Me.Sitting}) /stand
/call KillTarget
}
/call Self_Buffs
/call Group_Buffs
/if (${SingleBuffTimer} <= 1) /call Single_Buff
/call ReadyForNext
/goto :Main_Loop
/return
Sub KillTarget
/declare RangeFire local FALSE
/declare HandToHand local FALSE
/declare AssistTimer timer local 10s
:Combat
/if (${Paused}) /return
/if (${DEBUG}) /echo :Combat Loop pre check_hps
/if (${Group}) /call Check_grpHPs
/if (${DEBUG}) /echo :Combat Loop post check_hps
/if (!${AssistTimer}) {
/assist ${TankName}
/varset AssistTimer 10s
}
/face fast
/if (${Target.Type.Equal["Corpse"]} || !${Target.ID}) {
/if (${DEBUG}) /echo clearing target, leaving KillTarget
/varset Engaged FALSE
/attack on
/delay 1
/attack off
/target clear
/return
}
/if (!${Snared} && ${SnareMobs} && ${Target.PctHPs} <= 40 && ${Target.LineOfSight}) {
/call cast "Ensnare" 5 3s
/if (${Macro.Return.Equal[CAST_SUCCESS]}) /varset Snared TRUE
}
/if (!${AutoFire} && ${Int[${Target.Distance}]} > 40 && ${Int[${Target.Distance}]} < 200) {
/if (${DEBUG}) /echo Autofire 2
/squelch stick off
/keypress forward
/keypress back
/autofire
/varset RangeFire TRUE
}
/if (!${Me.Combat} && ${Int[${Target.Distance}]} < 40) {
/stick pin moveback ${Math.Calc[${Target.MaxRangeTo} * ${Closeness} / 100]}
/varset HandToHand TRUE
/attack on
}
/if (${AutoFire} && ${Target.Distance} < 40) {
/stick pin moveback ${Math.Calc[${Target.MaxRangeTo} * ${Closeness} / 100]}
/if (${DEBUG}) /echo Autofire 3
/autofire
/attack on
}
/if (${Me.Combat} && ${Target.Distance} > 40 && !${AutoFire}) {
/varset RangeFire TRUE
/varset HandToHand FALSE
/squelch /stick off
/attack off
/if (${DEBUG}) /echo Autofire 4
/autofire
}
/delay 1
/doevents
/goto :Combat
/return
Sub Self_Buffs
/if (${DEBUG}) /echo In Self_Buffs
/declare i int local 1
/for i 1 to ${SpellSelfBuff.Size}
/if (!${Me.Buff[${SpellSelfBuff[${i}]}].ID}) {
/if (!${Me.Gem[${SpellSelfBuff[${i}]}]}) /memspell ${SelfBuffGem} ${SpellSelfBuff[${i}]}
:SpellReadyLoop
/delay 5
/if (!${Me.SpellReady[${SpellSelfBuff[${i}]}]}) /goto :SpellReadyLoop
/if (${DEBUG}) /echo Targeting Myself in Self_Buffs
/delay 1
/if (${DEBUG}) /echo Target 2
/target myself
/call cast ${SpellSelfBuff[${i}]} ${SellBuffGem}
}
/next i
/return
Sub Group_Buffs
/if (${DEBUG}) /echo In Group_Buffs
/declare i int local 1
/for i 1 to ${SpellGroupBuff.Size}
/if (!${Me.Buff[${SpellGroupBuff[${i}]}].ID} && ${Spell[${SpellGroupBuff[${i}]}].Mana} < ${Me.CurrentMana}) {
/if (!${Me.Gem[${SpellGroupBuff[${i}]}]}) /memspell ${SelfGroupGem} ${SpellGroupBuff[${i}]}
:SpellReadyLoop2
/delay 5
/if (!${Me.SpellReady[${SpellGroupBuff[${i}]}]}) /goto :SpellReadyLoop2
/if (${DEBUG}) /echo Targeting Myself in Group_Buffs
/if (${DEBUG}) /echo Target 3
/target myself
/delay 1
/call cast ${SpellGroupBuff[${i}]} ${GroupBuffGem}
}
/next i
/return
Sub Single_Buff
/if (${DEBUG}) /echo In Single_Buff
/if (${SingleBuffTimer}) /return
/declare i int local 1
/declare j int local 1
/for i 1 to ${Group}
/for j 1 to ${SpellSingleBuff.Size}
/if (${Group.Member[${i}].Class.Name.Equal["Warrior"]} || ${Group.Member[${i}].Class.Name.Equal["Shadow Knight"]} || ${Group.Member[${i}].Class.Name.Equal["Paladin"]}) {
/if (${DEBUG}) /echo Target 4
/target ${Group.Member[${i}]}
/call cast ${SpellSingleBuff[${j}]} ${SingleBuffGem}
/varset SingleBuffTimer 55m
}
/next j
/next i
/return
Sub Check_grpHPs
/declare DEBUG_GHP local FALSE
/if (${DEBUG}) /echo In Check_GroupHPs
/declare i int local 1
/if (!${Me.Gem[${SpellHeal}]}) /memspell ${SelfHealGem} ${SpellHeal}
/if (${Me.CurrentMana} < ${Spell[${SpellHeal}].Mana}) /return
/if (!${Me.SpellReady[${SpellHeal}]}) /return
/if (!${Group} && ${Me.PctHPs} < ${MeleeHeals}) {
/if (${DEBUG_GHP}) /echo Inside NoGroup healing.
:SpellReadyLoop3
/delay 3
/if (!${Me.SpellReady[${SpellHeal}]}) /goto :SpellReadyLoop3
/if (${DEBUG}) /echo Target 4 (Check_grpHPs)
/target myself
/delay 1s ${Target.ID} == ${Me.ID}
/call cast ${SpellHeal} ${SpellHealGem}
/if (${Engaged} && ${Spawn[${TargetArray[4]}].ID}) {
/squelch /target id ${TargetArray[4]}
/delay 1s ${Target.ID} == ${TargetArray[4]}
}
}
/for i 0 to ${Group}
/if (${DEBUG}) /echo Start of /for statement. i = ${i}
/if ((${Group.Member[${i}].Class.PureCaster} || ${Group.Member[${i}].Class.Name.Equal["Cleric"]}) && ${Group.Member[${i}].PctHPs} < ${CasterHeals}) {
/squelch /attack on
/squelch /attack off
/if (${DEBUG_GHP}) /echo Inside Purecaster /if. Targeting ${Group.Member[${i}]} for healing.
/if (${DEBUG_GHP}) /echo Targeting ${Group.Member[${i}]} with ID: ${Group.Member[${i}].ID}
/if (${DEBUG_GHP}) /echo /target id ${Group.Member[${i}].ID}
/target id ${Group.Member[${i}].ID}
/if (${DEBUG_GHP}) /echo /delay 1s ${Group.Member[${i}].ID}==${Target.ID}
/delay 1s ${Group.Member[${i}].ID}==${Target.ID}
/if (${DEBUG_GHP}) /echo Target is now: ${Target.CleanName} with ID ${Target.ID}
/if (${DEBUG_GHP}) /echo /call cast ${SpellHeal} ${SpellHealGem} 4s
/call cast ${SpellHeal} ${SpellHealGem} 4s
/gsay Casting ${SpellHeal} on ${Target.CleanName}
} else /if (${Group.Member[${i}].PctHPs} < ${MeleeHeals}) {
/if (${DEBUG_GHP}) /echo Inside Melee /if. Targeting ${Group.Member[${i}]} for healing.
:SpellReadyLoop3
/delay 1
/if (!${Me.SpellReady[${SpellHeal}]}) /goto :SpellReadyLoop3
/if (${DEBUG}) /echo /target 6
/target id ${Group.Member[${i}].ID}
/delay 1s ${Target.ID} == ${Group.Member[${i}].ID}
/call cast ${SpellHeal} ${SpellHealGem}
/gsay Casting ${SpellHeal} on ${Target.CleanName}
}
/next i
/if (${Engaged} && ${Spawn[${TargetArray[4]}].ID}) {
/squelch /target id ${TargetArray[4]}
/delay 1s ${Target.ID} == ${TargetArray[4]}
}
/return
Sub AssistTank
/if (${DEBUG}) /echo Entered Sub AssistTank
/assist ${TankName}
/if (${Target.ID} && ${Target.PctHPs} < ${AssistAt} && ${Target.Distance} < ${AssistDistance} && !${Target.Type.Equal[PC]} && !${Target.Type.Equal[Corpse]} && !${Target.Type.Equal[PET]} ) {
/echo Inside Assist Tank
/if (${DEBUG}) /echo Setting TargetArray
/varset TargetArray[1] ${Target.CleanName}
/varset TargetArray[2] ${Target.Level}
/varset TargetArray[3] ${Target.Name}
/varset TargetArray[4] ${Target.ID}
/if (${Me.Sitting}) /stand
/varset Engaged TRUE
/return
}
/return
Sub ReadyForNext
/if (${DEBUG}) /echo Entered Sub ReadyForNext
/declare i int local 1
/varset Snared FALSE
/varset AutoFire FALSE
/varset Paused FALSE
/delay 2
/return
Sub ReturnHome
/if (${DEBUG}) /echo Entered Sub ReturnHome
/if (${Following} || ${MovingCamp} || !${StaticCamp}) /return
/if (${Math.Distance[${HomeY},${HomeX}]}<20) {
/keypress forward
/keypress back
/keypress left
/keypress right
/delay 2
/return
}
:MoveHome
/doevents
/face fast nolook loc ${HomeY},${HomeX}
/if (${Math.Distance[${HomeY},${HomeX}]}>20) {
/if (${Me.Sitting}) /stand
/keypress forward hold
}
/call AreWeStuck
/if (${Math.Distance[${HomeY},${HomeX}]}<25) {
/keypress forward
/keypress back
/keypress left
/keypress right
/if (${DEBUG}) /echo Leaving Sub ReturnHome
/return
}
/goto :MoveHome
/return
Sub AreWeStuck
/doevents
/declare StuckXLoc int local ${Me.X}
/declare StuckYLoc int local ${Me.Y}
/delay 3
/if (${StuckXLoc}==${Me.X} && ${StuckYLoc}==${Me.Y}) /call MoveAround
/return
Sub MoveAround
/doevents
/keypress forward
/keypress back hold
/delay 8
/keypress forward
/if (${Math.Rand[2]}) {
/keypress strafe_right hold
} else {
/keypress strafe_left hold
}
/delay 15
/keypress strafe_right
/keypress strafe_left
/return
Sub Event_NoSnare
/varset Snared TRUE
/gsay I can't snare this mob! It may run!!
/return
Sub Event_BackOff
/varset Paused TRUE
/attack off
/autofire off
/return
Sub Event_KillIt
/varset Paused FALSE
/return
Sub Event_GotHit
/if (!${Engaged}) {
/assist ${TankName}
/if (${Int[${Target.Distance}]} > 20 && ${Int[${Target.Distance}]} < 40 && > ${Target.MaxRangeTo}) /stick hold loose behindonce ${Math.Calc[${Target.MaxRangeTo} * ${Closeness} / 100]}
/varset Engaged TRUE
/call KillTarget
}
/return
Sub Event_TooFarAway
/if (${Int[${Target.Distance}]} > 50) /return
/echo ** Too far away - Getting 20% closer now!
/varset Closeness ${Math.Calc[${Closeness}*0.8].Int}
/if (${Closeness}<20) /varset Closeness 20
/return
Sub Event_SnareCall(string Line, string Toon)
/declare TriedSnare local FALSE
/if (${FollowTank}) {
/keypress forward
/keypress back
}
/echo Assisting : ${Toon}
/squelch /assist ${Toon}
/delay 3
:SnareLoop
/if (!${Snared} && ${Target.LineOfSight}) {
/call cast "Ensnare" 5 3s
/if (${Macro.Return.Equal[CAST_SUCCESS]}) {
/varset Snared TRUE
} else /if (!${Target.LineOfSight}) {
/gsay I can't see ${Target.CleanName} to snare it!
/delay 2s
/if (!${TriedSnare}) {
/varset TriedSnare TRUE
/goto :SnareLoop
}
/goto :AfterLoop
} else {
/goto :SnareLoop
}
}
:AfterLoop
/if (${FollowTank}) {
/squelch /target ${DefaultMT}
/stick 20
}
/return
Sub Event_NotStanding
/call MoveAround
/squelch /stand
/call AssistTank
/if (${Target.ID}) /call KillTarget
/call ReturnHome
/return
Sub Event_NoSeeTarget
/if (${Target.ID}) /face fast
/if (!${Engaged}) /return
/assist ${TankName}
/return
Sub Event_MobDead
/squelch /stick off
/squelch /attack on
/delay 1
/squelch /attack off
/delay 1
/keypress forward
/keypress back
/if (${Math.Distance[${HomeY},${HomeX}]}>15) /call ReturnHome
/return
Sub Event_gohome
/call ReturnHome
/return
Sub Event_Outdoors
/varset Outside FALSE
/return
Sub Event_Zoned
/varset Outside TRUE
/varset JustZoned TRUE
/if (${Following}) {
:WaitForTank
/delay 10
/doevents
/squelch /target ${TankName}
/if (!${Target.ID}) /goto :WaitForTank
/squelch /stick 20
/squelch /twist ${TravelGem}
}
/varset HomeX ${Me.X}
/varset HomeY ${Me.Y}
}
/return
Sub Event_ImDead
/echo Died, Waiting for Rez!
/squelch stick off
/keypress forward
/keypress back
/keypress left
/keypress right
/delay 20s
/varset MovingCamp FALSE
/varset Following FALSE
/varset Outside TRUE
/varset StaticCamp TRUE
/varset Engaged FALSE
:Zone_Loop
/if (!${JustZoned}) {
/doevents
/delay 2s
/goto :Zone_Loop
}
/call Wait4Rez
/memspellset spells
/delay 5s
/varset JustZoned FALSE
/return
Sub Event_SnareIt
:SnareLoop
/if (!${Snared} && ${Target.LineOfSight}) {
/call cast "Ensnare" 5 3s
/if (${Macro.Return.Equal[CAST_SUCCESS]}) {
/varset Snared TRUE
} else /if (!${Target.LineOfSight}) {
/gsay I can't see ${Target.CleanName} to snare it!
/return
}
else {
/goto :SnareLoop
}
}
/return
Sub Event_TSnare
/if (${SnareMobs}) {
/varset SnareMobs FALSE
/echo Snare routines turned OFF
/return
}
/varset SnareMobs TRUE
/echo Snare routines turned ON
/return
Sub Event_Enrageon
/if (${HandToHand}) /attack off
/return
Sub Event_Enrageoff
/if (${HandToHand}) /attack on
/return
Sub Event_AutofireOn
/echo Autofire activated! Target: ${Target.CleanName}
/varset AutoFire TRUE
/return
Sub Event_AutofireOff
/echo Autofire deactivated!
/varset AutoFire FALSE
/return



