Hello Everyone! I threw this macro together one night as I was tired of re-casting all my dots. Once I started talking about it on mumble a few others wanted it and more features. I haven't extensively tested the healing yet but it should work fine.
Features:
- Everything is configurable via the INI.
- Will only use abilities, combat abilities, nukes, and dots when in combat.
- You can target a tank when running the macro to enable tank healing.
-- You don't have to the macro runs fine without doing so.
Features:
- Everything is configurable via the INI.
- Will only use abilities, combat abilities, nukes, and dots when in combat.
- You can target a tank when running the macro to enable tank healing.
-- You don't have to the macro runs fine without doing so.
Rich (BB code):
|------------------------------------------------------------|
| DotBot.mac
|
| Last Modified by: TheDroidUrLookingFor
|
|------------------------------------------------------------|
|------------------------------------------------------------|
| Includes
|------------------------------------------------------------|
|#include advpath.inc
|#include advpath2.inc
#include spell_routines.inc
|#define CHATMETHOD "/if (${UseIRC}) /i say"
#define CHATMETHOD "/if (${UseEQBC}) /bc"
#define CHATMETHOD1 "/echo"
|------------------------------------------------------------|
| Events
|------------------------------------------------------------|
#Event BuffWornOff "Your #1# spell has worn off of #2#."
Sub Main
/call Declares
/popup ALL VARIABLES LOADED: Check Mq2 Window for Errors.
/if (${UseIRC}) /iconnect ${IRCServerAddr} ${IRCPort} ${IRCChannel} ${Me}
/if (${UseEQBC}) /bccmd connect ${EQBCServerAddr} ${EQBCPort} ${EQBCPassword}
/if (!${Target.ID}) {
CHATMETHOD1 [DB]: Target your tank when you run this macro. [DB]
CHATMETHOD1 [DB]: No tank set. [DB]
} else {
/if (${Target.Type.Equal[PC]}) {
/varset M_Assist ${Target}
CHATMETHOD1 [DB]: I will cast heals on ${Target}. [DB]
} else {
/if (${Target.Type.Equal[NPC]}) {
CHATMETHOD1 [DB]: Target your tank when you run this macro not an NPC. [SB]
CHATMETHOD1 [DB]: No tank set. [DB]
}
}
}
| --- MAIN LOOP ---|
:MainLoop
/doevents
/call HPCheck
/call MPCheck
/if (${DoGroupHeal}) /call GroupHeals
/if (${DoHeal}) /call HealTank
/if (${DoDot} && ${Me.Combat} && ${Target.Type.Equal[NPC]} && ${Target.PctHPs} <= ${DotAt} && ${Target.Distance} <= ${Spell[${DotOne}].MyRange} && !${Target.Buff[${DotOne}].Name.Equal[${DotOne}]}) /call Dot "${DotOne}"
/if (${DoDot} && ${Me.Combat} && ${Target.Type.Equal[NPC]} && ${Target.PctHPs} <= ${DotAt} && ${Target.Distance} <= ${Spell[${DotTwo}].MyRange} && !${Target.Buff[${DotTwo}].Name.Equal[${DotTwo}]}) /call Dot "${DotTwo}"
/if (${DoDot} && ${Me.Combat} && ${Target.Type.Equal[NPC]} && ${Target.PctHPs} <= ${DotAt} && ${Target.Distance} <= ${Spell[${DotThree}].MyRange} && !${Target.Buff[${DotThree}].Name.Equal[${DotThree}]}) /call Dot "${DotThree}"
/if (${DoDot} && ${Me.Combat} && ${Target.Type.Equal[NPC]} && ${Target.PctHPs} <= ${DotAt} && ${Target.Distance} <= ${Spell[${DotFour}].MyRange} && !${Target.Buff[${DotFour}].Name.Equal[${DotFour}]}) /call Dot "${DotFour}"
/if (${DoDot} && ${Me.Combat} && ${Target.Type.Equal[NPC]} && ${Target.PctHPs} <= ${DotAt} && ${Target.Distance} <= ${Spell[${DotFive}].MyRange} && !${Target.Buff[${DotFive}].Name.Equal[${DotFive}]}) /call Dot "${DotFive}"
/if (${DoNuke} && ${Me.Combat} && ${Target.Type.Equal[NPC]} && ${Target.PctHPs} <= ${NukeAt} && ${Target.Distance} <= ${Spell[${NukeOne}].MyRange} && !${Target.Buff[${NukeOne}].Name.Equal[${NukeOne}]}) /call Nuke "${NukeOne}"
/if (${DoNuke} && ${Me.Combat} && ${Target.Type.Equal[NPC]} && ${Target.PctHPs} <= ${NukeAt} && ${Target.Distance} <= ${Spell[${NukeTwo}].MyRange} && !${Target.Buff[${NukeTwo}].Name.Equal[${NukeTwo}]}) /call Nuke "${NukeTwo}"
/if (${DoNuke} && ${Me.Combat} && ${Target.Type.Equal[NPC]} && ${Target.PctHPs} <= ${NukeAt} && ${Target.Distance} <= ${Spell[${NukeThree}].MyRange} && !${Target.Buff[${NukeThree}].Name.Equal[${NukeThree}]}) /call Nuke "${NukeThree}"
/if (${DoNuke} && ${Me.Combat} && ${Target.Type.Equal[NPC]} && ${Target.PctHPs} <= ${NukeAt} && ${Target.Distance} <= ${Spell[${NukeFour}].MyRange} && !${Target.Buff[${NukeFour}].Name.Equal[${NukeFour}]}) /call Nuke "${NukeFour}"
/if (${DoNuke} && ${Me.Combat} && ${Target.Type.Equal[NPC]} && ${Target.PctHPs} <= ${NukeAt} && ${Target.Distance} <= ${Spell[${NukeFive}].MyRange} && !${Target.Buff[${NukeFive}].Name.Equal[${NukeFive}]}) /call Nuke "${NukeFive}"
/if (${DoAbilitiy} && ${Me.Combat} && ${Target.Type.Equal[NPC]} && ${Target.PctHPs} <= ${AbilitiyAt} && ${Target.Distance} <= 50 && ${Me.AbilityReady["${AbilityOne}"]}) /doability ${AbilityOne}
/if (${DoAbilitiy} && ${Me.Combat} && ${Target.Type.Equal[NPC]} && ${Target.PctHPs} <= ${AbilitiyAt} && ${Target.Distance} <= 50 && ${Me.AbilityReady["${AbilityTwo}"]}) /doability ${AbilityTwo}
/if (${DoAbilitiy} && ${Me.Combat} && ${Target.Type.Equal[NPC]} && ${Target.PctHPs} <= ${AbilitiyAt} && ${Target.Distance} <= 50 && ${Me.AbilityReady["${AbilityThree}"]}) /doability ${AbilityThree}
/if (${DoAbilitiy} && ${Me.Combat} && ${Target.Type.Equal[NPC]} && ${Target.PctHPs} <= ${AbilitiyAt} && ${Target.Distance} <= 50 && ${Me.AbilityReady["${AbilityFour}"]}) /doability ${AbilityFour}
/if (${DoAbilitiy} && ${Me.Combat} && ${Target.Type.Equal[NPC]} && ${Target.PctHPs} <= ${AbilitiyAt} && ${Target.Distance} <= 50 && ${Me.AbilityReady["${AbilityFive}"]}) /doability ${AbilityFive}
/if (${DoCombatAbilitiy} && ${Me.Combat} && ${Target.Type.Equal[NPC]} && ${Target.PctHPs} <= ${CombatAbilitiyAt} && ${Target.Distance} <= 50 && ${Me.CombatAbilityReady["${CombatAbilityOne}"]}) /disc ${CombatAbilityOne}
/if (${DoCombatAbilitiy} && ${Me.Combat} && ${Target.Type.Equal[NPC]} && ${Target.PctHPs} <= ${CombatAbilitiyAt} && ${Target.Distance} <= 50 && ${Me.CombatAbilityReady["${CombatAbilityTwo}"]}) /disc ${CombatAbilityTwo}
/if (${DoCombatAbilitiy} && ${Me.Combat} && ${Target.Type.Equal[NPC]} && ${Target.PctHPs} <= ${CombatAbilitiyAt} && ${Target.Distance} <= 50 && ${Me.CombatAbilityReady["${CombatAbilityThree}"]}) /disc ${CombatAbilityThree}
/if (${DoCombatAbilitiy} && ${Me.Combat} && ${Target.Type.Equal[NPC]} && ${Target.PctHPs} <= ${CombatAbilitiyAt} && ${Target.Distance} <= 50 && ${Me.CombatAbilityReady["${CombatAbilityFour}"]}) /disc ${CombatAbilityFour}
/if (${DoCombatAbilitiy} && ${Me.Combat} && ${Target.Type.Equal[NPC]} && ${Target.PctHPs} <= ${CombatAbilitiyAt} && ${Target.Distance} <= 50 && ${Me.CombatAbilityReady["${CombatAbilityFive}"]}) /disc ${CombatAbilityFive}
/delay 1s
/goto :MainLoop
| --- MAIN STOP ---|
/return
Sub Declares
/Declare botversion outer "1.0"
/if (${Ini[DotBot.${Me}.Settings.ini,General,Version].NotEqual[${botversion}]}) /call MakeDefaultIni
/if (!${Ini[DotBot.${Me}.Settings.ini,General,Version].Length}) /call MakeDefaultIni
|-----------SPELLS------------------------------------------|
/Declare HealProm string outer ${Ini[DotBot.${Me}.Settings.ini,HealSpells,HealProm]}
/Declare HealHoT string outer ${Ini[DotBot.${Me}.Settings.ini,HealSpells,HealHoT]}
/Declare HealFast string outer ${Ini[DotBot.${Me}.Settings.ini,HealSpells,HealFast]}
/Declare DotOne string outer ${Ini[DotBot.${Me}.Settings.ini,DamageSpells,DotOne]}
/Declare DotTwo string outer ${Ini[DotBot.${Me}.Settings.ini,DamageSpells,DotTwo]}
/Declare DotThree string outer ${Ini[DotBot.${Me}.Settings.ini,DamageSpells,DotThree]}
/Declare DotFour string outer ${Ini[DotBot.${Me}.Settings.ini,DamageSpells,DotFour]}
/Declare DotFive string outer ${Ini[DotBot.${Me}.Settings.ini,DamageSpells,DotFive]}
/Declare NukeOne string outer ${Ini[DotBot.${Me}.Settings.ini,DamageSpells,NukeOne]}
/Declare NukeTwo string outer ${Ini[DotBot.${Me}.Settings.ini,DamageSpells,NukeTwo]}
/Declare NukeThree string outer ${Ini[DotBot.${Me}.Settings.ini,DamageSpells,NukeThree]}
/Declare NukeFour string outer ${Ini[DotBot.${Me}.Settings.ini,DamageSpells,NukeFour]}
/Declare NukeFive string outer ${Ini[DotBot.${Me}.Settings.ini,DamageSpells,NukeFive]}
/Declare AbilityOne string outer ${Ini[DotBot.${Me}.Settings.ini,Abilities,AbilityOne]}
/Declare AbilityTwo string outer ${Ini[DotBot.${Me}.Settings.ini,Abilities,AbilityTwo]}
/Declare AbilityThree string outer ${Ini[DotBot.${Me}.Settings.ini,Abilities,AbilityThree]}
/Declare AbilityFour string outer ${Ini[DotBot.${Me}.Settings.ini,Abilities,AbilityFour]}
/Declare AbilityFive string outer ${Ini[DotBot.${Me}.Settings.ini,Abilities,AbilityFive]}
/Declare CombatAbilityOne string outer ${Ini[DotBot.${Me}.Settings.ini,CombatAbilities,CombatAbilityOne]}
/Declare CombatAbilityTwo string outer ${Ini[DotBot.${Me}.Settings.ini,CombatAbilities,CombatAbilityTwo]}
/Declare CombatAbilityThree string outer ${Ini[DotBot.${Me}.Settings.ini,CombatAbilities,CombatAbilityThree]}
/Declare CombatAbilityFour string outer ${Ini[DotBot.${Me}.Settings.ini,CombatAbilities,CombatAbilityFour]}
/Declare CombatAbilityFive string outer ${Ini[DotBot.${Me}.Settings.ini,CombatAbilities,CombatAbilityFive]}
|-----------IRC---------------------------------------------|
/Declare UseIRC string outer ${Ini[DotBot.${Me}.Settings.ini,IRC,UseIRC]}
/Declare IRCServerAddr string outer ${Ini[DotBot.${Me}.Settings.ini,IRC,Address]}
/Declare IRCPort string outer ${Ini[DotBot.${Me}.Settings.ini,IRC,Port]}
/Declare IRCChannel string outer ${Ini[DotBot.${Me}.Settings.ini,IRC,Channel]}
|-----------EQBC--------------------------------------------|
/Declare UseEQBC string outer ${Ini[DotBot.${Me}.Settings.ini,EQBC,UseEQBC]}
/Declare EQBCServerAddr string outer ${Ini[DotBot.${Me}.Settings.ini,EQBC,EQBCServerAddr]}
/Declare EQBCPort string outer ${Ini[DotBot.${Me}.Settings.ini,EQBC,EQBCPort]}
/Declare EQBCPassword string outer ${Ini[DotBot.${Me}.Settings.ini,EQBC,EQBCPassword]}
|-----------Other---------------------------------------------|
/declare AbilitiyAt string outer ${Ini[DotBot.${Me}.Settings.ini,Percent,AbilitiyAt]}
/declare CombatAbilitiyAt string outer ${Ini[DotBot.${Me}.Settings.ini,Percent,CombatAbilitiyAt]}
/declare DotAt string outer ${Ini[DotBot.${Me}.Settings.ini,Percent,DotAt]}
/declare NukeAt string outer ${Ini[DotBot.${Me}.Settings.ini,Percent,NukeAt]}
/declare HealAt string outer ${Ini[DotBot.${Me}.Settings.ini,Percent,HealAt]}
/declare HotAt string outer ${Ini[DotBot.${Me}.Settings.ini,Percent,HotAt]}
/declare HealPromAt string outer ${Ini[DotBot.${Me}.Settings.ini,Percent,HealPromAt]}
/declare DoNuke string outer ${Ini[DotBot.${Me}.Settings.ini,General,DoNuke]}
/declare DoDot string outer ${Ini[DotBot.${Me}.Settings.ini,General,DoDot]}
/declare DoAbilitiy string outer ${Ini[DotBot.${Me}.Settings.ini,General,DoAbilitiy]}
/declare DoCombatAbilitiy string outer ${Ini[DotBot.${Me}.Settings.ini,General,DoCombatAbilitiy]}
/declare DoPromHeal string outer ${Ini[DotBot.${Me}.Settings.ini,General,DoPromHeal]}
/declare DoHotHeal string outer ${Ini[DotBot.${Me}.Settings.ini,General,DoHotHeal]}
/declare DoFastHeal string outer ${Ini[DotBot.${Me}.Settings.ini,General,DoFastHeal]}
/declare DoGroupHeal string outer ${Ini[DotBot.${Me}.Settings.ini,General,DoGroupHeal]}
/declare DoHeal string outer ${Ini[DotBot.${Me}.Settings.ini,General,DoHeal]}
/declare M_Assist string outer
/declare AnchorRadius string outer 20
/declare AnchorY string outer ${Me.Y}
/declare AnchorX string outer ${Me.X}
/declare AnchorZ string outer ${Me.Z}
/return
Sub MakeDefaultIni
/call SetIni General Version ${botversion}
/call SetIni General Assist TRUE
/call SetIni General DoDot FALSE
/call SetIni General DoNuke FALSE
/call SetIni General DoAbilitiy FALSE
/call SetIni General DoCombatAbilitiy FALSE
/call SetIni General DoFastHeal FALSE
/call SetIni General DoFastHeal FALSE
/call SetIni General DoGroupHeal FALSE
/call SetIni General DoHeal FALSE
/call SetIni General DoPromHeal FALSE
/call SetIni General DoHotHeal FALSE
/call SetIni General DoFastHeal FALSE
/call SetIni Percent HealAt 65
/call SetIni Percent HotAt 65
/call SetIni Percent HealPromAt 65
/call SetIni Percent DotAt 95
/call SetIni Percent NukeAt 95
/call SetIni Percent AbilitiyAt 95
/call SetIni Percent CombatAbilitiyAt 95
/call SetIni HealSpells HealProm ""
/call SetIni HealSpells HealHoT ""
/call SetIni HealSpells HealFast ""
/call SetIni DamageSpells DotOne "Bond of Bonemaw Rk. II"
/call SetIni DamageSpells DotTwo "Bond of Ralstok Rk. II"
/call SetIni DamageSpells DotThree "Deceitful Blight Rk. II"
/call SetIni DamageSpells DotFour "Plague of Holmein Rk. II"
/call SetIni DamageSpells DotFive "Blood of Bonemaw Rk. II"
/call SetIni DamageSpells NukeOne ""
/call SetIni DamageSpells NukeTwo ""
/call SetIni DamageSpells NukeThree ""
/call SetIni DamageSpells NukeFour ""
/call SetIni DamageSpells NukeFive ""
/call SetIni Abilities AbilityOne ""
/call SetIni Abilities AbilityTwo ""
/call SetIni Abilities AbilityThree ""
/call SetIni Abilities AbilityFour ""
/call SetIni Abilities AbilityFive ""
/call SetIni CombatAbilities CombatAbilityOne ""
/call SetIni CombatAbilities CombatAbilityTwo ""
/call SetIni CombatAbilities CombatAbilityThree ""
/call SetIni CombatAbilities CombatAbilityFour ""
/call SetIni CombatAbilities CombatAbilityFive ""
/call SetIni IRC UseIRC FALSE
/call SetIni IRC Address "192.168.1.251"
/call SetIni IRC Port "6667"
/call SetIni IRC Channel "#Bot"
/call SetIni EQBC UseEQBC TRUE
/call SetIni EQBC EQBCServerAddr "192.168.1.251"
/call SetIni EQBC EQBCPort "2112"
/call SetIni EQBC EQBCPassword ""
CHATMETHOD1 [MB]++ Please Edit your INI file now! It is in your Macro's folder named "DotBot.${Me}.Settings.ini"!!!! ++[MB]
/end
/return
Sub SetIni(string section, string option, string value)
/ini "DotBot.${Me}.Settings.ini" "${section}" "${option}" "${value}"
/return
Sub HPCheck
/if (${Me.PctHPs}<=5) /return
/return
Sub MPCheck
/if (${Me.PctMana}<=5) /return
/return
Sub HealTank
/declare i int local 1
/for i 1 to ${Group}
/if (${Group.Member[${i}].PctHPs}<=${HealAt} && ${Spawn[${Group.Member[${i}]}].Type.Equal[PC]} && ${Target.Distance}<=${Spell[${HealFast}].MyRange} && ${Spawn[${Group.Member[${i}]}].Name}==${M_Assist}) {
/target pc ${Group.Member[${i}]}
/delay 5 ${Target.ID}==${Group.Member[${i}].ID}
/if (${DoPromHeal} && ${Target.Distance} <= ${Spell[${HealProm}].MyRange} && ${Me.SpellReady[${HealProm}]} && !${Target.Buff[${HealProm}].Name.Equal[${HealProm}]}) /call PromHeal ${HealProm}
/if (${DoFastHeal} && ${Target.Distance} <= ${Spell[${HealFast}].MyRange} && ${Me.SpellReady[${HealFast}]}) /call Heal ${HealFast}
/if (${DoHotHeal} && ${Target.Distance} <= ${Spell[${HealHoT}].MyRange} && ${Me.SpellReady[${HealHoT}]} && !${Target.Buff[${HealHoT}].Name.Equal[${HealHoT}]}) /call Hot ${HealHoT}
}
}
/next i
/return
Sub GroupHeals
/declare i int local 1
/for i 1 to ${Group}
/if (${Group.Member[${i}].PctHPs}<=${HealAt} && ${Spawn[${Group.Member[${i}]}].Type.Equal[PC]} && ${Target.Distance}<=${Spell[${HealFast}].MyRange}) {
/target pc ${Group.Member[${i}]}
/delay 5 ${Target.ID}==${Group.Member[${i}].ID}
/CHATMETHOD Casting -- ${HealFast} -- ${Target}
/call Heal ${HealFast}
}
}
/next i
/return
Sub Dot(string DotToCast)
:Attack_Loop
/if (${DoDot} && ${Target.Type.Equal[NPC]} && ${Target.Distance} <= ${Spell[${DotToCast}].MyRange} && ${Me.SpellReady[${DotToCast}]} && !${Target.Buff[${DotToCast}].Name.Equal[${DotToCast}]}) {
/if (!${Me.Pet.Combat} && ${Me.Pet.ID}) /pet attack
/call cast "${DotToCast}" gem1
/delay 1s !${Me.Casting.ID}
/if (${Macro.Return.Equal["CAST_INTERRUPTED"]}) /goto :Attack_Loop
}
/return
Sub Nuke(string NukeToCast)
:Attack_Loop
/if (${DoNuke} && ${Target.Type.Equal[NPC]} && ${Target.Distance} <= ${Spell[${NukeToCast}].MyRange} && ${Me.SpellReady[${NukeToCast}]}) {
/if (!${Me.Pet.Combat} && ${Me.Pet.ID}) /pet attack
/call cast "${NukeToCast}" gem1
/delay 1s !${Me.Casting.ID}
/if (${Macro.Return.Equal["CAST_INTERRUPTED"]}) /goto :Attack_Loop
}
/return
Sub Hot(string HotToCast)
:Hot_Loop
/if (${DoHotHeal} && ${Target.Distance} <= ${Spell[${HotToCast}].MyRange} && ${Me.SpellReady[${HotToCast}]} && !${Target.Buff[${HotToCast}].Name.Equal[${HotToCast}]}) {
/if (!${Me.Pet.Combat} && ${Me.Pet.ID}) /pet attack
/call cast "${HotToCast}" gem1
/delay 1s !${Me.Casting.ID}
/if (${Macro.Return.Equal["CAST_INTERRUPTED"]}) /goto :Hot_Loop
}
/return
Sub PromHeal(string PHealToCast)
:Hot_Loop
/if (${DoPromHeal} && ${Target.Distance} <= ${Spell[${PHealToCast}].MyRange} && ${Me.SpellReady[${PHealToCast}]} && !${Target.Buff[${PHealToCast}].Name.Equal[${PHealToCast}]}) {
/if (!${Me.Pet.Combat} && ${Me.Pet.ID}) /pet attack
/call cast "${PHealToCast}" gem1
/delay 1s !${Me.Casting.ID}
/if (${Macro.Return.Equal["CAST_INTERRUPTED"]}) /goto :Hot_Loop
}
/return
Sub Heal(string HealToCast)
:Heal_Loop
/if (${DoFastHeal} && ${Target.Distance} <= ${Spell[${HealToCast}].MyRange} && ${Me.SpellReady[${HealToCast}]}) {
/if (!${Me.Pet.Combat} && ${Me.Pet.ID}) /pet attack
/call cast "${HealToCast}" gem1
/delay 1s !${Me.Casting.ID}
/if (${Macro.Return.Equal["CAST_INTERRUPTED"]}) /goto :Heal_Loop
}
/return