Adding a submacro that casts buffs every 15 min

TheTempest

New member
Joined
Jul 9, 2009
Messages
56
Reaction score
0
Points
0
Age
38
Sorry for duplicate post, but the one made by another guy isn't getting answered and is a little different than what I want.

Currently I am using a macro to heal a tank if he gets below a certain percentage. It works great, but I also want to cast 2 buffs every 10 or 15 minutes, and since you can only have one macro up at once, I can't figure out how to add the code to case those 2 buffs to my macro.

Here is the macro I'm currently using:


#turbo
#include spell_routines.inc

Sub Main

:mainloop


:loop
/if (${Target.ID} && ${Target.PctHPs}<67 && ${Me.SpellReady[Dragonscale Aquifer Rk. II]}) /call cast "Dragonscale Aquifer Rk. II" gem3
/if (${Me.Standing} && !${Me.Casting.ID}) /call SitSub
/if (${Me.PctMana}<10) /call Med
/goto :loop
/return

Sub SitSub
/delay 1s
/if (${Me.Casting.ID}) /delay 5s !${Me.Casting.ID}
/sit
/return

Sub Med

/if (${Me.Standing} ) /sit
/delay 2m ${Me.PctMana}>90


/return
 
Code:
/declare BuffTimer int outer 


Sub Main
:Main
YourMacro that you use all the time here
/if (!${BuffTimer}) /call Rebuff

/goto :Main

/end

Sub ReBuff
/varset BuffTimer 600

YourBuffCastingStuff
/return
 
I almost got it working, but it keeps spamming the second buff. In my MQ window it says:

Can anyone please fix it based on the error? Really appreciate the help this is a big deal for me and it helps a lot. Thank you.

/varset failed, variable Bufftimer, not found
heals2 (my macro name).mac@21 (Rebuff): /varset Bufftimer 600s
heals2.mac@16 (Main): if (!${Bufftimer}) /call Rebuff.

Here's what I have:



#turbo
#include spell_routines.inc

Sub Main

:mainloop


:loop
/if (${Target.ID} && ${Target.PctHPs}<67 && ${Me.SpellReady[Dragonscale Aquifer Rk. II]}) /call cast "Dragonscale Aquifer Rk. II" gem3
/if (${Me.Standing} && !${Me.Casting.ID}) /call SitSub
/if (${Me.PctMana}<10) /call Med
/if (!${BuffTimer}) /call Rebuff
/goto :loop
/return

Sub ReBuff
/varset Bufftimer 600s
/casting "Shield of Spurs Rk. II"
/delay 6s
/casting "Cloak of Scales"
/delay 1s
/return

Sub SitSub
/delay 1s
/if (${Me.Casting.ID}) /delay 5s !${Me.Casting.ID}
/sit
/return

Sub Med

/if (${Me.Standing} ) /sit
/delay 2m ${Me.PctMana}>90



/return
 
Please Fix this Small Code Error

Sorry for repost again, just trying to get this tonight and old thread has wrong title for new problem. Below is the code I'm using to heal/buff. I'm stuck casting the second buff over and over because of the following error. Please fix my code.

Thank you very much!


Code:
/varset failed, variable Bufftimer, not found
heals2 (my macro name).mac@21 (Rebuff): /varset Bufftimer 600s
heals2.mac@16 (Main): if (!${Bufftimer}) /call Rebuff.

Here's what I have:



Code:
#turbo
#include spell_routines.inc

Sub Main

:mainloop


:loop
/if (${Target.ID} && ${Target.PctHPs}<67 && ${Me.SpellReady[Dragonscale Aquifer Rk. II]}) /call cast "Dragonscale Aquifer Rk. II" gem3
/if (${Me.Standing} && !${Me.Casting.ID}) /call SitSub
/if (${Me.PctMana}<10) /call Med
/if (!${BuffTimer}) /call Rebuff
/goto :loop
/return

Sub ReBuff
/varset Bufftimer 600s
/casting "Shield of Spurs Rk. II"
/delay 6s
/casting "Cloak of Scales"
/delay 1s
/return

Sub SitSub
/delay 1s
/if (${Me.Casting.ID}) /delay 5s !${Me.Casting.ID}
/sit
/return

Sub Med

/if (${Me.Standing} ) /sit
/delay 2m ${Me.PctMana}>90



/return
 
Why did you start a new thread for this instead of just posting the new work in the old thread. going back to old thread to give assistance.
 
/declare BuffTimer int outer


line is missing after the Sub Main
 
/declare BuffTimer int outer


line is missing after the Sub Main

Tried adding that but it didn't fix it. Sorry for the repost, but I thought you'd logged and nobody else is viewing this post because and wanted to get this working tonight for my afk tonight, want to get bonus exp while I'll be gone next 24 hours when I leave in an hour. In a totally isolated non-reportable spot, so just need this working, sorry for reposting.

Same exact error, same exact issue, casts first buff, then repeats second over and over and repeats that error.
/varset failed, variable Bufftimer, not found
heals2 (my macro name).mac@21 (Rebuff): /varset Bufftimer 600s
heals2.mac@16 (Main): if (!${Bufftimer}) /call Rebuff.

Here's the code again:


#turbo
#include spell_routines.inc

Sub Main

/declare BuffTimer int outer

:mainloop


:loop
/if (${Target.ID} && ${Target.PctHPs}<67 && ${Me.SpellReady[Dragonscale Aquifer Rk. II]}) /call cast "Dragonscale Aquifer Rk. II" gem3
/if (${Me.Standing} && !${Me.Casting.ID}) /call SitSub
/if (${Me.PctMana}<10) /call Med
/if (!${BuffTimer}) /call Rebuff
/goto :loop
/return

Sub ReBuff
/varset Bufftimer 600s
/casting "Shield of Spurs Rk. II"
/delay 6s
/casting "Cloak of Scales"
/delay 1s
/return

Sub SitSub
/delay 1s
/if (${Me.Casting.ID}) /delay 5s !${Me.Casting.ID}
/sit
/return

Sub Med

/if (${Me.Standing} ) /sit
/delay 2m ${Me.PctMana}>90



/return
 
Last edited:
Remove your toons name, and please always try to use [ code ] [ /code ] brackets

Code:
#turbo
#include spell_routines.inc

Sub Main
/declare BuffTimer timer outer
:loop

/if (${Target.ID} && ${Target.PctHPs}<67 && ${Me.SpellReady[Dragonscale Aquifer Rk. II]}) /call cast "Dragonscale Aquifer Rk. II" gem3
/if (${Me.Standing} && !${Me.Casting.ID}) /call SitSub
/if (${Me.PctMana}<10) /call Med
/if (!${BuffTimer}) /call Rebuff
/goto :loop
/return

Sub ReBuff
/varset Bufftimer 600s
/casting "Shield of Spurs Rk. II"
/delay 6s
/casting "Cloak of Scales"
/delay 1s
/return

Sub SitSub
/delay 1s
/if (${Me.Casting.ID}) /delay 5s !${Me.Casting.ID}
/sit
/return

Sub Med

/if (${Me.Standing} ) /sit
/delay 2m ${Me.PctMana}>90



/return
 
Thanks for the tip about the code, and for pointing out the toon's name (slipup!). I tried your new code, even changed the mac name and ended the old one to make sure it started up new. Same exact problem and same exact error still =-(.

Thank you for trying and thanks for whatever you come up with next, I really appreciate it.
 
Still no ideas why this macro has that error? Anyone have some clues? I'd love to try any suggestion and narrow it down to figure it out.
 
Still no ideas why this macro has that error? Anyone have some clues? I'd love to try any suggestion and narrow it down to figure it out.
Well, at the line it mentions, you have it lower case t, instead of upper like you do in the declare.

Code:
/varset Buff[COLOR="Red"]t[/COLOR]imer 600s

Make them all match, either BuffTimer, or Bufftimer, or bufftimer, etc. ;)

htw
 
Good catch htw didn't even look at his I just figured he copy pasted my lines.
 
Well, at the line it mentions, you have it lower case t, instead of upper like you do in the declare.

Code:
/varset Buff[COLOR="Red"]t[/COLOR]imer 600s

Make them all match, either BuffTimer, or Bufftimer, or bufftimer, etc. ;)

htw

And this is why you are htw, fixed! There were two that had a caps and one that didn't. So happy, thanks to both of you for helping me out!