That got me started and I've got one question that I know someone has a better way to do this then I've implimented here.
I've set it up so that every time a mob dies, it checks a different groupmember for a pet and casts the pet buffs. I didn't like the for loop because it would buff the first pet, zip through all the other group members and move on to getting ready for the next mob. It would never move past buffing the first persons pet.
My concern is that the way I'm doing it, is that if I have myself and 2 other people (counters 0, 1, and 2) in the group, when I increment the counter to 3, will it gracefully understand there's not a 4th member of the group and move on, or will it throw up an error and what's the better way to do what I'm trying to do. The new code is in the Checkbuffs sub.
Code: Select all
|start this with the tank name you want to assist as the arguement. |ex /macro enc tankname
#turbo
#Include SpellCast.inc
#Event Damage "#*#hits you for#*#"
#Chat #tell
Sub Main
/declare counter int outer 0
:MainLoop
/assist ${Param0}
/delay 2s ${Target.ID}
|Next line makes sure the assisted target is an NPC, has less than 95% but more then 10% hps, and is close.
/if (${Target.Type.Equal["NPC"]} && ${Target.PctHPs}<95 && ${Target.Distance}<100 && ${Target.PctHPs}>10) {
/face
/call Tash
/call Nuke
/call CheckBuffs
}
/goto :MainLoop
Sub Tash
/echo Engaged
/call Tash
/call Pet
/call Boggle
/return
Sub Tash
/call cast "Howl of Tashan"
/call Boggle
/return
Sub Pet
/echo Sic 'em Shiny Bob!
/pet attack
/return
Sub Boggle
/if (${Me.TargetOfTarget.ID} == ${Me.ID}) {
/echo Boggling
/call cast "Boggle"
/return
}
/return
Sub Nuke
:nuke
|First line makes sure the mob is still alive before we start casting and we |have 50+ mana.
|will keep looping and nuking until mob is under 10%
/if (${Target.Type.Equal["NPC"]} && ${Me.PctMana}>50) {
/call Boggle
/if (${Me.SpellReady["Psychosis"]}) /call cast "Psychosis" nodismount
/doevents
/if (${Target.Type.Equal["NPC"]} && ${Target.PctHPs}>10) /goto :nuke
}
/doevents
/return
Sub CheckBuffs
/echo Checking Buffs...
/doevents
/if (!${Me.Buff[Arcane Rune].ID}) /call cast "Ethereal Rune"
/if (!${Me.Buff[Clairvoyance].ID}) {
/target
/call cast "Clairvoyance" gem1
}
/if (!${Me.Buff[Shield of Maelin].ID}) /call cast "Mystic Shield" gem1
/if (!${Me.Buff[Overwhelming Splendor].ID}) {
/target
/call cast "Overwhelming Splendor" gem1
}
/if (${Group[${counter}].ID} && ${Group[${counter}].Pet.ID} && ${Me.SpellReady[Night`s Dark Terror]}) {
/target id ${Group[${counter}].Pet.ID}
/call cast "Speed of Salik"
/call cast "Night`s Dark Terror"
}
/vardata counter math.calc[${counter}+1]
/if (${counter}==6) /varset counter 0
/return
sub Event_Damage
/call Boggle
/return
Sub Event_Chat(ChatType,Sender,ChatText)
/if (${ChatText.Find[speed]}) {
/target ${Param0}
/call cast "Speed of Salik"
}
/if (${ChatText.Find[ndt]}) {
/target ${Param0}
/call cast "Night's Dark Terror"
}
/if (${ChatText.Find[C6]}) {
/target ${Param0}
/call cast "Clairvoyance"
}
/return