Quick Buff Status Check

A forum for macro code snippets to be used in writing other macros. Post routines or .inc files here only, completed macros go to the Macro Depot. MQ2Data format only!

Moderator: MacroQuest Developers

Harden
a hill giant
a hill giant
Posts: 244
Joined: Thu Aug 25, 2005 8:23 pm

Quick Buff Status Check

Post by Harden » Tue Mar 14, 2006 1:41 am

This provides a fast way to check buffs before engaging a target, so you can ensure then wont wear off at the wrong time.

It will echo any buff with less then 10 minutes remaining, also giving how many ticks are left.

Code: Select all

#Event BuffCheck		"[MQ2] buffcheck"
Sub Event_BuffCheck
	/declare i int local 0 
		/for i 0 to 25 
		/if (${Me.Buff[${i}].ID} && ${Me.Buff[${i}].Duration} < 100) { 
		/echo Less then ${Me.Buff[${i}].Duration} Ticks left on > ${Me.Buff[${i}].Name} < 
		} 
	/next i
	/echo *Done Checking Buff Durations
/return
-Harden
I wanna be a Macro Writer when I grow up!

portilicious
decaying skeleton
decaying skeleton
Posts: 8
Joined: Tue Mar 02, 2004 5:53 pm

Quick Buff Status Check

Post by portilicious » Tue Aug 01, 2006 12:56 pm

Thanks for the snippet. I think you might have a one off error and the maximum number of buffs may be off. More like...

Code: Select all

	/declare i int local 1
	/for i 1 to 21

Drumstix42
a grimling bloodguard
a grimling bloodguard
Posts: 808
Joined: Mon May 03, 2004 4:25 pm

Post by Drumstix42 » Tue Aug 01, 2006 7:25 pm

It's better to use fractions rather than an exact tick ammount as there are many short buff durations.

Harden
a hill giant
a hill giant
Posts: 244
Joined: Thu Aug 25, 2005 8:23 pm

Post by Harden » Tue Aug 01, 2006 11:22 pm

Most of those go to the short duration buff window don't they?

I designed this to check your buff let say for Example: Your about to Engage Warden Hanvar, which can take some time to finish the event, click your hot key,a nd you know what buffs are fading soon.


As for 1 to 21 vs 1 to 25, it dosent change the way the event functions, so never really thought about it much.
-Harden
I wanna be a Macro Writer when I grow up!