autodebuff.mac - Auto radius debuff macro - *New Parm Rdy*

A forum for you to dump all the macros you create, allowing users to use, modify, and comment on your work.

Moderator: MacroQuest Developers

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

autodebuff.mac - Auto radius debuff macro - *New Parm Rdy*

Post by ml2517 » Mon Feb 02, 2004 9:37 pm

See Instructions in my next post.

Code: Select all

| 
| autodebuff.mac 
| Auto mob debuff utility.  
| Version 1.47 
| Date:4/25/2004 2:00pm (If you don't have at least 4/25 release of MQ2 you MUST upgrade!)
|

#include spellcast.inc 
#include advpath.inc 

#Event Master "[MQ2] master" 
#Event Hold "[MQ2] hold" 
#Event Sit "[MQ2] sit" 
#Event SelfBuff "[MQ2] selfbuff" 
#Event GroupBuff "[MQ2] groupbuff" 
#Event Events "[MQ2] events" 
#Event Heal "[MQ2] heal" 
#Event Exclude "[MQ2] exclude" 
#Event Include "[MQ2] include"
#Event Announce "[MQ2] announce" 
#Event Watch "[MQ2] watch"

#chat tell 

Sub Main(INI) 

/call SetupADVars 
/declare a local 
/declare b local 
/declare TmpHolder local
/varset TmpHolder 0  

/varset IniFile "AD_" 
/varcat IniFile "${Me.Name}" 
/if (${Defined[INI]}) {
    /varcat IniFile "_@INI" 
}
/varcat IniFile ".ini" 

/call LoadINIVals 

/call LoadExcludes 

/for a 0 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 { 
        /varset SelfBuffedList(@a) 99999 
    } 
/next a 

/for a 1 to @GroupBuffCount 
    /for b 0 to 5
        /if (@GroupBuffAtStart(@a)==1) { 
            /varset GBL(@a,@b) 0 
        } else { 
            /varset GBL(@a,@b) 99999 
        } 
    /next b
/next a 

/for a 1 to @EventCount 
    /varset EventList(@a) 0 
/next a 

/for a 0 to 15
    /varset HoTList(@a) 0 
    /varset WatchTimer(@a) 0
/next a 

/for a 1 to 10
    /varset WatchList(@a) "Empty"
/next a 

/varset ZoneName "${Zone.Name}" 

/if (@PauseMacro==1) { 
    /echo -[ Debuffing Paused. ]-
} 

/if (@PauseEvents==1) { 
    /echo -[ HP/Mana Events Paused. ]-
} 

/if (@PauseHeals==1) { 
    /echo -[ Healing Paused. ]-
} 

/if (@Announce==0) { 
    /echo -[ Announcements OFF. ]-
} 

/call InitAPFVars 1 15 20 
/call LoadMasterList
/call Event_Master "master"
/call LoadWatchList 
/call Event_Watch "watch"

:MainLoop
/call AdvPathPoll 

/if (!${Zone.Name.Equal["@ZoneName"]}) { 
    /for a 0 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 ZoneName "${Zone.Name}"    
} 

/if (@PauseMacro==0) { 
    /call IterateNPC 
} 

/if (@NoSit==0) /call SitCheck 

/if (@PauseMacro==0) { 
    /for a 1 to @TrackNumber 
    /if (@PauseHeals==0) /call HealCheck
        /call AdvPathPoll 
        /if (@PauseMacro==0) { 
            /if (@MobList(@a)!=0) { 
                /for b 1 to @DebuffCount
                    /call AdvPathPoll 
                    /target id @MobList(@a)
                    /if (!${Target.Type.Equal["NPC"]}) /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))&&(@NpcCount>=@DebuffMinMobsInArea(@b))&&(!${Spawn[@MobList(@a)].State.Equal["DEAD"]})&&(${Me.PctMana}>@DebuffMinMana(@b))) {
                        /if (@FollowFlag==1) /if (@PauseFlag==0) { 
                            /varset TmpHolder 1 
                            /call PauseFunction 
                        } 
                        /echo Debuffing: -[ ${Spawn[@MobList(@a)].CleanName} ]- with @Debuff(@b). 

                        /if (@Announce==1) {
                            /call Debuff @MobList(@a) "@Debuff(@b)" "@DebuffAnnounce(@b)" @a @b
                        } else {
                            /call Debuff @MobList(@a) "@Debuff(@b)" "NULL" @a @b
                        }
                         /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["@Debuff(@b)"].Duration.TotalSeconds}==0) { 
                                    /varset MDL(@a,@b) ${Math.Calc[(1+${Macro.RunTime})-5]}
                                } else { 
                                    /varset MDL(@a,@b) ${Math.Calc[(${Spell["@Debuff(@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}]}
                        } 
                    } 
                /next b 
            } 
        } 
    :NotNPC
    /doevents 
    /next a 
    /if (@TmpHolder==1) { 
        /varset TmpHolder 0 
        /if (@FollowFlag==1) /if (@PauseFlag==1) /call PauseFunction 
    } 
} 

/call CheckNPC 
/call SelfBuffCheck 
/call GroupBuffCheck 
/if (@PauseEvents==0) { 
    /call EventCheck 
} 
/if (@PauseHeals==0) /call HealCheck

/doevents 
/goto :MainLoop 
/return 

Sub SitCheck
/declare MobHeading local
/declare MeHeading local
/declare MiniIterate local
/declare AggroFlag local
/declare AggroID local

/if (((@FollowFlag==0)&&(@PathingFlag==0))||(@PauseFlag==1)) { 
    /varset MiniIterate 1
    /varset AggroFlag 0
    /varset AggroID 0
    :CheckNext
    /varset AggroID ${NearestSpawn[@MiniIterate,npc radius 75 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}) {
                /if (${Me.State.Equal["SIT"]}) /stand 
            } 
            /goto :BreakOutCheckAggro
        }
    } else {
        /if (@AggroFlag==0) {
            /if (!${Me.Mount.ID}) {
                /if (${Me.State.Equal["STAND"]}) /sit on
            } 
            /goto :BreakOutCheckAggro
        }
    }
    /varadd MiniIterate 1
    /goto :CheckNext
    :BreakOutCheckAggro
} 
/return

Sub IterateNPC 
/declare npcid local 
/declare a local 
/declare b local 
/declare compare local 
/varset npcid 0 
/varset NpcCount 0 
:GetSpawn
/call AdvPathPoll
/doevents
/varset npcid ${NearestSpawn[${Math.Calc[@NpcCount+1]},npc radius @Radius zradius 10 noalert @AlertList].ID} 
/if (!${String[@npcid].Equal[NULL]}) { 
   /varadd NpcCount 1 
   /if (@NpcCount>@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 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 CheckNPC 
/declare a local 
/declare b local 
/for a 1 to @TrackNumber 
    /call AdvPathPoll 
    /if (@MobList(@a)!=0) { 
        /if ((${Spawn[@MobList(@a)].State.Equal["DEAD"]})||(!${Spawn[@MobList(@a)].ID})||(${Spawn[@MobList(@a)].Distance3D}>300)) {
            /varset MobList(@a) 0 
            /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) 
/declare resistcount local
/declare retrytimer local 
/varset resistcount 1 
:RecastDebuff 
/call AdvPathPoll 
/if (${Me.State.Equal["SIT"]}) /stand
/if (${String["@debname"].Mid[1,4].Equal["item"]}) { 
    /call Cast "${String["@debname"].Mid[6,${Math.Calc[${String["@debname"].Length}-5]}]}" "item" 
} else /if (${String["@debname"].Mid[1,8].Equal["activate"]}) { 
    /call Cast "${String["@debname"].Mid[10,${Math.Calc[${String["@debname"].Length}-9]}]}" "activate" 
} else { 
    /call Cast "@debname" 
}
/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) { 
        /varadd resistcount 1 
        :WaitForGem
        /if (@PauseHeals==0) /call HealCheck
        /call AdvPathPoll 
        /delay 1
        /if (${String["@debname"].Mid[1,4].Equal["item"]}) { 
            /goto :RecastDebuff 
        } else /if (${String["@debname"].Mid[1,8].Equal["activate"]}) { 
            /goto :RecastDebuff
        } else { 
            /if (@retrytimer<${Math.Calc[${Macro.RunTime}]}) {
                /return NODELAY
            }
            /if (!${Me.SpellReady["@debname"]}) /goto :WaitForGem
        } 
        /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)&&(!${String["@debannounce"].Equal["NULL"]})&&(@MobAnnounced(@a,@b)==0)) { 
    /if (${String["@AnnounceChannel"].Equal["group"]}) { 
      /if (${Group}>0) /gsay @debannounce
    } 
    /if (${String["@AnnounceChannel"].Equal["raid"]}) { 
      /rsay @debannounce
    } 
    /varset MobAnnounced(@a,@b) 1 
}
/return NODELAY

Sub SelfBuffCheck 
/declare a local 
/declare RetryBuffCount local 
/if (@SelfBuffCount>0) { 
    /for a 1 to @SelfBuffCount 
        /if (@PauseHeals==0) /call HealCheck
        /varset RetryBuffCount 0        
        /call AdvPathPoll 
        /if ((@SelfBuffedList(@a)<${Math.Calc[${Macro.RunTime}]})||((@SelfBuffIconCheck(@a)==1)&&(!${Me.Buff["@SelfBuffIconName(@a)"].Duration})&&(@SelfBuffedList(@a)!=99999))) { 
            :RetryBuff 
            /if ((${Me.Gem["@SelfBuff(@a)"]})||(${String["@SelfBuff(@a)"].Find["item"]})||(${String["@SelfBuff(@a)"].Find["activate"]})) {
                /if (${Me.State.Equal["SIT"]}) /stand
                /target myself 
                /if (${String["@SelfBuff(@a)"].Mid[1,4].Equal["item"]}) {
                    /echo -[ Casting Self Buff : @SelfBuff(@a) ]-
                    /call Cast "${String["@SelfBuff(@a)"].Mid[6,${Math.Calc[${String["@SelfBuff(@a)"].Length}-5]}]}" "item" 
                } else /if (${String["@SelfBuff(@a)"].Mid[1,8].Equal["activate"]}) { 
                    /echo -[ Casting Self Buff : @SelfBuff(@a) ]-
                    /call Cast "${String["@SelfBuff(@a)"].Mid[10,${Math.Calc[${String["@SelfBuff(@a)"].Length}-9]}]}" "activate" 
                } else { 
                    /echo -[ Casting Self Buff : @SelfBuff(@a) ]-
                    /call Cast "@SelfBuff(@a)" 
                } 
                /if (@SelfBuffDuration(@a)==99999) { 
                    /varset SelfBuffedList(@a) ${Math.Calc[99999+${Macro.RunTime}]}
                } else /if (@SelfBuffDuration(@a)==0) { 

                    /if (${Spell[@SelfBuff(@a)].Duration.TotalSeconds}==0) { 
                        /varset SelfBuffedList(@a) ${Math.Calc[(1+${Macro.RunTime})-5]}
                    } else { 
                        /varset SelfBuffedList(@a) ${Math.Calc[(${Spell[@SelfBuff(@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)"]}) { 
                    } else {
                        /delay 3s 
                        /varadd 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}]}
            } 
        } 
    /next a 
}
/if (@NoSit==0) /call SitCheck  
/return 

Sub EventCheck 
/declare a local 
/declare RetryEventCount local 
/if (@EventCount>0) { 
    /for a 1 to @EventCount 
        /if (@PauseHeals==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 ((${Me.Gem["@EventSpell(@a)"]})||(${String["@EventSpell(@a)"].Find["item"]})||(${String["@EventSpell(@a)"].Find["activate"]})) { 
                    /if (${Me.State.Equal["SIT"]}) /stand 
                    /target myself 
                    /if (${String["@EventSpell(@a)"].Mid[1,4].Equal["item"]}) { 
                        /echo -[ Casting Event Spell : @EventSpell(@a) ]-
                        /call Cast "${String["@EventSpell(@a)"].Mid[6,${Math.Calc[${String["@EventSpell(@a)"].Length}-5]}]}" "item" 
                    } else /if (${String["@EventSpell(@a)"].Mid[1,8].Equal["activate"]}) { 
                        /echo -[ Casting Event Spell : @EventSpell(@a) ]-
                        /call Cast "${String["@EventSpell(@a)"].Mid[10,${Math.Calc[${String["@EventSpell(@a)"].Length}-9]}]}" "activate" 
                    } else { 
                        /echo -[ Casting Event Spell : @EventSpell(@a) ]-
                        /call Cast "@EventSpell(@a)" 
                    } 
                    /if (@EventDuration(@a)==99999) { 
                        /varset EventList(@a) ${Math.Calc[99999+${Macro.RunTime}]} 
                    } else /if (@EventDuration(@a)==0) { 
                        /if (${Spell["@EventSpell(@a)"].Duration.TotalSeconds}==0) { 
                            /varset EventList(@a) ${Math.Calc[(1+${Macro.RunTime})-5]}
                        } else { 
                            /varset EventList(@a) ${Math.Calc[(${Spell["@EventSpell(@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)"]}) { 
                        } else {
                            /delay 3s 
                            /varadd 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}]}
                } 
            } 
        } 
    /next a 
}
/if (@NoSit==0) /call SitCheck  
/return 

Sub GroupBuffCheck 
/declare a local
/declare b local 
/declare RetryBuffCount local 
/if (@GroupBuffCount>0) { 
    /for a 1 to @GroupBuffCount 
        /if (@PauseHeals==0) /call HealCheck
        /call AdvPathPoll 
        /for b 0 to ${Group}
            /varset RetryBuffCount 0        
            /if (${Me.PctMana}>=@GroupBuffMinMana(@a)) {

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

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

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

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

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

                    :RetryBuff 
                    /if ((${Me.Gem["@GroupBuff(@a)"]})||(${String["@GroupBuff(@a)"].Find["item"]})||(${String["@GroupBuff(@a)"].Find["activate"]})) {
                        /if (${Spell["@GroupBuff(@a)"].TargetType.Find["Group"]}) {                        
                            /target myself 
                        } else {
                            /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,@b) ${Math.Calc[30+${Macro.RunTime}]}
                            /goto :BreakOutMember
                        }
                        /if ((@Announce==1)&&(!${String["@GroupBuffAnnounce(@a)"].Equal["NULL"]})) {
                            /if (${String["@AnnounceChannel"].Equal["group"]}) { 
                                /if (${Group}>0) /gsay @GroupBuffAnnounce(@a) 
                            } 
                            /if (${String["@AnnounceChannel"].Equal["raid"]}) { 
                                /rsay @GroupBuffAnnounce(@a) 
                            } 
                        }
                        /if (${Me.State.Equal["SIT"]}) /stand
                        /if (${String["@GroupBuff(@a)"].Mid[1,4].Equal["item"]}) {
                            /echo -[ Casting Group Buff : @GroupBuff(@a) ]-
                            /call Cast "${String["@GroupBuff(@a)"].Mid[6,${Math.Calc[${String["@GroupBuff(@a)"].Length}-5]}]}" "item" 
                        } else /if (${String["@GroupBuff(@a)"].Mid[1,8].Equal["activate"]}) { 
                            /echo -[ Casting Group Buff : @GroupBuff(@a) ]-
                            /call Cast "${String["@GroupBuff(@a)"].Mid[10,${Math.Calc[${String["@GroupBuff(@a)"].Length}-9]}]}" "activate" 
                        } else { 
                            /echo -[ Casting Group Buff : @GroupBuff(@a) ]-
                            /call Cast "@GroupBuff(@a)" 
                        } 
                        /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,@b) ${Math.Calc[20+${Macro.RunTime}]}
                            /goto :BreakOutMember
                        }
                        /if (@GroupBuffDuration(@a)==99999) { 
                            /varset GBL(@a,@b) ${Math.Calc[99999+${Macro.RunTime}]}
                        } else /if (@GroupBuffDuration(@a)==0) { 

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



Sub HealCheck 
/declare a local 
/declare b local
/declare c local
/declare d local
/declare e local
/declare RetryHealCount local 
/declare GroupHPTotal local
/declare GroupHealFlag local
/declare TempIndex local
/declare TempGroupCount local
/varset TempGroupCount ${Group}
/if (@HealCount>0) { 
    /for a 1 to @HealCount 
        /if (${Group}!=@TempGroupCount) /return
        /varset GroupHealFlag 0
        /if (${Me.PctMana}>=@HealMinMana(@a)) {
            /varset GroupHPTotal 0
            /for b 0 to ${Math.Calc[${Group}+10]}
                /if (@b>${Group}) {
                    /varset d ${Math.Calc[@b-${Group}]}
                    /if (!${String[@WatchList(@d)].Equal[Empty]}) {
                         /for e 0 to 5
                             /if (${String[@WatchList(@d)].Equal[${Group[@e]}]}) {
                                 /goto :BreakOutHoT
                             }
                         /next e
                    }
                }
                /if (${Group}!=@TempGroupCount) /return
                /varset TempIndex ${Math.Calc[@b-${Group}]}
                /if (@b>${Group}) {
                    /if (!${String[@WatchList(@TempIndex)].Equal[Empty]}) {
                        /if (${Spawn[@WatchList(@TempIndex)].ID}) {
                            /if ((${Spawn[@WatchList(@TempIndex)].Distance}<250)&&(${Target.ID}!=${Spawn[@WatchList(@TempIndex)].ID})) {
                                /if (${Math.Calc[${Macro.RunTime}]}>@WatchTimer(@TempIndex)) {
                                    /target id ${Spawn[@WatchList(@TempIndex)].ID}
                                    /varset WatchTimer(@TempIndex) ${Math.Calc[${Macro.RunTime}+2]}
                                }
                            }
                        }
                    }
                }
                /varset RetryHealCount 0 
                /if (${Math.Calc[${Group}+1]}<@HealMinGroupCount(@a)) /goto :BreakOutHeal
                /if ((${Spell["@HealSpell(@a)"].TargetType.Find["Group"]})||(@HealMinGroupCount(@a)>0)) {
                    /if (@b<=${Group}) {
                        /varadd GroupHPTotal ${Group[@b].PctHPs}
                        /goto :BreakOutHoT
                    } else {
                        /goto :BreakOutHoT
                    }
                }
                /if ((@b<=${Group})&&((${Group[@b].PctHPs}>@HealMinHP(@a))&&(${Group[@b].PctHPs}<@HealMaxHP(@a)))) /goto :ContinueHeal
                /if ((@b>${Group})&&((${Spawn[@WatchList(@TempIndex)].PctHPs}>@HealMinHP(@a))&&(${Spawn[@WatchList(@TempIndex)].PctHPs}<@HealMaxHP(@a)))) /goto :ContinueHeal
                    /goto :BreakOutHoT
                    :ContinueHeal
                    /if ((@b<=${Group})&&(!${String["@HealClass(@a)"].Find["${Group[@b].Class.ShortName}"]})) /goto :BreakOutHoT
                    /if ((@b>${Group})&&(!${String["@HealClass(@a)"].Find["${Spawn[@WatchList(@TempIndex)].Class.ShortName}"]})) /goto :BreakOutHoT
                    /if ((${Math.Calc[${Macro.RunTime}]}<@HoTList(@b))&&(${Spell["@HealSpell(@a)"].TargetType.Find["Single"]})) /goto :BreakOutHoT
                    :RetryHeal 
                    /if ((${Me.Gem["@HealSpell(@a)"]})||(${String["@HealSpell(@a)"].Find["item"]})||(${String["@HealSpell(@a)"].Find["activate"]})) { 
                        /if (${Spell["@HealSpell(@a)"].TargetType.Find["Group"]}) {                        
                            /target myself 
                        } else /if (@b<=${Group}) {
                            /target id ${Group[@b].ID}
                        } else {
                            /target id ${Spawn[@WatchList(@TempIndex)].ID}
                        }
                        /if ((!${Target.CleanName.Equal[${Group[@b]}]})&&(!${Target.CleanName.Equal[@WatchList(@TempIndex)]})) { 
                            /echo -(( Target not in zone.  Waiting 10 seconds and trying again. ))-
                            /varset HoTList(@b) ${Math.Calc[10+${Macro.RunTime}]}
                            /goto :BreakOutHoT
                        }
                        /if ((@Announce==1)&&(!${String["@HealAnnounce(@a)"].Equal["NULL"]})) {
                            /if (${String["@AnnounceChannel"].Equal["group"]}) { 
                                /if (${Group}>0) /gsay @HealAnnounce(@a) 
                            } 
                            /if (${String["@AnnounceChannel"].Equal["raid"]}) { 
                                /rsay @HealAnnounce(@a) 
                            } 
                        }
                        /if (${Me.State.Equal["SIT"]}) /stand 
                        /if (${String["@HealSpell(@a)"].Mid[1,4].Equal["item"]}) { 
                            /echo -[ Casting Heal Spell : @HealSpell(@a) ]-
                            /call Cast "${String["@HealSpell(@a)"].Mid[6,${Math.Calc[${String["@HealSpell(@a)"].Length}-5]}]}" "item" 
                        } else /if (${String["@HealSpell(@a)"].Mid[1,8].Equal["activate"]}) { 
                            /echo -[ Casting Heal Spell : @HealSpell(@a) ]-
                            /call Cast "${String["@HealSpell(@a)"].Mid[10,${Math.Calc[${String["@HealSpell(@a)"].Length}-9]}]}" "activate" 
                        } else { 
                            /echo -[ Casting Heal Spell : @HealSpell(@a) ]-
                            /call Cast "@HealSpell(@a)" 
                        }
                        /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. ))-
                            /varset HoTList(@b) ${Math.Calc[10+${Macro.RunTime}]}
                            /goto :BreakOutHoT
                        }
                        /if (@GroupHealFlag==1) {
                            /delay 2s
                            /varset GroupHealFlag 0
                        }
                        /if ((${Spell["@HealSpell(@a)"].Duration}>0)&&(${Macro.Return.Equal["CAST_SUCCESS"]})) {
                            /varset HoTList(@b) ${Math.Calc[${Spell["@HealSpell(@a)"].Duration.Seconds}+${Macro.RunTime}]}
                            /if ((${Spell["@HealSpell(@a)"].Duration}>0)&&(${Macro.Return.Equal["CAST_SUCCESS"]})&&((${Spell["@HealSpell(@a)"].TargetType.Find["Group"]})||(@HealMinGroupCount(@a)>0))) {
                                /for c 0 to ${Group}
                                    /varset HoTList(@c) ${Math.Calc[${Spell["@HealSpell(@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)"]}) { 
                                /delay 3s 
                                /varadd RetryHealCount 1 
                                /goto :RetryHeal 
                            }
                        } 
                        /echo -(( Heal Spell:@HealSpell(@a) not memmed or not ready. ))-
                        /goto :BreakOutHeal
                    } 
            :BreakOutHoT
            /next b
            /if ((${Spell["@HealSpell(@a)"].TargetType.Find["Group"]})||(@HealMinGroupCount(@a)>0)) {
                /if ((${Math.Calc[@GroupHPTotal\${Math.Calc[${Group}+1]}]}>@HealMinHP(@a))&&(${Math.Calc[@GroupHPTotal\${Math.Calc[${Group}+1]}]}<@HealMaxHP(@a))) {
                    /for c 0 to ${Group}
                        /if (${Math.Calc[${Macro.RunTime}]}<@HoTList(@c)) /goto :BreakOutHeal
                    /next c
                    /varset GroupHealFlag 1
                    /goto :RetryHeal
                }
            }
        } 
    :BreakOutHeal
    /next a 
}
/if (@NoSit==0) /call SitCheck 
/return

Sub Event_Master(EvtText)
/declare TempItem local 
/declare TempVar local 
/declare TempVar2 local 
/varset EvtText "${String["@EvtText"].Mid[14,${Math.Calc[${String["@EvtText"].Length}-13]}]}"
/if (${String["@EvtText"].Length}>0) { 
    /call INIListUpdate "@EvtText" "Masters" "0"
    /call LoadMasterList
} else {
    /varset TempVar2 0 
    /echo -[ Allowed Masters ]- 
    :CategoryList 
    /varset TempItem "${Ini[@IniFile,Masters,${Int[@TempVar]},NOTFOUND]}"
    /if (${String["@TempItem"].Equal["NOTFOUND"]}) /goto :DoneCategoryList 
    /varadd TempVar 1 
    /if (!${String["@TempItem"].Equal["Empty"]}) { 
        /varadd TempVar2 1 
        /echo -- Master[${Int[@TempVar2]}] @TempItem 
    } 
    /goto :CategoryList 
    :DoneCategoryList 
    /if (@TempVar2==0) /echo -(( No Masters Found ))- 
  
} 
/return

Sub Event_Watch(EvtText)
/declare TempItem local 
/declare TempVar local 
/declare TempVar2 local
/declare b local
/varset EvtText "${String["@EvtText"].Mid[13,${Math.Calc[${String["@EvtText"].Length}-12]}]}"
/if (${String["@EvtText"].Length}>0) { 
    /for b 0 to 5
        /if (${String[@EvtText].Equal[${Group[@b]}]}) {
            /echo -(( Cannot add group members to your watch list. ))-
            /return
        }
    /next b
    /call INIListUpdate "@EvtText" "Watch" "1"
    /call LoadWatchList
} else {
    /varset TempVar2 0 
    /varset TempVar 1
    /echo -[ Watch List ]- 
    :CategoryList
    /varset TempItem "${Ini[@IniFile,Watch,${Int[@TempVar]},NOTFOUND]}"
    /if (${String["@TempItem"].Equal["NOTFOUND"]}) /goto :DoneCategoryList 
    /varadd TempVar 1
    /if (!${String["@TempItem"].Equal["Empty"]}) { 
        /varadd TempVar2 1 
        /echo -- Watch Target[${Int[@TempVar2]}] @TempItem 
    } 
    /goto :CategoryList 
    :DoneCategoryList 
    /if (@TempVar2==0) /echo -(( No Watch List Found ))- 
  
} 
/return


Sub INIListUpdate(a,b,c)
/declare TempItem local 
/declare TempVar local 
/declare TempVar2 local 
/varset TempVar 0
/if (@c==1) /varset TempVar 1 
/if (${String["@a"].Length}>0) { 
    :ListSearch 
    /varset TempItem "${Ini[@IniFile,@b,${Int[@TempVar]},NOTFOUND]}"
    /if (${String["@TempItem"].Equal["NOTFOUND"]}) /goto :AddItem 
    /if (${String["@TempItem"].Equal["@a"]}) { 
        /echo -[ @a REMOVED from @b list. ]- 
        /ini "@IniFile" "@b" "${Int[@TempVar]}" "Empty" 
        /goto :DoneCategory
    } 
    /varadd TempVar 1 
    /goto :ListSearch 
    :AddItem
    /varset TempVar 0
    /if (@c==1) /varset TempVar 1 
    :AddItemLoop 
    /varset TempItem "${Ini[@IniFile,@b,${Int[@TempVar]},NOTFOUND]}" 
    /if (${String["@TempItem"].Equal["Empty"]}) /goto :FoundCategorySlot    
    /if (${String["@TempItem"].Equal["NOTFOUND"]}) /goto :FoundCategorySlot 
    /varadd TempVar 1 
    /goto :AddItemLoop 
    :FoundCategorySlot 
    /if ((@TempVar>10)&&(${String["@b"].Equal["Watch"]})) {
        /echo -(( All slots full, 10 Maximum. ))-
        /return
    }
    /echo -[ @a ADDED to @b list. ]- 
    /ini "@IniFile" "@b" "${Int[@TempVar]}" "@a" 
}
:DoneCategory
/return

Sub LoadWatchList 
/declare TempVar local 
/declare TempList local 
/declare TempItem local
/declare a local
/varset TempVar 1 
/for a 1 to 10
    /varset WatchList(@a) "Empty"
    /varset HoTList(@a) 0 
/next a

:LoadWatch
/varset WatchList(@TempVar) "${Ini[@IniFile,Watch,${Int[@TempVar]},NOTFOUND]}"
/if ((@TempVar>10)||(${String["@WatchList(@TempVar)"].Equal["NOTFOUND"]})) {
    /varset WatchList(@TempVar) "Empty"
    /return
}
/varadd TempVar 1 
/goto :LoadWatch 
/return 


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

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

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

Sub SetupADVars 
/declare NpcCount global 
/declare DebuffCount global 
/declare SelfBuffCount global 
/declare Radius global 
/declare ZoneName global 
/declare TrackNumber global 
/declare MobList array 
/declare MDL array2 
/declare SelfBuff array 
/declare SelfBuffDuration array 
/declare SelfBuffedList array 
/declare SelfBuffAtStart array
/declare SelfBuffIconCheck array
/declare SelfBuffIconName array 
/declare Debuff array 
/declare DebuffDuration array 
/declare DebuffStartWait array 
/declare DebuffMinHealth array 
/declare DebuffMinMana array 
/declare DebuffMinHealthNoCast array 
/declare DebuffMinMobsInArea array 
/declare EventCount global 
/declare EventMinMana array 
/declare EventMaxMana array 
/declare EventMinHP array 
/declare EventMaxHP array 
/declare EventList array 
/declare EventDuration array 
/declare EventSpell array 
/declare MasterList array 
/declare RetryCount global 
/declare IniFile global 
/declare PauseMacro global 
/declare NoSit global 
/declare PauseEvents global
/declare HealCount global
/declare HealSpell array
/declare HealMinHP array
/declare HealMaxHP array
/declare HealMinMana array
/declare HealMinGroupCount array
/declare HealClass array
/declare HealAnnounce array
/declare PauseHeals global
/declare HoTList array
/declare MobAnnounced array2
/declare DebuffAnnounce array
/declare Announce global
/declare AnnounceChannel global
/declare GroupBuffCount global
/declare GroupBuff array
/declare GroupBuffDuration array
/declare GroupBuffAtStart array
/declare GroupBuffMinMana array
/declare GroupBuffMinGroupCount array
/declare GBL array2
/declare GroupBuffAnnounce array
/declare GroupBuffClass array
/declare WatchList array
/declare WatchTimer array
/declare GroupCount global
/varset GroupCount 0
/declare AlertList global  
/varset AlertList 20 
/return 

Sub LoadINIVals 
/declare a local 
/declare b local 
/declare INIFlag local 
/varset INIFlag 0 

/varset Radius ${Ini[@IniFile,Settings,Radius,NOTFOUND]}
/if (${String["@Radius"].Equal["NOTFOUND"]}) { 
   /ini "@IniFile" Settings Radius 100 
   /varset Radius 100 
   /varset INIFlag 1 
} 
/varset NoSit ${Ini[@IniFile,Settings,NoSit,NOTFOUND]}
/if (${String["@NoSit"].Equal["NOTFOUND"]}) { 
   /ini "@IniFile" Settings NoSit 0 
   /varset NoSit 0 
   /varset INIFlag 1  
} 
/varset TrackNumber ${Ini[@IniFile,Settings,TrackNumber,NOTFOUND]}
/if (${String["@TrackNumber"].Equal["NOTFOUND"]}) { 
   /ini "@IniFile" Settings TrackNumber 10 
   /varset TrackNumber 10
   /varset INIFlag 1  
} 
/varset SelfBuffCount ${Ini[@IniFile,SelfBuff,SelfBuffCount,NOTFOUND]}
/if (${String["@SelfBuffCount"].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 (${String["@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 SelfBuffDuration(@a) "${Ini[@IniFile,SelfBuff,SelfBuffDuration@a,NOTFOUND]}" 
/if (${String["@SelfBuffDuration(@a)"].Equal["NOTFOUND"]}) { 
   /ini "@IniFile" SelfBuff SelfBuffDuration@a 0 
   /varset SelfBuffDuration(@a) 0 
   /varset INIFlag 1  
} 
/next a 
/for a 1 to 8 
/varset SelfBuffAtStart(@a) "${Ini[@IniFile,SelfBuff,SelfBuffAtStart@a,NOTFOUND]}" 
/if (${String["@SelfBuffAtStart(@a)"].Equal["NOTFOUND"]}) { 
   /ini "@IniFile" SelfBuff SelfBuffAtStart@a 0 
   /varset SelfBuffAtStart(@a) 0 
   /varset INIFlag 1 
}
/next a 
/for a 1 to 8 
/varset SelfBuffIconCheck(@a) "${Ini[@IniFile,SelfBuff,SelfBuffIconCheck@a,NOTFOUND]}" 
/if (${String["@SelfBuffIconCheck(@a)"].Equal["NOTFOUND"]}) { 
   /ini "@IniFile" SelfBuff SelfBuffIconCheck@a 0 
   /varset SelfBuffIconCheck(@a) 0 
   /varset INIFlag 1 
}
/next a
 
/for a 1 to 8 
/varset SelfBuffIconName(@a) "${Ini[@IniFile,SelfBuff,SelfBuffIconName@a,NOTFOUND]}" 
/if (${String["@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 
/varset DebuffCount ${Ini[@IniFile,Debuff,DebuffCount,NOTFOUND]} 
/if (${String["@DebuffCount"].Equal["NOTFOUND"]}) { 
   /ini "@IniFile" Debuff DebuffCount 2 
   /varset DebuffCount 2 
   /varset INIFlag 1  
} 
/for a 1 to 8 
/varset Debuff(@a) "${Ini[@IniFile,Debuff,Debuff@a,NOTFOUND]}" 
/if (${String["@Debuff(@a)"].Equal["NOTFOUND"]}) { 
   /ini "@IniFile" Debuff Debuff@a "Debuff Spell Name" 
   /varset Debuff(@a) "Debuff Spell Name" 
   /varset INIFlag 1  
} 
/next a 
/for a 1 to 8 
/varset DebuffDuration(@a) "${Ini[@IniFile,Debuff,DebuffDuration@a,NOTFOUND]}" 
/if (${String["@DebuffDuration(@a)"].Equal["NOTFOUND"]}) { 
   /ini "@IniFile" Debuff DebuffDuration@a 99999 
   /varset DebuffDuration(@a) 99999 
   /varset INIFlag 1  
} 
/next a
 
/for a 1 to 8 
/varset DebuffStartWait(@a) "${Ini[@IniFile,Debuff,DebuffStartWait@a,NOTFOUND]}" 
/if (${String["@DebuffStartWait(@a)"].Equal["NOTFOUND"]}) { 
   /ini "@IniFile" Debuff DebuffStartWait@a 0 
   /varset DebuffStartWait(@a) 0 
   /varset INIFlag 1  
} 
/next a 
/for a 1 to 8 
/varset DebuffMinHealth(@a) "${Ini[@IniFile,Debuff,DebuffMinHealth@a,NOTFOUND]}" 
/if (${String["@DebuffMinHealth(@a)"].Equal["NOTFOUND"]}) { 
   /ini "@IniFile" Debuff DebuffMinHealth@a 100 
   /varset DebuffMinHealth(@a) 100 
   /varset INIFlag 1  
} 
/next a 
/for a 1 to 8 
/varset DebuffMinHealthNoCast(@a) "${Ini[@IniFile,Debuff,DebuffMinHealthNoCast@a,NOTFOUND]}" 
/if (${String["@DebuffMinHealthNoCast(@a)"].Equal["NOTFOUND"]}) { 
   /ini "@IniFile" Debuff DebuffMinHealthNoCast@a 0 
   /varset DebuffMinHealthNoCast(@a) 0 
   /varset INIFlag 1  
} 
/next a 
/for a 1 to 8 
/varset DebuffMinMana(@a) "${Ini[@IniFile,Debuff,DebuffMinMana@a,NOTFOUND]}" 
/if (${String["@DebuffMinMana(@a)"].Equal["NOTFOUND"]}) { 
   /ini "@IniFile" Debuff DebuffMinMana@a 0 
   /varset DebuffMinMana(@a) 0 
   /varset INIFlag 1  
} 
/next a
 
/for a 1 to 8 
/varset DebuffMinMobsInArea(@a) "${Ini[@IniFile,Debuff,DebuffMinMobsInArea@a,NOTFOUND]}" 
/if (${String["@DebuffMinMobsInArea(@a)"].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 (${String["@DebuffAnnounce(@a)"].Equal["NOTFOUND"]}) { 
   /ini "@IniFile" Debuff DebuffAnnounce@a "Debuff Announcement" 
   /varset DebuffAnnounce(@a) "Debuff Announcement" 
   /varset INIFlag 1 
} 
/next a 
/varset Announce ${Ini[@IniFile,Settings,Announce,NOTFOUND]} 
/if (${String["@Announce"].Equal["NOTFOUND"]}) { 
   /ini "@IniFile" Settings Announce 0 
   /varset Announce 0 
   /varset INIFlag 1 
} 
/varset AnnounceChannel ${Ini[@IniFile,Settings,AnnounceChannel,NOTFOUND]} 
/if (${String["@AnnounceChannel"].Equal["NOTFOUND"]}) { 
   /ini "@IniFile" Settings AnnounceChannel group 
   /varset AnnounceChannel group 
   /varset INIFlag 1 
}
/varset RetryCount ${Ini[@IniFile,Settings,RetryCount,NOTFOUND]} 
/if (${String["@RetryCount"].Equal["NOTFOUND"]}) { 
   /ini "@IniFile" Settings RetryCount 2 
   /varset RetryCount 2 
   /varset INIFlag 1 
} 

/varset PauseMacro ${Ini[@IniFile,Settings,PauseMacro,NOTFOUND]} 
/if (${String["@PauseMacro"].Equal["NOTFOUND"]}) { 
   /ini "@IniFile" Settings PauseMacro 1 
   /varset PauseMacro 1 
   /varset INIFlag 1  
} 
/varset EventCount ${Ini[@IniFile,Events,EventCount,NOTFOUND]} 
/if (${String["@EventCount"].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 (${String["@EventSpell(@a)"].Equal["NOTFOUND"]}) { 
   /ini "@IniFile" Events EventSpell@a "Event Spell Name" 
   /varset EventSpell(@a) "Event Spell Name" 
   /varset INIFlag 1  
} 
/next a 
/for a 1 to 8 
/varset EventMinMana(@a) "${Ini[@IniFile,Events,EventMinMana@a,NOTFOUND]}" 
/if (${String["@EventMinMana(@a)"].Equal["NOTFOUND"]}) { 
   /ini "@IniFile" Events EventMinMana@a 100 
   /varset EventMinMana(@a) 100 
   /varset INIFlag 1  
} 
/next a 
/for a 1 to 8 
/varset EventMaxMana(@a) "${Ini[@IniFile,Events,EventMaxMana@a,NOTFOUND]}" 
/if (${String["@EventMaxMana(@a)"].Equal["NOTFOUND"]}) { 
   /ini "@IniFile" Events EventMaxMana@a 0 
   /varset EventMaxMana(@a) 0 
   /varset INIFlag 1  
} 
/next a
 
/for a 1 to 8 
/varset EventMinHP(@a) "${Ini[@IniFile,Events,EventMinHP@a,NOTFOUND]}" 
/if (${String["@EventMinHP(@a)"].Equal["NOTFOUND"]}) { 
   /ini "@IniFile" Events EventMinHP@a 100 
   /varset EventMinHP(@a) 100 
   /varset INIFlag 1  
} 
/next a 
/for a 1 to 8 
/varset EventMaxHP(@a) "${Ini[@IniFile,Events,EventMaxHP@a,NOTFOUND]}" 
/if (${String["@EventMaxHP(@a)"].Equal["NOTFOUND"]}) { 
   /ini "@IniFile" Events EventMaxHP@a 0 
   /varset EventMaxHP(@a) 0 
   /varset INIFlag 1  
} 
/next a 
/for a 1 to 8 
/varset EventDuration(@a) "${Ini[@IniFile,Events,EventDuration@a,NOTFOUND]}" 
/if (${String["@EventDuration(@a)"].Equal["NOTFOUND"]}) { 
   /ini "@IniFile" Events EventDuration@a 0 
   /varset EventDuration(@a) 0 
   /varset INIFlag 1  
} 
/next a 
/varset PauseEvents ${Ini[@IniFile,Settings,PauseEvents,NOTFOUND]} 
/if (${String["@PauseEvents"].Equal["NOTFOUND"]}) { 
   /ini "@IniFile" Settings PauseEvents 1 
   /varset PauseEvents 1 
   /varset INIFlag 1  
} 
/varset HealCount ${Ini[@IniFile,Heal,HealCount,NOTFOUND]} 
/if (${String["@HealCount"].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 (${String["@HealSpell(@a)"].Equal["NOTFOUND"]}) { 
   /ini "@IniFile" Heal HealSpell@a "Heal Spell Name" 
   /varset HealSpell(@a) "Heal Spell Name" 
   /varset INIFlag 1  
} 
/next a
 
/for a 1 to 8 
/varset HealMinHP(@a) "${Ini[@IniFile,Heal,HealMinHP@a,NOTFOUND]}" 
/if (${String["@HealMinHP(@a)"].Equal["NOTFOUND"]}) { 
   /ini "@IniFile" Heal HealMinHP@a 0 
   /varset HealMinHP(@a) 0 
   /varset INIFlag 1  
} 
/next a 
/for a 1 to 8 
/varset HealMaxHP(@a) "${Ini[@IniFile,Heal,HealMaxHP@a,NOTFOUND]}" 
/if (${String["@HealMaxHP(@a)"].Equal["NOTFOUND"]}) { 
   /ini "@IniFile" Heal HealMaxHP@a 100 
   /varset HealMaxHP(@a) 100 
   /varset INIFlag 1  
} 
/next a 
/for a 1 to 8 
/varset HealMinMana(@a) "${Ini[@IniFile,Heal,HealMinMana@a,NOTFOUND]}" 
/if (${String["@HealMinMana(@a)"].Equal["NOTFOUND"]}) { 
   /ini "@IniFile" Heal HealMinMana@a 0 
   /varset HealMinMana(@a) 0 
   /varset INIFlag 1  
} 
/next a 
/for a 1 to 8 
/varset HealMinGroupCount(@a) "${Ini[@IniFile,Heal,HealMinGroupCount@a,NOTFOUND]}" 
/if (${String["@HealMinGroupCount(@a)"].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 (${String["@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 HealAnnounce(@a) "${Ini[@IniFile,Heal,HealAnnounce@a,NOTFOUND]}" 
/if (${String["@HealAnnounce(@a)"].Equal["NOTFOUND"]}) { 
   /ini "@IniFile" Heal HealAnnounce@a "Heal Announcement" 
   /varset HealAnnounce(@a) "Heal Announcement" 
   /varset INIFlag 1 
} 
/next a 
/varset PauseHeals ${Ini[@IniFile,Settings,PauseHeals,NOTFOUND]} 
/if (${String["@PauseHeals"].Equal["NOTFOUND"]}) { 
   /ini "@IniFile" Settings PauseHeals 1 
   /varset PauseHeals 1 
   /varset INIFlag 1  
} 
/varset GroupBuffCount ${Ini[@IniFile,GroupBuff,GroupBuffCount,NOTFOUND]}
/if (${String["@GroupBuffCount"].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 (${String["@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 GroupBuffDuration(@a) "${Ini[@IniFile,GroupBuff,GroupBuffDuration@a,NOTFOUND]}" 
/if (${String["@GroupBuffDuration(@a)"].Equal["NOTFOUND"]}) { 
   /ini "@IniFile" GroupBuff GroupBuffDuration@a 99999 
   /varset GroupBuffDuration(@a) 99999 
   /varset INIFlag 1  
} 
/next a 
/for a 1 to 8 
/varset GroupBuffAtStart(@a) "${Ini[@IniFile,GroupBuff,GroupBuffAtStart@a,NOTFOUND]}" 
/if (${String["@GroupBuffAtStart(@a)"].Equal["NOTFOUND"]}) { 
   /ini "@IniFile" GroupBuff GroupBuffAtStart@a 0 
   /varset GroupBuffAtStart(@a) 0 
   /varset INIFlag 1 
}
/next a 
/for a 1 to 8 
/varset GroupBuffMinMana(@a) "${Ini[@IniFile,GroupBuff,GroupBuffMinMana@a,NOTFOUND]}" 
/if (${String["@GroupBuffMinMana(@a)"].Equal["NOTFOUND"]}) { 
   /ini "@IniFile" GroupBuff GroupBuffMinMana@a 0 
   /varset GroupBuffMinMana(@a) 0 
   /varset INIFlag 1  
} 
/next a 
/for a 1 to 8 
/varset GroupBuffMinGroupCount(@a) "${Ini[@IniFile,GroupBuff,GroupBuffMinGroupCount@a,NOTFOUND]}" 
/if (${String["@GroupBuffMinGroupCount(@a)"].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 (${String["@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 (${String["@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 
/if (@INIFlag==1) { 
   /echo INI file created and populated.  Please customize @IniFile in your macros directory. 
   /endmacro 
} 
/return 

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

   /if (${String["@Exclude"].Find["@ExcludeName"]}) { 
      /echo -(( @ExcludeName already on Exclude List ))-
      /return 
   } 
   /varadd EachExclude 1 
   /goto :NextExclude1 
:IniParsed 
   /if (@BlankExclude==0) { 
      /ini @IniFile "@Category" exclude_${Int[@EachExclude]} "@ExcludeName" 
   } else { 
      /ini @IniFile "@Category" exclude_${Int[@BlankExclude]} "@ExcludeName" 
   } 
   /alert add @AlertList NPC "@ExcludeName" 
/return 

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

Sub DelExclude(ExcludeName) 
   /declare Category local 
   /declare EachExclude local 
   /declare Exclude local 
   /varset Category "Excludes" 
   /if (${String["${Ini[@IniFile,@Category,,NOTFOUND]}"].Find["NOTFOUND"]}) { 
      /echo -(( No Exclude list exists. ))-
      /return 
   } 
   /varset EachExclude 0 
:NextExclude3 
   /varset Exclude "${Ini[@IniFile,@Category,exclude_${Int[@EachExclude]},NOTFOUND]}" 
   /if (${String["@Exclude"].Find["NOTFOUND"]}) { 
      /call LoadExcludes 
      /return 
   } 
   /if (${String["@Exclude"].Find["@ExcludeName"]}) { 
      /ini @IniFile "@Category" exclude_${Int[@EachExclude]} NONE 
   } 
   /varadd EachExclude 1 
   /goto :NextExclude3 
/return 


Sub Event_Hold(EvtText) 
/varset EvtText "${String["@EvtText"].Mid[7,${Math.Calc[${String["@EvtText"].Length}-6]}]}"
/if (${String["@EvtText"].Equal["hold"]}) { 
    /if (@PauseMacro==0) { 
        /varset PauseMacro 1 
        /echo -[ Autodebuff.mac Paused. ]-
    } else { 
        /varset PauseMacro 0 
        /echo -[ Autodebuff.mac Un-Paused. ]-
    } 
} 
/return 


Sub Event_Events(EvtText) 
/varset EvtText "${String["@EvtText"].Mid[7,${Math.Calc[${String["@EvtText"].Length}-6]}]}"
/if (${String["@EvtText"].Equal["events"]}) { 
    /if (@PauseEvents==0) { 
        /varset PauseEvents 1 
        /echo -[ HP/Mana events Paused. ]-
    } else { 
        /varset PauseEvents 0 
        /echo -[ HP/Mana events Unpaused. ]-
    } 
} 
/return 


Sub Event_Heal(EvtText) 
/varset EvtText "${String["@EvtText"].Mid[7,${Math.Calc[${String["@EvtText"].Length}-6]}]}"
/if (${String["@EvtText"].Equal["heal"]}) { 
    /if (@PauseHeals==0) { 
        /varset PauseHeals 1 
        /echo -[ Healing Paused. ]-
    } else { 
        /varset PauseHeals 0 
        /echo -[ Healing Unpaused. ]-
    } 
} 
/return 


Sub Event_Announce(EvtText) 
/varset EvtText "${String["@EvtText"].Mid[7,${Math.Calc[${String["@EvtText"].Length}-6]}]}" 
/if (${String["@EvtText"].Equal["announce"]}) { 
    /if (@Announce==0) { 
        /varset Announce 1 
        /echo -[ Announcements turned ON. ]-
    } else { 
        /varset Announce 0 
        /echo -[ Announcements turned OFF. ]-
    } 
} 
/return 


Sub Event_Sit(EvtText) 
/varset EvtText "${String["@EvtText"].Mid[7,${Math.Calc[${String["@EvtText"].Length}-6]}]}"
/if (${String["@EvtText"].Equal["sit"]}) { 
    /if (@NoSit==0) { 
        /if (${Me.State.Equal["SIT"]}) /stand 
        /varset NoSit 1 
        /echo -[ You will no longer sit during idle time. ]-
    } else { 
        /varset NoSit 0 
        /echo -[ You will now sit during idle time. ]-
    } 
} 
/return 


Sub Event_SelfBuff(EvtText) 
/declare a local 
/declare b local
/declare TempIndex local
/varset EvtText "${String["@EvtText"].Mid[7,${Math.Calc[${String["@EvtText"].Length}-6]}]}"
/if (@SelfBuffCount>0) { 
    /if (${String["@EvtText"].Equal["selfbuff"]}) { 
        /for a 0 to @SelfBuffCount 
            /varset SelfBuffedList(@a) 0 
        /next a 
    } else { 
        /for b 1 to 8 
            /if (${String["@b"].Equal["${String["@EvtText"].Arg[2]}"]}) { 
                /if ((${String["@EvtText"].Arg[2]}>0)&&(${String["@EvtText"].Arg[2]}<${Math.Calc[@SelfBuffCount+1]})) {
                    /varset TempIndex ${String["@EvtText"].Arg[2]}
                    /varset SelfBuffedList(@TempIndex) 0 
                    /goto :BreakOutRebuff 
                } 
            } 
        /next b 
        :BreakOutRebuff 
    } 
} 
/return 

Sub Event_GroupBuff(EvtText) 
/declare a local 
/declare b local
/declare TempIndex local
/varset EvtText "${String["@EvtText"].Mid[7,${Math.Calc[${String["@EvtText"].Length}-6]}]}"
/if (@GroupBuffCount>0) { 
    /if (${String["@EvtText"].Equal["groupbuff"]}) { 
        /for a 0 to @GroupBuffCount 
            /for b 0 to 5
                /varset GBL(@a,@b) 0 
            /next b
        /next a 
    } else { 
        /for a 1 to 8 
            /if (${String["@a"].Equal["${String["@EvtText"].Arg[2]}"]}) { 
                /if ((${String["@EvtText"].Arg[2]}>0)&&(${String["@EvtText"].Arg[2]}<${Math.Calc[@GroupBuffCount+1]})) {
                    /for b 0 to 5
                        /varset TempIndex ${String["@EvtText"].Arg[2]}
                        /varset GBL(@TempIndex,@b) 0 
                    /next b
                    /goto :BreakOutRebuff 
                } 
            } 
        /next a 
        :BreakOutRebuff 
    } 
} 
/return 

Sub Event_Exclude(EvtText) 
/varset EvtText "${String["@EvtText"].Mid[15,${Math.Calc[${String["@EvtText"].Length}-14]}]}"
/if (${String["@EvtText"].Length}>0) { 
    /call AddExclude "@EvtText" 
} 
/return 

Sub Event_Include(EvtText) 
/varset EvtText "${String["@EvtText"].Mid[15,${Math.Calc[${String["@EvtText"].Length}-14]}]}"
/if (${String["@EvtText"].Length}>0) { 
    /call DelExclude "@EvtText" 
} 
/return 

Sub Event_chat(MsgType,MsgFrom,MsgText) 
/declare TempVar local 
/varset TempVar 0 
:CheckAuth 
/if (!${String["@MasterList(@TempVar)"].Equal["UNDEFINED-ARRAY-ELEMENT"]}) { 
    /if (${String["@MasterList(@TempVar)"].Equal["@MsgFrom"]}) { 
        /if (${String["@MsgText"].Equal["hold"]}) { 
            /call Event_Hold "[MQ2] hold" 
            /return 
        } 
        /if (${String["@MsgText"].Mid[1,6].Equal["master"]}) { 
            /call Event_Master "[MQ2] @MsgText" 
            /return 
        } 
        /if (${String["@MsgText"].Mid[1,8].Equal["selfbuff"]}) { 
            /call Event_SelfBuff "[MQ2] @MsgText" 
            /return 
        } 
        /if (${String["@MsgText"].Mid[1,9].Equal["groupbuff"]}) { 
            /call Event_GroupBuff "[MQ2] @MsgText" 
            /return 
        } 
        /if (${String["@MsgText"].Mid[1,6].Equal["follow"]}) { 
            /if (${Me.State.Equal["SIT"]}) /stand 
            /if ((${String["@MsgText"].Equal["follow me"]})||(${String["@MsgText"].Equal["follow"]})) { 
                /call Event_LocalFollow "[MQ2] follow @MsgFrom" 
            } else { 
                /call Event_LocalFollow "[MQ2] @MsgText" 
            } 
            /return 
        } 
        /if (${String["@MsgText"].Mid[1,4].Equal["goto"]}) { 
            /if (${Me.State.Equal["SIT"]}) /stand 
            /call Event_LocalGoto "[MQ2] @MsgText"            
            /return 
        } 
        /if (${String["@MsgText"].Mid[1,4].Equal["stop"]}) { 
            /call StopFunction 
            /return 
        } 
        /if (${String["@MsgText"].Mid[1,3].Equal["sit"]}) { 
            /call Event_Sit "[MQ2] @MsgText" 
            /return 
        } 
        /if (${String["@MsgText"].Mid[1,6].Equal["events"]}) { 
            /call Event_Events "[MQ2] @MsgText" 
            /return 
        } 
        /if (${String["@MsgText"].Mid[1,4].Equal["heal"]}) { 
            /call Event_Heal "[MQ2] @MsgText" 
            /return 
        } 
        /if (${String["@MsgText"].Mid[1,7].Equal["exclude"]}) { 
            /call Event_Exclude "[MQ2] @MsgText" 
            /return 
        } 
        /if (${String["@MsgText"].Mid[1,7].Equal["include"]}) {
            /call Event_Include "[MQ2] @MsgText" 
            /return 
        }
        /if (${String["@MsgText"].Mid[1,5].Equal["watch"]}) {
            /call Event_Watch "[MQ2] @MsgText" 0 
            /return 
        }
        /if (${String["@MsgText"].Mid[1,8].Equal["announce"]}) { 
            /call Event_Announce "[MQ2] @MsgText" 
            /return 
        } 
         /if (${String["@MsgText"].Mid[1,5].Equal["pause"]}) { 
            /call PauseFunction 
            /return 
        } 
    } 
    /varadd TempVar 1 
    /goto :CheckAuth 
} 
/return 
Last edited by ml2517 on Sun Apr 25, 2004 2:33 pm, edited 67 times in total.

Spanky_Monkey
a ghoul
a ghoul
Posts: 103
Joined: Wed Feb 19, 2003 3:10 pm

Heh

Post by Spanky_Monkey » Tue Feb 03, 2004 5:23 am

Reading this code just made me smile. That is a smooth smooth tool dude. AWESOME :)

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

Post by ml2517 » Tue Feb 03, 2004 7:44 pm

* You need to get spellcast.inc from the snippets forum and place it in your macros directory.
Get it Here (Make sure to get the *last* one posted by me. I also posted it in this thread.):
http://macroquest2.com/phpBB2/viewtopic.php?t=5090

** You need to also get advpath.inc from the snippets forum and place it in your macros directory.
Get it Here:
http://macroquest2.com/phpBB2/viewtopic.php?t=5086


Examples:

Code: Select all

| 
| autodebuff.txt 
| Auto mob debuff utility documentation
| Version 1.05 
| Date:4/24/2004 9:00am 
| 
|   NOTE: You must use the spellcast.inc that I posted in the snippets forum under 
|         the title of: "spellcast.inc --- This will cast a spell reliably for you." 
|         Be sure to use the one in that thread that was posted by ml2517. 
|         This should only be necessary if you are going to use AA skill activations. 
| 
|         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 autodebuff.mac [INI_Name] 
| 
| 
| To set this script up modify the INI file that is generated. 
| 
| Commands Available via /echo and from a designated master: 
|     heal                   (Toggles healing on/off) 
|     events                 (Toggles hp/mana events on/off) 
|     hold                   (Toggles debuffing on/off) 
|     master <playername>    (Toggles master rights for a player on/off) 
|     sit                    (Toggles idle time sitting on/off) 
|     selfbuff [#]           (Buffs/Rebuffs self buff #. If no number is given it rebuffs all self buffs.) 
|     groupbuff [#]          (Buffs/Rebuffs group buff #. If no number is given it rebuffs all group buffs.) 
|     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)
|     watch <targetname>     (Toggles health watch on/off for <targetname>)
|
| 
| 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.) 
| 
|     Commands can be issued via /echo and as a tell from a master. 
| ----------------------------------------------------------------------------- 
| 
| INI Setting Examples: 
| --------------------- 
| 
| 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!
| 
| 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
|
|
| 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. 
| 
| HealSpell1=Complete Healing
| HealMinHP1=40 <----------------- This wouldn't try casting this heal if the group member was over 40 percent HP.
| HealMaxHP1=50 <----------------- This wouldn't try casting this heal if the group member was under 50 percent HP.
| 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 ]- !
|
| 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.
| GroupBuffAnnounce1=Casting Endure Magic on -[ %T ]- !
| GroupBuffClass1=WAR|SHD|PAL|RNG|MNK|ROG|BRD|BST|BER|SHM|CLR|DRU|WIZ|MAG|ENC|NEC
|
| 
| 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.
| 
| 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.
| 
| 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. 
| 
| HealSpell1=item Pants O Healing
| HealMinHP1=40 <----------------- This wouldn't try casting this heal if the average group HP percentage was over 40.
| HealMaxHP1=50 <----------------- This wouldn't try casting this heal if the average group HP percentage was under 50.
| 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.
| 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!
|
| 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.
| 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
|
| 
| 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.
| 
| SelfBuff1=activate 75 <------------ 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.
| 
| 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. 
| 
| HealSpell1=activate 169
| HealMinHP1=40 <----------------- This wouldn't try casting this heal if the average group HP percentage was over 40.
| HealMaxHP1=50 <----------------- This wouldn't try casting this heal if the average group HP percentage was under 50.
| 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.
| 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!
|
| GroupBuff1=activate 56
| 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.
| 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
|
For ease of finding it, here is the spellcast.inc.

Code: Select all

| SpellCast.inc 
| This will cast a spell reliably for you... 
|
| Usage: 
|       /call Cast "spellname|itemname|AA#" [item|activate]
|
| This would essentially: /cast "Death Peace"
| example: /call Cast "Death Peace" 
|
| 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
|
| It will return the following values: 
| CAST_SUCCESS 
| CAST_UNKNOWNSPELL 
| CAST_OUTOFMANA 
| CAST_OUTOFRANGE 
| CAST_CANNOTSEE 
| CAST_STUNNED 
| CAST_RESISTED 
| CAST_TOOK2LONG 
| CAST_ABILITYNOTREADY
|
| 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
|

#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 Ability "You can use the ability "
#event ImmuneSlow "Your target is immune to changes in its attack speed."


Sub Cast(SpellName,Item) 
   /if (!${Defined[CastGiveUpTime]}) /declare CastGiveUpTime timer 
   /if (!${Defined[Item]}) /declare Item local
   /if (${Me.Speed}>0) {
       /keypress forward 
       /keypress back 
       /delay 8 
   } else {
       /delay 4
   }
   /if ((${String["@Item"].Equal["Item"]})||(${String["@Item"].Equal["Activate"]})) /goto :StartCast 

   /if (!${Me.Gem["@SpellName"]}) { 
      /memspell 5 "@SpellName" 
      /delay 5s 
   } 
   :StartCast 
      /varset CastGiveUpTime 5s 
   :CastNow 
      /if (${String["@Item"].Equal["Item"]}) { 
         /call ClearReturnValue 
         /cast item "@SpellName" 

      } else /if (${String["@Item"].Equal["Activate"]}) { 
         /call ClearReturnValue 
         /alt activate "@SpellName" 
      } 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" 
         } 
   :WaitCast 
      /if (${Me.Casting.ID}) { 
      /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
   /doevents Ability
   /if (${Macro.Return.Equal["CAST_RESTART"]}) /goto :StartCast 
   /if (${Macro.Return.NotEqual["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 1s 
/return CAST_RESTART

Sub Event_Resisted 
/return CAST_RESISTED

Sub Event_ImmuneSlow
/return CAST_IMMUNESLOW

Sub Event_Ability
/return CAST_ABILITYNOTREADY
Last edited by ml2517 on Sat Apr 24, 2004 10:14 am, edited 10 times in total.

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

Post by ml2517 » Wed Feb 04, 2004 12:27 am

Updated:

Integrated advpath.inc for following purposes.

My advice is the issue a 'hold' command before you turn on follow. If you don't use the hold command your debuff bot will debuff mobs along the way.

I left this behavior for people that will dungeon crawl and would find it useful. If you stop along the way to fight your debuff bot will not sit down unless you issue a 'stop' command to stop following.

When you get to a spot where you'd like to stop and get pulls you should issue a 'stop' command so that your debuff bot will sit and med when mobs aren't in the area.

Give it a try and let me know if there is anything that should be changed/improved.

* Hold off using the goto command. I didn't get around to getting it done and I won't be able to finish it until tomorrow.

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

Post by ml2517 » Wed Feb 04, 2004 6:48 pm

Updated:

Finished adding the 'goto' command.

Added some more code to forget mobs that have moved more than a distance of 500 locs from you.

mcswanbeck
a lesser mummy
a lesser mummy
Posts: 70
Joined: Fri Jan 16, 2004 5:16 am

Post by mcswanbeck » Fri Feb 06, 2004 3:15 am

I tested this script (the first version) out yesterday in a PoEa entrance group and it worked very well, however I noticed that sometimes when slow (I was using it on a shammy and did Malos then Slow) was resisted, then it didn't recast slow. Can that be because of a long refresh time?

Also some times when mobs where incoming and got "cought" in the awesom pathing at the ramp, then it resulted in my shaman starting to debuff, but got "can't see your target" messages a few times, so when the mob was done moonwalking on the ramps and actually came close to us, then the retries from the macro was reached, resulting in no debuffs.

I am not quite sure if the first part of this quest (the resist-thing) was a result of a combination of both (2 x "can't see your target", 1 x "resist" and then my debuff-tries were reached.

I'll try to get another group going during the weekend and test if I still have the problems with the newest version of this script...

Awesome work ml2517, I love it...
/mcswanbeck

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

Post by ml2517 » Fri Feb 06, 2004 6:53 am

If you had your logging on in EQ please send me the text of your slow resists. It might be a limitation of spellcast.inc.

The no line of sight thing I think I can take care of. I'll look at it tonight.

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

Post by ml2517 » Fri Feb 06, 2004 6:58 am

Take a look at spellcast.inc in the snippets forum, apparently the resist event has a typo in it. That is probably what caused the resist thing.

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

Post by ml2517 » Fri Feb 06, 2004 7:38 pm

Updated:

Added debuff duration support to the INI file. These values can be:
99999 - This is the default and it basically means never to refresh the debuff.
0 - This means to use the default duration of the spell in seconds. ($spell("Spellname",duration))
Any other number in seconds - This means it will wait for your duration to pass and then refresh this debuff.

Added a 10 second wait and retry if there is no line of sight or mob is out of range.

You could probably use this script to do alot of things now like auto-mez mobs etc...

Updated again:
Added the ability to use 8 spells.

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

Post by ml2517 » Sat Feb 07, 2004 3:49 am

Updated:

Added the ability to delay a certain number of seconds for a particular debuff to be cast the first time the mob is seen in your area. This should allow for big aggro spells to be cast after other spells etc. Run the script and then end it and you will see DebuffStartWait# entries in the INI for each debuff spell. These wait times are in seconds and only apply on the first cast of a particular debuff, the first time the mob is seen in your area.

Added the ability to wait for a minimum percentage of health of the mob before casting a debuff. Run the script and then end it and you will see DebuffMinHealth# entries in the INI for each debuff spell.

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

Post by ml2517 » Sat Feb 07, 2004 1:49 pm

Updated:

Added DebuffMinHealthNoCast that is settable in the INI file for each debuff. This allows you to avoid casting of certain debuffs (mezzes are the first that come to mind) on mobs that are under this certain HP percentage.

Added DebuffMinMobsInArea that is settable in the INI file for each debuff. This allows you to avoid casting a particular buff on mobs unless there are more than the amount of mobs in the area that you specify. For example, for mezzes, I would set this number to 2 so that I would only mez if there were 2 or more mobs in the area.

Made a few small bug fixes.

mcswanbeck
a lesser mummy
a lesser mummy
Posts: 70
Joined: Fri Jan 16, 2004 5:16 am

Post by mcswanbeck » Sat Feb 07, 2004 3:41 pm

Any chance to make it possible to remote toggle the sit-state?
As I see it now, then it will try to sit all the time. If you want to walk and stand up, then it just sits you down again.
/mcswanbeck

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

Post by ml2517 » Sat Feb 07, 2004 3:45 pm

Yeah.. I always just used follow when moving around. It shouldn't try to sit when using follow.

I'll throw something in there for you.

mcswanbeck
a lesser mummy
a lesser mummy
Posts: 70
Joined: Fri Jan 16, 2004 5:16 am

Post by mcswanbeck » Sat Feb 07, 2004 4:02 pm

You camp this board too much omg :)

But thanks :)
/mcswanbeck

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

Post by ml2517 » Sat Feb 07, 2004 4:11 pm

Updated:
Added in the requested sit toggle. There is also an entry that gets created in the INI file called NoSit that you can set to 1 and it will prevent sitting by default, if you so choose.