Welcome, Guest. Please login or register.
Did you miss your activation email?
March 28, 2024, 04:32:38 am *

Login with username, password and session length
Pages: [1]
Print
Author Topic: Bog's Buff macro Version 5.0 ( buffv5.mac )  (Read 5332 times)
Bogreaper
Jr. Member
**
Posts: 62



View Profile WWW
« on: July 31, 2017, 09:43:24 pm »

Here is a buff macro that I wrote with the help of Ergg and Grogan.

I hope it is beneficial to you, and you enjoy the use.

If you find any problems with  it please reply here.  Additionally, if you enjoy and/or have suggestions please reply here also.
I really appreciate all feed back, and love suggestions, so please feel free to let me know your thoughts.

(Note:  English is not my first language, so if my write up is a little confusing and thoughts are disconnected, I apologize in advance, it's a little difficult for me to translate my Southern drawl (dialect) in to readable English)

What it does.

In Brief:  runs down the characters spell list looking for buffs to cast on characters.
It checks for self buffs, single and group buffs.  It checks to see if the target already has the buff on them and it still has over half the DEFAULT duration left on it and if cast now it will last longer then 5 minutes.

If you have a Shield of Ages, it clicks it.

If you have a Pet it will target and hail your pet, then tell it to Arm it self.
If you have a Pet and a Harness of soul Gem in your secondary it will click it
If you have a pet and two bandolier settings, Melee and Pet, it will swap them out and put the pet one up and try to use the secondary item, then switch back to Melee

If you have a spell list saved by the name of Zbuffs it will load that spell list before casting any buffs then it will attempt to load Zattack once it is finished buffing *changable in the files, instructions both in the macro and below in this post.

Will check to see if the character running the macro is in a Raid, if so it will cast on everyone in the raid.  If not in a raid it will check to see if the character running the macro is in a group, if so it will cast  on everyone in the group.  If not in a Raid or Group it will cast all of the buffs on itself.
It will verify before going down the spell list that the current target (raid, group, pet, or specified character) is withing 100 of it.

You can pass 2 variables to it.  1: a target's name, and / or, a recast duration.
The recast duration is there to try and speed up the buffing process.  Take Rune of Denial III for example, it has a recast time of 30 seconds.  If you cast that on a raid of 18 characters it going to take a Minimum of 9 minutes to cast all the buffs.  I personally cast RoDIII on the tanks right before I pull, so I do not want to cast it when Re-buffing, but I do want to cast it at Initial buffing.


Example.

When I first log in and form up my Raid, or I just wiped and getting back in order I will do a.

/bcaa //macro buffv5 30

This will tell all characters (yes even the warriors, we will get to that in a minute) to buff everyone with anything that takes 30 seconds or less to recast.

But if everything has been going well and an hour has passed by and I just want to refresh all the buffs that have faded, or about to fade I will do a

/bcaa //macro buffv5

This will have everyone cast any buff that has a recast time of 5 seconds or less, skipping over say RoDIII.

Or say, Warizzle wants me to buff him because he does not have an Enchanter or Druid, I will do a

/bcaa //macro buffv5 warizzle 30

and it will have all my characters cast all spells with a recast of 30 seconds or less on warizzle directly.

Or say, Warizzle is playing with me, but he is not in my raid for what ever reason, and he does not need / want RoDIII I would just

/bcaa //macro buffv5 warizzle


-----------------------------------
Settings you can change easily
-----------------------------------
There is no real reason for most people to edit the file at all, but I have made it so that you can, and I have attempted to make it as easy as possible to just change the few things that most people would find that they needed a little bit different then my defaults.

These are documented inside the macro file near the top.

Change spell list.  This is a 1 for yes or 0 for no.
Having it set to 1 and not having the spell list to load does not effect the macro that much, it will just attempt to load the new one and not find it and continue one.

bufflist Zbuffs
attacklist Zattack

the Zbuffs and Zattack are your 2 spell lists.  You can change them to what ever you wish, It loads the bufflist before attempting to do any buffing at all.
It loads attacklist at the very end of the macro.

minbuffduration 5

This is the default minimum duration of buffs to cast in minutes.  If a beneficial spell has a duration of 5 minutes or more it will attempt to cast.  Please be aware that if you change this to a low number some very short duration buffs will be cast.

----------------------------------------------------------------
Detail workings
----------------------------------------------------------------

When the macro is ran, it is first going to check and see if you told it to cast a single character, if you changed the default recast time, or both.

If you have a pet it then hails the pet and tells it to arm itself.
If changespelllist is still 1, then it loads your buff list
If you have a Shield of the Ages on your back, it clicks it.
It goes down the spell list and casts all self only buffs.
Checks if you specified to buff a single character, if so do it and skip the next three lines.
If you did not specify a specific character and in a raid, go down the raid list starting with the 1st member. Skipping the next 2 lines.
If you did not specify a specific character and not in a raid and in a group, go down the group list starting with the 1st member. Skipping the next line.
If you did not specify a specific character and not in a raid and not in a group, buff myself.

Once it knows whom to buff, it does the following checks.
Is the target within 100 of me?
if so, then it does the following checks for each spell in the spell list starting with spell 1.
Is it a beneficial spell?
Is it a single target or group spell?
Is the recast time less then the recast time specified?
Is this buff already on the target? and if it is does it have less then half of the default spell duration (before any extend is put on it)

If all of those are meet, then it waits for the spell to ready for casting, once ready it casts the spell.
It then moves on to the next spell on the list.

Once all of the spells on that characters spell list have been checked/cast, it then moves on to the next character in the group or raid, or stops if you specified a character or if not in a raid or group.

Once all the characters have been cast on, it then checks if you have want to change spell lists, if so it loads the spell list.

It then checks your inventory for Harnessed soul gem, if it finds one in your bags, it attempts to activate the Pet bandolier, then use the secondary item (off hand) then activate the Melee bandolier.  If you already have this item in your off hand and do not have the pet and melee bandoliers it will just use the item.

If the macro took longer then 60 seconds to run, it will report back in either /rsay, /gsay or /say which ever is the case, and state how long it took to run.

macro ends.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


As I said, I hope this is helpful for ya.

If you try it out, if you use it or not, please post back here and share your thoughts, good, bad or ugly.  I would enjoy hearing them.
All suggestions will be explored, not saying I will make the changes, just explore them.  Cool

Peace.

If you do not see the paperclip and download link below, please log in, I have been informed that if you are not logged in you do not see the attachment.

Download link Just below
« Last Edit: July 31, 2017, 09:56:10 pm by Bogreaper » Logged

Loyal
Sr. Member
****
Posts: 397



View Profile
« Reply #1 on: August 02, 2017, 03:01:29 pm »

As my current Buff macro has recently run into issues and i was dreading troubleshooting it....i look forward to setting yours up and using it Smiley

Thanks!
Logged

Natedog
Master
******
Posts: 830


View Profile
« Reply #2 on: August 02, 2017, 09:59:40 pm »

Why not write a permanent macro that is run by all toons and when needed you can trigger buffs with commands / auto buff.  Grin
Logged

Bogreaper
Jr. Member
**
Posts: 62



View Profile WWW
« Reply #3 on: August 03, 2017, 12:40:30 am »

Running a macro all the time so that it looks for commands to buff:  I usally have my characters standing around doing nothing and not running any macro at all.  Each and everything that I have them do is a separate macro in itself.

I am not sure why, I just don't like the idea of a constant run macro.

BUT.. the newest build of mq2 has advanced event handling, and I am currently looking into how to best use it in downshits.

This would allow it to watch for a xxx fades or a tell to buff without it actually running a macro in and of itself, just check for a tell each second when it checks downshits.

I mean it is do able, and I am sure it would work great for some people, just not for me.

Peace
Logged

Natedog
Master
******
Posts: 830


View Profile
« Reply #4 on: August 03, 2017, 07:14:52 pm »

I like to run out full time and incorporate special commands through the BC channel and other chat channels for people I play with.


With this setup when I  /bc natebot assist

Every character that is running that macro and is in the current zone of the commander (character that sent the command).. will assist him.

This is only a few of the commands written into it.. there are a shit ton of them.

One of the commands will have all characters sell off everything in their inventory to the currently targeted vendor.. based on an INI file of looted/sellable shit.



example...
Code:
#event BcRequest "<#2#> natebot #1#"
#event TellMSG "#2# tells you, 'natebot #1#'"
#event BctRequest "[#2#(msg)] natebot #1#"

Sub Event_TellMSG(string message, string request, string commander)
/call CommandRequest "${commander.Right[-2].Left[-1]}" "${request}"
/return

Sub Event_BcRequest(string message, string request, string commander)
/call CommandRequest "${commander}" "${request}"
/return

Sub Event_BctRequest(string message, string request, string commander)
/call CommandRequest "${commander}" "${request}"
/return


Sub CommandRequest(string commander, string request)
/declare arg1 string
/declare arg2 string
/declare arg3 string
/declare arg4 string
/declare arg5 string

/varset arg1 ${request.Arg[1," "].Lower}

/echo Request is ${arg1}
/if (${arg1.Equal[assist]}) {
|Only assist if they are in the zone
/varset arg2 ${request.Arg[2," "].Lower}
/if (${Spawn[PC ${commander}].ID}) {
/varset stickid 0
/varset startcombat ${arg2}
/echo New Target: ${Spawn[id ${arg2}].Name} requested from ${commander}
/if (${startcombat}) {
/varset autocombat 1
} else {
/varset autocombat 0
}
}
} else /if (${arg1.Equal[space]}) {
/if (${commander.Equal[${Me.Name}]}) {
/popup I have ${Me.FreeInventory} inventory slots left!
} else {
/tell ${commander} I have ${Me.FreeInventory} inventory slots left!
}
} else /if (${arg1.Equal[followme]}) {
/varset arg2 ${request.Arg[2," "].Lower}
/if (${Spawn[PC ${commander}].ID} && ${commander.NotEqual[${Me.Name}]}) {
/varset startcombat 0
/varset autocombat 0
/if (${arg2.Equal[on]}) {
/attack off
/varset stickid ${Spawn[PC ${commander}].ID}
/target id ${Spawn[PC ${commander}].ID}
/delay 3
/stick ${stickfollow}
} else {
/varset stickid 0
/stick off
}
}
} else /if (${arg1.Equal[vendor]}) {
/varset arg2 ${request.Arg[2," "].Lower}
/if (${Spawn[PC ${commander}].ID}) {
/varset startcombat 0
/call SellToVendor ${arg2}
}
}
/return

Logged

Bogreaper
Jr. Member
**
Posts: 62



View Profile WWW
« Reply #5 on: August 03, 2017, 09:07:17 pm »

Very nice.

You seem to know your way around the coding of the macros, you will notice mine is very short and sweet, just a few checks then 1 little for/next loop.

Feel free to take the section with the checks and casts, its the sub routine at the bottom, that does the actual work and add it to your macro.

Peace
Logged

Bogreaper
Jr. Member
**
Posts: 62



View Profile WWW
« Reply #6 on: August 29, 2017, 09:35:11 am »

Updated to version 5.1

|   Modified August 29th 2017 by BogReaper to
|      Added a delay between each spell check, on some systems it was going so fast that it would not see the spell already on the target.
|      Switched from using ${Spell
  • .Duration} to using ${Spell
  • .DurationValue1} on the Emu server I play on, the Duration was returning massive numbers compared to what the actual duration was
|         So it would cast some very short duration spells (HoTs) as a buff.

Enjoy
Logged

Bogreaper
Jr. Member
**
Posts: 62



View Profile WWW
« Reply #7 on: October 18, 2017, 06:05:19 am »

For those of you that live on the bleeding edge and have installed the newest Test/emu release of mq2, you will notice somethings not working in the old buffv5.1 macro.

Well never fear! Bog is on the job.. Announcing Buffv6!

When using this, please ensure that it reports v 6 in the mq2 window.

Comments , suggestions, feedback is always welcome.

Peace
Logged

Pages: [1]
Print
Jump to:  

Recent

Stats

Members
Stats
  • Total Posts: 64969
  • Total Topics: 5050
  • Online Today: 74
  • Online Ever: 8678
  • (December 19, 2022, 02:32:09 pm)
Users Online
Users: 0
Guests: 47
Total: 47
TinyPortal v1.0 beta 4 © Bloc