Show number of buffs and buff slots

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

User avatar
gimp
a grimling bloodguard
a grimling bloodguard
Posts: 584
Joined: Fri Oct 29, 2004 9:28 am
Location: internet

Show number of buffs and buff slots

Post by gimp » Tue Mar 29, 2005 11:43 pm

Here's some code to do just that.
If someone with the DoN AA "Embrace of the Keepers" could test this to see if it works properly would be cool.

Code: Select all

Sub Main

   |shows how many buffs you currently have

   |15 buffs from start
   |+5 OOW AA buffs
   |+1 DON AA buffs

   /declare buffslots int local 0

   |Calculates the number of buff slots you have available
   /varset buffslots 15
   /varcalc buffslots ${buffslots}+(${Me.AltAbility[Mystical Attuning]}/5)
   /if (${Me.AltAbility[Embrace of the Keepers]}) /varcalc buffslots ${buffslots}+1

   /echo ${Me.CountBuffs}/${buffslots} buffs

/return
Last edited by gimp on Wed Mar 30, 2005 4:34 pm, edited 2 times in total.

A_Druid_00
Macro Maker Extraordinaire
Posts: 2378
Joined: Tue Jul 13, 2004 12:45 pm
Location: Rolling on the Lawn Farting

Post by A_Druid_00 » Wed Mar 30, 2005 8:18 am

Not to rain on your parade, but there was already an object in MQ that returned this. I think it was Me.FreeBuffSlots and BuffCount. I don't know if it's stil there, but I'd have to assume it is.
[quote]<DigitalMocking> man, A_Druid_00 really does love those long ass if statements
<dont_know_at_all> i don't use his macro because i'm frightened of it[/quote]
[quote][12:45] <dont_know_at_all> never use a macro when you can really fuck up things with a plugin[/quote]

User avatar
gimp
a grimling bloodguard
a grimling bloodguard
Posts: 584
Joined: Fri Oct 29, 2004 9:28 am
Location: internet

Post by gimp » Wed Mar 30, 2005 3:26 pm

Thanks, couldnt find a Me.BuffCount or similar, but FreeBuffSlots is there. Got rid of that ugly loop :-)

Updated first post with new code

User avatar
fearless
Not a Psychic
Posts: 2684
Joined: Wed Mar 10, 2004 3:52 pm

Post by fearless » Wed Mar 30, 2005 3:28 pm

I believe Embrace of the Keepers is only 1 spell slot, not the entire 5.
Reading . . . it's not just for me.

[url=http://www.catb.org/~esr/faqs/smart-questions.html]How To Ask Questions The Smart Way[/url]
[quote="Ccomp5950"]Fearless showed me the light, you too shall learn.[/quote]

A_Druid_00
Macro Maker Extraordinaire
Posts: 2378
Joined: Tue Jul 13, 2004 12:45 pm
Location: Rolling on the Lawn Farting

Post by A_Druid_00 » Wed Mar 30, 2005 3:38 pm

${Me.CountBuffs}

Found it in my RaidDruid code for CheckBuffs.
[quote]<DigitalMocking> man, A_Druid_00 really does love those long ass if statements
<dont_know_at_all> i don't use his macro because i'm frightened of it[/quote]
[quote][12:45] <dont_know_at_all> never use a macro when you can really fuck up things with a plugin[/quote]

User avatar
gimp
a grimling bloodguard
a grimling bloodguard
Posts: 584
Joined: Fri Oct 29, 2004 9:28 am
Location: internet

Post by gimp » Wed Mar 30, 2005 4:34 pm

lol, okay updated code again, should be accurate now, thx druid guy :)
and fearless you're correct someone who had the aa confirmed that it's just 1 slot aswell

echoism
a ghoul
a ghoul
Posts: 131
Joined: Tue Oct 19, 2004 9:59 am

Post by echoism » Thu Mar 31, 2005 9:45 am

I know that Me.FreeBuffSlots does account for the Omens AA skill, "Mystical Attuning". I don't know if it accounts for the additional buff slot granted from DoN progression or not.

A_Druid_00
Macro Maker Extraordinaire
Posts: 2378
Joined: Tue Jul 13, 2004 12:45 pm
Location: Rolling on the Lawn Farting

Post by A_Druid_00 » Thu Mar 31, 2005 9:49 am

echoism wrote:I know that Me.FreeBuffSlots does account for the Omens AA skill, "Mystical Attuning". I don't know if it accounts for the additional buff slot granted from DoN progression or not.
It sure used to. Now I don't know if it counts the DoN though.

It's easy enough to test if you have someone that can cast a ton of buffs on you available.
[quote]<DigitalMocking> man, A_Druid_00 really does love those long ass if statements
<dont_know_at_all> i don't use his macro because i'm frightened of it[/quote]
[quote][12:45] <dont_know_at_all> never use a macro when you can really fuck up things with a plugin[/quote]

User avatar
gimp
a grimling bloodguard
a grimling bloodguard
Posts: 584
Joined: Fri Oct 29, 2004 9:28 am
Location: internet

Post by gimp » Fri Apr 22, 2005 2:19 pm

okay the embrace of the keepers check is broken in the first post, this code is verified to work properly:

Code: Select all

Sub Main

	|shows how many buffs you currently have

	|15 buffs from start
	|+5 OOW AA buffs
	|+1 DON AA buffs

	/declare buffslots int local 0

	|Calculates the number of buff slots you have available
	/varset buffslots 15
	/varcalc buffslots ${buffslots}+(${Me.AltAbility[Mystical Attuning]}/5)
	/if (${AltAbility[Embrace of the Keepers].ID}) {
		/varcalc buffslots ${buffslots}+1
	}

	/echo ${Me.CountBuffs}/${buffslots} buffs

/return