- Joined
- Oct 14, 2006
- Messages
- 417
- Reaction score
- 0
- Points
- 16
Hey all, I had someone reply to me in PM about letting me use their macro for their shaman and it is not working correctly and he has not responded to the PM I sent him. I have very little knowledge in writing macros, and I just wanted to post this so that maybe you can tell me why it's not working correctly.
All it does when I turn it on (it recognizes the MT) then coninuously casts buffs. It will assist the MT and target the mob and sit there casting Talisman of Celerity on it and nothing else. Doesn't even slow or attempt to slow.
Basically, I wanted my macro to just Assist MT, Slow, Keep Buffs up, Canni. Don't really care about anything else.
Credit to memset for this macro.
All it does when I turn it on (it recognizes the MT) then coninuously casts buffs. It will assist the MT and target the mob and sit there casting Talisman of Celerity on it and nothing else. Doesn't even slow or attempt to slow.
Basically, I wanted my macro to just Assist MT, Slow, Keep Buffs up, Canni. Don't really care about anything else.
Credit to memset for this macro.
Code:
#Event SetTank "#1# tells you, 'settank #2# #3#'"
|################################################
Sub Main
| Define your MainTank... this is changeable while the macro is running by having new main tank /tell you: secretphrase (see below)
/declare MainTank string outer Tank Name Here
/declare SecretPhrase string outer Phrase Here
| Define your Spells...
/declare Spell_LANGUOR string outer "Talisman of Fortitude"
/declare Spell_COUGAR string outer "Talisman of the Panther"
/declare Spell_CHAMPION string outer "Champion"
/declare Spell_HASTE string outer "Talisman of Celerity"
/declare Spell_GROWTH string outer "Dire Focusing"
/declare Spell_CANNI string outer "Ancestral Bargain"
/declare Spell_HOT string outer "Halcyon Whisper Rk. II"
/declare Spell_PATCH string outer "Ahnkaul's Mending Rk. II"
/declare Spell_SLOW string outer "Turger's Insects"
/declare AA_Malo string outer "Malosinete"
/declare ITEM_Epic string outer "Crafted Talisman of Fates"
| Define what % mana you feel you should canni.
/declare MinMana int outer 90
| Define if you want to HoT (heal over time) or not. Also define what % health you want to HoT the MT.
/declare DoHOT bool outer FALSE
/declare DoHOTPercent int outer 85
| Define if you want to PATCH heal or not. Also define what % health you want to heal the MT.
/declare DoPATCH bool outer FALSE
/declare DoPATCHPercent int outer 70
| Define if you want to auto-slow mobs or not. Also define what % health you want to slow the mob.
/declare DoSLOW bool outer TRUE
/declare DoSLOWPercent int outer 98
| Define if we want to malo mobs or not.
/declare DoAAMalo bool outer False
|
| Don't need to edit below this line!
|
| Lets see if a MT was passed as an argument to the macro.
/if (${Defined[Param0]}) {
| We have a MT passed, lets use that instead of our default!
/varset MainTank ${Param0}
}
/echo Loaded Short Duration Buffs v1.0 by memset
/echo MAIN TANK: ${MainTank}
/echo CANNI AT %: ${MinMana}% Mana
/if (${DoHOT}) {
/echo HOT AT %: ${DoHOTPercent}%
}
/if (${DoPATCH}) {
/echo PATCH AT %: ${DoPATCHPercent}%
}
| Check if MQ2Cast plugin is loaded, if it isn't... load it automatically.
/if (!${Plugin[MQ2Cast].Name.Equal[mq2cast]}) /squelch /plugin MQ2Cast nocheck
|################################################
| START OF LOOP
:start
/doevents
/call GMCheck
|################################################
| Target our MT.
/target ${MainTank}
/delay 1s
|################################################
| Make sure we have a target before continuing.
/if (!${Target.ID}) {
/goto :start
}
|################################################
| Next, make sure we aren't invisible... if we ARE, don't cast anything.
/if (${Me.Invis}) {
/goto :start
}
|################################################
| Also, if we are MOVING... we don't need to cast anything. Will be pointless.
/if (${Me.Moving}) {
/goto :start
}
|################################################
| Finally, see if we're casting or not. This was added LATER... so it's slightly redundant below. Clean up later.
| /if (${Me.Casting.ID}) /goto :start
|################################################
| Lets first make sure we don't need to heal the MT.
| Do we need to PATCH heal the MT?
/if (${Target.PctHPs} <= ${DoPATCHPercent} && ${DoPATCH}) {
| It seems so. Better heal! Is the spell ready? Make sure we're not casting already...
/if (!${Me.Casting.ID} && ${Me.SpellReady[${Spell_PATCH}]} && ${Target.Distance} < 100) {
/echo Healing ${MainTank} with ${Spell_PATCH}!
/casting ${Spell_PATCH}
/delay 2.5
}
}
| Do we need to HoT the MT?
/if (${Target.PctHPs} <= ${DoHOTPercent} && ${DoHOT}) {
| It seems so. Better heal! Is the spell ready? Make sure we're not casting already...
/if (!${Me.Casting.ID} && ${Me.SpellReady[${Spell_HOT}]} && ${Target.Distance} < 100 && !${Target.Buff[${Spell_HOT}].Duration}) {
/echo Healing ${MainTank} with ${Spell_HOT}!
/casting ${Spell_HOT}
/delay 2.5
}
}
| There's a possibility that the shaman running this macro could be in need of a heal from canni... check now!
/if (${Me.PctHPs} <= 80) {
/target ${Me.CleanName}
/delay 1s
/casting ${Spell_PATCH}
/delay 2.5
/target ${MainTank}
/delay 1s
}
|################################################
| Lets see if the mob is malo'd... if not, and we're supposed to, then malo it.
/if (${DoAAMalo} && ${Me.AltAbilityReady[${AA_Malo}]}) {
| Yes... see if mob is malo'd already.
/assist ${MainTank}
/delay 1s
/if (${Target.Buff[${AA_Malo}].Duration.Ticks} < 1 && ${Target.Type.Equal[NPC]} && ${Target.Distance} < 100 && ${Target.PctHPs} <= ${DoSLOWPercent}) {
| Ok... malo the mob!
/echo Malo'ing ${Target.CleanName} with ${AA_Malo}
/aa act Malosinete
/delay 4s
}
}
|################################################
| Now lets check if we need to slow a mob!
/if (${DoSLOW}) {
| Ok, we need to slow....maybe. Assist MT, check if it has been slowed already with our spell. Also verify it's an NPC.
/assist ${MainTank}
/delay 1s
/if (${Target.Type.Equal[NPC]}) {
| Verified this IS an NPC.
| Check HP's... and if we've slowed already or not.
/if (${Target.PctHPs} <= ${DoSLOWPercent} && !${Target.BuffDuration[${Spell_SLOW}]} && !${Me.Casting.ID} && ${Target.Distance} < 100 && ${Me.SpellReady[${Spell_SLOW}]}) {
| HP's match and the mob isn't slow and I'm not casting... AND it's within range. lets slow this mob.
/echo Slowing ${Target.CleanName} with ${Spell_SLOW}!
/casting ${Spell_SLOW}
/delay 1.5s
/target pc ${MainTank}
/delay 1s
}
}
/target ${MainTank}
/delay 1s
}
|################################################
| Check if we need to rebuff LANGUOR:
/if (${Target.BuffDuration[${Spell_LANGUOR}]} < 15 && ${Target.Distance}<100) {
| Am I currently casting a spell? And is the spell ready?
/if (!${Me.Casting.ID} && ${Me.SpellReady[${Spell_LANGUOR}]}) {
| Good to go! Cast!
| /casting uses plugin mq2cast.
/echo Casting ${Spell_LANGUOR} on ${Target.CleanName}!
/casting ${Spell_LANGUOR}
/delay 2s
}
}
|################################################
| Check if we need to rebuff CHAMPION:
/if (${Target.BuffDuration[${Spell_CHAMPION}]} < 15 && ${Target.Distance}<100) {
| Am I currently casting a spell? And is the spell ready?
/if (!${Me.Casting.ID} && ${Me.SpellReady[${Spell_CHAMPION}]}) {
| Good to go! Cast!
| /casting uses plugin mq2cast.
/echo Casting ${Spell_CHAMPION} on ${Target.CleanName}!
/casting ${Spell_CHAMPION}
/delay 2s
}
}
|################################################
| Check if we need to rebuff COUGAR:
/if (!${Target.BuffDuration[${Spell_COUGAR}]} && ${Target.Distance} < 50) {
| Am I currently casting a spell? And is the spell ready?
/if (!${Me.Casting.ID} && ${Me.SpellReady[${Spell_COUGAR}]}) {
| Before we cast, lets make it so it only casts if MT has a mob targeted and the mob is closeby..
/assist ${MainTank}
/delay 1s
/if (${Target.Distance} < 100 && ${Target.CleanName.NotEqual[${MainTank}]}) {
| Good to go! Cast!
/target ${MainTank}
/delay 1s
/echo Casting ${Spell_COUGAR} on ${Target.CleanName}!
/casting ${Spell_COUGAR}
/delay 4s
}
}
}
|################################################
| Check if we need to CLICK EPIC:
/if (${FindItem[${ITEM_Epic}].Timer} == 0) {
| Epic clicky is ready... do we need to click it?
/assist ${MainTank}
/delay 8
/if (${Target.Distance} < 100 && ${Target.Type.Equal[NPC]}) {
| Yep. Lets click it!
/casting ${ITEM_Epic}
/delay 1s
}
}
|################################################
| Check if we need to rebuff HASTE:
/if (!${Target.BuffDuration[${Spell_HASTE}]} && ${Target.Distance}<100) {
| Am I currently casting a spell? And is the spell ready?
/if (!${Me.Casting.ID} && ${Me.SpellReady[${Spell_HASTE}]}) {
| Good to go! Cast!
| /casting uses plugin mq2cast.
/echo Casting ${Spell_HASTE} on ${Target.CleanName}!
/casting ${Spell_HASTE}
/delay 4s
}
}
|################################################
| Check if we need to rebuff GROWTH:
/if (${Target.BuffDuration[${Spell_GROWTH}]} <= 15 && ${Target.Distance}<100) {
| Am I currently casting a spell? And is the spell ready?
/if (!${Me.Casting.ID} && ${Me.SpellReady[${Spell_GROWTH}]}) {
| Good to go! Cast!
| /casting uses plugin mq2cast.
/echo Casting ${Spell_GROWTH} on ${Target.CleanName}!
/casting ${Spell_GROWTH}
/delay 2s
}
}
|################################################
| Check if we need to cannibilize:
/if (${Me.PctMana} <= ${MinMana} && ${Me.SpellReady[${Spell_CANNI}]}) {
| Less than or equal to minimum percent of mana... lets canni.
/echo Casting ${Spell_CANNI}!
/casting ${Spell_CANNI}
/delay 1s
/if (${Me.AltAbilityReady[Cannibalization]} && ${Me.CurrentMana}<(${Me.MaxMana}-1200) && ${Me.MaxHPs}>2424) /casting "Cannibalization" alt
}
/delay 1s
/goto :start
/return
|################################################
Sub Event_SetTank(line, sender, new_tank, secretphrase)
/if (${secretphrase.Equal[${SecretPhrase}]}) {
/echo ${sender} sent secret phrase, setting ${new_tank} as tank!
/varset MainTank ${new_tank}
/target ${MainTank}
/delay 1s
}
/return
|################################################
Sub GMCheck
/if (${Spawn[gm].ID}) {
/beep
/beep
/beep
/echo GM has entered the zone!
/echo FUCK HIM but ending the macro...
/keypress forward
/keypress back
/quit
/endmacro
}
/return
Last edited: