Public Macros Universal Buff Bot Macro
Reply
Universal Buff Bot Macro
this was a Sub routine i wrote for a large macro i'm working on i realized it would make a decent macro all by it's self with just a little extra work so i went ahead and did it real quick it can be used by any class character as long as the requester can spell the buff names correctly and they say please they will get the buff if the character can cast it.
it also takes into account if you have the rank 2 or 3 versions of a spell and casts them if you have them hope someone finds it usefull

Macro
More +

|MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM|
|MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM|
|MM                                                                 MM|
|MM                     MICAHSBUFFBOT.MAC                           MM|
|MM                                                                 MM|
|MM                 This Marco Was Made By Micah                    MM|
|MM                                                                 MM|
|MM                                                                 MM|
|MM     just Change the number in line 30 to the number             MM|
|MM     of the spell gem you want your bot to use to cast buffs     MM|
|MM     and send a tell to the bot for instructions     on how to   MM|
|MM     request a buff from Him/Her. This Macro will work with      MM|
|MM     any Character no matter the Class you and your friends      MM|
|MM     just have to know how to spell the buff names correctly     MM|
|MM                                                                 MM|
|MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM|
|MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM|

#event OOR                                                                      "Your target is out of range, get closer!"
#event OOR                                                                      "You must first select a target for this spell!"
#Event Buff                                                                     "#1#tells you, '#2# Please#*#"
#Event Tell                                                                     "#*#tells you#*#
#Event OOM                                                      "Insufficient Mana to cast this spell!"
#Event ToLow                                                            "Your spell is too powerful for your intended target."

|MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM

Sub Main
                /plugin mq2cast load
                /declare GemNumber int outer                    5
                /declare M int outer
                /tgb on
                /call Loop
               
|MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
               
Sub Event_Buff 
                /declare RankIII string local           ${Param2} RK.III
                /declare RankIIIb string local          ${Param2} RK. III
                /declare RankII string local            ${Param2} RK.II
                /declare RankIIb string local           ${Param2} RK. II
               
                /keypress esc
                /if (${Me.Book[${RankIII}]}) {
                        /memorize  "${RankIII}" ${GemNumber}
                        /goto :RKCheckDone
                }
                /if (${Me.Book[${RankIIIb}]}) {
                        /memorize  "${RankIIIb}" ${GemNumber}
                        /goto :RKCheckDone
                }
                /if (${Me.Book[${RankII}]}) {
                        /memorize  "${RankII}" ${GemNumber}
                        /goto :RKCheckDone
                }
                /if (${Me.Book[${RankIIb}]}) {
                        /memorize  "${RankIIb}" ${GemNumber}
                        /goto :RKCheckDone
                }
                /if (${Me.Book[${Param2}]}) {
                        /memorize  "${Param2}" ${GemNumber}
                        /goto :RKCheckDone
                }
                /reply sorry i do not have that buff yet or you did not spell it rite or it is not a ${Me.Class.Name} buff your requesting
                /return
        }
        :RKCheckDone
                        /delay 1s
                        /call WaitForSpell
                        /delay 1s
                        /rtarget
                        /delay 1s
                        /for M 1 to 120
                                /doevents
                                /if (${Me.Casting.ID}) /goto :CastingNow
                                /cast ${GemNumber}
                                /doevents
                                /delay 2s
                                /next M
                :CastingNow
                        /reply casting ${Param2} on you now
                        /for M 1 to 120
                                /if (!${Me.Casting.ID}) /Return
                                /delay 2s
                                /next M
                        /return
                }
               
|MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
               
Sub Event_OOM
                /reply im out of mana rite now i will send a tell when i have mana and you can try again, if no one els sends me a tell between now and then :-)
                /for M 1 to 300
                /if (${Me.State.Equal[STAND]}) /sit
                /if (${Me.PctMana}==100) {
                        /reply im full mana now ready to buff again :-)
                        /call Loop
                }
                /delay 1s
                /next M
                /call Loop
}

|MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
               
Sub Event_OOR
                /reply You are out of range get CLOSER and try again :-)
                /call Loop
}

|MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM

Sub Event_Tell
                /reply I am a ${Me.Class.Name} Buff Bot just send a tell with the buff name you want followed by the word please example ->->-> <Buff Name> please
                /return
}

|MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM

Sub Loop
        :Loop
                /doevents
                /delay 5
                /if (${Me.State.Equal[STAND]}) /sit
                /goto :Loop
}              

|MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM          
               
Sub WaitForSpell       

                /for M 1 to 120
                        /if (${Me.Gem[${GemNumber}].ID}) /return
                        /delay 5
                        /next M
                /return
}

|MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
               
Sub Event_ToLow
                /reply sorry you are to low level for that spell please chose a lower lvl spell and try again :-)
                /call Loop
}
               
Mon Jan 29, 2018 4:21 am
Awesome. Thanks for sharing.
Tue Jan 30, 2018 9:34 am
Project Lead
Public Macros Universal Buff Bot Macro
Reply