Another timer question for my mage macro heh
Posted: Mon Jun 28, 2004 3:00 pm
I read the timer questions in this thread to try and make sense of it, but I'm just not getting it to apply to my macro well. Right now my macro works perfect for what i want if I comment out the Sub ManaCheck...
and the Sub Event_Timer...
but I can't figure out how to complete these two bits of code or combine them to one if that would be better. Here is my full macro for it to make more sense...
Basically what I'm shooting for is if I drop below 88%, (or whatever I decide), to use the mod rod then start a 5 minute timer so I dont get spammed with rod can not be used at this time or whatever lame message you get if the 5 minute reuse timer is not up yet. Make sense? I know I'm prolly making this confusing hehe. Some of this I came up with on my own and some I grabbed from here and there on the boards here. I have never used a timer ever in my easier macros so I can't seem to figure this out heh.
Any help filling in the blanks would be much much appreciated!!
When I get the timer part worked out I'm gonna add in another variable that will recast a new rod when the first one is gone, but for now I'd like to get this part working heh. Thanks for any hlep again!
(disclaimer)
This is NOT and afk macro and should NOT be used as such. I have it cause I like to chat with my buddies in our channel and I slack badly when I'm not paying full attention to the game. I'm always right infront of my screen when using this just incase things go crazy in my group. That is why there is no gate and end macro type subs in this.
Code: Select all
Sub ManaCheck
/if (${Me.PctMana}<=88) {
/call cast "Rod of Mystical Transvergance" item
}
/returnCode: Select all
Sub Event_Timer
/if (${tmrName.Equal["Rodtimer"]}) { Code: Select all
#Event exp "#*#experience!!#*#"
#Event rageon "#*#has become ENRAGED#*#"
#Event rageoff "#*#is no longer enraged#*#"
#Event burn "#*#burnout V spell has worn off#*#"
#Event nuke1 "#*#Nuke 1#*#"
#Event nuke2 "#*#Nuke 2#*#"
#Event nuke3 "#*#Nuke 3#*#"
#include spellcast.inc
Sub Main
/declare assist outer
/echo Assisting ${Param0}
/declare sentpet outer
/varset sentpet 0
/declare MaloCast outer
/varset MaloCast 0
/declare BoltCast outer
/varset BoltCast 0
/declare BoltCastB outer
/varset BoltCastB 0
/declare BoltCastC outer
/varset BoltCastC 0
/declare BoltCastD outer
/varset BoltCastD 0
/declare BurnOut outer
/varset BurnOut 0
/declare NukeAmount outer
/varset NukeAmount 4
/declare RodTimer timer outer 0
/varset RodTimer 5m
:MainLoop
/assist ${Param0}
/call BuffCheck
/if (${String[${BurnOut}].Equal[0]}) {
/echo Casting Burnout V
/if (${String[${Me.State}].Equal[SIT]}) {
/stand
/delay 1s
}
/delay 3s
/call cast "Burnout V"
/delay 5
/doevents
/varset BurnOut 1
}
/call ManaCheck
/if (${Target.ID} && ${Target.PctHPs}<=97) {
/if (${String[${Target.Type}].Equal[NPC]}) {
/if (${sentpet}==0) {
/pet attack
/varset sentpet 1
/echo Pet Sent
}
/if (${MaloCast}==0) {
/call Malo
}
}
}
/if (${Target.PctHPs}<=97 && ${Target.PctHPs}>=90 && ${String[${Target.Type}].Equal[NPC]}) {
/if (${BoltCast}==0) {
/if (${String[${Me.State}].Equal[SIT]}) {
/stand
/delay 1s
}
/echo this is cast 1
/call cast "Sun Vortex"
/varset BoltCast 1
/doevents
}
}
/if (${Target.PctHPs}<=70 && ${Target.PctHPs}>=60 && ${String[${NukeAmount}].Equal[4]}) {
/if (${BoltCastB}==0) {
/if (${String[${Me.State}].Equal[SIT]}) {
/stand
/delay 1s
}
/echo this is cast 2
/call cast "Sun Vortex"
/varset BoltCastB 1
/doevents
}
}
/if (${Target.PctHPs}<=40 && ${Target.PctHPs}>=30 && ${String[${NukeAmount}].Equal[4]}) {
/if (${BoltCastC}==0) {
/if (${String[${Me.State}].Equal[SIT]}) {
/stand
/delay 1s
}
/echo this is cast 3
/call cast "Sun Vortex"
/varset BoltCastC 1
/doevents
}
}
/if (${Target.PctHPs}<=13 && ${Target.PctHPs}>=5 && ${String[${NukeAmount}].Equal[4]}) {
/if (${BoltCastD}==0) {
/if (${String[${Me.State}].Equal[SIT]}) {
/stand
/delay 1s
}
/echo this is cast 4
/call cast "Sun Vortex"
/varset BoltCastD 1
/doevents
}
}
}
/doevents
/goto :MainLoop
/return
Sub Event_exp
/varset sentpet 0
/varset MaloCast 0
/varset BoltCast 0
/varset BoltCastB 0
/varset BoltCastC 0
/varset BoltCastD 0
/echo Mob is dead!!! Resetting Variables!!
/pet hold
/return
Sub Malo
/call cast "Veil of Lost Hopes" item
/if (${Macro.Return.Equal["CAST_SUCCESS"]}) {
/echo ${Target.Name} maloed.
/varset MaloCast 1
/return
} else /if (${Macro.Return.Equal["CAST_RESISTED"]}) {
/delay 1
/echo trying again with malosinia
/call Malo
} else
/echo check malo logic
}
/return
Sub ManaCheck
/if (${Me.PctMana}<=88) {
/call cast "Rod of Mystical Transvergance" item
}
/return
Sub Event_Timer
/if (${tmrName.Equal["Rodtimer"]}) {
Sub Event_rageon
/echo %t is enraged. Backing pet off.
/pet back off
/delay 2
/pet hold
/return
Sub Event_rageoff
/doevents flush
/echo %t is no longer enraged. Sending pet.
/pet attack
/return
Sub BuffCheck
/if (!${Me.Buff[Elemental Siphon Recourse].ID}) {
/echo Casting Elemental Siphon
/call cast "Elemental Siphon"
/delay 5
/doevents
}
/if (!${Me.Buff[Khura's Focusing].ID} && !${Me.Buff[Focus of Soul].ID} && !${Me.Buff[Focus of the Seventh].ID} && !${Me.Buff[Talisman of Kragg].ID} && !${Me.Buff[Shield of Maelin].ID}) {
/echo Casting Shield of Maelin
/call cast "Shield of Maelin"
}
/doevents
/if (!${Me.Buff[Xegony's Phantasmal Guard].ID} && !${Me.Buff[Blessing of the Nine].ID} && !${Me.Buff[Protection of the Nine].ID}) {
/echo Casting Xegony's Phantasmal Guard
/call cast "Xegony's Phantasmal Guard"
/delay 5
/doevents
}
/if (!${Me.Buff[Maelstrom of Ro].ID}) {
/call cast "Maelstrom of Ro"
}
/return
Sub Event_burn
/target ${Me.Pet.CleanName}
/delay 2s
/call cast "burnout V"
/return
Sub Event_nuke1
/varset NukeAmount 1
/echo Nuking Once Per Fight
/return
Sub Event_Nuke2
/varset NukeAmount 2
/echo Nuking Twice Per Fight
/return
Sub Event_Nuke3
/varset NukeAmount 3
/echo Nuking Three times Per Fight
/return
Any help filling in the blanks would be much much appreciated!!
When I get the timer part worked out I'm gonna add in another variable that will recast a new rod when the first one is gone, but for now I'd like to get this part working heh. Thanks for any hlep again!
(disclaimer)
This is NOT and afk macro and should NOT be used as such. I have it cause I like to chat with my buddies in our channel and I slack badly when I'm not paying full attention to the game. I'm always right infront of my screen when using this just incase things go crazy in my group. That is why there is no gate and end macro type subs in this.