Advbot.mac - Advanced Caster Bot - Heal/Debuff/Buff

Post your completed (working) macros here. Only for macros using MQ2Data syntax!

Moderator: MacroQuest Developers

ml2517
a grimling bloodguard
a grimling bloodguard
Posts: 1216
Joined: Wed Nov 12, 2003 1:12 am

Advbot.mac - Advanced Caster Bot - Heal/Debuff/Buff

Post by ml2517 » Wed Apr 28, 2004 2:27 am

Advanced Caster Bot is designed to allow you to specify thresholds for the spells you have defined. Once you have your logic correct for these spells the bot can make very good decision making and won't get "freaked out" if all hell breaks loose.

All files necessary are posted in this thread with the exception of advpath. The link to advpath in the snippets forum is listed down lower in this thread.

Code: Select all

Version Info   Version #        Last Updated
------------------------------------------------------
advbot.txt     1.26             5/16/2004 11:00am
advbot.mac     1.95             5/16/2004 11:00am
advbot.inc     1.35             5/16/2004 9:30pm
advbot2.inc    1.30             5/16/2004 11:00am

advpath.inc    1.29             5/11/2004 4:00am
advpath2.inc   1.27             5/08/2004 3:00pm

spellcast.inc  no ver           5/14/2004 9:30pm
Last edited by ml2517 on Sun May 16, 2004 10:29 pm, edited 21 times in total.

ml2517
a grimling bloodguard
a grimling bloodguard
Posts: 1216
Joined: Wed Nov 12, 2003 1:12 am

advbot.txt

Post by ml2517 » Wed Apr 28, 2004 2:28 am

advbot.txt

Code: Select all

| 
| advbot.txt 
| Advanced Caster Bot Documentation
| Version 1.26
| Date:5/16/2004 11:00am 
| 
| 
|         Exclude/Include routines taken from Raebis' advchant.mac 
|         and adapted to work in this script. No need to reinvent the wheel. 
| 
|   TIP:  The easiest way to exclude/include mobs is to set up a hotkey like this: 
|         For Excludes: 
|         /echo exclude ${Target.CleanName}
|        
|         For Includes: 
|         /echo include ${Target.CleanName} 
| 
|    Optional INI Name (No Spaces) --o 
|                                    | 
|                                 vvvvvvvv 
|     Syntax:  /macro advbot.mac [INI_Name] 
|
|     Example: /macro advbot.mac Plane_Of_Fear
|     Might Generate: AD_Johnny_Plane_Of_Fear.ini
| 
| 
| To set this script up modify the INI file that is generated. 
| 
| Commands Available via /echo and from a designated master: 
|
|     heal [pets]                                     (Toggles healing on/off, if you use the 'pets' optional parameter it toggles pet healing on/off.) 
|
|     events                                          (Toggles hp/mana events on/off) 
|   
|     debuff                                          (Toggles debuffing on/off) (** This was previously 'hold' it has been changed for clarity)
|
|     face                                            (Toggles facing before debuffs on/off) 
|
|     master <playername>                             (Toggles master rights for a player on/off) 
|
|     sit                                             (Toggles idle time sitting on/off) 
|
|     selfbuff [#|all|alias]                          (Toggles selfbuffs on/off, Buffs/Rebuffs self buff #, alias or if all parameter is used it rebuffs all self buffs.) 
|
|     groupbuff [#|all|alias] [player#|player name]   (Toggles groupbuffs on/off, Buffs/Rebuffs group buff #, alias or if all parameter is used it rebuffs all group buffs,
|                                                      Buffs player# or player name you specified with the buff if specified.)
|
|     buff <#|all|alias> <player name>                (Buffs <player name> with buff #, alias or all group buffs.  This is the command you use to buff people outside of your group.
|                                                      There is no timer on these buffs so they won't be refreshed when they wear off.  This is just a manual buff command.
|
|     exclude <mobname>                               (Excludes the mob name you specify.  Spaces *are* allowed. 
|
|     include <mobname>                               (Includes the mob name you specify.  Spaces *are* allowed. This essentially 
|                                                      removes the mob from your INI file and the alert list.) 
|
|     announce                                        (Toggles announcing on/off)
|
|     reply                                           (Toggles replying on/off)
|
|     watch <targetname>                              (Toggles health watch on/off for <targetname>)
|
|     pet [summon|optional /pet params]               (Toggles pet functions on/off, if 'summon' parameter is supplied it will summon your pet. You can also feed 
|                                                      parameters like 'back off', 'guard here' etc.)
|
|     assist [assistname]                             (Toggles assist functions for debuffs/pet on/off, if an assist name is specified it will set your main assist name.)
|
|     cmd [freeform command string]                   (This lets you perform generic commands on your bot. For instance, if you wanted to peform a mass group buff you can
|                                                      send a command like '/tell botname cmd alt activate 35'  Just set up a hotkey on your master and you could issue the
|                                                     mass group buff and then '/tell botname groupbuff 1' to mass group buff your first groupbuff slot.
|
| 
| Also added several advpath.inc commands that are able to be used from /echo or a designated master: 
|
|     follow <playername>                             (Starts following of <playername>) 
|
|     stop                                            (Stops following.) 
|
|     pause                                           (Pauses following.) 
|
|     goto locy locx [locz]                           (Sends the player to location y,x[,z] coordinate.) 
| 
|     distance <#>                                    (This sets the follow distance between you and the player you are following.) 
|
|
|     Commands can be issued via /echo and as a tell from a master. 
| ----------------------------------------------------------------------------- 
| 
| INI Setting Examples: 
| --------------------- 
| Radius=100 <------------------ Sets the mob search radius for the debuff function. 
| TrackNumber=10 <-------------- Number of mobs to track within your radius.  If more than this number enters, they will be ignored until a slot frees up.
| Announce=1 <------------------ If this is set to 1, announcements are on upon macro startup.
| AnnounceChannel=gsay;rsay <--- This sets the channel(s) where announcements will be sent.  They can be sent to any channel, IE: 'AnnounceChannel=chat #mychannel;rsay;gsay'
| RetryCount=2 <---------------- Number of tries total, if resisted, for each debuff spell.
| NoSit=0 <--------------------- If this is set to 1, sitting is off upon macro startup.
| PauseEvents=1 <--------------- If this is set to 1, events are paused upon macro startup.
| PauseHeals=1 <---------------- If this is set to 1, heals are paused upon macro startup.
| PauseSelfBuffs=0 <------------ If this is set to 1, self buffs are paused upon macro startup.
| PauseGroupBuffs=0 <----------- If this is set to 1, group buffs are paused upon macro startup.
| PauseDebuffs=1 <-------------- If this is set to 1, debuffs are paused upon macro startup.
| PauseAssist=0 <--------------- If this is set to 1, pet/debuff MA assisting are paused upon macro startup.
| Reply=1 <--------------------- If this is set to 1, you will reply to commands sent to you from a master.
| MainAssistName=Johnny
| ReplyChannel=tell @ <--------- This is the channel that you acknowledge commands to.  If you have a channel like gsay or chat #channelname that doesn't
|                                have a specific player name to respond to you juse use that channel IE: ReplyChannel=gsay or ReplyChannel=chat #channelname
|                                If you are replying to a channel that needs the masters name to reply back use this: ReplyChannel=tell @ or ReplyChannel=msg @
|                                The @ symbol lets it know that it needs to replace the @ with the masters name.
|
| 
| xxxxCheckTime=xxx <----------- Each of these settings per section are used to regulate how often a given function is checked.  If you'd like to give
|                                priority to any given section just lower the number (it is in seconds, IE -- 1s is one second.).
|
| PausePet=0 <------------------ If this is set to 1, pet functions are pause upon macro startup.
| PetAssistOnHPPct=98 <--------- Once the mob is under 98 percent and assisting is on, the pet will assist the MA and attack the target.
|
| 
| WussyFactor=10 <-------------- This entry determines how much to compensate for pure casters during single target heal checking.  If your thresholds were
|                                to heal from 30 to 60 percent and you had this set to ten, that would effectively be 30 to 70 percent for a pure caster.
|
| HealPets=0 <------------------ This entry is used to turn pet healing on/off upon macro startup.  You can toggle it on/off in game with the 'heal pets' command.
|
| Dismount=nodismount <--------- This entry is used to determine whether or not you want to /dismount and duck to terminate casting when your target is lost.
|                                Valid entries are dismount and nodismount.
|
| SitAggroRadiusCheck=75 <------ If mobs are within this radius and facing directly at you, you will not sit down.  I wouldn't recommend going much lower than 50 or so.
|
|
| Example for using spells: 
| 
| Debuff1=Tashania 
| Debuff2=Bliss 
| Debuff3=Cripple 
| DebuffDuration1=0 <----------- Uses default spell duration IE: $spell("Spell Name",duration). 
| DebuffDuration2=60 <---------- Uses custom duration of 60 seconds, after 60 seconds the debuff would be recast. 
| DebuffDuration3=99999 <------- Uses INI default duration of 99999 seconds so that the debuff wouldn't be recast. 
| DebuffStartWait1=0 <---------- Uses INI default wait time of 0 seconds which means to cast immediately. 
| DebuffStartWait2=0 <---------- Uses INI default wait time of 0 seconds which means to cast immediately. 
| DebuffStartWait3=20 <--------- Uses custom wait time of 20 seconds.  After 20 seconds the mob will be debuffed.  Then it uses the normal DebuffDuration timing from then on. 
| DebuffMinHealth1=100 <-------- Uses INI default of 100 percent health, which would always cast on mobs. 
| DebuffMinHealth2=100 <-------- Uses INI default of 100 percent health, which would always cast on mobs. 
| DebuffMinHealth3=90 <--------- Uses custom value of 90 percent health.  When the mobs health gets under 90 percent he would be debuffed. 
| DebuffMinHealthNoCast1=0 <---- Uses INI default of 0 percent health, which would always cast on mobs. 
| DebuffMinHealthNoCast2=95 <--- Uses custom value of 95 percent health.  If the mob is at 95 percent or lower this debuff would not be cast. 
| DebuffMinHealthNoCast3=0 <---- Uses INI default of 0 percent health, which would always cast on mobs. 
| DebuffMinMobsInArea1=0 <------ Uses INI default of 0 mobs in area, which would always cast on mobs. 
| DebuffMinMobsInArea2=2 <------ Uses custom value of 2 mobs in area, if there are at least 2 mobs in the area this debuff would be cast. 
| DebuffMinMobsInArea3=0 <------ Uses INI default of 0 mobs in area, which would always cast on mobs. 
| DebuffMinMana1=0 <------------ Uses INI default of 0 percent mana, which would always cast the debuff regardless of your mana percent.
| DebuffMinMana2=0 <------------ Uses INI default of 0 percent mana, which would always cast the debuff regardless of your mana percent.
| DebuffMinMana3=20 <----------- Uses custom value of 20 percent mana, this would stop casting this debuff if you were below 20 percent.
| DebuffAnnounce1=Debuffing -[ %T ]- with Tashania!
| DebuffAnnounce2=NULL <-------- This means that it would not announce anything for this particular debuff.
| DebuffAnnounce3=Debuffing -[ %T ]- with Cripple!
| DebuffMemToSlot1=0 <---------- If this spell is not memmed it would just throw it in the generic slot that spellcast.inc picks (Slot 5 currently)
| DebuffMemToSlot2=1 <---------- If this spell is not memmed it would mem this spell to slot 1. (I do not recommend using the mem function for debuffs)
| DebuffMemToSlot3=2 <---------- If this spell is not memmed it would mem this spell to slot 2. (I do not recommend using the mem function for debuffs)
| 
| SelfBuff1=Invisibility
| SelfBuffDuration1=99999 <------- Tells it not to refresh for 99999 seconds.
| SelfBuffAtStart1=0 <------------ Uses default, not to buff yourself with this self buff when the macro is first start. 
| SelfBuffIconCheck1=1 <---------- If this is set to 1 it will check for the buff name and recast if it isn't seen.
| SelfBuffIconName1=Invisibility
| SelfBuffMemToSlot1=7  <--------- If this spell is not memmed it would mem this spell to slot 7.
| SelfBuffAliasName1=invis <------ This is an alias name so that you don't have to remember the slot number when issuing the /echo selfbuff invis type commands.
|
| NOTE: All 4 conditions of each event must be met in order to trigger the event. 
| EventSpell1=Cannablize II 
| EventMinMana1=95 <-------------- If your character is equal to or less than 95 percent mana it will cast the event spell. 
| EventMaxMana1=0 <--------------- Uses INI default, if your character is equal to or greater than 0 percent mana it will cast the event spell. 
| EventMinHP1=100 <--------------- Uses INI default, if your character is equal to or less than 100 percent hp it will cast the event spell. 
| EventMaxHP1=80 <---------------- If your character is equal to or greater than 80 percent hp it will cast the event spell. 
| EventDuration=1 <--------------- This would tell the event to repeat constantly while the HP/Mana criteria are true. 
| EventMemToSlot1=8  <------------ If this spell is not memmed it would mem this spell to slot 8.  (The use of MemToSlot with events is situational)
| 
| HealSpell1=Complete Healing
| HealMinHP1=40 <----------------- If the player in question is under 40 percent health this heal would NOT be cast.
| HealMaxHP1=50 <----------------- If the player in question is under 50 percent health this heal WOULD be cast.
| HealMinMana1=20 <--------------- This wouldn't try casting this heal if you were under 20 percent mana.
| HealMinGroupCount1=0 <---------- If this were a group based heal you could set this to the minimum number of group members to have to cast this spell.
| HealClass1=WAR|SHD|PAL <-------- This would only cast this heal on Warriors, Shadowknights and Paladins.
| HealAnnounce1=Complete Healing Incoming for -[ %T ]- !
| HealMemToSlot1=2 <-------------- If this spell is not memmed it would mem this spell to slot 2. (I do not recommend using the mem function for heal spells)
|
| GroupBuff1=Endure Magic
| GroupBuffDuration1=0 <---------- Set this to the duration of the buff, in seconds. 0 uses the spells normal duration. Using 1 for duration would chain cast it.
| GroupBuffAtStart1=0 <----------- This determines if the buff will be applied to the group immediately upon starting the script. 0 is no, 1 is yes.
| GroupBuffMinMana1=0 <----------- Minimum amount of mana you must have before trying to cast this group buff.
| GroupBuffMinGroupCount1=0 <----- This buff will not be cast unless there are 0 or more users in group. Max is 6. (NEVER set a single target buff to anything but 0.)
| GroupBuffAnnounce1=Casting Endure Magic on -[ %T ]- !
| GroupBuffClass1=WAR|SHD|PAL|RNG|MNK|ROG|BRD|BST|BER|SHM|CLR|DRU|WIZ|MAG|ENC|NEC
| GroupBuffMemToSlot1=7  <-------- If this spell is not memmed it would mem this spell to slot 7.
| GroupBuffAliasName1=endurem <---- This is an alias name so that you don't have to remember the slot number when issuing the /echo groupbuff endurem type commands.
| 
| Example for using casting items: 
| 
| Debuff1=item Gloves of Fire <- Notice: the name of the item is preceded with "item ". 
| DebuffDuration1=1 <----------- Set this to the duration of the debuff, in seconds. DO NOT use 0, as this is not a spell.  Using 1 for duration would chain cast it. 
| DebuffStartWait1=0 <---------- Uses INI default wait time of 0 seconds which means to cast immediately. 
| DebuffMinHealth1=20 <--------- Uses INI value of 20 percent health, which means you wouldn't cast until the mob was at 20 percent. 
| DebuffMinHealthNoCast1=0 <---- Uses INI default of 0 percent health, which would always cast on mobs. 
| DebuffMinMobsInArea1=0 <------ Uses INI default of 0 mobs in area, which would always cast on mobs. 
| DebuffMinMana1=0 <------------ Uses INI default of 0 percent mana, which would always cast the debuff regardless of your mana percent.
| DebuffAnnounce1=NULL <-------- This means that it would not announce anything for this particular debuff.
| DebuffMemToSlot1=0 <---------- Never change this from 0 if you are using an item.
| 
| SelfBuff1=item White Rope Bridle<-- Notice: the name of the item is preceded with "item ". 
| SelfBuffDuration1=3600 <----------- Waits 60 minutes before refreshing the buff. Never use 0 when using an item. 
| SelfBuffAtStart1=1 <--------------- Buffs yourself immediately upon starting the macro. 
| SelfBuffIconCheck1=1 <------------- If this is set to 1 it will check for the buff name and recast if it isn't seen.
| SelfBuffIconName1=Summon Horse <--- Since the item name and the buff name are different you'd set it like this.
| SelfBuffMemToSlot1=0  <------------ Never change this from 0 if you are using an item.
| SelfBuffAliasName1=horse <--------- This is an alias name so that you don't have to remember the slot number when issuing the /echo selfbuff horse type commands.
| 
| NOTE: All 4 conditions of each event must be met in order to trigger the event. 
| EventSpell1=item Rod O Power <-- Notice: the name of the item is preceded with "item ". 
| EventMinMana1=95 <-------------- If your character is equal to or less than 95 percent mana it will cast the event item. 
| EventMaxMana1=0 <--------------- Uses INI default, if your character is equal to or greater than 0 percent mana it will cast the event item. 
| EventMinHP1=100 <--------------- Uses INI default, if your character is equal to or less than 100 percent hp it will cast the event item. 
| EventMaxHP1=80 <---------------- If your character is equal to or greater than 80 percent hp it will cast the event item. 
| EventDuration=600 <------------- This would tell the event to repeat no sooner than 10 minutes from the last event of this type. 
| EventMemToSlot1=0  <------------ Never change this from 0 if you are using an item.
| 
| HealSpell1=item Pants O Healing
| HealMinHP1=40 <----------------- If the group average is under 40 percent health this heal would NOT be cast.
| HealMaxHP1=50 <----------------- If the group average is under 50 percent health this heal WOULD be cast.
| HealMinMana1=20 <--------------- This wouldn't try casting this heal if you were under 20 percent mana.
| HealMinGroupCount1=4 <---------- This will not be cast unless you have 4 or more group members.  (NEVER set a single target heal to anything but 0.)
| HealClass1=WAR|SHD|PAL <-------- This would only cast this heal on Warriors, Shadowknights and Paladins. (This is ignored because its a group spell.)
| HealAnnounce1=Casting Pants O Healing on the group!
| HealMemToSlot1=0 <-------------- Never change this from 0 if you are using an item.
|
| GroupBuff1=item Pants O Group Symbol
| GroupBuffDuration1=3600 <------- Set this to the duration of the buff, in seconds. You cannot use 0 for items!  Using 1 for duration would chain cast it.
| GroupBuffAtStart1=0 <----------- This determines if the buff will be applied to the group immediately upon starting the script. 0 is no, 1 is yes.
| GroupBuffMinMana1=0 <----------- Minimum amount of mana you must have before trying to cast this group buff.
| GroupBuffMinGroupCount1=4 <----- This buff will not be cast unless there are 4 or more users in group. Max is 6. (NEVER set a single target buff to anything but 0.)
| GroupBuffAnnounce1=Casting Pants O Group Symbol on the group!
| GroupBuffClass1=WAR|SHD|PAL|RNG|MNK|ROG|BRD|BST|BER|SHM|CLR|DRU|WIZ|MAG|ENC|NEC
| GroupBuffMemToSlot1=0  <-------- Never change this from 0 if you are using an item.
| GroupBuffAliasName1=pants <----- This is an alias name so that you don't have to remember the slot number when issuing the /echo groupbuff pants type commands.
| 
| Example for using AA skill activations: 
| 
| Debuff1=activate 169 <-------- Notice: the number of the AA Skill is preceded with "activate ". 
| DebuffDuration1=1 <----------- AA skill duration in seconds. DO NOT use 0, as this is not a spell.  Using 1 for duration would try to chain cast it. 
| DebuffStartWait1=0 <---------- Uses INI default wait time of 0 seconds which means to activate the AA skill immediately. 
| DebuffMinHealth1=20 <--------- Uses INI value of 20 percent health, which means you wouldn't activate the AA skill until the mob was at 20 percent. 
| DebuffMinHealthNoCast1=0 <---- Uses INI default of 0 percent health, which would always activate the AA skill on mobs. 
| DebuffMinMobsInArea1=0 <------ Uses INI default of 0 mobs in area, which would always actiavet the AA skill on mobs. 
| DebuffMinMana1=0 <------------ Uses INI default of 0 percent mana, which would always cast the debuff regardless of your mana percent.
| DebuffAnnounce1=NULL <-------- This means that it would not announce anything for this particular debuff.
| DebuffMemToSlot1=0 <---------- Never change this from 0 if you are using an AA activate.
| 
| SelfBuff1=activate 57 <------------ Notice: the number of the AA Skill is preceded with "activate ". 
| SelfBuffDuration1=3600 <----------- Waits 60 minutes before refreshing the AA skill buff. Never use 0 when using an AA activation skill. 
| SelfBuffAtStart1=1 <--------------- Buffs yourself with the AA skill immediately upon starting the macro. 
| SelfBuffIconCheck1=1 <------------- If this is set to 1 it will check for the buff name and recast if it isn't seen.
| SelfBuffIconName1=AAIconNameBlah<-- If your AA skill puts an icon on you, you could use this to have it refresh if it goes away.
| SelfBuffMemToSlot1=0  <------------ Never change this from 0 if you are using an AA activate.
| SelfBuffAliasName1=gather <-------- This is an alias name so that you don't have to remember the slot number when issuing the /echo selfbuff gather type commands.
| 
| NOTE: All 4 conditions of each event must be met in order to trigger the event. 
| EventSpell1=activate 47 <------- Notice: the name of the AA skill is preceded with "activate ". 
| EventMinMana1=95 <-------------- If your character is equal to or less than 95 percent mana it will activate the AA skill. 
| EventMaxMana1=0 <--------------- Uses INI default, if your character is equal to or greater than 0 percent mana it will activate the AA skill. 
| EventMinHP1=100 <--------------- Uses INI default, if your character is equal to or less than 100 percent hp it will activate the AA skill. 
| EventMaxHP1=80 <---------------- If your character is equal to or greater than 80 percent hp it will activate the AA skill. 
| EventDuration=4320 <------------ This would tell the event to repeat no sooner than 72 minutes from the last event of this type. 
| EventMemToSlot1=0  <------------ Never change this from 0 if you are using an AA activate.
| 
| HealSpell1=activate 169
| HealMinHP1=40 <----------------- If the group average is under 40 percent health this heal would NOT be cast.
| HealMaxHP1=50 <----------------- If the group average is under 50 percent health this heal WOULD be cast.
| HealMinMana1=20 <--------------- This wouldn't try casting this heal if you were under 20 percent mana.
| HealMinGroupCount1=4 <---------- This will not be cast unless you have 4 or more group members. (NEVER set a single target heal to anything but 0.)
| HealClass1=WAR|SHD|PAL <-------- This would only cast this heal on Warriors, Shadowknights and Paladins. (This is ignored because its a group spell.)
| HealAnnounce1=Casting Divine Arbitration on the group!
| HealMemToSlot1=0 <-------------- Never change this from 0 if you are using an AA activate.
|
| GroupBuff1=activate Paragon of Spirit
| GroupBuffDuration1=3600 <------- Set this to the duration of the buff, in seconds. You cannot use 0 for AA skills!  Using 1 for duration would chain cast it.
| GroupBuffAtStart1=0 <----------- This determines if the buff will be applied to the group immediately upon starting the script. 0 is no, 1 is yes.
| GroupBuffMinMana1=0 <----------- Minimum amount of mana you must have before trying to cast this group buff.
| GroupBuffMinGroupCount1=4 <----- This buff will not be cast unless there are 4 or more users in group. Max is 6. (NEVER set a single target buff to anything but 0.)
| GroupBuffAnnounce1=Using AA skill Blah on the Group!
| GroupBuffClass1=WAR|SHD|PAL|RNG|MNK|ROG|BRD|BST|BER|SHM|CLR|DRU|WIZ|MAG|ENC|NEC
| GroupBuffMemToSlot1=0  <-------- Never change this from 0 if you are using an AA activate.
| GroupBuffAliasName1=paragon <--- This is an alias name so that you don't have to remember the slot number when issuing the /echo groupbuff paragon type commands.
|
Last edited by ml2517 on Sun May 16, 2004 10:30 pm, edited 23 times in total.

ml2517
a grimling bloodguard
a grimling bloodguard
Posts: 1216
Joined: Wed Nov 12, 2003 1:12 am

advbot.mac

Post by ml2517 » Wed Apr 28, 2004 2:29 am

advbot.mac

Code: Select all

| 
| advbot.mac 
| Advanced Caster Bot macro. This macro lets you specify precise thresholds for debuffing/healing/events etc.
| Version 1.95
| Date:5/16/2004 11:00am
|

#turbo 40

#include advbot.inc
#include advbot2.inc
#include spellcast.inc 
#include advpath.inc 

| Uncomment these if you'd like commands to work via group and chat channels.
|#chat group
|#chat chat

#chat tell 


Sub Main(INI)
/declare a int local 
/declare b int local
/call SetupADVars
/call InitAPFVars 1 15 20  
/varset IniFile AD_${Me.Name} 
/if (${Defined[INI]}) {
    /varset IniFile ${IniFile}_${INI}
}
/varset IniFile ${IniFile}.ini
/call Startup


:MainLoop
/call AdvPathCall 

/if (!${Zone.Name.Equal["${ZoneName}"]}) { 
    /for a 1 to ${TrackNumber} 
        /varset MobList[${a}] 0 
        /for b 1 to ${DebuffCount} 
            /varset MDL[${a},${b}] 0 
            /varset MobAnnounced[${a},${b}] 0
        /next b 
    /next a
    /varset VarNpcCount 0     
    /varset ZoneName ${Zone.Name}    
} 

/if (${PauseDebuffs}==0 && !${Me.Moving} && ${DebuffTimer}==0) /call DebuffSub 

/if (${PauseDebuffs}==0) /call CheckNPC

/if (${PausePet}==0 && ${PetCheckTimer}==0) /call PetCheck

/if (${NoSit}==0 && !${Me.Moving} && ${SitCheckTimer}==0 && !${Me.Mount.ID}>0) /call SitCheck 

/doevents

/if (${PauseDebuffs}==0 && !${Me.Moving}) /call IterateNPC

/if (${PauseSelfBuffs}==0 && !${Me.Moving} && ${SelfBuffTimer}==0 && (${VarNpcCount}<2 || ${PauseDebuffs}==1)) /call SelfBuffCheck

/if (${PauseGroupBuffs}==0 && !${Me.Moving} && ${GroupBuffTimer}==0 && (${VarNpcCount}<2 || ${PauseDebuffs}==1)) /call GroupBuffCheck
 
/if (${PausePet}==0 && !${Me.Moving} && ${PetBuffCheckTimer}==0 && (${VarNpcCount}<2 || ${PauseDebuffs}==1)) /call PetBuffCheck

/if (${PauseEvents}==0 && !${Me.Moving} && ${EventTimer}==0) /call EventCheck

/if (${PauseDebuffs}==0) /call CheckNPC

/if (${NoSit}==0 && !${Me.Moving}) /call SitCheck 
 
/if (${PauseHeals}==0 && ${HealTimer}==0) /call HealCheck

/doevents 

/if (${MiscCheckTimer}==0) {
    /varset MiscCheckTimer 5s
    /if (${Me.Invited}) /timed 20 /disband
    /if (${Window[ConfirmationDialogBox].Open}) /notify ConfirmationDialogBox Yes_Button leftmouseup
}
/goto :MainLoop 
/return 

Sub AdvPathCall
/if (${FollowFlag}==1) {
    /if (!${Me.Mount.ID}>0 && !${Me.Standing} && ${Spawn[${FollowID}].Distance3D}>=${FollowDistance}) /stand
    /call AdvPathPoll
}
/return

Sub SitCheck
/declare MobHeading int local
/declare MeHeading int local
/declare MiniIterate int local
/declare AggroFlag int local
/declare AggroID int local
/varset SitCheckTimer 2s
/if (${FollowFlag}==1 && ${Spawn[${FollowID}].Distance3D}>${FollowDistance}) /return
    /varset MiniIterate 1
    /varset AggroFlag 0
    /varset AggroID 0
    :CheckNext
    /varset AggroID ${NearestSpawn[${MiniIterate},npc radius ${SitAggroRadiusCheck} zradius 10].ID}
    /if (${AggroID}>0) {
        /varset MobHeading ${Spawn[${AggroID}].Heading.Degrees}
        /if (${Math.Abs[${Math.Calc[${Spawn[${AggroID}].HeadingTo.Degrees}+180]}]}>=359.99) {
            /varset MeHeading ${Math.Calc[(${Spawn[${AggroID}].HeadingTo.Degrees}-180)+360]}
        } else {
            /varset MeHeading ${Math.Calc[(${Spawn[${AggroID}].HeadingTo.Degrees}+180)+360]}
        }
        /if ((${Math.Calc[${MobHeading}+360]}>${Math.Calc[${MeHeading}-15]})&&(${Math.Calc[${MobHeading}+360]}<${Math.Calc[${MeHeading}+15]})) {
            /varset AggroFlag 1
            /if (!${Me.Mount.ID}>0) {
                /if (${Me.Sitting}) /stand 
            } 
            /goto :BreakOutCheckAggro
        }
    } else {
        /if (${AggroFlag}==0) {
            /if (!${Me.Mount.ID}>0) {
                /if (${Me.Standing}) /sit on
            } 
            /goto :BreakOutCheckAggro
        }
    }
    /varset MiniIterate ${Math.Calc[${MiniIterate}+1]}
    /goto :CheckNext
    :BreakOutCheckAggro
/return


Sub IterateNPC 
/declare npcid int local 
/declare a int local 
/declare b int local 
/declare compare int local 
/declare TempNpcCount int local
/varset npcid 0 
/varset TempNpcCount 0
:GetSpawn
/doevents
/varset npcid ${NearestSpawn[${Math.Calc[${TempNpcCount}+1]},npc radius ${Radius} zradius 10 noalert ${AlertList}].ID} 
/if (!${String[${npcid}].Equal[NULL]}) { 

   /varset TempNpcCount ${Math.Calc[${TempNpcCount}+1]}
   /if (${TempNpcCount}>${TrackNumber}) /goto :DoneSearching 
   /varset compare 0 
   /for a 1 to ${TrackNumber} 
       /if (${npcid}==${MobList[${a}]}) { 
           /varset compare 1 
           /goto :BreakOutComp 
       } 
   /next a 
   :BreakOutComp
   /if (${compare}==0) { 
       /for a 1 to ${TrackNumber} 
           /if (${MobList[${a}]}==0) { 
               /varset VarNpcCount ${Math.Calc[${VarNpcCount}+1]}
               /varset MobList[${a}] ${npcid}
               /for b 1 to ${DebuffCount} 
                   /varset MDL[${a},${b}] ${Math.Calc[${DebuffStartWait[${b}]}+${Macro.RunTime}]}
                   /varset MobAnnounced[${a},${b}] 0
               /next b 
               /goto :GetSpawn
           } 
       /next a 
   } 
} else { 
    /goto :DoneSearching 
} 
/goto :GetSpawn 
:DoneSearching 
/return 


Sub DebuffSub
/call IterateNPC
/varset DebuffTimer ${DebuffCheckTime}
/declare a int local 
/declare b int local
/declare c int local 
/declare MATarget int local 0
/if (${PauseAssist}==0) {
    /if (${TankName.Length}>0 && !${TankName.Equal[Main Assist Name]}) {
        /if (${Spawn[pc ${TankName}].Distance}<200) {
            /squelch /target myself
            /delay 1s ${Target.ID}==${Me.ID}
            /assist ${TankName}
            /delay 1s ${Target.ID}!=${Me.ID}
            /varset MATarget ${Target.ID}
        }
    }
}
/for a 1 to ${TrackNumber}
    /doevents Enraged
    /call AdvPathCall  
    /if (${PauseDebuffs}==0  && !${Me.Moving}) { 
        /if (${MobList[${a}]}!=0) { 
        /for b 1 to ${DebuffCount}
            /doevents Enraged
            /if (${MobList[${a}]}!=${MATarget} && ${DebuffOnMATarget[${b}]}==1 && ${PauseAssist}==0) /goto :BreakOutDebuff
            /if (${VarNpcCount}<${DebuffMinMobsInArea[${b}]}) /goto :BreakOutDebuff

            /call AdvPathCall  
            /squelch /target id ${MobList[${a}]}
            /delay 1s ${Target.ID}==${MobList[${a}]}
            /if (!${Target.Type.Equal["NPC"]}) /goto :NotNPC
            /if (${Spawn[${MobList[${a}]}].Distance}>${Radius}) /goto :NotNPC
            /if (((${MDL[${a},${b}]}==0)||(${MDL[${a},${b}]}<${Math.Calc[${Macro.RunTime}]}))&&(${Spawn[${MobList[${a}]}].PctHPs}<=${DebuffMinHealth[${b}]})&&(${Spawn[${MobList[${a}]}].PctHPs}>${DebuffMinHealthNoCast[${b}]})&&(!${Spawn[${MobList[${a}]}].State.Equal["DEAD"]})&&(${Me.PctMana}>${DebuffMinMana[${b}]})) {
                /if (((!${Debuff[${b}].Find["item"]})&&(!${Debuff[${b}].Find["activate"]}))&&((!${Me.SpellReady["${Debuff[${b}]}"]})&&(${Me.Gem["${Debuff[${b}]}"]}))) {
                    /for c 1 to 30
                        /delay 1
                        /if (${Me.SpellReady["${Debuff[${b}]}"]}) {
                            /goto :ContinueDebuff
                        }
                    /next c
                    /if (!${Me.SpellReady["${Debuff[${b}]}"]}) /goto :BreakOutDebuff
                }
                :ContinueDebuff
                /if (!${Target.ID}>0) /goto :NotNPC
                /echo Debuffing: -[ ${Spawn[${MobList[${a}]}].CleanName} ]- with ${Debuff[${b}]}. 
                /if (${FaceBeforeDebuff}==1) /face
                /if (${Announce}==1) {
                    /call Debuff ${MobList[${a}]} "${Debuff[${b}]}" "${DebuffAnnounce[${b}]}" ${a} ${b} "${DebuffMemToSlot[${b}]}"
                } else {
                    /call Debuff ${MobList[${a}]} "${Debuff[${b}]}" "NULL" ${a} ${b} "${DebuffMemToSlot[${b}]}"
                }

                /if (${Macro.Return.Equal["CAST_LOSTTARGET"]}) {
                    /delay 5
                    /return
                }
                /if (${Macro.Return.Equal["NODELAY"]}) {
                    /if (${DebuffDuration[${b}]}==99999) { 
                        /varset MDL[${a},${b}] ${Math.Calc[99999+${Macro.RunTime}]}
                    } else /if (${DebuffDuration[${b}]}==0) { 
                        /if (${Spell[${DebuffID[${b}]}].Duration.TotalSeconds}==0) { 
                            /varset MDL[${a},${b}] ${Math.Calc[(1+${Macro.RunTime})-5]}
                        } else { 
                            /varset MDL[${a},${b}] ${Math.Calc[(${Spell[${DebuffID[${b}]}].Duration.TotalSeconds}+${Macro.RunTime})-5]}
                        } 
                    } else { 
                        /varset MDL[${a},${b}] ${Math.Calc[(${DebuffDuration[${b}]}+${Macro.RunTime})-5]}
                    } 
                } else { 
                    /varset MDL[${a},${b}] ${Math.Calc[15+${Macro.RunTime}]}
                } 
                /if (${PauseHeals}==0 && ${HealTimer}==0) /call HealCheck
                /if (${PausePet}==0 && ${PetCheckTimer}==0) /call PetCheck
            }
        :BreakOutDebuff 
        /next b 
        /if (${PauseEvents}==0 && ${EventTimer}==0 && !${Me.Moving}) /call EventCheck
        /if (${PauseHeals}==0 && ${HealTimer}==0) /call HealCheck
        } 
    } 
    :NotNPC
    /doevents 
/next a
/return


Sub CheckNPC 
/declare a int local 
/declare b int local 
/for a 1 to ${TrackNumber} 
    /if (${MobList[${a}]}!=0) { 
        /if ((${Spawn[${MobList[${a}]}].State.Equal["DEAD"]})||(!${Spawn[${MobList[${a}]}].ID})||(${Spawn[${MobList[${a}]}].Distance}>${Radius})) {
            /varset MobList[${a}] 0 
            /varset VarNpcCount ${Math.Calc[${VarNpcCount}-1]}
            /for b 1 to ${DebuffCount} 
                /varset MDL[${a},${b}] 0 
                /varset MobAnnounced[${a},${b}] 0
            /next b 
        } 
    }
/next a 
/return 


Sub Debuff(mobid,debname,debannounce,a,b,memtoslot) 
/declare resistcount int local
/declare retrytimer int local
/declare ParseAnnounceChannels string local
/declare TempHoldAnnounce string local

/varset resistcount 1
:RecastDebuff
/if (${PauseDebuffs}==1) /return
/if (${Me.Sitting}) /stand
/if (${debname.Left[4].Equal["item"]}) { 
    /call Cast "${debname.Right[-5]}" "item" "${Dismount}"
} else /if (${debname.Left[8].Equal["activate"]}) { 
    /if (!${Me.AltAbilityReady[${debname.Right[-9]}]}) /return DELAY
    /call Cast "${debname.Right[-9]}" "activate" "${Dismount}"
} else { 
    /call Cast "${debname}" "gem${memtoslot}" "${Dismount}"
}
/if (${Macro.Return.Equal["CAST_LOSTTARGET"]}) /return CAST_LOSTTARGET

/if (${Macro.Return.Equal["CAST_TOOK2LONG"]}) /return DELAY

/if (${Macro.Return.Equal["CAST_RESISTED"]}) {
    /if (${Spell["${debname}"].RecastTime}) {
        /if (${Spell["${debname}"].RecastTime}<=10) {
            /varset retrytimer ${Math.Calc[${Spell["${debname}"].RecastTime}+1+${Macro.RunTime}]}
        } else {
            /return NODELAY
        }
    }
    /if (${resistcount}<${RetryCount}) { 
        /varset resistcount ${Math.Calc[${resistcount}+1]}
        :WaitForGem
        /call AdvPathCall  
        /delay 1
        /if (${debname.Left[4].Equal["item"]}) { 
            /squelch /target id ${mobid}
            /delay 1s ${Target.ID}==${mobid}
            /goto :RecastDebuff 
        } else /if (${debname.Left[8].Equal["activate"]}) { 
            /squelch /target id ${mobid}
            /delay 1s ${Target.ID}==${mobid}
            /goto :RecastDebuff
        } else { 
            /if (${retrytimer}<${Math.Calc[${Macro.RunTime}]}) {
                /return NODELAY
            }
            /if (!${Me.SpellReady["${debname}"]}) {
                /goto :WaitForGem
            }
        } 
        /squelch /target id ${mobid}
        /delay 1s ${Target.ID}==${mobid}
        /goto :RecastDebuff 
    } else {
        /return NODELAY
    }
}
/if ((${Macro.Return.Equal["CAST_CANNOTSEE"]})||(${Macro.Return.Equal["CAST_OUTOFRANGE"]})) { 
    /echo -(( Mob out of range or cannot be seen.  Waiting 15 seconds and trying again. ))-
    /return DELAY
}
/if ((${Macro.Return.Equal["CAST_SUCCESS"]})&&(${Announce}==1)&&(!${debannounce.Equal["NULL"]})&&(${MobAnnounced[${a},${b}]}==0)) { 
    /if (${AnnounceChannel.Length}>0) { 
        /if (${AnnounceChannel.Find[;]}) {
            /varset TempHoldAnnounce ${AnnounceChannel}
            :ParseNext
            /varset ParseAnnounceChannels ${TempHoldAnnounce.Arg[1,;]}
            /varset TempHoldAnnounce ${TempHoldAnnounce.Right[-${TempHoldAnnounce.Find[;]}]}
            :SendIt
            /if (${ParseAnnounceChannels.Equal[gsay]} && ${Group}>0) {
                /gsay ${debannounce}
            } else /if (!${ParseAnnounceChannels.Equal[gsay]}) {
                /docommand /${ParseAnnounceChannels} ${debannounce}
            }
            /if (${TempHoldAnnounce.Length}>0) {
                /if (${TempHoldAnnounce.Find[;]}>0) {
                    /goto :ParseNext
                } else {
                    /varset ParseAnnounceChannels ${TempHoldAnnounce}
                    /varset TempHoldAnnounce
                    /goto :SendIt
                }
            }
        } else {
            /if (${AnnounceChannel.Equal[gsay]} && ${Group}>0) {
                /gsay ${debannounce}
            } else /if (!${AnnounceChannel.Equal[gsay]}) {
                /docommand /${AnnounceChannel} ${debannounce}
            }
        }
    } 
    /varset MobAnnounced[${a},${b}] 1 
}
/return NODELAY


Sub SelfBuffCheck 
/varset SelfBuffTimer ${SelfBuffCheckTime}
/declare a int local
/declare f int local 
/declare RetryBuffCount int local 
/if (${SelfBuffCount}>0) { 
    /for a 1 to ${SelfBuffCount} 
        /if (${PauseSelfBuffs}==1 || ${Me.Moving}) /return
        /if (${PauseHeals}==0 && ${HealTimer}==0) /call HealCheck
        /varset RetryBuffCount 0        
        /call AdvPathCall  
        /if ((${SelfBuffedList[${a}]}<${Math.Calc[${Macro.RunTime}]})||((${SelfBuffIconCheck[${a}]}==1)&&(!${Me.Buff["${SelfBuffIconName[${a}]}"].Duration})&&(${SelfBuffedList[${a}]}!=99999))) { 
            :RetryBuff 
            /if (${PauseSelfBuffs}==1) /return

            /if ((!${SelfBuff[${a}].Find["item"]}>0)&&(!${SelfBuff[${a}].Find["activate"]}>0)) {
                /if (${Me.Gem[${SelfBuff[${a}]}]}) {
                    /for f 1 to 30
                        /delay 1
                        /if (${Me.SpellReady["${SelfBuff[${a}]}"]}) {
                            /goto :ContinueSelfBuff
                        }
                    /next f
                    /if (!${Me.SpellReady["${SelfBuff[${a}]}"]}) /goto :BreakOutSelf
                }
            }
            :ContinueSelfBuff
            /if ((${Me.Gem[${SelfBuff[${a}]}]})||(${SelfBuff[${a}].Find["item"]})||(${SelfBuff[${a}].Find["activate"]})||(${SelfBuffMemToSlot[${a}]}>0)) {
                /if (${Me.Sitting}) /stand
                /squelch /target myself 
                /delay 1s ${Target.ID}==${Me.ID}
                /if (${SelfBuff[${a}].Left[4].Equal["item"]}) {
                    /echo -[ Casting Self Buff : ${SelfBuff[${a}]} ]-
                    /call Cast "${SelfBuff[${a}].Right[-5]}" "item" "${Dismount}"
                } else /if (${SelfBuff[${a}].Left[8].Equal["activate"]}) { 
                    /if (!${Me.AltAbilityReady[${SelfBuff[${a}].Right[-9]}]}) /goto :BreakOutSelf
                    /echo -[ Casting Self Buff : ${SelfBuff[${a}]} ]-
                    /call Cast "${SelfBuff[${a}].Right[-9]}" "activate" "${Dismount}"
                } else { 
                    /echo -[ Casting Self Buff : ${SelfBuff[${a}]} ]-
                    /call Cast "${SelfBuff[${a}]}" "gem${SelfBuffMemToSlot[${a}]}" "${Dismount}"
                } 
                /if (${Macro.Return.Equal["CAST_LOSTTARGET"]}) {
                    /delay 5
                    /varset SelfBuffTimer 0
                    /return
                }
                /if (${Macro.Return.Equal["CAST_TOOK2LONG"]}) {
                    /varset SelfBuffedList[${a}] ${Math.Calc[15+${Macro.RunTime}]}
                    /goto :BreakOutSelf
                }
                /if (${SelfBuffDuration[${a}]}==99999) { 
                    /varset SelfBuffedList[${a}] ${Math.Calc[99999+${Macro.RunTime}]}
                } else /if (${SelfBuffDuration[${a}]}==0) { 

                    /if (${Spell[${SelfBuffID[${a}]}].Duration.TotalSeconds}==0) { 
                        /varset SelfBuffedList[${a}] ${Math.Calc[(1+${Macro.RunTime})-5]}
                    } else { 
                        /varset SelfBuffedList[${a}] ${Math.Calc[(${Spell[${SelfBuffID[${a}]}].Duration.TotalSeconds}+${Macro.RunTime})-5]}
                    } 
                } else { 
                    /varset SelfBuffedList[${a}] ${Math.Calc[(${SelfBuffDuration[${a}]}+${Macro.RunTime})-5]}
                } 
            } else { 
                /if (${RetryBuffCount}==0) {
                    /if (!${Me.SpellReady["${SelfBuff[${a}]}"]}) { 
                        /call Delay 3s 
                        /varset RetryBuffCount ${Math.Calc[${RetryBuffCount}+1]}
                        /goto :RetryBuff 
                    }
                } 
                /echo -(( Self Buff:${SelfBuff[${a}]} not memmed or not ready. ))-
                /echo -(( Waiting 60 seconds before retrying buff. ))-
                /varset SelfBuffedList[${a}] ${Math.Calc[60+${Macro.RunTime}]}
            } 
        }
    :BreakOutSelf 
    /next a 
}
/return 


Sub PetCheck
/varset PetCheckTimer ${PetCheckTime}
/declare PetTarget int local 0
/if (${PauseAssist}==0) {
    /if (${Me.Pet.ID}>0 && !${TankName.Equal[Main Assist Name]} && ${TankName.Length}>0) {
        /if (${Spawn["${TankName}"].Distance}<150) {
            /squelch /target id ${Me.Pet.ID}
            /delay 1s ${Target.ID}==${Me.Pet.ID}
            /assist
            /delay 1s ${Target.ID}!=${Me.Pet.ID}
            /if ((${Target.ID}>0) && (${Target.ID}!=${Me.Pet.ID}) && (!${Target.Type.Equal[CORPSE]})) {
                /varset PetTarget ${Target.ID}
            } else {
                /varset PetTarget 0
            }
            /assist ${TankName}
            /delay 7
            /if (${Target.ID}>0 && ${Target.Type.Equal[NPC]} && ${Target.PctHPs}<=${PetAssistOnHPPct}) {
                /if (${PetTarget}==0) {
                    /pet attack
                } else /if (${PetTarget}!=${Target.ID}) {
                    /pet back off
                    /delay 2
                    /pet attack
                }
            }
        }
    }
}
/return


Sub PetBuffCheck
/declare a int local
/declare f int local
/declare RetryPetBuffCount int local
/varset PetBuffCheckTimer ${PetBuffCheckTime}
/if (${Me.Pet.ID}>0 && ${PetBuffCount}>0) {
    /for a 1 to ${PetBuffCount}
        /varset RetryPetBuffCount 0
        /if (!${Me.PetBuff["${PetBuffIconName[${a}]}"]}>0 && ${Me.Pet.Distance}<100) {
            /if (${PausePet}==1) /return

            :RetryPetBuff
            /if ((!${PetBuff[${a}].Find["item"]}>0)&&(!${PetBuff[${a}].Find["activate"]}>0)) {
                /if (${Me.Gem[${PetBuff[${a}]}]}) {
                    /for f 1 to 30
                        /delay 1
                        /if (${Me.SpellReady["${PetBuff[${a}]}"]}) {
                            /goto :ContinuePetBuff
                        }
                    /next f
                    /if (!${Me.SpellReady["${PetBuff[${a}]}"]}) /goto :BreakOutPetBuff
                }
            }
            :ContinuePetBuff
            /if ((${Me.Gem[${PetBuff[${a}]}]})||(${PetBuff[${a}].Find["item"]})||(${PetBuff[${a}].Find["activate"]})||(${PetBuffMemToSlot[${a}]}>0)) { 
                /if (${Me.Sitting}) /stand 
                /squelch /target id ${Me.Pet.ID}
                /delay 1s ${Target.ID}==${Me.Pet.ID}
                /if (${PetBuff[${a}].Left[4].Equal["item"]}) { 
                    /echo -[ Casting Pet Buff : ${PetBuff[${a}]} ]-
                    /call Cast "${PetBuff[${a}].Right[-5]}" "item" "${Dismount}"
                } else /if (${PetBuff[${a}].Left[8].Equal["activate"]}) { 
                    /if (!${Me.AltAbilityReady[${PetBuff[${a}].Right[-9]}]}) /goto :BreakOutPetBuff
                    /echo -[ Casting Pet Buff : ${PetBuff[${a}]} ]-
                    /call Cast "${PetBuff[${a}].Right[-9]}" "activate" "${Dismount}"
                } else { 
                    /echo -[ Casting Pet Buff : ${PetBuff[${a}]} ]-
                    /call Cast "${PetBuff[${a}]}" "gem${PetBuffMemToSlot[${a}]}" "${Dismount}"
                }
            } else { 
                /if (${RetryPetBuffCount}==0) {
                    /if (!${Me.SpellReady["${PetBuff[${a}]}"]}) { 
                        /call Delay 3s 
                        /varset RetryPetBuffCount ${Math.Calc[${RetryPetBuffCount}+1]}
                        /goto :RetryPetBuff 
                    }
                } 
            } 


        }
    :BreakOutPetBuff
    /next a
}
/return


Sub EventCheck 
/varset EventTimer ${EventCheckTime}
/declare a int local
/declare c int local 
/declare RetryEventCount int local 
/if (${EventCount}>0) { 
    /for a 1 to ${EventCount} 
        /call AdvPathCall  
        /if (${PauseEvents}==1 || ${Me.Moving}) /return
        /if (${PauseHeals}==0 && ${HealTimer}==0) /call HealCheck
        /varset RetryEventCount 0 
        /if ((${Me.PctMana}<=${EventMinMana[${a}]})&&(${Me.PctMana}>=${EventMaxMana[${a}]})&&(${Me.PctHPs}<=${EventMinHP[${a}]})&&(${Me.PctHPs}>=${EventMaxHP[${a}]})) {
            /if (${EventList[${a}]}<${Math.Calc[${Macro.RunTime}]}) { 
                :RetryEvent 
                /if (${PauseEvents}==1) /return

                /if ((!${EventSpell[${a}].Find["item"]}>0)&&(!${EventSpell[${a}].Find["activate"]}>0)) {
                    /if (${Me.Gem[${EventSpell[${a}]}]}) {
                        /for c 1 to 30
                            /delay 1
                            /if (${Me.SpellReady["${EventSpell[${a}]}"]}) {
                                /goto :ContinueEvent
                            }
                        /next c
                        /if (!${Me.SpellReady["${EventSpell[${a}]}"]}) /goto :BreakOutEvent
                    }
                }
                :ContinueEvent
                /if ((${Me.Gem[${EventSpell[${a}]}]})||(${EventSpell[${a}].Find["item"]})||(${EventSpell[${a}].Find["activate"]})||(${EventMemToSlot[${a}]}>0)) { 
                    /if (${Me.Sitting}) /stand 
                    /squelch /target myself 
                    /delay 1s ${Target.ID}==${Me.ID}
                    /if (${EventSpell[${a}].Left[4].Equal["item"]}) { 
                        /echo -[ Casting Event Spell : ${EventSpell[${a}]} ]-
                        /call Cast "${EventSpell[${a}].Right[-5]}" "item" "${Dismount}"
                    } else /if (${EventSpell[${a}].Left[8].Equal["activate"]}) { 
                        /if (!${Me.AltAbilityReady[${EventSpell[${a}].Right[-9]}]}) /goto :BreakOutEvent
                        /echo -[ Casting Event Spell : ${EventSpell[${a}]} ]-
                        /call Cast "${EventSpell[${a}].Right[-9]}" "activate" "${Dismount}"
                    } else { 
                        /echo -[ Casting Event Spell : ${EventSpell[${a}]} ]-
                        /call Cast "${EventSpell[${a}]}" "gem${EventMemToSlot[${a}]}" "${Dismount}"
                    }
                    /if (${Macro.Return.Equal["CAST_LOSTTARGET"]}) {
                        /delay 5
                        /varset EventTimer 0
                        /return
                    }
                    /if (${Macro.Return.Equal["CAST_TOOK2LONG"]}) {
                        /varset EventList[${a}] ${Math.Calc[15+${Macro.RunTime}]}
                        /goto :BreakOutEvent
                    }
 
                    /if (${EventDuration[${a}]}==99999) { 
                        /varset EventList[${a}] ${Math.Calc[99999+${Macro.RunTime}]} 
                    } else /if (${EventDuration[${a}]}==0) { 
                        /if (${Spell[${EventSpellID[${a}]}].Duration.TotalSeconds}==0) { 
                            /varset EventList[${a}] ${Math.Calc[(1+${Macro.RunTime})-5]}
                        } else { 
                            /varset EventList[${a}] ${Math.Calc[(${Spell[${EventSpellID[${a}]}].Duration.TotalSeconds}+${Macro.RunTime})-5]} 
                        } 
                    } else { 
                        /varset EventList[${a}] ${Math.Calc[(${EventDuration[${a}]}+${Macro.RunTime})-5]}
                    } 

                } else { 
                    /if (${RetryEventCount}==0) {
                        /if (!${Me.SpellReady["${EventSpell[${a}]}"]}) { 
                            /call Delay 3s 
                            /varset RetryEventCount ${Math.Calc[${RetryEventCount}+1]}
                            /goto :RetryEvent 
                        }
                    } 
                    /echo -(( Event Spell:${EventSpell[${a}]} not memmed or not ready. ))-
                    /echo -(( Waiting 60 seconds before retrying event. ))-
                    /varset EventList[${a}] ${Math.Calc[60+${Macro.RunTime}]}
                } 
            } 
        }
    :BreakOutEvent 
    /next a 
}
/return 


Sub GroupBuffCheck
/varset GroupBuffTimer ${GroupBuffCheckTime}
/declare a int local
/declare b int local
/declare c int local
/declare f int local 
/declare RetryBuffCount int local
/declare ParseAnnounceChannels string local
/declare TempHoldAnnounce string local
/if (${GroupBuffCount}>0) { 
    /for a 1 to ${GroupBuffCount} 
        /if (${PauseGroupBuffs}==1 || ${Me.Moving}) /return
        /if (${PauseHeals}==0 && ${HealTimer}==0) /call HealCheck
        /call AdvPathCall 
        /for b 0 to ${Group}
            /call AdvPathCall 
            /varset RetryBuffCount 0        
            /if (${Me.PctMana}>=${GroupBuffMinMana[${a}]}) {

                /if (${GBL[${a},${Math.Calc[${b}+1]}]}<${Math.Calc[${Macro.RunTime}]}) { 

                /if (${Math.Calc[${Group}+1]}<${GroupBuffMinGroupCount[${a}]}) /goto :BreakOutBuff

                /if (((${Spell[${GroupBuffID[${a}]}].TargetType.Find["Group"]})&&(${b}!=0))||((${GroupBuffMinGroupCount[${a}]}>0)&&(${b}!=0))) /goto :BreakOutBuff

                /if ((${b}>0)&&(!${GroupBuffClass[${a}].Find["${Group[${b}].Class.ShortName}"]})) /goto :BreakOutMember

                /if ((${b}==0)&&(!${GroupBuffClass[${a}].Find["${Me.Class.ShortName}"]})&&((!${Spell[${GroupBuffID[${a}]}].TargetType.Find["Group"]})||(${GroupBuffMinGroupCount[${a}]}==0))) /goto :BreakOutMember

                    :RetryBuff 
                    /if (${PauseGroupBuffs}==1 || ${Me.Moving}) /return
                    /if ((${Me.Gem[${GroupBuff[${a}]}]})||(${GroupBuff[${a}].Find["item"]})||(${GroupBuff[${a}].Find["activate"]})||(${GroupBuffMemToSlot[${a}]}>0)) {

                        /if ((${GroupBuff[${a}].Find["activate"]})&&(!${Me.AltAbilityReady[${GroupBuff[${a}].Right[-9]}]})) /goto :BreakOutBuff

                        /if ((!${GroupBuff[${a}].Find["item"]}>0)&&(!${GroupBuff[${a}].Find["activate"]}>0)) {
                            /if (${Me.Gem[${GroupBuff[${a}]}]}) {
                                /for f 1 to 30
                                    /delay 1
                                    /if (${Me.SpellReady["${GroupBuff[${a}]}"]}) {
                                        /goto :ContinueGroupBuff
                                    }
                                /next f
                                /if (!${Me.SpellReady["${GroupBuff[${a}]}"]}) /goto :BreakOutBuff
                           }
                        }
                        :ContinueGroupBuff
                        /if (${Spell[${GroupBuffID[${a}]}].TargetType.Find["Group"]} || ${b}==0) {                        
                            /squelch /target myself 
                            /delay 1s ${Target.ID}==${Me.ID}
                        } else {
                            /squelch /target id ${Group[${b}].ID}
                            /delay 1s ${Target.ID}==${Group[${b}].ID}
                        }
                        /if (!${Target.CleanName.Equal[${Group[${b}]}]}) { 
                            /echo -(( Target not in zone.  Waiting 30 seconds and trying again. ))-
                            /varset GBL[${a},${Math.Calc[${b}+1]}] ${Math.Calc[30+${Macro.RunTime}]}
                            /goto :BreakOutMember
                        }
                        /if (!${GroupBuff[${a}].Find[Item]} && !${GroupBuff[${a}].Find[Activate]} && ${Target.Distance3D}>${Spell[${GroupBuffID[${a}]}].Range}) /goto :BreakOutMember
                        /if ((${Announce}==1)&&(!${GroupBuffAnnounce[${a}].Equal["NULL"]})) {
                            /if (${AnnounceChannel.Length}>0) { 
                                /if (${AnnounceChannel.Find[;]}) {
                                    /varset TempHoldAnnounce ${AnnounceChannel}
                                    :ParseNext
                                    /varset ParseAnnounceChannels ${TempHoldAnnounce.Arg[1,;]}
                                    /varset TempHoldAnnounce ${TempHoldAnnounce.Right[-${TempHoldAnnounce.Find[;]}]}
                                    :SendIt
                                    /if (${ParseAnnounceChannels.Equal[gsay]} && ${Group}>0) {
                                        /gsay ${GroupBuffAnnounce[${a}]}
                                    } else /if (!${ParseAnnounceChannels.Equal[gsay]}) {
                                        /docommand /${ParseAnnounceChannels} ${GroupBuffAnnounce[${a}]}
                                    }
                                    /if (${TempHoldAnnounce.Length}>0) {
                                        /if (${TempHoldAnnounce.Find[;]}>0) {
                                            /goto :ParseNext
                                        } else {
                                            /varset ParseAnnounceChannels ${TempHoldAnnounce}
                                            /varset TempHoldAnnounce
                                            /goto :SendIt
                                        }
                                   }
                               } else {
                                   /if (${AnnounceChannel.Equal[gsay]} && ${Group}>0) {
                                       /gsay ${GroupBuffAnnounce[${a}]}
                                   } else /if (!${AnnounceChannel.Equal[gsay]}) {
                                       /docommand /${AnnounceChannel} ${GroupBuffAnnounce[${a}]}
                                   }
                               }
                            } 
                        }
                        /if (${Me.Sitting}) /stand
                        /if (${GroupBuff[${a}].Left[4].Equal["item"]}) {
                            /echo -[ Casting Group Buff : ${GroupBuff[${a}]} ]-
                            /call Cast "${GroupBuff[${a}].Right[-5]}" "item" "${Dismount}"
                        } else /if (${GroupBuff[${a}].Left[8].Equal["activate"]}) { 
                            /echo -[ Casting Group Buff : ${GroupBuff[${a}]} ]-
                            /call Cast "${GroupBuff[${a}].Right[-9]}" "activate" "${Dismount}"
                        } else { 
                            /echo -[ Casting Group Buff : ${GroupBuff[${a}]} ]-
                            /call Cast "${GroupBuff[${a}]}" "gem${GroupBuffMemToSlot[${a}]}" "${Dismount}"
                        }
                        /if (${Macro.Return.Equal["CAST_TOOK2LONG"]}) {
                            /varset GBL[${a},${Math.Calc[${b}+1]}] ${Math.Calc[15+${Macro.RunTime}]}
                            /goto :BreakOutBuff
                        }
                        /if (${Macro.Return.Equal["CAST_LOSTTARGET"]}) {
                            /delay 5
                            /varset GroupBuffTimer 0
                            /return
                        }
                        /if ((${Macro.Return.Equal["CAST_CANNOTSEE"]})||(${Macro.Return.Equal["CAST_OUTOFRANGE"]})) { 
                            /echo -(( Out of range or cannot be seen.  Waiting 20 seconds and trying again. ))-
                            /varset GBL[${a},${Math.Calc[${b}+1]}] ${Math.Calc[20+${Macro.RunTime}]}
                            /goto :BreakOutMember
                        }
                        /if (${GroupBuffDuration[${a}]}==99999) { 
                            /varset GBL[${a},${Math.Calc[${b}+1]}] ${Math.Calc[99999+${Macro.RunTime}]}
                        } else /if (${GroupBuffDuration[${a}]}==0) { 

                            /if (${Spell[${GroupBuffID[${a}]}].Duration.TotalSeconds}==0) { 
                                /varset GBL[${a},${Math.Calc[${b}+1]}] ${Math.Calc[(1+${Macro.RunTime})-5]}
                            } else { 
                                /varset GBL[${a},${Math.Calc[${b}+1]}] ${Math.Calc[(${Spell[${GroupBuffID[${a}]}].Duration.TotalSeconds}+${Macro.RunTime})-5]}
                            } 
                        } else { 
                            /varset GBL[${a},${Math.Calc[${b}+1]}] ${Math.Calc[(${GroupBuffDuration[${a}]}+${Macro.RunTime})-5]}
                        }
                    } else { 
                        /if (${RetryBuffCount}==0) {
                            /if (!${Me.SpellReady["${GroupBuff[${a}]}"]}) { 
                                /call Delay 3s 
                                /varset RetryBuffCount ${Math.Calc[${RetryBuffCount}+1]} 
                                /goto :RetryBuff 
                            }
                        } 
                        /echo -(( Group Buff:${GroupBuff[${a}]} not memmed or not ready. ))-
                        /echo -(( Waiting 60 seconds before retrying buff. ))-
                        /varset GBL[${a},${Math.Calc[${b}+1]}] ${Math.Calc[60+${Macro.RunTime}]}
                    } 
                }
            }
        :BreakOutMember
        /next b
    :BreakOutBuff
    /next a 
}
/return 


Sub HealCheck 
/varset HealTimer ${HealCheckTime}
/declare a int local 
/declare b int local
/declare c int local
/declare d int local
/declare e int local
/declare f int local
/declare RetryHealCount int local 
/declare GroupHPTotal int local
/declare GroupHealFlag int local
/declare TempIndex int local
/declare TempGroupCount int local
/declare ParseAnnounceChannels string local
/declare TempHoldAnnounce string local
/declare PetHealFlag int local 0
/declare TempGrpCt int local 0
/declare TempClass string local Nothing
/declare TempHealth int local 0
/declare TempTargetType string local
/varset TempGroupCount ${Group}

/if (${HealCount}>0) { 
    /for a 1 to ${HealCount}
        /doevents Enraged
        /call AdvPathCall 
        /if (${PauseHeals}==1) /return
        /if (${Group}!=${TempGroupCount}) /return
        /varset GroupHealFlag 0
        /if (${Me.PctMana}>=${HealMinMana[${a}]}) {
            /varset GroupHPTotal 0
            /for b 0 to ${Math.Calc[${Group}+${WatchListCount}]}
                /varset PetHealFlag 0
                /call AdvPathCall 
                /if (${b}>${Group}) {
                    /varset d ${Math.Calc[${b}-${Group}]}
                    /if (!${WatchList[${d}].Equal[Empty]}) {
                         /for e 0 to 5
                             /if (${WatchList[${d}].Equal[${Group[${e}]}]}) {
                                 /goto :BreakOutHoT
                             }
                         /next e
                    }
                }
                /if (${Group}!=${TempGroupCount}) /return
                /varset TempIndex ${Math.Calc[${b}-${Group}]}
                /if (${b}>${Group}) {
                    /if (!${WatchList[${TempIndex}].Equal[Empty]}) {
                        /if (${Spawn[${WatchList[${TempIndex}]}].ID}) {
                            /if (${Spawn[${WatchList[${TempIndex}]}].Distance}<250) {
                                /if (${Math.Calc[${Macro.RunTime}]}>${WatchTimer[${TempIndex}]}) {
                                    /if (${Target.ID}!=${Spawn[${WatchList[${TempIndex}]}].ID}) {
                                        /squelch /target id ${Spawn[${WatchList[${TempIndex}]}].ID}
                                        /delay 1s ${Target.ID}==${Spawn[${WatchList[${TempIndex}]}].ID}
                                    }
                                    /if (${Spawn[${WatchList[${TempIndex}]}].Pet.ID}>0 && ${HealPets}==1) {
                                        /squelch /target id ${Spawn[${WatchList[${TempIndex}]}].Pet.ID}
                                        /delay 1s ${Target.ID}==${Spawn[${WatchList[${TempIndex}]}].Pet.ID}
                                    }
                                    /varset WatchTimer[${Math.Calc[${TempIndex}]}+1]}] ${Math.Calc[${Macro.RunTime}+2]}
                                }
                            }
                        }
                    }
                }
                /varset RetryHealCount 0 
                /if (${Math.Calc[${Group}+1]}<${HealMinGroupCount[${a}]}) /goto :BreakOutHeal

                /varset TempTargetType ${Spell[${HealSpellID[${a}]}].TargetType}
                /if ((${TempTargetType.Find["Group"]})||(${HealMinGroupCount[${a}]}>0)) {
                    /if (${b}<=${Group}) {
                        /if (${Group[${b}].ID}>0) /varset GroupHPTotal ${Math.Calc[${GroupHPTotal}+${Group[${b}].PctHPs}]}
                        /goto :BreakOutHoT
                    } else {
                        /goto :BreakOutHoT
                    }
                }

                /if (${b}<=${Group}) {
                    /varset TempClass ${Group[${b}].Class.ShortName}
                    /varset TempHealth ${Group[${b}].PctHPs}
                    /if (${String["WIZ|MAG|ENC|NEC"].Find["${TempClass}"]}>0) {
                        /if (${TempHealth}>${HealMinHP[${a}]} && ${TempHealth}<${Math.Calc[${HealMaxHP[${a}]}+${WussyFactor}]}) /goto :ContinueHeal
                    } else /if (${String["SHM|CLR|DRU"].Find["${TempClass}"]}>0) {
                        /if (${TempHealth}>${HealMinHP[${a}]} && ${TempHealth}<${Math.Calc[${HealMaxHP[${a}]}+(${WussyFactor}/2)]}) /goto :ContinueHeal
                    } else {
                        /if (${TempHealth}>${HealMinHP[${a}]} && ${TempHealth}<${HealMaxHP[${a}]}) /goto :ContinueHeal
                    }
                    /if (${HealPets}==1) {
                        /varset TempHealth ${Group[${b}].Pet.PctHPs}
                        /if (${TempHealth}>${HealMinHP[${a}]} && ${TempHealth}<${HealMaxHP[${a}]}) {
                            /varset PetHealFlag 1
                            /goto :ContinueHealPet
                        }
                    }
                } else {
                    /varset TempClass ${Spawn[${WatchList[${TempIndex}]}].Class.ShortName}
                    /varset TempHealth ${Spawn[${WatchList[${TempIndex}]}].PctHPs}
                    /if (${String["WIZ|MAG|ENC|NEC"].Find["${TempClass}"]}>0) {
                        /if (${TempHealth}>${HealMinHP[${a}]} && ${TempHealth}<${Math.Calc[${HealMaxHP[${a}]}+${WussyFactor}]}) /goto :ContinueHeal
                    } else /if (${String["SHM|CLR|DRU"].Find["${TempClass}"]}>0) {
                        /if (${TempHealth}>${HealMinHP[${a}]} && ${TempHealth}<${Math.Calc[${HealMaxHP[${a}]}+(${WussyFactor}/2)]}) /goto :ContinueHeal
                    } else {
                        /if (${TempHealth}>${HealMinHP[${a}]} && ${TempHealth}<${HealMaxHP[${a}]}) /goto :ContinueHeal
                    }
                    /if (${HealPets}==1) {
                        /varset TempHealth ${Spawn[${WatchList[${TempIndex}]}].Pet.PctHPs}
                        /if (${TempHealth}>${HealMinHP[${a}]} && ${TempHealth}<${HealMaxHP[${a}]}) {
                            /varset PetHealFlag 1
                            /goto :ContinueHealPet
                        }
                    }
                }

                    /goto :BreakOutHoT

                    :ContinueHeal
                    /call AdvPathCall 
                    /if (!${HealClass[${a}].Find["${TempClass}"]}>0) /goto :BreakOutHoT

                    :ContinueHealPet
                    /if (${PetHealFlag}==0 && ${Math.Calc[${Macro.RunTime}]}<${HoTList[${Math.Calc[${b}+1]},1]} && ${TempTargetType.Find["Single"]}) /goto :BreakOutHoT
                    /if (${PetHealFlag}==1 && ${Math.Calc[${Macro.RunTime}]}<${HoTList[${Math.Calc[${b}+1]},2]} && ${TempTargetType.Find["Single"]}) /goto :BreakOutHoT
       
                    :RetryHeal
                    /if (${PauseHeals}==1) /return 
                    /if (${Me.Gem[${HealSpell[${a}]}]} || ${HealSpell[${a}].Find["item"]} || ${HealSpell[${a}].Find["activate"]} || ${HealMemToSlot[${a}]}>0) { 

                        /if (${HealSpell[${a}].Find["activate"]} && !${Me.AltAbilityReady[${HealSpell[${a}].Right[-9]}]}) /goto :BreakOutHeal

                        /if (!${HealSpell[${a}].Find["item"]}>0 && !${HealSpell[${a}].Find["activate"]}>0) {
                            /if (${Me.Gem[${HealSpell[${a}]}]}) {
                                /for f 1 to 30
                                    /delay 1
                                    /if (${Me.SpellReady["${HealSpell[${a}]}"]}) {
                                        /goto :ContinueHeal2
                                    }
                                /next f
                                /if (!${Me.SpellReady["${HealSpell[${a}]}"]}) /goto :BreakOutHeal
                           }
                        }
                        :ContinueHeal2

                        /if (${b}<=${Group} && !${Group[${b}].ID}>0) /goto :BreakOutHoT
                        /if (${b}>${Group} && !${Spawn[${WatchList[${TempIndex}]}].ID}>0) /goto :BreakOutHoT

                        /if ((${TempTargetType.Find["Group"]} || ${b}==0) && ${PetHealFlag}==0) {                        
                            /squelch /target myself 
                            /delay 1s ${Target.ID}==${Me.ID}
                        } else /if (${b}<=${Group} && ${PetHealFlag}==0) {
                            /squelch /target id ${Group[${b}].ID}
                            /delay 1s ${Target.ID}==${Group[${b}].ID}
                        } else /if (${PetHealFlag}==1) {
                            /if (${b}<=${Group}) {
                                /squelch /target id ${Group[${b}].Pet.ID}
                                /delay 1s ${Target.ID}==${Group[${b}].Pet.ID}
                            } else {
                                /squelch /target id ${Spawn[${WatchList[${TempIndex}]}].Pet.ID}
                                /delay 1s ${Target.ID}==${Spawn[${WatchList[${TempIndex}]}].Pet.ID}
                            }
                        } else {
                            /squelch /target id ${Spawn[${WatchList[${TempIndex}]}].ID}
                            /delay 1s ${Target.ID}==${Spawn[${WatchList[${TempIndex}]}].ID}
                        }

                        /if (${Target.CleanName.Equal[${Group[${b}]}]}) /goto :TargetInZone
                        /if (${Target.CleanName.Equal[${WatchList[${TempIndex}]}]}) /goto :TargetInZone
                        /if (${Target.CleanName.Equal[${Group[${b}].Pet.CleanName}]}) /goto :TargetInZone
                        /if (${Target.CleanName.Equal[${Spawn[${WatchList[${TempIndex}]}].Pet.CleanName}]}) /goto :TargetInZone

                        /echo -(( Target not in zone.  Waiting 10 seconds and trying again. ))-
                        /if (${PetHealFlag}==0) /varset HoTList[${Math.Calc[${b}+1]},1] ${Math.Calc[10+${Macro.RunTime}]}
                        /if (${PetHealFlag}==1) /varset HoTList[${Math.Calc[${b}+1]},2] ${Math.Calc[10+${Macro.RunTime}]}
                        /goto :BreakOutHoT

                        :TargetInZone
                        /if (!${HealSpell[${a}].Find[Item]} && !${HealSpell[${a}].Find[Activate]} && ${Target.Distance3D}>${Spell[${HealSpellID[${a}]}].Range}) /goto :BreakOutHoT
                        /if (${Announce}==1 && !${HealAnnounce[${a}].Equal["NULL"]}) {
                            /if (${AnnounceChannel.Length}>0) { 
                                /if (${AnnounceChannel.Find[;]}) {
                                    /varset TempHoldAnnounce ${AnnounceChannel}
                                    :ParseNext
                                    /varset ParseAnnounceChannels ${TempHoldAnnounce.Arg[1,;]}
                                    /varset TempHoldAnnounce ${TempHoldAnnounce.Right[-${TempHoldAnnounce.Find[;]}]}
                                    :SendIt
                                    /if (${ParseAnnounceChannels.Equal[gsay]} && ${Group}>0) {
                                        /gsay ${HealAnnounce[${a}]}
                                    } else /if (!${ParseAnnounceChannels.Equal[gsay]}) {
                                        /docommand /${ParseAnnounceChannels} ${HealAnnounce[${a}]}
                                    }
                                    /if (${TempHoldAnnounce.Length}>0) {
                                        /if (${TempHoldAnnounce.Find[;]}>0) {
                                            /goto :ParseNext
                                        } else {
                                            /varset ParseAnnounceChannels ${TempHoldAnnounce}
                                            /varset TempHoldAnnounce
                                            /goto :SendIt
                                        }
                                   }
                               } else {
                                   /if (${AnnounceChannel.Equal[gsay]} && ${Group}>0) {
                                       /gsay ${HealAnnounce[${a}]}
                                   } else /if (!${AnnounceChannel.Equal[gsay]}) {
                                       /docommand /${AnnounceChannel} ${HealAnnounce[${a}]}
                                   }
                               }
                            } 
                        }
                        /if (${Me.Sitting}) /stand 
                        /if (${HealSpell[${a}].Left[4].Equal["item"]}) { 
                            /echo -[ Casting Heal Spell : ${HealSpell[${a}]} ]-
                            /call Cast "${HealSpell[${a}].Right[-5]}" "item" "${Dismount}"
                        } else /if (${HealSpell[${a}].Left[8].Equal["activate"]}) { 
                            /echo -[ Casting Heal Spell : ${HealSpell[${a}]} ]-
                            /call Cast "${HealSpell[${a}].Right[-9]}" "activate" "${Dismount}"
                        } else { 
                            /echo -[ Casting Heal Spell : ${HealSpell[${a}]} ]-
                            /call Cast "${HealSpell[${a}]}" "gem${HealMemToSlot[${a}]}" "${Dismount}"
                        }

                        /if (${Macro.Return.Equal["CAST_LOSTTARGET"]}) {
                            /delay 5
                            /varset HealTimer 0
                            /return
                        }
                        /if (${Macro.Return.Equal["CAST_CANNOTSEE"]} || ${Macro.Return.Equal["CAST_OUTOFRANGE"]}) { 
                            /echo -(( Out of range or cannot be seen.  Waiting 10 seconds and trying again. ))-
                            /if (${PetHealFlag}==0) /varset HoTList[${Math.Calc[${b}+1]},1] ${Math.Calc[10+${Macro.RunTime}]}
                            /if (${PetHealFlag}==1) /varset HoTList[${Math.Calc[${b}+1]},2] ${Math.Calc[10+${Macro.RunTime}]}
                            /goto :BreakOutHoT
                        }
                        /if (${GroupHealFlag}==1) {
                            /delay 15
                            /varset GroupHealFlag 0
                        }
                        /if (${Spell[${HealSpellID[${a}]}].Duration}>0 && ${Macro.Return.Equal["CAST_SUCCESS"]}) {
                            /if (${PetHealFlag}==0) /varset HoTList[${Math.Calc[${b}+1]},1] ${Math.Calc[${Spell[${HealSpellID[${a}]}].Duration.Seconds}+${Macro.RunTime}]}
                            /if (${PetHealFlag}==1) /varset HoTList[${Math.Calc[${b}+1]},2] ${Math.Calc[${Spell[${HealSpellID[${a}]}].Duration.Seconds}+${Macro.RunTime}]}
                            /if (${Spell[${HealSpellID[${a}]}].Duration}>0 && ${Macro.Return.Equal["CAST_SUCCESS"]} && (${TempTargetType.Find["Group"]} || ${HealMinGroupCount[${a}]}>0)) {
                                /for c 0 to ${Group}
                                    /varset HoTList[${Math.Calc[${c}+1]},1] ${Math.Calc[${Spell[${HealSpellID[${a}]}].Duration.Seconds}+${Macro.RunTime}]}
                                /next c
                                /varset GroupHPTotal ${Math.Calc[100*${Math.Calc[${Group}+1]}]}
                                /goto :BreakOutHeal
                            }
                        }
                        /varset GroupHPTotal ${Math.Calc[100*${Math.Calc[${Group}+1]}]}
                    } else { 
                        /if (${RetryHealCount}==0) {
                            /if (!${Me.SpellReady["${HealSpell[${a}]}"]}) { 
                                /call Delay 3s 
                                /varset RetryHealCount ${Math.Calc[${RetryHealCount}+1]} 
                                /goto :RetryHeal 
                            }
                        } 
                        /echo -(( Heal Spell:${HealSpell[${a}]} not memmed or not ready. ))-
                        /goto :BreakOutHeal
                    } 
            :BreakOutHoT
            /next b
            /if (${TempTargetType.Find["Group"]} || ${HealMinGroupCount[${a}]}>0) {
                /varset TempGrpCt 0
                /for c 0 to ${Group}
                    /if (${Group[${c}].ID}>0) /varset TempGrpCt ${Math.Calc[${TempGrpCt}+1]}
                /next c
                /if (${Math.Calc[${GroupHPTotal}\${TempGrpCt}]}>${HealMinHP[${a}]} && ${Math.Calc[${GroupHPTotal}\${TempGrpCt}]}<${HealMaxHP[${a}]}) {
                    /for c 0 to ${Group}
                        /if (${Math.Calc[${Macro.RunTime}]}<${HoTList[${Math.Calc[${c}+1]},1]}) /goto :BreakOutHeal
                    /next c
                    /varset GroupHealFlag 1
                    /varset b 0
                    /goto :RetryHeal
                }
            }
        } 
    :BreakOutHeal
    /next a 
}
/return
Last edited by ml2517 on Sun May 16, 2004 10:31 pm, edited 49 times in total.

ml2517
a grimling bloodguard
a grimling bloodguard
Posts: 1216
Joined: Wed Nov 12, 2003 1:12 am

advbot.inc

Post by ml2517 » Wed Apr 28, 2004 2:30 am

advbot.inc

Code: Select all

| 
| advbot.inc 
| Include file for advbot.mac
| Version 1.35
| Date:5/16/2004 9:30pm
|

#Event Master "[MQ2] master#*#" 
#Event Debuff "[MQ2] debuff#*#" 
#Event Sit "[MQ2] sit#*#" 
#Event SelfBuff "[MQ2] selfbuff#*#" 
#Event GroupBuff "[MQ2] groupbuff#*#" 
#Event Evts "[MQ2] events#*#" 
#Event Heal "[MQ2] heal#*#" 
#Event Pet "[MQ2] pet#*#" 
#Event Exclude "[MQ2] exclude#*#" 
#Event Include "[MQ2] include#*#"
#Event Announce "[MQ2] announce#*#" 
#Event Reply "[MQ2] reply#*#" 
#Event Watch "[MQ2] watch#*#"
#Event Assist "[MQ2] assist#*#"
#Event Cmd "[MQ2] cmd#*#"
#Event Face "[MQ2] face#*#"
#Event Buff "[MQ2] buff#*#"
#Event Invite "#*#invites you to join a group.#*#"
#Event Slain "#*#Returning to home point, please wait...#*#"
#Event DelayOnZone "#*#You have entered#*#" 
#Event Enraged "#*#has become ENRAGED#*#"


Sub DebuffFunction
/if (${PauseDebuffs}==0) { 
    /varset PauseDebuffs 1 
    /echo -[ Debuffing Paused. ]-
    /if (${Reply}==1 && !${SenderName.Equal[nobody]}) /docommand /${If[${ReplyChannel.Find[ @]}>0,${ReplyChannel.Mid[1,${Math.Calc[${ReplyChannel.Find[ @]}-1]}]} ${SenderName},${ReplyChannel}]} Ok, I'm not going to debuff.
} else { 
    /varset PauseDebuffs 0 
    /echo -[ Debuffing Un-Paused. ]-
    /if (${Reply}==1 && !${SenderName.Equal[nobody]}) /docommand /${If[${ReplyChannel.Find[ @]}>0,${ReplyChannel.Mid[1,${Math.Calc[${ReplyChannel.Find[ @]}-1]}]} ${SenderName},${ReplyChannel}]} Ok, I'm going to debuff.
}
/return

Sub Event_Debuff(EvtText) 
/varset EvtText ${EvtText.Right[-6]}
/if (${EvtText.Equal["debuff"]}) { 
    /varset SenderName nobody
    /call DebuffFunction
} 
/return 

Sub EvtsFunction
/if (${PauseEvents}==0) { 
    /varset PauseEvents 1 
    /if (${Reply}==1 && !${SenderName.Equal[nobody]}) /docommand /${If[${ReplyChannel.Find[ @]}>0,${ReplyChannel.Mid[1,${Math.Calc[${ReplyChannel.Find[ @]}-1]}]} ${SenderName},${ReplyChannel}]} Ok, I'm not going to pay attention to hp or mana events.
    /echo -[ HP/Mana events Paused. ]-
} else { 
    /varset PauseEvents 0 
    /if (${Reply}==1 && !${SenderName.Equal[nobody]}) /docommand /${If[${ReplyChannel.Find[ @]}>0,${ReplyChannel.Mid[1,${Math.Calc[${ReplyChannel.Find[ @]}-1]}]} ${SenderName},${ReplyChannel}]} Ok, I'm going to pay attention to hp or mana events.
    /echo -[ HP/Mana events Unpaused. ]-
} 
/return

Sub Event_Evts
/varset SenderName nobody
/call EvtsFunction
/return 

Sub HealFunction(HealCmd)
/if (${Defined[HealCmd]}) {
    /if (${HealCmd.Equal[pets]}) {
        /if (${HealPets}==1) {
            /varset HealPets 0
            /if (${Reply}==1 && !${SenderName.Equal[nobody]}) /docommand /${If[${ReplyChannel.Find[ @]}>0,${ReplyChannel.Mid[1,${Math.Calc[${ReplyChannel.Find[ @]}-1]}]} ${SenderName},${ReplyChannel}]} I'm not going to heal pets anymore.
            /echo -[ Pet Healing Paused. ]-
        } else {
            /varset HealPets 1
            /if (${Reply}==1 && !${SenderName.Equal[nobody]}) /docommand /${If[${ReplyChannel.Find[ @]}>0,${ReplyChannel.Mid[1,${Math.Calc[${ReplyChannel.Find[ @]}-1]}]} ${SenderName},${ReplyChannel}]} Ok, I'll heal pets.
            /echo -[ Pet Healing Unpaused. ]-
        }
    }
    /return
} else {
    /if (${PauseHeals}==0) { 
        /varset PauseHeals 1 
        /if (${Reply}==1 && !${SenderName.Equal[nobody]}) /docommand /${If[${ReplyChannel.Find[ @]}>0,${ReplyChannel.Mid[1,${Math.Calc[${ReplyChannel.Find[ @]}-1]}]} ${SenderName},${ReplyChannel}]} I'm not going to watch your health, so don't die!
        /echo -[ Healing Paused. ]-
    } else { 
        /varset PauseHeals 0 
        /if (${Reply}==1 && !${SenderName.Equal[nobody]}) /docommand /${If[${ReplyChannel.Find[ @]}>0,${ReplyChannel.Mid[1,${Math.Calc[${ReplyChannel.Find[ @]}-1]}]} ${SenderName},${ReplyChannel}]} I'll watch you for heals.
        /echo -[ Healing Unpaused. ]-
    } 
}
/return

Sub Event_Heal(EvtText) 
/if (${EvtText.Right[-11].Length}>0) {
    /varset SenderName nobody
    /call HealFunction "${EvtText.Right[-11]}"
} else {
    /varset SenderName nobody
    /call HealFunction
}
/return 

Sub PetFunction(PetCmd)
/declare f int local
/declare Reason string local
/if (${Defined[PetCmd]}) {
    /if (${PetCmd.Equal[summon]}) {
        /if (${Reply}==1 && !${SenderName.Equal[nobody]}) /docommand /${If[${ReplyChannel.Find[ @]}>0,${ReplyChannel.Mid[1,${Math.Calc[${ReplyChannel.Find[ @]}-1]}]} ${SenderName},${ReplyChannel}]} Ok, I'll summon a pet.
        /echo -[ Summoning a pet. ]-
        /if ((${Me.Gem[${PetSummonSpell}]})||(${PetSummonSpell.Find["item"]})||(${PetSummonSpell.Find["activate"]})||(${PetSummonMemToSlot}>0)) {
            /if ((${PetSummonSpell.Find["activate"]})&&(!${Me.AltAbilityReady[${PetSummonSpell.Right[-9]}]})) {
                /varset Reason Ability Not Ready
                /goto :ErrorSummon
            }
            /if ((!${PetSummonSpell.Find["item"]}>0)&&(!${PetSummonSpell.Find["activate"]}>0)) {
                /if (${Me.Gem[${PetSummonSpell}]}) {
                    /for f 1 to 30
                        /delay 1
                        /if (${Me.SpellReady["${PetSummonSpell}"]}) {
                            /goto :ContinueSummon
                        }
                    /next f
                    /if (!${Me.SpellReady["${PetSummonSpell}"]}) {
                        /varset Reason Spell Not Ready
                        /goto :ErrorSummon
                    }
                }
            }
            :ContinueSummon
            /if (${Me.Sitting}) /stand
            /if (${PetSummonSpell.Left[4].Equal["item"]}) {
                /echo -[ Casting Pet Summon : ${PetSummonSpell}. ]-
                /call Cast "${PetSummonSpell.Right[-5]}" "item" "nocheck"
            } else /if (${PetSummonSpell.Left[8].Equal["activate"]}) { 
                /echo -[ Casting Pet Summon : ${PetSummonSpell}. ]-
                /call Cast "${PetSummonSpell.Right[-9]}" "activate" "nocheck"
            } else { 
                /echo -[ Casting Pet Summon : ${PetSummonSpell}. ]-
                /call Cast "${PetSummonSpell}" "gem${PetSummonMemToSlot}" "nocheck"
            }
            /if (${Macro.Return.Equal["CAST_TOOK2LONG"]}) {
                /echo -(( Cast took too long, aborting. ))-
                /varset Reason Cast Took Too Long
                /goto :ErrorSummon
            }
        } else {
            /varset Reason Unknown Error
            /goto :ErrorSummon
        }
    } else {
        /pet ${PetCmd}
    }
    /return
    :ErrorSummon
    /delay 15
    /if (${Reply}==1 && !${SenderName.Equal[nobody]}) /docommand /${If[${ReplyChannel.Find[ @]}>0,${ReplyChannel.Mid[1,${Math.Calc[${ReplyChannel.Find[ @]}-1]}]} ${SenderName},${ReplyChannel}]} Couldn't summon pet because ${Reason}.
    /echo -(( Couldn't Summon Pet - Reason:${Reason}. ))-
} else {
    /if (${PausePet}==0) { 
        /varset PausePet 1 
        /if (${Reply}==1 && !${SenderName.Equal[nobody]}) /docommand /${If[${ReplyChannel.Find[ @]}>0,${ReplyChannel.Mid[1,${Math.Calc[${ReplyChannel.Find[ @]}-1]}]} ${SenderName},${ReplyChannel}]} Ok, I'm not going to have my pet assist you.
        /echo -[ Pet Assisting Paused. ]-
    } else { 
        /varset PausePet 0 
        /if (${Reply}==1 && !${SenderName.Equal[nobody]}) /docommand /${If[${ReplyChannel.Find[ @]}>0,${ReplyChannel.Mid[1,${Math.Calc[${ReplyChannel.Find[ @]}-1]}]} ${SenderName},${ReplyChannel}]} Ok, I'm going to have my pet assist you.
        /echo -[ Pet Assisting Unpaused. ]-
    } 
}
/return

Sub Event_Pet(EvtText) 
/if (${EvtText.Right[-10].Length}>0) {
    /varset SenderName nobody
    /call PetFunction "${EvtText.Right[-10]}"
} else {
    /varset SenderName nobody
    /call PetFunction
}
/return 

Sub CmdFunction(CmdStr)
/if (${Defined[CmdStr]}) {
    /if (${CmdStr.Length}>0) {
        /docommand /${CmdStr}
    }
}
/return

Sub Event_Invite(EvtText) 
/declare TempVar int local 
/varset TempVar 0 
:CheckAuth 
/if (!${MasterList[${TempVar}].Equal["UNDEFINED-ARRAY-ELEMENT"]}) { 
    /if (${MasterList[${TempVar}].Equal["${EvtText.Arg[1]}"]}) { 
        /invite
        /return
    } 
    /varset TempVar ${Math.Calc[${TempVar}+1]} 
    /goto :CheckAuth 
} 
/return 


Sub Event_Cmd(EvtText) 
/if (${EvtText.Right[-10].Length}>0) {
    /varset SenderName nobody
    /call CmdFunction "${EvtText.Right[-10]}"
}
/return 

Sub AssistFunction(TankNm)
/if (${Defined[TankNm]}) {
    /varset TankName ${TankNm}
    /if (${Reply}==1 && !${SenderName.Equal[nobody]}) /docommand /${If[${ReplyChannel.Find[ @]}>0,${ReplyChannel.Mid[1,${Math.Calc[${ReplyChannel.Find[ @]}-1]}]} ${SenderName},${ReplyChannel}]} I'm going to assist ${TankName} while we are fighting.
    /echo -[ Assisting ${TankName} During Combat. ]-
} else {
    /if (${PauseAssist}==0) { 
        /varset PauseAssist 1 
        /if (${Reply}==1 && !${SenderName.Equal[nobody]}) /docommand /${If[${ReplyChannel.Find[ @]}>0,${ReplyChannel.Mid[1,${Math.Calc[${ReplyChannel.Find[ @]}-1]}]} ${SenderName},${ReplyChannel}]} I'm not going to assist the tank while we are fighting.
        /echo -[ Assisting Paused. ]-
    } else { 
        /varset PauseAssist 0 
        /if (${Reply}==1 && !${SenderName.Equal[nobody]}) /docommand /${If[${ReplyChannel.Find[ @]}>0,${ReplyChannel.Mid[1,${Math.Calc[${ReplyChannel.Find[ @]}-1]}]} ${SenderName},${ReplyChannel}]} I'll assist the tank while we are fighting.
        /echo -[ Assisting Unpaused. ]-
    } 
}
/return

Sub Event_Assist(EvtText) 
/if (${EvtText.Arg[3].Length}>0) {
    /varset SenderName nobody
    /call AssistFunction "${EvtText.Arg[3]}"
} else {
    /varset SenderName nobody
    /call AssistFunction
}
/return 


Sub ReplyFunction
/if (${Reply}==0) { 
    /varset Reply 1 
/echo ${If[${ReplyChannel.Find[ @]}>0,${ReplyChannel.Mid[1,${Math.Calc[${ReplyChannel.Find[ @]}-1]}]} ${SenderName},${ReplyChannel}]} I'm going to reply.
    /if (!${SenderName.Equal[nobody]}) /docommand /${If[${ReplyChannel.Find[ @]}>0,${ReplyChannel.Mid[1,${Math.Calc[${ReplyChannel.Find[ @]}-1]}]} ${SenderName},${ReplyChannel}]} I'm going to reply.
    /echo -[ Replies turned ON. ]-
} else { 
    /varset Reply 0 
    /if (!${SenderName.Equal[nobody]}) /docommand /${If[${ReplyChannel.Find[ @]}>0,${ReplyChannel.Mid[1,${Math.Calc[${ReplyChannel.Find[ @]}-1]}]} ${SenderName},${ReplyChannel}]} I'm not going to reply.
    /echo -[ Replies turned OFF. ]-
} 
/return

Sub Event_Reply(EvtText) 
/varset SenderName nobody
/call ReplyFunction
/return 


Sub AnnounceFunction
/if (${Announce}==0) { 
    /varset Announce 1 
    /if (${Reply}==1 && !${SenderName.Equal[nobody]}) /docommand /${If[${ReplyChannel.Find[ @]}>0,${ReplyChannel.Mid[1,${Math.Calc[${ReplyChannel.Find[ @]}-1]}]} ${SenderName},${ReplyChannel}]} I'm going to tell people what I'm doing.
    /echo -[ Announcements turned ON. ]-
} else { 
    /varset Announce 0 
    /if (${Reply}==1 && !${SenderName.Equal[nobody]}) /docommand /${If[${ReplyChannel.Find[ @]}>0,${ReplyChannel.Mid[1,${Math.Calc[${ReplyChannel.Find[ @]}-1]}]} ${SenderName},${ReplyChannel}]} I'm not going to bother telling people what I'm doing.
    /echo -[ Announcements turned OFF. ]-
} 
/return

Sub Event_Announce(EvtText) 
/varset SenderName nobody
/call AnnounceFunction
/return 

Sub FaceFunction
/if (${FaceBeforeDebuff}==0) { 
    /varset FaceBeforeDebuff 1 
    /if (${Reply}==1 && !${SenderName.Equal[nobody]}) /docommand /${If[${ReplyChannel.Find[ @]}>0,${ReplyChannel.Mid[1,${Math.Calc[${ReplyChannel.Find[ @]}-1]}]} ${SenderName},${ReplyChannel}]} I'm not going to bother looking at mobs when I debuff them.
    /echo -[ Facing before debuffs turned ON. ]-
} else { 
    /varset FaceBeforeDebuff 0 
    /if (${Reply}==1 && !${SenderName.Equal[nobody]}) /docommand /${If[${ReplyChannel.Find[ @]}>0,${ReplyChannel.Mid[1,${Math.Calc[${ReplyChannel.Find[ @]}-1]}]} ${SenderName},${ReplyChannel}]} I'll look at mobs when I debuff them.
    /echo -[ Facing before debuffs turned OFF. ]-
} 
/return

Sub Event_Face
/varset SenderName nobody
/call FaceFunction
/return 

Sub SelfBuffFunction(CmdText)
/declare a int local 
/declare b int local
/declare c int local
/declare TempIndex int local
/declare TempIndex2 int local
/if (${SelfBuffCount}>0) { 
    /if (${CmdText.Equal["selfbuff"]}) { 
        /if (${PauseSelfBuffs}==0) { 
            /varset PauseSelfBuffs 1 
            /if (${Reply}==1 && !${SenderName.Equal[nobody]}) /docommand /${If[${ReplyChannel.Find[ @]}>0,${ReplyChannel.Mid[1,${Math.Calc[${ReplyChannel.Find[ @]}-1]}]} ${SenderName},${ReplyChannel}]} Ok, I'm not going to self buff.
            /echo -[ Self Buffs Paused. ]-
        } else { 
            /varset PauseSelfBuffs 0 
            /if (${Reply}==1 && !${SenderName.Equal[nobody]}) /docommand /${If[${ReplyChannel.Find[ @]}>0,${ReplyChannel.Mid[1,${Math.Calc[${ReplyChannel.Find[ @]}-1]}]} ${SenderName},${ReplyChannel}]} Ok, I'm going to self buff.
            /echo -[ Self Buffs Unpaused. ]-
        } 
    } else /if (${CmdText.Right[-9].Equal["all"]}) { 
        /for a 1 to ${SelfBuffCount} 
            /varset SelfBuffedList[${a}] 0 
        /next a 
        /if (${Reply}==1 && !${SenderName.Equal[nobody]}) /docommand /${If[${ReplyChannel.Find[ @]}>0,${ReplyChannel.Mid[1,${Math.Calc[${ReplyChannel.Find[ @]}-1]}]} ${SenderName},${ReplyChannel}]} Ok, I'll totally buff myself.
        /echo -[ Self Buffing with all buffs. ]-
    } else {
        /for b 1 to 8 
            /if (${CmdText.Arg[2].Equal["${b}"]}) { 
                /if ((${CmdText.Arg[2]}>0)&&(${CmdText.Arg[2]}<${Math.Calc[${SelfBuffCount}+1]})) {
                    /varset TempIndex ${CmdText.Arg[2]}
                    /if (${TempIndex}>0) {
                        /varset SelfBuffedList[${TempIndex}] 0
                        /if (${Reply}==1 && !${SenderName.Equal[nobody]}) /docommand /${If[${ReplyChannel.Find[ @]}>0,${ReplyChannel.Mid[1,${Math.Calc[${ReplyChannel.Find[ @]}-1]}]} ${SenderName},${ReplyChannel}]} Ok, I'll buff myself with ${SelfBuff[${b}]}.
                        /echo -[ Self Buffing with ${SelfBuff[${b}]}. ]-
                    }
                    /goto :BreakOutRebuff 
                } 
            } 
        /next b 

        :LookUpAlias
        /varset TempIndex2 0
        /for c 1 to 8
            /if (${SelfBuffAliasName[${c}].Equal[${CmdText.Arg[2]}]}) /varset TempIndex2 ${c}
        /next c

        /if ((${TempIndex2}>0)&&(${TempIndex2}<${Math.Calc[${SelfBuffCount}+1]})) {
            /varset TempIndex ${TempIndex2}
            /if (${TempIndex}>0) {
                /varset SelfBuffedList[${TempIndex}] 0
                /if (${Reply}==1 && !${SenderName.Equal[nobody]}) /docommand /${If[${ReplyChannel.Find[ @]}>0,${ReplyChannel.Mid[1,${Math.Calc[${ReplyChannel.Find[ @]}-1]}]} ${SenderName},${ReplyChannel}]} Ok, I'll buff myself with ${SelfBuff[${TempIndex}]}.
                /echo -[ Self Buffing with ${SelfBuff[${TempIndex}]}. ]-
            }

        } 
        :BreakOutRebuff 
    }
} 
/return

Sub Event_Slain
/echo -(( Death detected, waiting 10 seconds and then putting all functions on hold. ))-
/echo -(( You must issue the appropriate command to restart each function or restart. ))-
/delay 10s
/if (${PauseDebuffs}==0) /call DebuffFunction
/if (${PauseEvents}==0) /call EvtsFunction
/if (${PauseHeals}==0) /call HealFunction
/if (${PauseSelfBuffs}==0) /call SelfBuffFunction "selfbuff"
/if (${PauseGroupBuffs}==0) /call GroupBuffFunction "groupbuff"
/return

Sub Event_SelfBuff(EvtText) 
/varset EvtText ${EvtText.Right[-6]}
/varset SenderName nobody
/call SelfBuffFunction "${EvtText}"
/return 

Sub BuffFunction(CmdText)
/declare a int local 
/declare b int local
/declare c int local
/declare f int local
/declare Reason string local
/declare TempIndex int local
/declare TempIndex2 string local
/declare PlayerID int local
/declare BuffPlayerName string local
/if (!${CmdText.Arg[3].Length}>0) {
    /varset Reason You didn't give a name
    /goto :ErrorBuff
}
/varset BuffPlayerName ${CmdText.Right[-5]}
/varset BuffPlayerName ${BuffPlayerName.Mid[${BuffPlayerName.Find[" "]},${BuffPlayerName.Length}]}
/varset PlayerID ${NearestSpawn[1,pc ${BuffPlayerName}].ID}
/if (!${PlayerID}>0) /varset PlayerID ${NearestSpawn[1,pet ${BuffPlayerName}].ID}
/if (!${PlayerID}>0) {
    /varset Reason I don't see them around
    /goto :ErrorBuff
}
/if (${GroupBuffCount}>0) { 
    /if (${CmdText.Right[-5].Arg[2].Length}>0) {
        /varset TempIndex2 0
        /for c 1 to 8
            /if (${GroupBuffAliasName[${c}].Equal[${CmdText.Arg[2]}]}) /varset TempIndex2 ${c}
        /next c
        /if (${TempIndex2.Equal[0]}) /varset TempIndex2 ${CmdText.Arg[2]}

        /for a 1 to 8 
            /if (${TempIndex2.Equal["${Int[${a}]}"]}) { 
                /if ((${Int[${TempIndex2}]}>0)&&(${Int[${TempIndex2}]}<${Math.Calc[${GroupBuffCount}+1]})) {
                    /if (${PlayerID}>0 && ${Spawn[${PlayerID}].Distance}<85) {
                        /varset TempIndex ${TempIndex2}
                        /if (${Reply}==1 && !${SenderName.Equal[nobody]}) /docommand /${If[${ReplyChannel.Find[ @]}>0,${ReplyChannel.Mid[1,${Math.Calc[${ReplyChannel.Find[ @]}-1]}]} ${SenderName},${ReplyChannel}]} Ok, I'll buff ${BuffPlayerName} with ${GroupBuff[${a}]}.
                        /echo -[ Buffing ${BuffPlayerName} with ${GroupBuff[${a}]}. ]-
                        /if ((${Me.Gem[${GroupBuff[${a}]}]})||(${GroupBuff[${a}].Find["item"]})||(${GroupBuff[${a}].Find["activate"]})||(${GroupBuffMemToSlot[${a}]}>0)) {
                            /if ((${GroupBuff[${a}].Find["activate"]})&&(!${Me.AltAbilityReady[${GroupBuff[${a}].Right[-9]}]})) {
                                /varset Reason Ability Not Ready
                                /goto :ErrorBuff
                            }
                            /if ((!${GroupBuff[${a}].Find["item"]}>0)&&(!${GroupBuff[${a}].Find["activate"]}>0)) {
                                /if (${Me.Gem[${GroupBuff[${a}]}]}) {
                                    /for f 1 to 30
                                        /delay 1
                                        /if (${Me.SpellReady["${GroupBuff[${a}]}"]}) {
                                            /goto :ContinueGroupBuff
                                        }
                                    /next f
                                    /if (!${Me.SpellReady["${GroupBuff[${a}]}"]}) {
                                        /varset Reason Spell Not Ready
                                        /goto :ErrorBuff
                                    }
                               }
                            }
                            :ContinueGroupBuff
                            /if (${Me.ID}!=${PlayerID}) {
                                /squelch /target id ${PlayerID}
                            } else {
                                /squelch /target myself
                            }
                            /delay 1s ${Target.ID}==${PlayerID}
                            /if (!${Target.CleanName.Equal[${BuffPlayerName}]}) { 
                                /varset Reason Can't target ${BuffPlayerName}
                                /goto :ErrorBuff
                            }
                            /if (${Me.Sitting}) /stand
                            /if (${GroupBuff[${a}].Left[4].Equal["item"]}) {
                                /echo -[ Casting Buff : ${GroupBuff[${a}]} on ${BuffPlayerName}. ]-
                                /call Cast "${GroupBuff[${a}].Right[-5]}" "item" "${Dismount}"
                            } else /if (${GroupBuff[${a}].Left[8].Equal["activate"]}) { 
                                /echo -[ Casting Buff : ${GroupBuff[${a}]} on ${BuffPlayerName}. ]-
                                /call Cast "${GroupBuff[${a}].Right[-9]}" "activate" "${Dismount}"
                            } else { 
                                /echo -[ Casting Buff : ${GroupBuff[${a}]} on ${BuffPlayerName}. ]-
                                /call Cast "${GroupBuff[${a}]}" "gem${GroupBuffMemToSlot[${a}]}" "${Dismount}"
                            }
                            /if (${Macro.Return.Equal["CAST_TOOK2LONG"]} || ${Macro.Return.Equal["CAST_LOSTTARGET"]}) {
                                /echo -(( Cast took too long or lost target, aborting. ))-
                                /varset Reason Cast Took Too Long or Lost Target
                                /goto :ErrorBuff
                            }
                            /if ((${Macro.Return.Equal["CAST_CANNOTSEE"]})||(${Macro.Return.Equal["CAST_OUTOFRANGE"]})) { 
                                /echo -(( Out of range or cannot be seen, aborting. ))-
                                /varset Reason Target Out of Range
                                /goto :ErrorBuff
                            }
                        } else {
                            /varset Reason Unknown Error
                            /goto :ErrorBuff
                        }
                        /goto :BreakOutRebuff1
                    } else {
                        /varset Reason Target Not in Zone or too far away
                        /goto :ErrorBuff
                    }
                } 
            }
        /next a 
        /if (${CmdText.Arg[2].Equal[all]}) {
                /if (${Reply}==1 && !${SenderName.Equal[nobody]}) /docommand /${If[${ReplyChannel.Find[ @]}>0,${ReplyChannel.Mid[1,${Math.Calc[${ReplyChannel.Find[ @]}-1]}]} ${SenderName},${ReplyChannel}]} Ok, buffing ${BuffPlayerName} with every buff.
                /echo -[ Buffing Target ${BuffPlayerName} with all group buffs. ]-
                /for a 1 to ${GroupBuffCount}
                    /if (${PlayerID}>0 && ${Spawn[${PlayerID}].Distance}<85) {
                        /varset TempIndex ${CmdText.Arg[2]}
                        /echo -[ Buffing ${BuffPlayerName} with ${GroupBuff[${a}]}. ]-
                        /if ((${Me.Gem[${GroupBuff[${a}]}]})||(${GroupBuff[${a}].Find["item"]})||(${GroupBuff[${a}].Find["activate"]})||(${GroupBuffMemToSlot[${a}]}>0)) {
                            /if ((${GroupBuff[${a}].Find["activate"]})&&(!${Me.AltAbilityReady[${GroupBuff[${a}].Right[-9]}]})) {
                                /varset Reason Ability Not Ready
                                /goto :ErrorBuff
                            }
                            /if ((!${GroupBuff[${a}].Find["item"]}>0)&&(!${GroupBuff[${a}].Find["activate"]}>0)) {
                                /if (${Me.Gem[${GroupBuff[${a}]}]}) {
                                    /for f 1 to 30
                                        /delay 1
                                        /if (${Me.SpellReady["${GroupBuff[${a}]}"]}) {
                                            /goto :ContinueGroupBuff2
                                        }
                                    /next f
                                    /if (!${Me.SpellReady["${GroupBuff[${a}]}"]}) {
                                        /varset Reason Spell Not Ready
                                        /goto :ErrorBuff
                                    }
                                }
                            }
                            :ContinueGroupBuff2
                            /if (${Me.ID}!=${PlayerID}) {
                                /squelch /target id ${PlayerID}
                            } else {
                                /squelch /target myself
                            }
                            /delay 1s ${Target.ID}==${PlayerID}

                            /if (!${Target.CleanName.Equal[${BuffPlayerName}]}) { 
                                /varset Reason Can't target ${BuffPlayerName}
                                /goto :ErrorBuff
                            }
                            /if (${Me.Sitting}) /stand
                            /if (${GroupBuff[${a}].Left[4].Equal["item"]}) {
                                /echo -[ Casting Buff : ${GroupBuff[${a}]} on ${BuffPlayerName}. ]-
                                /call Cast "${GroupBuff[${a}].Right[-5]}" "item" "${Dismount}"
                            } else /if (${GroupBuff[${a}].Left[8].Equal["activate"]}) { 
                                /echo -[ Casting Buff : ${GroupBuff[${a}]} on ${BuffPlayerName}. ]-
                                /call Cast "${GroupBuff[${a}].Right[-9]}" "activate" "${Dismount}"
                            } else { 
                                /echo -[ Casting Buff : ${GroupBuff[${a}]} on ${BuffPlayerName}. ]-
                                /call Cast "${GroupBuff[${a}]}" "gem${GroupBuffMemToSlot[${a}]}" "${Dismount}"
                            }
                            /if (${Macro.Return.Equal["CAST_TOOK2LONG"]}) {
                                /echo -(( Cast took too long, aborting. ))-
                                /varset Reason Cast Took Too Long
                                /goto :ErrorBuff
                            }
                            /if ((${Macro.Return.Equal["CAST_CANNOTSEE"]})||(${Macro.Return.Equal["CAST_OUTOFRANGE"]})) { 
                                /echo -(( Out of range or cannot be seen, aborting. ))-
                                /varset Reason Target Out of Range
                                /goto :ErrorBuff
                            }
                        } else {
                            /varset Reason Unknown Error
                            /goto :ErrorBuff
                        }
                    } else {
                        /varset Reason Target Not in Zone or too far away
                        /goto :ErrorBuff
                    }
                /next a
                /goto :BreakOutRebuff1
            } else {
                /goto :ErrorBuff
            }
        }
        :ErrorBuff
        /delay 15
        /if (${Reply}==1 && !${SenderName.Equal[nobody]}) /docommand /${If[${ReplyChannel.Find[ @]}>0,${ReplyChannel.Mid[1,${Math.Calc[${ReplyChannel.Find[ @]}-1]}]} ${SenderName},${ReplyChannel}]} Couldn't buff ${BuffPlayerName} because ${Reason}.
        /echo -(( Couldn't buff ${BuffPlayerName} Reason:${Reason}. ))-
    }
} 
:BreakOutRebuff1
/return

Sub Event_Buff(EvtText) 
/varset EvtText ${EvtText.Right[-6]}
/varset SenderName nobody
/call BuffFunction "${EvtText}"
/return 

Sub GroupBuffFunction(CmdText)
/declare a int local 
/declare b int local
/declare c int local
/declare TempIndex int local
/declare TempIndex2 int local
/if (${GroupBuffCount}>0) { 
    /if (${CmdText.Equal["groupbuff"]}) { 
        /if (${PauseGroupBuffs}==0) { 
            /varset PauseGroupBuffs 1 
            /if (${Reply}==1 && !${SenderName.Equal[nobody]}) /docommand /${If[${ReplyChannel.Find[ @]}>0,${ReplyChannel.Mid[1,${Math.Calc[${ReplyChannel.Find[ @]}-1]}]} ${SenderName},${ReplyChannel}]} Ok, I'm not going to group buff.
            /echo -[ Group Buffs Paused. ]-
        } else { 
            /varset PauseGroupBuffs 0 
            /if (${Reply}==1 && !${SenderName.Equal[nobody]}) /docommand /${If[${ReplyChannel.Find[ @]}>0,${ReplyChannel.Mid[1,${Math.Calc[${ReplyChannel.Find[ @]}-1]}]} ${SenderName},${ReplyChannel}]} Ok, I'm going to group buff.
            /echo -[ Group Buffs Unpaused. ]-
        } 
    } else /if (${CmdText.Right[-10].Equal["all"]}) { 
        /for a 1 to ${GroupBuffCount} 
            /for b 1 to 6
                /if (${Spell[${GroupBuffID[${a}]}].TargetType.Find["Group"]}) {
                    /varset GBL[${a},${b}] 99999
                    /if (${b}==1) /varset GBL[${a},${b}] 0 
                } else {
                    /varset GBL[${a},${b}] 0 
                }
            /next b
        /next a
        /echo -[ Group Buffing with all buffs. ]-
        /if (${Reply}==1 && !${SenderName.Equal[nobody]}) /docommand /${If[${ReplyChannel.Find[ @]}>0,${ReplyChannel.Mid[1,${Math.Calc[${ReplyChannel.Find[ @]}-1]}]} ${SenderName},${ReplyChannel}]} Ok, I'll totally buff everyone.
    } else /if (${CmdText.Right[-10].Arg[2].Length}>0) {
        /for a 1 to 8 
            /if (${CmdText.Arg[2].Equal["${Int[${a}]}"]}) { 
                /if ((${CmdText.Arg[2]}>0)&&(${CmdText.Arg[2]}<${Math.Calc[${GroupBuffCount}+1]})) {
                    /for b 1 to 6
                        /if (${Group[${Math.Calc[${b}-1]}].Name.Equal[${CmdText.Arg[3]}]} || ${String[${b}].Equal[${CmdText.Arg[3]}]}) {
                            /varset TempIndex ${CmdText.Arg[2]}
                            /if (!${Spell[${GroupBuffID[${TempIndex}]}].TargetType.Find["Group"]}>0) {
                                /if (${Reply}==1 && !${SenderName.Equal[nobody]}) /docommand /${If[${ReplyChannel.Find[ @]}>0,${ReplyChannel.Mid[1,${Math.Calc[${ReplyChannel.Find[ @]}-1]}]} ${SenderName},${ReplyChannel}]} Ok, I'll buff ${Group[${Math.Calc[${b}-1]}].CleanName} with ${GroupBuff[${a}]}.
                                /echo -[ Group Buffing ${Group[${Math.Calc[${b}-1]}].CleanName} with ${GroupBuff[${a}]}. ]-
                                /varset GBL[${TempIndex},${b}] 0 
                            } else {
                                /if (${Reply}==1 && !${SenderName.Equal[nobody]}) /docommand /${If[${ReplyChannel.Find[ @]}>0,${ReplyChannel.Mid[1,${Math.Calc[${ReplyChannel.Find[ @]}-1]}]} ${SenderName},${ReplyChannel}]} Sorry, thats a group buff.
                                /echo -(( Buff requested is a group based buff, not a single target buff. ))-
                            }
                        }
                    /next b
                    /goto :BreakOutRebuff1
                } 
            } else /if (${CmdText.Arg[2].Equal[all]}) {

                /for b 1 to 6
                    /if (${Group[${Math.Calc[${b}-1]}].Name.Equal[${CmdText.Arg[3]}]} || ${String[${b}].Equal[${CmdText.Arg[3]}]}) {
                        /varset TempIndex ${a}
                        /if (!${Spell[${GroupBuffID[${TempIndex}]}].TargetType.Find["Group"]}>0) {
                            /varset GBL[${TempIndex},${b}] 0 
                        } else {
                            /if (${Reply}==1 && !${SenderName.Equal[nobody]}) /docommand /${If[${ReplyChannel.Find[ @]}>0,${ReplyChannel.Mid[1,${Math.Calc[${ReplyChannel.Find[ @]}-1]}]} ${SenderName},${ReplyChannel}]} Sorry, thats a group buff.
                            /echo -(( Buff requested is a group based buff, not a single target buff. ))-
                        }
                    }
                /next b
                /if (${Reply}==1 && !${SenderName.Equal[nobody]}) /docommand /${If[${ReplyChannel.Find[ @]}>0,${ReplyChannel.Mid[1,${Math.Calc[${ReplyChannel.Find[ @]}-1]}]} ${SenderName},${ReplyChannel}]} Ok, I'll buff ${Group[${Math.Calc[${b}-1]}].CleanName} with every buff.
                /echo -[ Group Buffing ${Group[${Math.Calc[${b}-1]}].CleanName} with every buff. ]-
            }
        /next a
        /if (${a}>8) /goto :LookUpAlias
        /goto :BreakOutRebuff1

        :LookUpAlias
        /varset TempIndex2 0
        /for c 1 to 8
            /if (${GroupBuffAliasName[${c}].Equal[${CmdText.Arg[2]}]}) /varset TempIndex2 ${c}
        /next c

        /if ((${TempIndex2}>0)&&(${TempIndex2}<${Math.Calc[${GroupBuffCount}+1]})) {
            /for b 1 to 6
                /if (${Group[${Math.Calc[${b}-1]}].Name.Equal[${CmdText.Arg[3]}]} || ${String[${b}].Equal[${CmdText.Arg[3]}]}) {
                    /varset TempIndex ${TempIndex2}
                    /if (!${Spell[${GroupBuffID[${TempIndex}]}].TargetType.Find["Group"]}>0) {
                        /if (${Reply}==1 && !${SenderName.Equal[nobody]}) /docommand /${If[${ReplyChannel.Find[ @]}>0,${ReplyChannel.Mid[1,${Math.Calc[${ReplyChannel.Find[ @]}-1]}]} ${SenderName},${ReplyChannel}]} Ok, I'll buff ${Group[${Math.Calc[${b}-1]}].CleanName} with ${GroupBuff[${TempIndex}]}.
                        /echo -[ Group Buffing ${Group[${Math.Calc[${b}-1]}].CleanName} with ${GroupBuff[${TempIndex}]}. ]-
                        /varset GBL[${TempIndex},${b}] 0 
                    } else {
                        /if (${Reply}==1 && !${SenderName.Equal[nobody]}) /docommand /${If[${ReplyChannel.Find[ @]}>0,${ReplyChannel.Mid[1,${Math.Calc[${ReplyChannel.Find[ @]}-1]}]} ${SenderName},${ReplyChannel}]} Sorry, thats a group buff.
                        /echo -(( Buff requested is a group based buff, not a single target buff. ))-
                    }
                }
            /next b
            /goto :BreakOutRebuff1
        } 

        :BreakOutRebuff1
    } else {
        /for a 1 to 8 
            /if (${CmdText.Arg[2].Equal["${Int[${a}]}"]}) { 
                /if ((${CmdText.Arg[2]}>0)&&(${CmdText.Arg[2]}<${Math.Calc[${GroupBuffCount}+1]})) {
                    /for b 1 to 6
                        /varset TempIndex ${CmdText.Arg[2]}
                        /if (${Spell[${GroupBuffID[${TempIndex}]}].TargetType.Find["Group"]}) {
                            /varset GBL[${TempIndex},${b}] 99999
                            /if (${b}==1) /varset GBL[${TempIndex},${b}] 0 
                        } else {
                            /varset GBL[${TempIndex},${b}] 0 
                        }
                    /next b
                    /goto :BreakOutRebuff2 
                } 
            }
        /next a 
        /if (${a}>8) /goto :LookUpAlias2
        :BreakOutRebuff2
        /if (${Reply}==1 && !${SenderName.Equal[nobody]}) /docommand /${If[${ReplyChannel.Find[ @]}>0,${ReplyChannel.Mid[1,${Math.Calc[${ReplyChannel.Find[ @]}-1]}]} ${SenderName},${ReplyChannel}]} Ok, I'll buff everyone with ${GroupBuff[${a}]}.
        /echo -[ Group Buffing everyone with ${GroupBuff[${a}]}. ]-
        /return

        :LookUpAlias2

        /varset TempIndex2 0
        /for c 1 to 8
            /if (${GroupBuffAliasName[${c}].Equal[${CmdText.Arg[2]}]}) /varset TempIndex2 ${c}
        /next c

        /if (${TempIndex2}==0) {
            /if (${Reply}==1 && !${SenderName.Equal[nobody]}) /docommand /${If[${ReplyChannel.Find[ @]}>0,${ReplyChannel.Mid[1,${Math.Calc[${ReplyChannel.Find[ @]}-1]}]} ${SenderName},${ReplyChannel}]} I couldn't find that buff.
            /echo -(( Group Buff: ${CmdText.Arg[2]} could not be found. ))-
            /return
        }

        /if ((${TempIndex2}>0)&&(${TempIndex2}<${Math.Calc[${GroupBuffCount}+1]})) {
            /for b 1 to 6
                /varset TempIndex ${TempIndex2}
                /if (${Spell[${GroupBuffID[${TempIndex}]}].TargetType.Find["Group"]}) {
                    /varset GBL[${TempIndex},${b}] 99999
                    /if (${b}==1) /varset GBL[${TempIndex},${b}] 0 
                } else {
                    /varset GBL[${TempIndex},${b}] 0 
                }
            /next b
        } 

        /if (${Reply}==1 && !${SenderName.Equal[nobody]}) /docommand /${If[${ReplyChannel.Find[ @]}>0,${ReplyChannel.Mid[1,${Math.Calc[${ReplyChannel.Find[ @]}-1]}]} ${SenderName},${ReplyChannel}]} Ok, I'll buff everyone with ${GroupBuff[${TempIndex}]}.
        /echo -[ Group Buffing everyone with ${GroupBuff[${TempIndex}]}. ]-

 
    }
} 
/return

Sub Event_GroupBuff(EvtText) 
/varset EvtText ${EvtText.Right[-6]}
/varset SenderName nobody
/call GroupBuffFunction "${EvtText}"
/return 

Sub Event_Exclude(EvtText) 
/varset EvtText ${EvtText.Right[-14]}
/if (${EvtText.Length}>0) { 
    /varset SenderName nobody
    /call AddExclude "${EvtText}" 
} 
/return 

Sub Event_Include(EvtText) 
/varset EvtText ${EvtText.Right[-14]}
/if (${EvtText.Length}>0) { 
    /varset SenderName nobody
    /call DelExclude "${EvtText}" 
} 
/return 

Sub Event_Enraged(EvtText) 
/if (${PausePet}==0) {
    /assist ${Me.Pet.CleanName}
    /delay 6
    /if (${Target.CleanName.Find[${EvtText.Mid[1,${Math.Calc[${EvtText.Find[ has become ENRAGED]}-1]}]}]}>0) {
        /pet back off
        /delay 5
        /pet back off
        /varset PetCheckTimer 20s
    }
}
/return 

Sub SitFunction
/if (${NoSit}==0) { 
    /if (${Me.Sitting}) /stand 
    /varset NoSit 1 
    /if (${Reply}==1 && !${SenderName.Equal[nobody]}) /docommand /${If[${ReplyChannel.Find[ @]}>0,${ReplyChannel.Mid[1,${Math.Calc[${ReplyChannel.Find[ @]}-1]}]} ${SenderName},${ReplyChannel}]} I'll just stay standing for now.
    /echo -[ You will no longer sit during idle time. ]-
} else { 
    /varset NoSit 0 
    /if (${Reply}==1 && !${SenderName.Equal[nobody]}) /docommand /${If[${ReplyChannel.Find[ @]}>0,${ReplyChannel.Mid[1,${Math.Calc[${ReplyChannel.Find[ @]}-1]}]} ${SenderName},${ReplyChannel}]} I'll sit when I'm not busy with things.
    /echo -[ You will now sit during idle time. ]-
} 
/return


Sub Event_Sit
/varset SenderName nobody
/call SitFunction
/return 


Sub LoadWatchList
/declare TempVar int local 
/declare a int local
/declare b string local

/for a 1 to 10
    /varset WatchList[${a}] Empty
    /varset HoTList[${a},1] 0 
    /varset HoTList[${a},2] 0 
/next a

/varset TempVar 1
/varset WatchListCount 0
:LoadWatch
/varset b ${Ini[${IniFile},Watch,${Int[${TempVar}]},NOTFOUND]}
/if ((${WatchListCount}>10)||(${b.Equal["NOTFOUND"]})) {
    /return
}
/if (!${b.Equal[Empty]}) {
    /varset WatchListCount ${Math.Calc[${WatchListCount}+1]} 
    /varset WatchList[${WatchListCount}] ${b}
}
/varset TempVar ${Math.Calc[${TempVar}+1]}
/goto :LoadWatch 
/return 

Sub LoadMasterList 
/declare TempVar int local 
/declare TempList string local 
/varset TempVar 0 

:ClearMasters 
/varset TempList ${Ini[${IniFile},Masters,${Int[${TempVar}]},NOTFOUND]}
/if (${TempList.Equal["NOTFOUND"]}) /goto :DoneClearMasters 
/varset MasterList[${Math.Calc[${TempVar}+1]}] Empty 
/varset TempVar ${Math.Calc[${TempVar}+1]} 
/goto :ClearMasters 

:DoneClearMasters 
/varset TempVar 0 
:LoadMasters 
/varset MasterList[${Math.Calc[${TempVar}+1]}] ${Ini[${IniFile},Masters,${Int[${TempVar}]},NOTFOUND]}
/if (${MasterList[${Math.Calc[${TempVar}+1]}].Equal["NOTFOUND"]}) /return
/varset TempVar ${Math.Calc[${TempVar}+1]} 
/goto :LoadMasters 
/return 

Sub AddExclude(ExcludeName) 
   /declare Category string local 
   /declare EachExclude int local 
   /declare Exclude string local 
   /declare BlankExclude int local 
   /varset BlankExclude 0 
   /varset Category Excludes 
   /varset EachExclude 0 
:NextExclude1 
   /varset Exclude ${Ini[${IniFile},${Category},exclude_${Int[${EachExclude}]},NOTFOUND]} 
   /if (${Exclude.Find["NOTFOUND"]}) { 
      /goto :IniParsed 
   } 
   /if (${Exclude.Find["NONE"]}) { 
      /varset BlankExclude ${EachExclude} 
   } 

   /if (${Exclude.Find["${ExcludeName}"]}) { 
      /if (${Reply}==1 && !${SenderName.Equal[nobody]}) /docommand /${If[${ReplyChannel.Find[ @]}>0,${ReplyChannel.Mid[1,${Math.Calc[${ReplyChannel.Find[ @]}-1]}]} ${SenderName},${ReplyChannel}]} Yeah, I'm ignoring ${ExcludeName} already.
      /echo -(( ${ExcludeName} already on Exclude List ))-
      /return 
   } 
   /varset EachExclude ${Math.Calc[${EachExclude}+1]} 
   /goto :NextExclude1 
:IniParsed 
   /if (${BlankExclude}==0) { 
      /ini ${IniFile} "${Category}" exclude_${Int[${EachExclude}]} "${ExcludeName}" 
   } else { 
      /ini ${IniFile} "${Category}" exclude_${Int[${BlankExclude}]} "${ExcludeName}" 
   } 
   /if (${Reply}==1 && !${SenderName.Equal[nobody]}) /docommand /${If[${ReplyChannel.Find[ @]}>0,${ReplyChannel.Mid[1,${Math.Calc[${ReplyChannel.Find[ @]}-1]}]} ${SenderName},${ReplyChannel}]} Ok, I'm going to ignore ${ExcludeName}.
   /echo -[ Added ${ExcludeName} to the exclusions list. ]-
   /alert add ${AlertList} NPC "${ExcludeName}" 
/return 

Sub LoadExcludes
   /declare Category string local 
   /declare EachExclude int local 
   /declare Exclude string local 
   /varset Category Excludes 
   /alert clear ${AlertList} 
   /alert add ${AlertList} advbot.mac
   /alert add ${AlertList} NPC "eye of "
   /if (${String["${Ini[${IniFile},${Category},-1,NOTFOUND]}"].Find["NOTFOUND"]}) { 
      /echo -(( No Exclude list exists. ))-
      /return 
   } 
   /varset EachExclude 0 
:NextExclude2 
   /varset Exclude ${Ini[${IniFile},${Category},exclude_${Int[${EachExclude}]},NOTFOUND]} 
   /if (${Exclude.Equal["NOTFOUND"]}) { 
      /return 
   } 
   /if (${Exclude.Find["NONE"]}) { 
   } else {
     /alert add ${AlertList} NPC "${Exclude}" 
   } 
   /varset EachExclude ${Math.Calc[${EachExclude}+1]}
   /goto :NextExclude2 
/return 

Sub DelExclude(ExcludeName) 
   /declare Category string local 
   /declare EachExclude int local 
   /declare Exclude string local 
   /varset Category Excludes 
   /if (${String["${Ini[${IniFile},${Category},-1,NOTFOUND]}"].Find["NOTFOUND"]}) { 
      /echo -(( No Exclude list exists. ))-
      /return 
   } 
   /varset EachExclude 0 
:NextExclude3 
   /varset Exclude ${Ini[${IniFile},${Category},exclude_${Int[${EachExclude}]},NOTFOUND]} 
   /if (${Exclude.Find["NOTFOUND"]}) { 
      /call LoadExcludes 
      /return 
   } 
   /if (${Exclude.Find["${ExcludeName}"]}) { 
      /if (${Reply}==1 && !${SenderName.Equal[nobody]}) /docommand /${If[${ReplyChannel.Find[ @]}>0,${ReplyChannel.Mid[1,${Math.Calc[${ReplyChannel.Find[ @]}-1]}]} ${SenderName},${ReplyChannel}]} Ok, I'm not going to ignore ${ExcludeName} any more.
      /echo -[ Removed ${ExcludeName} from the exclusions list. ]-       
      /ini ${IniFile} "${Category}" exclude_${Int[${EachExclude}]} NONE 
   } 
   /varset EachExclude ${Math.Calc[${EachExclude}+1]}
   /goto :NextExclude3 
/return 

Sub SetupADVars 
/declare VarNpcCount int outer 0
/declare DebuffCount int outer 
/declare SelfBuffCount int outer 
/declare Radius int outer 
/declare ZoneName string outer 
/declare TrackNumber int outer
/declare PauseAssist int outer
/declare MobList[51] int outer
/declare MDL[51,10] int outer
/declare SelfBuff[8] string outer UNDEFINED-ARRAY-ELEMENT
/declare SelfBuffAliasName[8] string outer
/declare SelfBuffID[8] int outer 0
/declare SelfBuffDuration[8] int outer
/declare SelfBuffedList[8] int outer 
/declare SelfBuffAtStart[8] int outer
/declare SelfBuffIconCheck[8] int outer
/declare SelfBuffIconName[8] string outer UNDEFINED-ARRAY-ELEMENT 
/declare SelfBuffMemToSlot[8] int outer
/declare SelfBuffTimer timer outer 0
/declare SelfBuffCheckTime string outer
/declare Debuff[8] string outer UNDEFINED-ARRAY-ELEMENT
/declare DebuffID[8] int outer 0
/declare DebuffDuration[8] int outer
/declare DebuffStartWait[8] int outer
/declare DebuffMinHealth[8] int outer
/declare DebuffMinMana[8] int outer
/declare DebuffMinHealthNoCast[8] int outer
/declare DebuffMinMobsInArea[8] int outer
/declare DebuffMemToSlot[8] int outer
/declare DebuffOnMATarget[8] int outer
/declare DebuffTimer timer outer 0
/declare DebuffCheckTime string outer
/declare EventCount int outer 
/declare EventMinMana[8] int outer
/declare EventMaxMana[8] int outer
/declare EventMinHP[8] int outer
/declare EventMaxHP[8] int outer
/declare EventList[8] int outer
/declare EventDuration[8] int outer
/declare EventSpell[8] string outer UNDEFINED-ARRAY-ELEMENT
/declare EventSpellID[8] int outer 0
/declare EventMemToSlot[8] int outer
/declare EventTimer timer outer 0
/declare EventCheckTime string outer
/declare MasterList[100] string outer UNDEFINED-ARRAY-ELEMENT
/declare RetryCount int outer 
/declare IniFile string outer 
/declare PauseDebuffs int outer 
/declare NoSit int outer 
/declare PauseEvents int outer
/declare HealCount int outer
/declare HealSpell[8] string outer UNDEFINED-ARRAY-ELEMENT
/declare HealSpellID[8] int outer 0
/declare HealMinHP[8] int outer
/declare HealMaxHP[8] int outer
/declare HealMinMana[8] int outer
/declare HealMinGroupCount[8] int outer
/declare HealClass[8] string outer UNDEFINED-ARRAY-ELEMENT
/declare HealAnnounce[8] string outer
/declare HealMemToSlot[8] int outer
/declare HealTimer timer outer 0
/declare HealCheckTime string outer
/declare HealPets int outer 0
/declare WussyFactor int outer 10
/declare PauseHeals int outer
/declare HoTList[20,2] int outer 0
/declare MobAnnounced[51,10] int outer
/declare DebuffAnnounce[8] string outer
/declare Announce int outer
/declare AnnounceChannel string outer
/declare GroupBuffCount int outer
/declare GroupBuff[8] string outer UNDEFINED-ARRAY-ELEMENT
/declare GroupBuffAliasName[8] string outer
/declare GroupBuffID[8] int outer 0
/declare GroupBuffDuration[8] int outer
/declare GroupBuffAtStart[8] int outer
/declare GroupBuffMinMana[8] int outer
/declare GroupBuffMinGroupCount[8] int outer
/declare GroupBuffMemToSlot[8] int outer
/declare GroupBuffTimer timer outer 0
/declare GroupBuffCheckTime string outer
/declare GBL[9,20] int outer
/declare GroupBuffAnnounce[8] string outer
/declare GroupBuffClass[8] string outer UNDEFINED-ARRAY-ELEMENT
/declare WatchList[11] string outer UNDEFINED-ARRAY-ELEMENT
/declare WatchListCount int outer 0
/declare WatchTimer[20] int outer
/declare GroupCount int outer
/varset GroupCount 0
/declare AlertList int outer  
/varset AlertList 20
/declare PauseSelfBuffs int outer 
/declare PauseGroupBuffs int outer
/declare PausePet int outer
/declare PetAssistOnHPPct int outer 98
/declare TankName string outer Main Assist Name
/declare PetCheckTimer timer outer 0
/declare PetBuffCheckTimer timer outer 0
/declare PetCheckTime string outer
/declare PetBuffCheckTime string outer
/declare PetBuff[8] string outer
/declare PetBuffIconName[8] string outer
/declare PetBuffCount int outer
/declare PetBuffMemToSlot[8] int outer
/declare PetSummonSpell string outer
/declare PetSummonMemToSlot int outer
/declare FaceBeforeDebuff int outer 1
/declare MiscCheckTimer timer outer 0
/declare SenderName string outer nobody
/declare Reply int outer
/declare ReplyChannel string outer
/declare Dismount string outer nodismount
/declare BotFollowDistance int outer 10
/declare SitCheckTimer timer outer 0
/declare SitAggroRadiusCheck int outer 75
/return 

Sub Startup
/declare a int local 
/declare b int local
/declare c int local
/call LoadINIVals
/call LoadExcludes
/call DistanceFunction ${BotFollowDistance}
/for a 1 to ${TrackNumber} 
    /varset MobList[${a}] 0 
    /for b 1 to ${DebuffCount} 
        /varset MDL[${a},${b}] 0 
        /varset MobAnnounced[${a},${b}] 0
    /next b 
/next a 
/for a 1 to ${SelfBuffCount} 
    /if (${SelfBuffAtStart[${a}]}==1) { 
        /varset SelfBuffedList[${a}] 0 
    } else { 
        /if (${SelfBuffedList[${a}]}==12345) {
            /if (${Me.Buff["${SelfBuffIconName[${a}]}"].Name.Length}>0) {
                /varset SelfBuffedList[${a}] ${Me.Buff["${SelfBuffIconName[${a}]}"].Duration.TotalSeconds}
            } else {
                /varset SelfBuffedList[${a}] 0 
            }
        } else {
            /varset SelfBuffedList[${a}] 99999 
        }
    } 
/next a 
/for a 1 to ${GroupBuffCount}
    /for b 0 to 5
        /if (${GroupBuffAtStart[${a}]}==1) { 
            /varset GBL[${a},${Math.Calc[${b}+1]}] 0 
        } else { 
            /varset GBL[${a},${Math.Calc[${b}+1]}] 99999 
        } 
    /next b
/next a 
/for a 1 to ${EventCount} 
    /varset EventList[${a}] 0 
/next a 
/for a 1 to 16
    /varset HoTList[${a},1] 0 
    /varset HoTList[${a},2] 0 
    /varset WatchTimer[${a}] 0
/next a 
/for a 1 to 10
    /varset WatchList[${a}] Empty
/next a 
/varset ZoneName ${Zone.Name}
/if (${PauseDebuffs}==1) { 
    /echo -[ Debuffing Paused. ]-
} 
/if (${FaceBeforeDebuff}==1) { 
    /echo -[ Facing before debuffs turned ON. ]-
}
/if (${PauseEvents}==1) { 
    /echo -[ HP and Mana Events Paused. ]-
} 
/if (${PauseHeals}==1) { 
    /echo -[ Healing Paused. ]-
} 
/if (${Announce}==0) { 
    /echo -[ Announcements OFF. ]-
} 
/if (${PauseSelfBuffs}==1) { 
    /echo -[ Self Buffs Paused. ]-
} 
/if (${PauseGroupBuffs}==1) { 
    /echo -[ Group Buffs Paused. ]-
} 
/if (${PausePet}==0) {
    /echo -[ Pet assisting un-paused. ]-
}
/if (${PauseAssist}==0) {
    /echo -[ Assisting un-paused${If[!${TankName.Equal[Main Assist Name]}, you will be assisting ${TankName},]}. ]-
}
/call LoadMasterList
/call MasterFunction "master"
/call LoadWatchList 
/call WatchFunction "watch"
/doevents flush 
/return


Sub Event_DelayOnZone
/varset HealTimer 8s
/return 

Sub Event_chat(MsgType,MsgFrom,MsgText) 
/declare TempVar int local 
/varset TempVar 0 
:CheckAuth 
/if (!${MasterList[${TempVar}].Equal["UNDEFINED-ARRAY-ELEMENT"]}) { 
    /if (${MasterList[${TempVar}].Equal["${MsgFrom}"]}) { 
        /varset SenderName ${MsgFrom}
        /if (${MsgText.Equal["debuff"]}) { 
            /call DebuffFunction
            /return 
        }
        /if (${MsgText.Left[6].Equal["master"]}) { 
            /call MasterFunction "${MsgText}" 
            /return 
        } 
        /if (${MsgText.Left[8].Equal["selfbuff"]}) { 
            /call SelfBuffFunction "${MsgText}" 
            /return 
        } 
        /if (${MsgText.Left[9].Equal["groupbuff"]}) { 
            /call GroupBuffFunction "${MsgText}" 
            /return 
        } 
        /if (${MsgText.Left[4].Equal["buff"]}) { 
            /call BuffFunction "${MsgText}" 
            /return 
        } 
        /if (${MsgText.Left[6].Equal["follow"]}) { 
            /if (${Me.Sitting}) /stand 
            /if ((${MsgText.Equal["follow me"]})||(${MsgText.Equal["follow"]})) { 
                /if (${Reply}==1 && !${SenderName.Equal[nobody]}) /docommand /${If[${ReplyChannel.Find[ @]}>0,${ReplyChannel.Mid[1,${Math.Calc[${ReplyChannel.Find[ @]}-1]}]} ${SenderName},${ReplyChannel}]} Ok, I'm going to follow you.
                /call FollowFunction "${MsgFrom}" 
            } else { 
                /if (${Reply}==1 && !${SenderName.Equal[nobody]}) /docommand /${If[${ReplyChannel.Find[ @]}>0,${ReplyChannel.Mid[1,${Math.Calc[${ReplyChannel.Find[ @]}-1]}]} ${SenderName},${ReplyChannel}]} Ok, I'm going to follow ${MsgText.Right[-7]}.
                /call FollowFunction "${MsgText.Right[-7]}"
            } 
            /return 
        } 
        /if (${MsgText.Left[4].Equal["goto"]}) { 
            /if (${Me.Sitting}) /stand 
            /if (${Reply}==1 && !${SenderName.Equal[nobody]}) /docommand /${If[${ReplyChannel.Find[ @]}>0,${ReplyChannel.Mid[1,${Math.Calc[${ReplyChannel.Find[ @]}-1]}]} ${SenderName},${ReplyChannel}]} Ok, I'm going to head to ${MsgText.Arg[2]}, ${MsgText.Arg[3]}.
            /call GotoFunction "${MsgText.Arg[2]}" "${MsgText.Arg[3]}"
            /return 
        } 
        /if (${MsgText.Left[4].Equal["stop"]}) { 
            /if (${Reply}==1 && !${SenderName.Equal[nobody]}) /docommand /${If[${ReplyChannel.Find[ @]}>0,${ReplyChannel.Mid[1,${Math.Calc[${ReplyChannel.Find[ @]}-1]}]} ${SenderName},${ReplyChannel}]} Ok, I'll just stop here.
            /call StopFunction 
            /return 
        } 
        /if (${MsgText.Left[3].Equal["sit"]}) { 
            /call SitFunction
            /return 
        } 
        /if (${MsgText.Left[6].Equal["events"]}) { 
            /call EvtsFunction
            /return 
        } 
        /if (${MsgText.Left[4].Equal["heal"]}) { 
            /if (${MsgText.Right[-5].Length}>0) {
                /call HealFunction "${MsgText.Right[-5]}"
            } else {
                /call HealFunction
            }
            /return 
        }
        /if (${MsgText.Left[4].Equal["face"]}) { 
            /call FaceFunction
            /return 
        }  
        /if (${MsgText.Left[3].Equal["pet"]}) { 
            /if (${MsgText.Right[-4].Length}>0) {
                /call PetFunction "${MsgText.Right[-4]}"
            } else {
                /call PetFunction
            }
            /return 
        }
        /if (${MsgText.Left[3].Equal["cmd"]}) { 
            /if (${MsgText.Right[-4].Length}>0) {
                /call CmdFunction "${MsgText.Right[-4]}"
            }
            /return 
        }  
        /if (${MsgText.Left[6].Equal["assist"]}) { 
            /if (${MsgText.Arg[2].Length}>0) {
                /call AssistFunction "${MsgText.Arg[2]}"
            } else {
                /call AssistFunction
            }
            /return 
        } 
        /if (${MsgText.Left[7].Equal["exclude"]}) { 
            /call AddExclude "${MsgText.Right[-8]}"
            /return 
        } 
        /if (${MsgText.Left[7].Equal["include"]}) {
            /call DelExclude "${MsgText.Right[-8]}"
            /return 
        }
        /if (${MsgText.Left[5].Equal["watch"]}) {
            /call WatchFunction "${MsgText}"
            /return 
        }
        /if (${MsgText.Left[8].Equal["announce"]}) { 
            /call AnnounceFunction
            /return 
        }
        /if (${MsgText.Left[5].Equal["reply"]}) { 
            /call ReplyFunction
            /return 
        }
        /if (${MsgText.Left[8].Equal["distance"]}) {
            /call DistanceFunction "${MsgText.Right[-9]}"
            /return 
        }  
         /if (${MsgText.Left[5].Equal["pause"]}) { 
            /if (${Reply}==1 && !${SenderName.Equal[nobody]} ${PauseFlag}==1) /docommand /${If[${ReplyChannel.Find[ @]}>0,${ReplyChannel.Mid[1,${Math.Calc[${ReplyChannel.Find[ @]}-1]}]} ${SenderName},${ReplyChannel}]} Ok, I'm going to wait here. Let me know when you want me to proceed.
            /if (${Reply}==1 && !${SenderName.Equal[nobody]} ${PauseFlag}==0) /docommand /${If[${ReplyChannel.Find[ @]}>0,${ReplyChannel.Mid[1,${Math.Calc[${ReplyChannel.Find[ @]}-1]}]} ${SenderName},${ReplyChannel}]} Ok, I'm coming.
            /call PauseFunction 
            /return 
        } 
    } 
    /varset TempVar ${Math.Calc[${TempVar}+1]} 
    /goto :CheckAuth 
} 
/return 
Last edited by ml2517 on Sun May 16, 2004 10:31 pm, edited 35 times in total.

ml2517
a grimling bloodguard
a grimling bloodguard
Posts: 1216
Joined: Wed Nov 12, 2003 1:12 am

advbot2.inc

Post by ml2517 » Wed Apr 28, 2004 2:32 am

advbot2.inc

Code: Select all

| 
| advbot2.inc 
| Include file 2 for advbot.mac
| Version 1.30
| Date:5/16/2004 11:00am
|


Sub LoadINIVals 
/declare a int local 
/declare b int local
/declare INIFlag int local
/declare TempStr string local
 
/varset INIFlag 0 
/varset TempStr ${Ini[${IniFile},Settings,Radius,NOTFOUND]}
/varset Radius ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" Settings Radius 100 
   /varset Radius 100 
   /varset INIFlag 1 
}

/varset TempStr ${Ini[${IniFile},Settings,NoSit,NOTFOUND]}
/varset NoSit ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" Settings NoSit 0 
   /varset NoSit 0 
   /varset INIFlag 1  
}
 
/varset TempStr ${Ini[${IniFile},Settings,TrackNumber,NOTFOUND]}
/varset TrackNumber ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" Settings TrackNumber 10 
   /varset TrackNumber 10
   /varset INIFlag 1  
}

/varset TempStr ${Ini[${IniFile},Settings,Announce,NOTFOUND]}
/varset Announce ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" Settings Announce 0 
   /varset Announce 0 
   /varset INIFlag 1 
}

/varset AnnounceChannel ${Ini[${IniFile},Settings,AnnounceChannel,NOTFOUND]} 
/if (${AnnounceChannel.Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" Settings AnnounceChannel gsay
   /varset AnnounceChannel gsay 
   /varset INIFlag 1 
}

| Remove this after a few weeks.  This auto-upgrades the old announce INI entry.
/if (${AnnounceChannel.Equal[group]}) {
   /ini "${IniFile}" Settings AnnounceChannel gsay
   /varset AnnounceChannel gsay
} else /if (${AnnounceChannel.Equal[raid]}) {
   /ini "${IniFile}" Settings AnnounceChannel rsay
   /varset AnnounceChannel rsay
}
| Remove this after a few weeks.  This auto-upgrades the old announce INI entry.

/varset TempStr ${Ini[${IniFile},Settings,Reply,NOTFOUND]}
/varset Reply ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" Settings Reply 0 
   /varset Reply 0 
   /varset INIFlag 1 
}

/varset ReplyChannel ${Ini[${IniFile},Settings,ReplyChannel,NOTFOUND]} 
/if (${ReplyChannel.Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" Settings ReplyChannel "tell @"
   /varset ReplyChannel tell @
   /varset INIFlag 1 
}

/varset TempStr ${Ini[${IniFile},Settings,RetryCount,NOTFOUND]}
/varset RetryCount ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" Settings RetryCount 2 
   /varset RetryCount 2 
   /varset INIFlag 1 
} 

/varset TempStr ${Ini[${IniFile},Settings,PauseDebuffs,NOTFOUND]}
/varset PauseDebuffs ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" Settings PauseDebuffs 1 
   /varset PauseDebuffs 1 
   /varset INIFlag 1  
} 

/varset TempStr ${Ini[${IniFile},Settings,PauseEvents,NOTFOUND]}
/varset PauseEvents ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" Settings PauseEvents 1 
   /varset PauseEvents 1 
   /varset INIFlag 1  
}

/varset TempStr ${Ini[${IniFile},Settings,PauseHeals,NOTFOUND]}
/varset PauseHeals ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" Settings PauseHeals 1 
   /varset PauseHeals 1 
   /varset INIFlag 1  
} 

/varset TempStr ${Ini[${IniFile},Settings,PauseAssist,NOTFOUND]}
/varset PauseAssist ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" Settings PauseAssist 0 
   /varset PauseAssist 0 
   /varset INIFlag 1  
} 

/varset TempStr ${Ini[${IniFile},Settings,PauseSelfBuffs,NOTFOUND]}
/varset PauseSelfBuffs ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" Settings PauseSelfBuffs 0 
   /varset PauseSelfBuffs 0 
   /varset INIFlag 1  
} 

/varset TempStr ${Ini[${IniFile},Settings,PauseGroupBuffs,NOTFOUND]}
/varset PauseGroupBuffs ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" Settings PauseGroupBuffs 0 
   /varset PauseGroupBuffs 0 
   /varset INIFlag 1  
} 

/varset TankName ${Ini[${IniFile},Settings,MainAssistName,NOTFOUND]}
/if (${TankName.Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" Settings MainAssistName "Main Assist Name" 
   /varset TankName Main Assist Name
   /varset INIFlag 1 
}

/varset Dismount ${Ini[${IniFile},Settings,Dismount,NOTFOUND]}
/if (${Dismount.Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" Settings Dismount "nodismount" 
   /varset Dismount nodismount
   /varset INIFlag 1 
}

/varset TempStr ${Ini[${IniFile},Settings,FollowDistance,NOTFOUND]}
/varset BotFollowDistance ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" Settings FollowDistance 20 
   /varset BotFollowDistance 20 
   /varset INIFlag 1  
} 

/varset TempStr ${Ini[${IniFile},Settings,SitAggroRadiusCheck,NOTFOUND]}
/varset SitAggroRadiusCheck ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" Settings SitAggroRadiusCheck 75 
   /varset SitAggroRadiusCheck 75 
   /varset INIFlag 1  
} 

/varset TempStr ${Ini[${IniFile},SelfBuff,SelfBuffCount,NOTFOUND]}
/varset SelfBuffCount ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" SelfBuff SelfBuffCount 0 
   /varset SelfBuffCount 0 
   /varset INIFlag 1  
}

/for a 1 to 8 
/varset SelfBuff[${a}] ${Ini[${IniFile},SelfBuff,SelfBuff${a},NOTFOUND]}
/if (${SelfBuff[${a}].Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" SelfBuff SelfBuff${a} "Self Buff Spell Name" 
   /varset SelfBuff[${a}] "Self Buff Spell Name" 
   /varset INIFlag 1  
} 
/next a

/for a 1 to 8
/varset SelfBuffAliasName[${a}] ${Ini[${IniFile},SelfBuff,SelfBuffAliasName${a},NOTFOUND]}
/if (${SelfBuffAliasName[${a}].Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" SelfBuff SelfBuffAliasName${a} "Self Buff Alias Name" 
   /varset SelfBuffAliasName[${a}] Self Buff Alias Name
   /varset INIFlag 1 
}
/next a

/if (${SelfBuffCount}>0) {
    /for a 1 to ${SelfBuffCount}
        /varset SelfBuffID[${a}] ${Spell["${SelfBuff[${a}]}"].ID}
    /next a
}

/for a 1 to 8 
/varset TempStr ${Ini[${IniFile},SelfBuff,SelfBuffDuration${a},NOTFOUND]}
/varset SelfBuffDuration[${a}] ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" SelfBuff SelfBuffDuration${a} 0 
   /varset SelfBuffDuration[${a}] 0 
   /varset INIFlag 1  
} 
/next a

/for a 1 to 8 
/varset TempStr ${Ini[${IniFile},SelfBuff,SelfBuffAtStart${a},NOTFOUND]}
/varset SelfBuffAtStart[${a}] ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" SelfBuff SelfBuffAtStart${a} 0 
   /varset SelfBuffAtStart[${a}] 0 
   /varset INIFlag 1 
}
/next a 

/for a 1 to 8
/varset TempStr ${Ini[${IniFile},SelfBuff,SelfBuffIconCheck${a},NOTFOUND]}
/varset SelfBuffIconCheck[${a}] ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" SelfBuff SelfBuffIconCheck${a} 0 
   /varset SelfBuffIconCheck[${a}] 0 
   /varset INIFlag 1 
}
/if (${SelfBuffIconCheck[${a}]}==1) {
    /varset SelfBuffedList[${a}] 12345
}
/next a
 
/for a 1 to 8
/varset SelfBuffIconName[${a}] ${Ini[${IniFile},SelfBuff,SelfBuffIconName${a},NOTFOUND]}
/if (${SelfBuffIconName[${a}].Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" SelfBuff SelfBuffIconName${a} "Self Buff Icon Name" 
   /varset SelfBuffIconName[${a}] Self Buff Icon Name
   /varset INIFlag 1 
}
/next a

/for a 1 to 8 
/varset TempStr ${Ini[${IniFile},SelfBuff,SelfBuffMemToSlot${a},NOTFOUND]}
/varset SelfBuffMemToSlot[${a}] ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" SelfBuff SelfBuffMemToSlot${a} 0 
   /varset SelfBuffMemToSlot[${a}] 0 
   /varset INIFlag 1  
} 
/next a

/varset SelfBuffCheckTime ${Ini[${IniFile},SelfBuff,SelfBuffCheckTime,NOTFOUND]}
/if (${SelfBuffCheckTime.Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" SelfBuff SelfBuffCheckTime 15s 
   /varset SelfBuffCheckTime 15s 
   /varset INIFlag 1 
}

/varset TempStr ${Ini[${IniFile},Debuff,DebuffCount,NOTFOUND]}
/varset DebuffCount ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" Debuff DebuffCount 0 
   /varset DebuffCount 0 
   /varset INIFlag 1  
} 

/for a 1 to 8
/varset Debuff[${a}] ${Ini[${IniFile},Debuff,Debuff${a},NOTFOUND]} 
/if (${Debuff[${a}].Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" Debuff Debuff${a} "Debuff Spell Name" 
   /varset Debuff[${a}] Debuff Spell Name 
   /varset INIFlag 1  
} 
/next a 

/if (${DebuffCount}>0) {
    /for a 1 to ${DebuffCount}
        /varset DebuffID[${a}] ${Spell["${Debuff[${a}]}"].ID}
    /next a
}

/for a 1 to 8
/varset TempStr ${Ini[${IniFile},Debuff,DebuffDuration${a},NOTFOUND]}
/varset DebuffDuration[${a}] ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" Debuff DebuffDuration${a} 99999 
   /varset DebuffDuration[${a}] 99999 
   /varset INIFlag 1  
} 
/next a
 
/for a 1 to 8 
/varset TempStr ${Ini[${IniFile},Debuff,DebuffStartWait${a},NOTFOUND]}
/varset DebuffStartWait[${a}] ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" Debuff DebuffStartWait${a} 0 
   /varset DebuffStartWait[${a}] 0 
   /varset INIFlag 1  
} 
/next a 

/for a 1 to 8
/varset TempStr ${Ini[${IniFile},Debuff,DebuffMinHealth${a},NOTFOUND]}
/varset DebuffMinHealth[${a}] ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" Debuff DebuffMinHealth${a} 100 
   /varset DebuffMinHealth[${a}] 100 
   /varset INIFlag 1  
} 
/next a 

/for a 1 to 8
/varset TempStr ${Ini[${IniFile},Debuff,DebuffMinHealthNoCast${a},NOTFOUND]}
/varset DebuffMinHealthNoCast[${a}] ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" Debuff DebuffMinHealthNoCast${a} 0 
   /varset DebuffMinHealthNoCast[${a}] 0 
   /varset INIFlag 1  
} 
/next a 

/for a 1 to 8 
/varset TempStr ${Ini[${IniFile},Debuff,DebuffMinMana${a},NOTFOUND]}
/varset DebuffMinMana[${a}] ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" Debuff DebuffMinMana${a} 0 
   /varset DebuffMinMana[${a}] 0 
   /varset INIFlag 1  
} 
/next a
 
/for a 1 to 8
/varset TempStr ${Ini[${IniFile},Debuff,DebuffMinMobsInArea${a},NOTFOUND]}
/varset DebuffMinMobsInArea[${a}] ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" Debuff DebuffMinMobsInArea${a} 0 
   /varset DebuffMinMobsInArea[${a}] 0 
   /varset INIFlag 1  
} 
/next a
 
/for a 1 to 8 
/varset DebuffAnnounce[${a}] ${Ini[${IniFile},Debuff,DebuffAnnounce${a},NOTFOUND]} 
/if (${DebuffAnnounce[${a}].Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" Debuff DebuffAnnounce${a} "Debuff Announcement" 
   /varset DebuffAnnounce[${a}] Debuff Announcement 
   /varset INIFlag 1 
} 
/next a 

/for a 1 to 8 
/varset TempStr ${Ini[${IniFile},Debuff,DebuffMemToSlot${a},NOTFOUND]}
/varset DebuffMemToSlot[${a}] ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" Debuff DebuffMemToSlot${a} 0 
   /varset DebuffMemToSlot[${a}] 0 
   /varset INIFlag 1  
} 
/next a

/for a 1 to 8 
/varset TempStr ${Ini[${IniFile},Debuff,DebuffOnMATarget${a},NOTFOUND]}
/varset DebuffOnMATarget[${a}] ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" Debuff DebuffOnMATarget${a} 0 
   /varset DebuffOnMATarget[${a}] 0 
   /varset INIFlag 1  
} 
/next a 

/varset DebuffCheckTime ${Ini[${IniFile},Debuff,DebuffCheckTime,NOTFOUND]}
/if (${DebuffCheckTime.Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" Debuff DebuffCheckTime 3s
   /varset DebuffCheckTime 3s 
   /varset INIFlag 1 
}

/varset TempStr ${Ini[${IniFile},Debuff,FaceBeforeDebuff,NOTFOUND]}
/varset FaceBeforeDebuff ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" Debuff FaceBeforeDebuff 1
   /varset FaceBeforeDebuff 1 
   /varset INIFlag 1 
}

/varset TempStr ${Ini[${IniFile},Events,EventCount,NOTFOUND]}
/varset EventCount ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" Events EventCount 0 
   /varset EventCount 0 
   /varset INIFlag 1  
}
 
/for a 1 to 8 
/varset EventSpell[${a}] ${Ini[${IniFile},Events,EventSpell${a},NOTFOUND]} 
/if (${EventSpell[${a}].Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" Events EventSpell${a} "Event Spell Name" 
   /varset EventSpell[${a}] Event Spell Name 
   /varset INIFlag 1  
} 
/next a 

/if (${EventCount}>0) {
    /for a 1 to ${EventCount}
        /varset EventSpellID[${a}] ${Spell["${EventSpell[${a}]}"].ID}
    /next a
}

/for a 1 to 8
/varset TempStr ${Ini[${IniFile},Events,EventMinMana${a},NOTFOUND]}
/varset EventMinMana[${a}] ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" Events EventMinMana${a} 100 
   /varset EventMinMana[${a}] 100 
   /varset INIFlag 1  
} 
/next a
 
/for a 1 to 8 

/varset TempStr ${Ini[${IniFile},Events,EventMaxMana${a},NOTFOUND]}
/varset EventMaxMana[${a}] ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" Events EventMaxMana${a} 0 
   /varset EventMaxMana[${a}] 0 
   /varset INIFlag 1  
} 
/next a
 
/for a 1 to 8 
/varset TempStr ${Ini[${IniFile},Events,EventMinHP${a},NOTFOUND]}
/varset EventMinHP[${a}] ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" Events EventMinHP${a} 100 
   /varset EventMinHP[${a}] 100 
   /varset INIFlag 1  
} 
/next a
 
/for a 1 to 8 
/varset TempStr ${Ini[${IniFile},Events,EventMaxHP${a},NOTFOUND]}
/varset EventMaxHP[${a}] ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" Events EventMaxHP${a} 0 
   /varset EventMaxHP[${a}] 0 
   /varset INIFlag 1  
} 
/next a
 
/for a 1 to 8 
/varset TempStr ${Ini[${IniFile},Events,EventDuration${a},NOTFOUND]}
/varset EventDuration[${a}] ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" Events EventDuration${a} 0 
   /varset EventDuration[${a}] 0 
   /varset INIFlag 1  
} 
/next a

/for a 1 to 8 
/varset TempStr ${Ini[${IniFile},Events,EventMemToSlot${a},NOTFOUND]}
/varset EventMemToSlot[${a}] ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" Events EventMemToSlot${a} 0 
   /varset EventMemToSlot[${a}] 0 
   /varset INIFlag 1  
} 
/next a

/varset EventCheckTime ${Ini[${IniFile},Events,EventCheckTime,NOTFOUND]}
/if (${EventCheckTime.Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" Events EventCheckTime 10s 
   /varset EventCheckTime 10s 
   /varset INIFlag 1 
}

/varset TempStr ${Ini[${IniFile},Heal,HealCount,NOTFOUND]}
/varset HealCount ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" Heal HealCount 0 
   /varset HealCount 0 
   /varset INIFlag 1  
} 
/for a 1 to 8 
/varset HealSpell[${a}] ${Ini[${IniFile},Heal,HealSpell${a},NOTFOUND]} 
/if (${HealSpell[${a}].Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" Heal HealSpell${a} "Heal Spell Name" 
   /varset HealSpell[${a}] Heal Spell Name 
   /varset INIFlag 1  
} 
/next a

/if (${HealCount}>0) {
    /for a 1 to ${HealCount}
        /varset HealSpellID[${a}] ${Spell["${HealSpell[${a}]}"].ID}
    /next a
}
 
/for a 1 to 8
/varset TempStr ${Ini[${IniFile},Heal,HealMinHP${a},NOTFOUND]}
/varset HealMinHP[${a}] ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" Heal HealMinHP${a} 0 
   /varset HealMinHP[${a}] 0 
   /varset INIFlag 1  
} 
/next a 

/for a 1 to 8 
/varset TempStr ${Ini[${IniFile},Heal,HealMaxHP${a},NOTFOUND]}
/varset HealMaxHP[${a}] ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" Heal HealMaxHP${a} 100 
   /varset HealMaxHP[${a}] 100 
   /varset INIFlag 1  
} 
/next a
 
/for a 1 to 8 
/varset TempStr ${Ini[${IniFile},Heal,HealMinMana${a},NOTFOUND]}
/varset HealMinMana[${a}] ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" Heal HealMinMana${a} 0 
   /varset HealMinMana[${a}] 0 
   /varset INIFlag 1  
} 
/next a 

/for a 1 to 8
/varset TempStr ${Ini[${IniFile},Heal,HealMinGroupCount${a},NOTFOUND]}
/varset HealMinGroupCount[${a}] ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" Heal HealMinGroupCount${a} 0 
   /varset HealMinGroupCount[${a}] 0 
   /varset INIFlag 1  
} 
/next a
 
/for a 1 to 8 
/varset HealClass[${a}] ${Ini[${IniFile},Heal,HealClass${a},NOTFOUND]} 
/if (${HealClass[${a}].Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" Heal HealClass${a} WAR|SHD|PAL|RNG|MNK|ROG|BRD|BST|BER|SHM|CLR|DRU|WIZ|MAG|ENC|NEC
   /varset HealClass[${a}] WAR|SHD|PAL|RNG|MNK|ROG|BRD|BST|BER|SHM|CLR|DRU|WIZ|MAG|ENC|NEC 
   /varset INIFlag 1  
} 
/next a

/for a 1 to 8 
/varset TempStr ${Ini[${IniFile},Heal,HealMemToSlot${a},NOTFOUND]}
/varset HealMemToSlot[${a}] ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" Heal HealMemToSlot${a} 0 
   /varset HealMemToSlot[${a}] 0 
   /varset INIFlag 1  
} 
/next a

/varset HealCheckTime ${Ini[${IniFile},Heal,HealCheckTime,NOTFOUND]}
/if (${HealCheckTime.Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" Heal HealCheckTime 2s 
   /varset HealCheckTime 2s 
   /varset INIFlag 1 
}
 
/for a 1 to 8 
/varset HealAnnounce[${a}] ${Ini[${IniFile},Heal,HealAnnounce${a},NOTFOUND]} 
/if (${HealAnnounce[${a}].Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" Heal HealAnnounce${a} "Heal Announcement" 
   /varset HealAnnounce[${a}] Heal Announcement 
   /varset INIFlag 1 
} 
/next a

/varset TempStr ${Ini[${IniFile},Heal,HealPets,NOTFOUND]}
/varset HealPets ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" Heal HealPets 1 
   /varset HealPets 1
   /varset INIFlag 1  
} 

/varset TempStr ${Ini[${IniFile},Heal,WussyFactor,NOTFOUND]}
/varset WussyFactor ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" Heal WussyFactor 10 
   /varset WussyFactor 10
   /varset INIFlag 1  
} 

/varset TempStr ${Ini[${IniFile},GroupBuff,GroupBuffCount,NOTFOUND]}
/varset GroupBuffCount ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" GroupBuff GroupBuffCount 0 
   /varset GroupBuffCount 0 
   /varset INIFlag 1  
}
 
/for a 1 to 8 
/varset GroupBuff[${a}] ${Ini[${IniFile},GroupBuff,GroupBuff${a},NOTFOUND]} 
/if (${GroupBuff[${a}].Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" GroupBuff GroupBuff${a} "Group Buff Spell Name" 
   /varset GroupBuff[${a}] Group Buff Spell Name 
   /varset INIFlag 1  
} 
/next a

/for a 1 to 8 
/varset GroupBuffAliasName[${a}] ${Ini[${IniFile},GroupBuff,GroupBuffAliasName${a},NOTFOUND]} 
/if (${GroupBuffAliasName[${a}].Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" GroupBuff GroupBuffAliasName${a} "Group Buff Alias Name" 
   /varset GroupBuffAliasName[${a}] Group Buff Alias Name 
   /varset INIFlag 1  
} 
/next a

/if (${GroupBuffCount}>0) {
    /for a 1 to ${GroupBuffCount}
        /varset GroupBuffID[${a}] ${Spell["${GroupBuff[${a}]}"].ID}
    /next a
}
 
/for a 1 to 8 
/varset TempStr ${Ini[${IniFile},GroupBuff,GroupBuffDuration${a},NOTFOUND]}
/varset GroupBuffDuration[${a}] ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" GroupBuff GroupBuffDuration${a} 99999 
   /varset GroupBuffDuration[${a}] 99999 
   /varset INIFlag 1  
} 
/next a

 
/for a 1 to 8 
/varset TempStr ${Ini[${IniFile},GroupBuff,GroupBuffAtStart${a},NOTFOUND]}
/varset GroupBuffAtStart[${a}] ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" GroupBuff GroupBuffAtStart${a} 0 
   /varset GroupBuffAtStart[${a}] 0 
   /varset INIFlag 1 
}
/next a
 
/for a 1 to 8 
/varset TempStr ${Ini[${IniFile},GroupBuff,GroupBuffMinMana${a},NOTFOUND]}
/varset GroupBuffMinMana[${a}] ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" GroupBuff GroupBuffMinMana${a} 0 
   /varset GroupBuffMinMana[${a}] 0 
   /varset INIFlag 1  
} 
/next a
 
/for a 1 to 8 
/varset TempStr ${Ini[${IniFile},GroupBuff,GroupBuffMinGroupCount${a},NOTFOUND]}
/varset GroupBuffMinGroupCount[${a}] ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" GroupBuff GroupBuffMinGroupCount${a} 0 
   /varset GroupBuffMinGroupCount[${a}] 0 
   /varset INIFlag 1  
} 
/next a 
/for a 1 to 8 
/varset GroupBuffAnnounce[${a}] ${Ini[${IniFile},GroupBuff,GroupBuffAnnounce${a},NOTFOUND]} 
/if (${GroupBuffAnnounce[${a}].Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" GroupBuff GroupBuffAnnounce${a} "Group Buff Announcement" 
   /varset GroupBuffAnnounce[${a}] Group Buff Announcement 
   /varset INIFlag 1 
} 
/next a
/for a 1 to 8 
/varset GroupBuffClass[${a}] ${Ini[${IniFile},GroupBuff,GroupBuffClass${a},NOTFOUND]} 
/if (${GroupBuffClass[${a}].Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" GroupBuff GroupBuffClass${a} WAR|SHD|PAL|RNG|MNK|ROG|BRD|BST|BER|SHM|CLR|DRU|WIZ|MAG|ENC|NEC
   /varset GroupBuffClass[${a}] WAR|SHD|PAL|RNG|MNK|ROG|BRD|BST|BER|SHM|CLR|DRU|WIZ|MAG|ENC|NEC 
   /varset INIFlag 1  
}
/next a

/for a 1 to 8 
/varset TempStr ${Ini[${IniFile},GroupBuff,GroupBuffMemToSlot${a},NOTFOUND]}
/varset GroupBuffMemToSlot[${a}] ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" GroupBuff GroupBuffMemToSlot${a} 0 
   /varset GroupBuffMemToSlot[${a}] 0 
   /varset INIFlag 1  
} 
/next a

/varset GroupBuffCheckTime ${Ini[${IniFile},GroupBuff,GroupBuffCheckTime,NOTFOUND]}
/if (${GroupBuffCheckTime.Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" GroupBuff GroupBuffCheckTime 15s 
   /varset GroupBuffCheckTime 15s 
   /varset INIFlag 1 
}

/varset TempStr ${Ini[${IniFile},Pet,PausePet,NOTFOUND]}
/varset PausePet ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" Pet PausePet 1 
   /varset PausePet 1 
   /varset INIFlag 1 
}

/varset TempStr ${Ini[${IniFile},Pet,PetAssistOnHPPct,NOTFOUND]}
/varset PetAssistOnHPPct ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" Pet PetAssistOnHPPct 98 
   /varset PetAssistOnHPPct 98 
   /varset INIFlag 1 
}

/varset PetCheckTime ${Ini[${IniFile},Pet,PetAssistCheckTime,NOTFOUND]}
/if (${PetCheckTime.Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" Pet PetAssistCheckTime 5s 
   /varset PetCheckTime 5s 
   /varset INIFlag 1 
}

/varset PetBuffCheckTime ${Ini[${IniFile},Pet,PetBuffCheckTime,NOTFOUND]}
/if (${PetBuffCheckTime.Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" Pet PetBuffCheckTime 15s 
   /varset PetBuffCheckTime 15s 
   /varset INIFlag 1 
}

/varset TempStr ${Ini[${IniFile},Pet,PetBuffCount,NOTFOUND]}
/varset PetBuffCount ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" Pet PetBuffCount 0 
   /varset PetBuffCount 0 
   /varset INIFlag 1 
}

/for a 1 to 8 
/varset PetBuff[${a}] ${Ini[${IniFile},Pet,PetBuff${a},NOTFOUND]} 
/if (${PetBuff[${a}].Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" Pet PetBuff${a} "Pet Buff Name"
   /varset PetBuff[${a}] Pet Buff Name
   /varset INIFlag 1  
}
/next a

/for a 1 to 8
/varset PetBuffIconName[${a}] ${Ini[${IniFile},Pet,PetBuffIconName${a},NOTFOUND]}
/if (${PetBuffIconName[${a}].Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" Pet PetBuffIconName${a} "Pet Buff Icon Name" 
   /varset PetBuffIconName[${a}] Pet Buff Icon Name
   /varset INIFlag 1 
}
/next a

/for a 1 to 8 
/varset TempStr ${Ini[${IniFile},Pet,PetBuffMemToSlot${a},NOTFOUND]}
/varset PetBuffMemToSlot[${a}] ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" Pet PetBuffMemToSlot${a} 0 
   /varset PetBuffMemToSlot[${a}] 0 
   /varset INIFlag 1  
} 
/next a

/varset PetSummonSpell ${Ini[${IniFile},Pet,PetSummonSpell,NOTFOUND]}
/if (${PetSummonSpell.Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" Pet PetSummonSpell "Pet Summon Spell Name"
   /varset PetSummonSpell Pet Summon Spell Name
   /varset INIFlag 1 
}

/varset TempStr ${Ini[${IniFile},Pet,PetSummonMemToSlot,NOTFOUND]}
/varset PetSummonMemToSlot ${TempStr}
/if (${TempStr.Equal["NOTFOUND"]}) { 
   /ini "${IniFile}" Pet PetSummonMemToSlot 0 
   /varset PetSummonMemToSlot 0 
   /varset INIFlag 1 
}

/if (${INIFlag}==1) { 
   /echo INI file created and populated.  Please customize ${IniFile} in your macros directory. 
   /endmacro 
}
/tgb on 
/return 

Sub INIListUpdate(a,b,c)
/declare TempItem string local 
/declare TempVar int local 
/declare TempVar2 int local 
/varset TempVar 0
/if (${c}==1) /varset TempVar 1 
/if (${a.Length}>0) { 
    :ListSearch 
    /varset TempItem ${Ini[${IniFile},${b},${Int[${TempVar}]},NOTFOUND]}
    /if (${TempItem.Equal["NOTFOUND"]}) /goto :AddItem 
    /if (${TempItem.Equal["${a}"]}) { 
        /echo -[ ${a} REMOVED from ${b} list. ]- 
        /if (${Reply}==1 && !${SenderName.Equal[nobody]}) /docommand /${If[${ReplyChannel.Find[ @]}>0,${ReplyChannel.Mid[1,${Math.Calc[${ReplyChannel.Find[ @]}-1]}]} ${SenderName},${ReplyChannel}]} Ok, I guess I won't ${If[${b.Equal[Watch]},watch,listen to]} ${a} anymore.
        /ini "${IniFile}" "${b}" "${Int[${TempVar}]}" "Empty" 
        /goto :DoneCategory
    }
    /varset TempVar ${Math.Calc[${TempVar}+1]}
    /goto :ListSearch 
    :AddItem
    /varset TempVar 0
    /if (${c}==1) /varset TempVar 1 
    :AddItemLoop 
    /varset TempItem ${Ini[${IniFile},${b},${Int[${TempVar}]},NOTFOUND]} 
    /if (${TempItem.Equal["Empty"]}) /goto :FoundCategorySlot    
    /if (${TempItem.Equal["NOTFOUND"]}) /goto :FoundCategorySlot 
    /varset TempVar ${Math.Calc[${TempVar}+1]} 
    /goto :AddItemLoop 
    :FoundCategorySlot 
    /if ((${TempVar}>10)&&(${b.Equal["Watch"]})) {
        /echo -(( All slots full, 10 Maximum. ))-
        /return
    }
    /echo -[ ${a} ADDED to ${b} list. ]- 
    /if (${Reply}==1 && !${SenderName.Equal[nobody]}) /docommand /${If[${ReplyChannel.Find[ @]}>0,${ReplyChannel.Mid[1,${Math.Calc[${ReplyChannel.Find[ @]}-1]}]} ${SenderName},${ReplyChannel}]} Ok, I will ${If[${b.Equal[Watch]},watch,listen to]} ${a} now.
    /ini "${IniFile}" "${b}" "${Int[${TempVar}]}" "${a}" 
}
:DoneCategory
/return

Sub Event_Master(EvtText)
/varset EvtText ${EvtText.Right[-6]}
/varset SenderName nobody
/call MasterFunction "${EvtText}"
/return

Sub MasterFunction(CmdText)
/declare TempItem string local 
/declare TempVar int local 
/declare TempVar2 int local
/declare MakeReply string local
/varset CmdText ${CmdText.Right[-7]}
/if (${CmdText.Length}>0) { 
    /call INIListUpdate "${CmdText}" "Masters" "0"
    /call LoadMasterList
} else {
    /varset TempVar2 0 
    /varset TempVar 0
    /varset MakeReply I'll do whatever these guys say -
    /echo -[ Allowed Masters ]- 
    :CategoryList 
    /varset TempItem ${Ini[${IniFile},Masters,${Int[${TempVar}]},NOTFOUND]}
    /if (${TempItem.Equal["NOTFOUND"]}) /goto :DoneCategoryList 
    /varset TempVar ${Math.Calc[${TempVar}+1]} 
    /if (!${TempItem.Equal["Empty"]}) { 
        /varset TempVar2 ${Math.Calc[${TempVar2}+1]}
        /varset MakeReply ${MakeReply} ${TempItem},
        /echo -- Master[${Int[${TempVar2}]}] ${TempItem} 
    } 
    /goto :CategoryList 
    :DoneCategoryList 
    /if (${Reply}==1 && !${SenderName.Equal[nobody]} && ${TempVar2}>0) /docommand /${If[${ReplyChannel.Find[ @]}>0,${ReplyChannel.Mid[1,${Math.Calc[${ReplyChannel.Find[ @]}-1]}]} ${SenderName},${ReplyChannel}]} ${MakeReply.Left[-1]}.
    /if (${Reply}==1 && !${SenderName.Equal[nobody]} && ${TempVar2}==0) /docommand /${If[${ReplyChannel.Find[ @]}>0,${ReplyChannel.Mid[1,${Math.Calc[${ReplyChannel.Find[ @]}-1]}]} ${SenderName},${ReplyChannel}]} I'm not listening to anyone.
    /if (${TempVar2}==0) /echo -(( No Masters Found ))- 
  
} 
/return

Sub Event_Watch(EvtText)
/varset EvtText ${EvtText.Right[-6]}
/varset SenderName nobody
/call WatchFunction "${EvtText}"
/return

Sub WatchFunction(CmdText)
/declare TempItem string local 
/declare TempVar int local 
/declare TempVar2 int local
/declare b int local
/declare MakeReply string local
/varset CmdText ${CmdText.Right[-6]}
/if (${CmdText.Length}>0) { 
    /call INIListUpdate "${CmdText}" "Watch" "1"
    /call LoadWatchList
} else {
    /varset TempVar2 0 
    /varset TempVar 1
    /varset MakeReply I'll be watching the health of these guys -
    /echo -[ Watch List ]- 
    :CategoryList
    /varset TempItem ${Ini[${IniFile},Watch,${Int[${TempVar}]},NOTFOUND]}
    /if (${TempItem.Equal["NOTFOUND"]}) /goto :DoneCategoryList 
    /varset TempVar ${Math.Calc[${TempVar}+1]}
    /if (!${TempItem.Equal["Empty"]}) { 
        /varset TempVar2 ${Math.Calc[${TempVar2}+1]} 
        /varset MakeReply ${MakeReply} ${TempItem},
        /echo -- Watch Target[${Int[${TempVar2}]}] ${TempItem} 
    } 
    /goto :CategoryList 
    :DoneCategoryList
    /if (${Reply}==1 && !${SenderName.Equal[nobody]} && ${TempVar2}>0) /docommand /${If[${ReplyChannel.Find[ @]}>0,${ReplyChannel.Mid[1,${Math.Calc[${ReplyChannel.Find[ @]}-1]}]} ${SenderName},${ReplyChannel}]} ${MakeReply.Left[-1]}.
    /if (${Reply}==1 && !${SenderName.Equal[nobody]} && ${TempVar2}==0) /docommand /${If[${ReplyChannel.Find[ @]}>0,${ReplyChannel.Mid[1,${Math.Calc[${ReplyChannel.Find[ @]}-1]}]} ${SenderName},${ReplyChannel}]} I'm not watching anyones health.
    /if (${TempVar2}==0) /echo -(( No Watch List Found ))- 
  
} 
/return
Last edited by ml2517 on Sun May 16, 2004 10:32 pm, edited 13 times in total.

ml2517
a grimling bloodguard
a grimling bloodguard
Posts: 1216
Joined: Wed Nov 12, 2003 1:12 am

advpath link & spellcast.inc

Post by ml2517 » Wed Apr 28, 2004 2:32 am

** Get advpath from the link below:

http://macroquest2.com/phpBB2/viewtopic.php?t=5086


spellcast.inc

Code: Select all

|
| SpellCast.inc 
|
| Last Modified: 5/14/2004 9:30pm
| This will cast a spell reliably for you... 
| 
| Usage: 
|       /call Cast "spellname|itemname|AA#|AAskillname" [item|activate|gem#] [nocheck|dismount|nodismount]
|
| If no dismount or nodismount is provided it defaults to nodismount.
| 
| This would essentially: /cast "Death Peace" 
| example: /call Cast "Death Peace" 
| 
| This would essentially: Check for the spell in your spell slots, if not there mem it to spell 
|                         gem slot 7 and then /cast "Death Peace" 
| example: /call Cast "Death Peace" gem7
|
| This would essentially: /cast item "White Rope Bridle" 
| example: /call Cast "White Rope Bridle" item 
| 
| This would essentially: /alt activate 169
| example: /call Cast "169" activate 
|  or...
| example: /call Cast "Divine Arbitration" activate 
|
| This would dismount if your target was lost or dies mid-cast, cast Burn and mem it to spell
| slot 3 if it wasn't already memmed:
| example: /call Cast "Burn" gem3 dismount
|
| This would not dismount but would move you back and forth if your target was lost or dies mid-cast, cast Burn and mem
| it to spell slot 3 if it wasn't already memmed:
| example: /call Cast "Burn" gem3 nodismount
|
| 'nocheck' is the default for the "loss of target/target dying" value.  If nocheck is specified (Or nothing was specified)
| no target checking will be performed and spellcast.inc should act like the spellcast.inc of the past.
|
| It will return the following values: 
| CAST_SUCCESS 
| CAST_UNKNOWNSPELL 
| CAST_OUTOFMANA 
| CAST_OUTOFRANGE 
| CAST_CANNOTSEE 
| CAST_STUNNED 
| CAST_RESISTED 
| CAST_TOOK2LONG 
| CAST_ABILITYNOTREADY 
| CAST_IMMUNESLOW 
| CAST_LOSTTARGET
| 
| New Vars Modification 
| Plazmic's no globals needed version 
| 
| Oct 09, 2003 - Updated to work with new vars and $char(casting) -gf 
| Oct 11, 2003 - switched some logic, removed defines -gf 
| Oct 15, 2003 - Item support added by -EqMule 
| XXX xx, xxxx - Modified to add automeming of spells. -Goofmester1 
| Dec 26, 2003 - fd fail 1 added -m0nk 
| Jan 01, 2004 - timeout(5s) added to stop "dead-time" -m0nk 
| Jan 01, 2004 - switchd fdfail to a standing check. -m0nk 
| Jan 01, 2004 - added silence checking as a stun check -m0nk 
| Feb 17, 2004 - added AA activate capabilities -ml2517 
| Apr 11, 2004 - Updated for new Parm system -ml2517 
| Apr 12, 2004 - Will spit out a different message on immune to slows. -ml2517 
| Apr 16, 2004 - Removed /sendkeys and replaced with /keypress. -ml2517 
| Apr 17, 2004 - Various code enhancements. -Wassup 
| Apr 20, 2004 - Updated all of the /if's to have parenthesis. -ml2517 
| Apr 25, 2004 - Updated to new variable system. -ml2517 
| Apr 29, 2004 - Fixed Item problem -ml2517
| Apr 29, 2004 - Changed the alt ability to use AltAbilityReady instead of an event. -ml2517
| May 02, 2004 - Added the ability to specify a gem slot to mem spells to. -ml2517
| May 10, 2004 - Updated for new event system.
| May 12, 2004 - Added suggestions for loss of target and stun handling change. -ml2517
| May 13, 2004 - Activate now accepts AA skill by name or number. -ml2517
| May 14, 2004 - Added the nocheck value, it is the default. This bypasses the target checking code. -ml2517
| 

#event Fizzle "#*#Your spell fizzles#*#" 
#event Interrupt "#*#Your casting has been interrupted#*#" 
#event Interrupt "#*#Your spell is interrupted.#*#" 
#event Recover "#*#You haven't recovered yet...#*#" 
#event Recover "#*#Spell recovery time not yet met.#*#" 
#event Resisted "#*#Your target resisted the #*#" 
#event OutOfMana "#*#Insufficient Mana to cast this spell!#*#" 
#event OutOfRange "#*#Your target is out of range, get closer!#*#" 
#event NoLOS "#*#You cannot see your target.#*#" 
#event Stunned "#*#You cannot cast while stunned#*#" 
#event Stunned "#*#You *CANNOT* cast spells, you have been silenced!#*#" 
#event Standing "#*#You must be standing to cast a spell#*#" 
#event Standing "#*#has fallen to the ground.#*#" 
#event Collapse "#*#Your gate is too unstable, and collapses.#*#" 
#event ImmuneSlow "#*#Your target is immune to changes in its attack speed.#*#" 


Sub Cast(SpellName,ItemFlag,DismountFlag) 
   /declare HaveTarget int local 0
   /declare CastBarTime timer local
   /declare CastCurrLocY float local 0
   /declare CastCurrLocX float local 0
   /varset CastCurrLocY ${Me.Y}
   /varset CastCurrLocX ${Me.X}
   /if (${Target.ID}>0) /varset HaveTarget 1
   /if (!${Defined[CastGiveUpTime]}) /declare CastGiveUpTime timer local 
   /if (!${Defined[ItemFlag]}) /declare ItemFlag string local 
   /if (!${Defined[DismountFlag]}) {
       /declare DismountFlag string local nocheck
       /if (${ItemFlag.Find["dismount"]}) /varset DismountFlag ${ItemFlag}
   }
   /if (!${Me.Standing} && !${Me.Mount.ID}>0) /stand
   /if (${Me.Moving}) { 
       /keypress forward 
       /keypress back 
       /delay 8 
   } else { 
       /delay 4 
   } 
   /if (${ItemFlag.Equal["Item"]} || ${ItemFlag.Equal["Activate"]}) /goto :StartCast 

   /if (!${Me.Gem["${SpellName}"]}) { 
       /if (${ItemFlag.Find[gem]}) {
           /if (${Int[${ItemFlag.Right[1]}]}>0 && ${Int[${ItemFlag.Right[1]}]}<9) {
               /memspell ${ItemFlag.Right[1]} "${SpellName}" 
               /delay 5s 
           } else {
               /goto :GenericMem
           }
       } else {        
           :GenericMem
           /memspell 5 "${SpellName}" 
           /delay 5s 
       }

   } 
   :StartCast 
      /varset CastGiveUpTime 5s 
   :CastNow 
      /if (${ItemFlag.Equal["Item"]}) { 
         /call ClearReturnValue 
         /cast item "${SpellName}" 
      } else /if (${ItemFlag.Equal["Activate"]}) { 
         /call ClearReturnValue 
         /if (!${Me.AltAbilityReady[${SpellName}]}) /return CAST_ABILITYNOTREADY 
         /alt activate ${AltAbility[${SpellName}].ID}
         /varset CastBarTime ${Me.Casting.CastTime}
      } else { 
         /if (!${Me.Gem["${SpellName}"]}) /return CAST_UNKNOWNSPELL 
         /call ClearReturnValue 
         /if (!${Me.SpellReady["${SpellName}"]}) { 
            /if (${CastGiveUpTime}==0) /return CAST_TOOK2LONG 
            /delay 1 
            /goto :CastNow 
         } 
         /cast "${SpellName}" 
         /varset CastBarTime ${Math.Calc[${Me.Casting.CastTime}*10]}
      } 
   :WaitCast 
      /if (${Me.Casting.ID}) { 
         /if ((!${Target.ID}>0 || ${Target.Type.Equal[CORPSE]}) && !${DismountFlag.Find[nocheck]} && ${HaveTarget}==1) {
             /if (${Me.Mount.ID}>0) {
                 /if (${DismountFlag.Equal[dismount]}) {
                     /dismount
                 } else {
                     /if (!${ItemFlag.Equal["Item"]}) {
                         /if (${CastBarTime}<7) {
                             :Interrupt
                             /keypress FORWARD hold
                             /delay 6
                             /keypress FORWARD
                             /keypress BACK hold
                             /delay 8
                             /keypress BACK
                         } else {
                             :HoldForSpell
                             /delay 1
                             /if (${CastBarTime}<7) /goto :Interrupt
                             /goto :HoldForSpell
                         }
                     } else {
                         /keypress FORWARD hold
                         :Forward
                         /delay 1
                         /if (${Math.Distance[${CastCurrLocY},${CastCurrLocX}]}<6) /goto :Forward
                         /keypress FORWARD
                         /keypress BACK hold
                         :Backward
                         /delay 1
                         /if (${Math.Distance[${CastCurrLocY},${CastCurrLocX}]}>4) /goto :Backward
                         /keypress BACK
                         /if (!${Me.Casting.ID}>0) /goto :DuckTime
                     }
                 }
             }
             :DuckTime
             /keypress FORWARD
             /keypress BACK
             /if (!${Me.Ducking}) /keypress DUCK
             /delay 1
             /if (${Me.Ducking}) /keypress DUCK
             /return CAST_LOSTTARGET
         }
         /delay 1
         /goto :WaitCast 
      } 
   /delay 1 
   /doevents Fizzle 
   /doevents Interrupt 
   /doevents Interrupt 
   /doevents Recover 
   /doevents Standing 
   /doevents OutOfRange 
   /doevents OutOfMana 
   /doevents NoLOS 
   /doevents Resisted 
   /doevents ImmuneSlow 
   /doevents Stunned 
   /doevents Collapse 
   /if (${Macro.Return.Equal["CAST_RESTART"]}) /goto :StartCast 
   /if (!${Macro.Return.Equal["NULL"]}) /return ${Macro.Return} 
/return CAST_SUCCESS 

Sub ClearReturnValue 
/return NULL 

Sub Event_Fizzle 
/return CAST_RESTART 

Sub Event_Interrupt 
/return CAST_RESTART 

Sub Event_Recover 
   /delay 5 
/return CAST_RESTART 

Sub Event_Standing 
   /stand 
/return CAST_RESTART 

Sub Event_Collapse 
/return CAST_RESTART 

Sub Event_OutOfMana 
/return CAST_OUTOFMANA 

Sub Event_OutOfRange 
/return CAST_OUTOFRANGE 

Sub Event_NoLOS 
/return CAST_CANNOTSEE 

Sub Event_Stunned 
   /delay 2s !${Me.Stunned} 
/return CAST_RESTART 

Sub Event_Resisted 
/return CAST_RESISTED 

Sub Event_ImmuneSlow 
/return CAST_IMMUNESLOW 
Last edited by ml2517 on Fri May 14, 2004 10:43 pm, edited 17 times in total.

illus1on
orc pawn
orc pawn
Posts: 24
Joined: Wed Apr 14, 2004 3:32 pm

Post by illus1on » Wed Apr 28, 2004 6:24 am

I love your macros.

Question....

Events. Having a Shaman Can5 (/alt acticate 44) I believe...
- I set the Event to do this every 240 seconds, and when he is below 60m and when he is over 50h. All the settings should make this work. But he never does his Can5.

- Same thing for setting Events for Can 4 spell. Mana from 80 to 99. And health anything over 50.

ml2517
a grimling bloodguard
a grimling bloodguard
Posts: 1216
Joined: Wed Nov 12, 2003 1:12 am

Post by ml2517 » Wed Apr 28, 2004 9:35 am

I'll try to check this tonight and make sure I didn't break anything since converting all of this, but make sure you have the following for Can 5:

A. Set EventCount=x where x is the number of events you have defined.
B. Set EventMinManax=60
C. Set EventMaxHPx=50
D. Set EventSpellx=activate 44 (If it is 44 as you say)

Also make sure PauseEvents is set to 0 at start if you want him to immediately start acting on your events. You can toggle events on and off in game using the 'events' command.

JimJohnson
a grimling bloodguard
a grimling bloodguard
Posts: 1299
Joined: Sat Oct 11, 2003 6:00 am

Post by JimJohnson » Wed Apr 28, 2004 10:01 am

[quote="
Events. Having a Shaman Can5 (/alt acticate 44) I believe...
- I set the Event to do this every 240 seconds, and when he is below 60m and when he is over 50h. All the settings should make this work. But he never does his Can5.

quote]

Code: Select all

[Events]
EventCount=1
EventSpell1=activate 47
EventMinMana1=60
EventMaxHP1=80
EventDuration1=240



would be canni 5. This wouldnt do it ever 240 seconds tho. it only checks the mana every 240 seconds. If its under 60 mana then checks the HPs then performs the activation. Reading your post sounded like you wanted it to go off every 4 minutes.

illus1on
orc pawn
orc pawn
Posts: 24
Joined: Wed Apr 14, 2004 3:32 pm

Post by illus1on » Wed Apr 28, 2004 2:20 pm

What about if it was in the Self Buffs section? Could I get the 240 second timer to go there? Regardless of mana count? But over 50% hp?

ml2517
a grimling bloodguard
a grimling bloodguard
Posts: 1216
Joined: Wed Nov 12, 2003 1:12 am

Post by ml2517 » Wed Apr 28, 2004 2:36 pm

I'd have to add some HP checks in self buff. I'm going to finish updating my other macros to the new var system and then I can start doing stuff like this. I need someone to verify if the new "on death pause the debuffing" stuff I put in and let me know if it works. I don't test this in any situation where I'd die.

JimJohnson
a grimling bloodguard
a grimling bloodguard
Posts: 1299
Joined: Sat Oct 11, 2003 6:00 am

Post by JimJohnson » Wed Apr 28, 2004 2:46 pm

illus1on wrote:What about if it was in the Self Buffs section? Could I get the 240 second timer to go there? Regardless of mana count? But over 50% hp?

why would you want to put the timer in self buff code?


What all still needs tested? just the pause on death?


The groupbuff code needs little tweaking still i think. Doesnt work good with long recast buffs FA / Fero

ml2517
a grimling bloodguard
a grimling bloodguard
Posts: 1216
Joined: Wed Nov 12, 2003 1:12 am

Post by ml2517 » Wed Apr 28, 2004 3:59 pm

JimJohnson wrote: The groupbuff code needs little tweaking still i think. Doesnt work good with long recast buffs FA / Fero
Can you Explain what is going on with this? Do you mean the spell gem stays greyed out for a long time or?

RudeBoy
orc pawn
orc pawn
Posts: 23
Joined: Wed Mar 24, 2004 7:04 am

Post by RudeBoy » Wed Apr 28, 2004 4:20 pm

FA greys out for about 1 min after memming or casted

ml2517
a grimling bloodguard
a grimling bloodguard
Posts: 1216
Joined: Wed Nov 12, 2003 1:12 am

Post by ml2517 » Wed Apr 28, 2004 5:03 pm

Oh, I think I get it. This is a single target buff that is long recast refresh eh? If that is the case I can try to throw a check in to skip by them until its refreshed.