Genbot v13.3.7 [Updated 04/19/05]

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

Moderator: MacroQuest Developers

User avatar
Fippy
a snow griffon
a snow griffon
Posts: 499
Joined: Tue Jul 16, 2002 10:42 am

Post by Fippy » Mon Sep 06, 2004 4:58 pm

OK seems like there isnt a bug with buff recasting it is getting it spot on. However what is happening is the wrong duration is being given by ${Spell[].Duration.TotalSeconds} which is odd because it starts off ok but then at some point it starts to give the wrong figure. Unloading and reloading MQ doesnt fix it only way is to relog.

Gonna do some more checking and then bug it.
Fippy

This is my girl. But Rizwank had her first :-)
[img]http://www.btinternet.com/~artanor/images/fairy_bounce09.gif[/img]

Nightshift
a lesser mummy
a lesser mummy
Posts: 54
Joined: Mon Oct 13, 2003 8:52 am

Post by Nightshift » Mon Sep 06, 2004 5:17 pm

I've noticed it recasting early as well, but it seems to be only on short duration spells, under 15 minute timer.

That isn't confirmed, just a quick observation over about 5 hours of play, it didn't start at any specific time.

The macro was restarted 3 times during that time, buffs were redone and after awhile the short duration spells would start to be cast sooner than they should.

NightShift

User avatar
Fippy
a snow griffon
a snow griffon
Posts: 499
Joined: Tue Jul 16, 2002 10:42 am

Post by Fippy » Mon Sep 06, 2004 6:06 pm

Nightshift when you notice it start to cast buffs early do a /echo ${Spell[NameofSpell].Duration.TotalSeconds} and see if that value matches up to the duration it tells you when you right click on the same spell.
Fippy

This is my girl. But Rizwank had her first :-)
[img]http://www.btinternet.com/~artanor/images/fairy_bounce09.gif[/img]

Frank25
a ghoul
a ghoul
Posts: 136
Joined: Thu Aug 12, 2004 6:38 am

Post by Frank25 » Mon Sep 06, 2004 10:52 pm

asci:

I had to refind it agian but i got it from this post: http://macroquest2.com/phpBB2/viewtopic ... c&start=30

It's not actually in the AFCleric macro , but in spell_routines.inc.

User avatar
Fippy
a snow griffon
a snow griffon
Posts: 499
Joined: Tue Jul 16, 2002 10:42 am

Post by Fippy » Tue Sep 07, 2004 5:23 am

OK buffing too early is definately not a genbot problem its an MQ problem. Heres my bug report. http://www.macroquest2.com/phpBB2/viewt ... 6741#66741

If anybody else has this problem can they test it too and post results.
Fippy

This is my girl. But Rizwank had her first :-)
[img]http://www.btinternet.com/~artanor/images/fairy_bounce09.gif[/img]

ascii38
a grimling bloodguard
a grimling bloodguard
Posts: 506
Joined: Sat Jul 17, 2004 8:06 pm

Post by ascii38 » Tue Sep 07, 2004 1:03 pm

Frank25 wrote:asci:

I had to refind it agian but i got it from this post: http://macroquest2.com/phpBB2/viewtopic ... c&start=30

It's not actually in the AFCleric macro , but in spell_routines.inc.
Genbot does not use spell_routines.inc. We have our own spell casting module that does most of what spell_routines does.

Frank25
a ghoul
a ghoul
Posts: 136
Joined: Thu Aug 12, 2004 6:38 am

Post by Frank25 » Fri Sep 10, 2004 2:32 am

ascii38 wrote:
Frank25 wrote:asci:

I had to refind it agian but i got it from this post: http://macroquest2.com/phpBB2/viewtopic ... c&start=30

It's not actually in the AFCleric macro , but in spell_routines.inc.
Genbot does not use spell_routines.inc. We have our own spell casting module that does most of what spell_routines does.
Ok please shoot me, i posted in the wrong thread :P
Servers me right reading 3 posts at a time heh.
This shoulda been in the AFcleric thread .

Sorry ascii38, Genbot is working PERFECTLY on all my comps btw , it roxors

Stabber
decaying skeleton
decaying skeleton
Posts: 2
Joined: Sat Sep 11, 2004 11:22 am

Puller/Guard/Anchor

Post by Stabber » Sat Sep 11, 2004 11:32 am

In an effort to automate my pally I am using the guard/anchor/puller combo of features.

The problem I am having is when the pally goes to pull, he will aggro the mob, and anytime from that point to the time he gets the mob back to the anchor point he could start turning and going back to the mob, or if he gets the mob back to the anchor point will just start spinning around in circles. Once this happens the macro doesn't recover and I have to restart it. The mob ends up killing itself on the damage shield I have on him but he sits there spinning in circles the whole time until I restart.

I don't see any other complaints about this so I am thinking I have something set up wrong with my radius setting but nothing I change makes a difference. It doesn't happen every time either. Could take a half hour, could take 5 min.

This is a great macro and is perfect for when I am in front of the pc. I never have to touch the pally. Autopull just doesnt work the best due to my above problem.

javelinl
a lesser mummy
a lesser mummy
Posts: 70
Joined: Thu Mar 11, 2004 12:40 pm

Necro Mod

Post by javelinl » Sat Sep 11, 2004 2:22 pm

I apologize if someone has already posted a way to use Necro lich options without killing the necro, but I've added these options to my botspell.inc.

Maybe someone has a suggestion to set it up better than my crude modifications to the canni code.

Code: Select all

|botspell.inc 
|Bot spell module. 
|Version 13.3.3 
|Date:08/24/2004 
| 
||** 
[botspell] 
version=13.3.3 
**|| 

#event CastFizzle "Your spell fizzles!" 
#event CastInterrupt "Your spell is interrupted." 
#event CastInterrupt "Your casting has been interrupted." 
#event CastNoMana "Insufficient Mana to cast this spell!" 
#event CastResist "Your target resisted #*#" 
#event CastTooFar "Your target is out of range, get closer!" 
#event Collapse "Your gate is too unstable, and collapses." 
#event Distracted "You are too distracted to cast a spell now!" 
#event ImmuneSlow "Your target is immune to changes in its attack speed." 
#event ImmuneRoot "Your target is immune to changes in its run speed." 
#event MissedNote "You miss a note, bringing your song to a close!" 
#event NoLOS "You cannot see your target." 
#event NoMem "You do not seem to have that spell memorized." 
#event NoOverWrite "Your spell would not have taken hold on your target." 
#event NoTarget "You must first select a target for this spell!" 
#event Recovered "You haven't recovered yet..." 
#event Recovered "Spell recovery time not yet met." 
#event RootOff "Your Immobilize spell has worn off." 
#event Sitting "You must be standing to cast a spell." 
#event Stunned "You can't cast spells while stunned!" 
#event Stunned "You *CANNOT* cast spells, you have been silenced!" 

Sub Init-Spell 
   /declare cmds-SPELL string outer Spell: 
   |For each command 
   |/call AddCommand "Command Section" "Command Phrase" "Called Sub" 
   |Command Section - where the command will be listed in response to the cmd phrase 
   |Command Phrase to trigger bot - End User can change to suit prefferences 
   |Called Sub - Routine to execute in response to Command Phrase 
   /call AddCommands buff chainnuke chainstun evac loadlist 
   /call AddCommands mana selfbuff bufflist setlompct sn snt spellgem 
|/declare Vars 
   /declare BuffPtrList string outer 
   /declare BuffSelfIconList string outer 
   /declare CastInfo string outer 
   /declare CastLastResult string outer 
   /declare CastName string outer 
   /declare CastOldTargetID int outer 
   /declare CastQueue string outer 
   /declare CastStep int outer 
   /declare CastTarget string outer 
   /declare CastType string outer 
   /declare ChainStunNum int outer 
   /declare DoAgain bool outer FALSE 
   /declare LastSn string outer NA 
   /declare SpellNeedToRemem bool outer 0 

|Timers 
   /declare CannAATimer timer outer 
   /declare ChainStunTime timer outer 
   /declare CannTimer timer outer 
   /declare CastTimer timer outer 
   /declare CTimer timer outer 
   /declare LomTimer timer outer 
   /declare LichTimer timer outer 
   /declare ST-CheckSelfBuffs timer outer 1 
   /declare YaulpTimer timer outer 

|Load Settings 
   /call LoadSetting BuffSelfList string SelfBuffList "Buffs you wish to maintain on yourself separated with |" 
   /call AddToggle sitaftercast on return "I will no longer sit after casting." "I will now sit after casting." 
   /call LoadSetting DelayBeforeSit string DelayBeforeSit 3s 
   /call AddToggle canni off return "I won't eat myself for mana." "I will eat myself for mana." 
   /call AddToggle lich off return "I will not Lich myself" "I will Lich myself" 
   /call LoadSetting CanniSpell string CanniSpell Cannibalize
   /call LoadSetting LichSpell string LichSpell Cannibalize 
   /call LoadSetting CanniLimit string CanniUntilPctHPsLessThan 40
   /call LoadSetting LichLimit string LichUntilPctHPsLessThan 40 
   /call LoadSetting ChainNuke string ChainNuke "Your Chain Nuke Spells separated with |." 
   /call LoadSetting ChainStun string ChainStun "Your Chain Stun Spells separated with |." 
   /call LoadSetting DefaultSpellSet string DefaultSpellSet Default 
   /call AddToggle dobuff on return "I won't cast buffs until commanded." "I will cast buffs." 
   /call LoadSetting EvacSpell string EvacSpell "Enter the name of your Evac spell here." 
   /call LoadSetting LomMsg string LomMsg "Warning I'm running low on Mana." 
   /call AddToggle reportlom off return "I won't tell you when I'm low on Mana." "I'll let you know when I'm low on Mana." 
   /call AddToggle remem off return "I won't remem my spellset after casting." "I will remem my spellset after casting." 
   /call LoadSetting SpellGem int DefaultSpellGem 8 
   /call AddToggle yaulp off return "I won't Yaulp for mana." "I will Yaulp for mana." 
   /call LoadSetting YaulpSpell string YaulpSpell Yaulp 


   /if (${BuffSelfList.NotEqual[${BuffSelfList-DefaultValue}]}) { 
      /declare ArgNum int local 1 
      /for ArgNum 1 to ${Math.Calc[${BuffSelfList.Count[|]}+1]} 
         /varset CommandParam ${BuffSelfList.Arg[${ArgNum},|]} 
         /call Command-SelfBuff "${CommandParam}" 
      /next ArgNum 
   } 
/return 

Sub SpellMain 
   /call CastFromQueue 
   /if (${Toggle-canni}) /call CheckCann 
   /if (${Toggle-yaulp}) /call CheckYaulp 
   /if (${Toggle-lich}) /call CheckLich
/return 

||||| Do Subs 

Sub Command-buff 
   /declare BuffName string local 
   /declare BuffType string local 
   /if (!${Defined[Param0]}) /return 
   /if (${Param0.Equal[on]}) /return 
   /if (${Param0.Equal[off]}) { 
      /varset BuffListCount 0 
      /return 
   } 
   /declare SpellNameParam string local ${Param0} 
   /declare TargetName string local 
   /declare ParamCount int local 1 
   /if (${Param0.Equal[on]}) { 
      /varset SpellNameParam ${LastSn} 
      /goto :Command-BuffTargetStart 
   } 
   :Command-BuffSpellLoop 
      /if (${Defined[Param${ParamCount}]}) { 
         /if (${Param${ParamCount}.Equal[on]}) /goto :Command-BuffTargetStart 
         /varset SpellNameParam ${SpellNameParam} ${Param${ParamCount}} 
         /varcalc ParamCount ${ParamCount}+1 
         /goto :Command-BuffSpellLoop 
      } 
   :Command-BuffTargetStart 
   /varcalc ParamCount ${ParamCount}+1 
   /if (!${Defined[Param${ParamCount}]}) { 
      /varset TargetName me 
   } else { 
      /varset TargetName ${Param${ParamCount}} 
      /varcalc ParamCount ${ParamCount}+1 
      :Command-BuffTargetLoop 
         /if (${Defined[Param${ParamCount}]}) { 
            /varset TargetName ${TargetName} ${Param${ParamCount}} 
            /varcalc ParamCount ${ParamCount}+1 
            /goto :Command-BuffTargetLoop 
         } 
      /if (${TargetName.Equal[yourself]} || ${TargetName.Equal[${Me.CleanName}]}) { 
         /varset CommandParam ${SpellNameParam} 
         /call Command-SelfBuff ${CommandParam} 
         /return 
      } 
   } 
   /call AssignCastTarget "${TargetName}" 
   /varset TargetName ${Macro.Return} 
   /if (${TargetName.Equal[0]}) { 
      /call ChatOut 5 "I don't understand who to cast that buff on." 
      /return 
   } 
   /if (${DebugList.Find[spell]}) /echo Command-buff "${SpellNameParam}" "${TargetName}" 
   /call AddCast "${SpellNameParam}" "${TargetName}" b-0 
/return 


Sub BuffResult(string BuffType,string BuffCast,string BuffTarget,int Ptr) 
   /declare GenFor int local 
   /declare BuffSpell int local 
   /declare BuffDuration string local 0 

   | Find an available pointer for the buff and delete duplicates 
   /if (${Ptr}) { 
      /call ListDelbyName BuffPtrList ${Ptr} " " 
      /goto :gBuffPtrFound 
   } 
   /for GenFor 1 to ${Math.Calc[${BuffPtrList.Count[ ]}+2]} 
      /if (!${String[ ${BuffPtrList} ].Find[ ${GenFor} ]} && !${Ptr}) { 
         /varset Ptr ${GenFor} 
      } 
      /if (${Buff-${BuffPtrList.Arg[${GenFor}]}-Text.Equal[${BuffType};${BuffCast};${BuffTarget}]}) { 
         /varset Ptr ${BuffPtrList.Arg[${GenFor}]} 
         /call ListDelbyArg BuffPtrList ${GenFor} " " 
         /varset ST-BuffRefresh-${Ptr} 0 
         /goto :gBuffPtrFound 
      } 
   /next GenFor 
   :gBuffPtrFound 
   /if (!${Defined[Buff-${Ptr}-Text]}) /declare Buff-${Ptr}-Text string outer 
   /if (!${Defined[Buff-${Ptr}-RetryNum]}) /declare Buff-${Ptr}-RetryNum int outer 0 

   /if (${DebugList.Find[spell]}) /echo BuffPtr ${Ptr} 

   /if (${CastLastResult.Equal[CAST_Successful]}) { 
      /varset Buff-${Ptr}-RetryNum 0 
      /if (${Spawn[${BuffTarget}].Name.Equal[${Me.Name}]} || ${BuffTarget.Equal[0]}) { 
         /call CheckForBuffIcon ${BuffType} "${BuffCast}" 
         /if (${Macro.Return}) { 
            /if (!${String[|BuffSelfIconList|].Find[|${BuffType};${BuffCast}|]}) { 
               /call ListAppendElement BuffSelfIconList "${BuffType};${BuffCast}" | 
            } 
            /return 
         } else { 
         /call ChatOut 8 "I don't recognize the icon for ${BuffType.Arg[1,-]} ${BuffName}.  Tell me 'timebuff ${BuffType.Arg[1,-]} ${BuffName}' some time when I don't have that buff active, and I'll record the buff and time how long it lasts." 
         } 
      } 
      /if (${String[|${TimedBuffList}].Find[|${BuffSpell};]}) { 
         /call ListFindStringArg TimedBuffList "|${BuffSpell};" | 
         /varset BuffDuration ${TimedBuffList.Arg[${Macro.Return},|].Arg[2,;]} 
         /if (${Spawn[${BuffTarget}].Name.Equal[${Me.Name}]} && ${Me.Buff[${TimedBuffList.Arg[${Macro.Return},|].Arg[3,;]}].ID}) { 
            /if (!${String[|${BuffSelfList}|].Find[|${BuffType};${BuffCast}|]}) { 
               /call ListAppendElement BuffSelfList "${BuffType};${BuffCast}" | 
            } 
            /return 
         } 
      } 
      /if (!${BuffDuration}) { 
         /if (${BuffType.Arg[1,-].Equal[spell]}) { 
            /varset BuffDuration ${Spell[${BuffCast}].Duration.TotalSeconds}s 
        } else /if (${BuffType.Arg[1,-].Equal[item]}) { 
           /varset BuffDuration ${FindItem[${BuffCast}].Spell.Duration.TotalSeconds}s 
        } else /if (${BuffType.Equal[alt]}) { 
           /varset BuffDuration ${AltAbility[${BuffCast}].ReuseTime}s 
        } 
      } 
   } else { 
      /if (${CastLastResult.Equal[CAST_NoOverWrite]} || ${CastLastResult.Equal[TARGET_NOTEXIST]}) { 
         /varset BuffDuration 2m 
         /varset Buff-${Ptr}-RetryNum 0 
      } else /if (${Buff-${Ptr}-RetryNum}<2) { 
         /varcalc Buff-${Ptr}-RetryNum ${Buff-${Ptr}-RetryNum}+1 
         /varset BuffDuration 15s 
      } else { 
         /varset BuffDuration 95s 
         /varset Buff-${Ptr}-RetryNum 0 
      } 
   } 
   /if (!${Defined[ST-BuffRefresh-${Ptr}]}) /declare ST-BuffRefresh-${Ptr} timer outer 
   /varset ST-BuffRefresh-${Ptr} ${BuffDuration} 
   /varcalc ST-BuffRefresh-${Ptr} ${ST-BuffRefresh-${Ptr}}-50 
   /if (${DebugList.Find[spell]}) /echo ST-BuffRefresh-${Ptr} ${ST-BuffRefresh-${Ptr}} BuffDuration ${BuffDuration} 

   /varset Buff-${Ptr}-Text ${BuffType};${BuffCast};${BuffTarget} 
   /call ListAppendElement BuffPtrList ${Ptr} " " 
/return 

Sub BuffRefresh(int Ptr) 
   /call AddCast "${Buff-${Ptr}-Text.Arg[1,;]};${Buff-${Ptr}-Text.Arg[2,;]}" "${Buff-${Ptr}-Text.Arg[3,;]}" b-${Ptr} 
/return 

Sub Command-SelfBuff 
   /if (!${Defined[Param0]}) /return 
   /if (${Param0.Equal[off]}) { 
      /varset BuffSelfList 
      /return 
   } 
   /if (${DebugList.Find[spell]}) /echo Command-SelfBuff ${CommandParam} 
   /call RefineCast "${CommandParam}" 
   /if (${Macro.Return.Equal[0]}) /return 
   /varset CommandParam ${Macro.Return} 
   /if (${DebugList.Find[spell]}) /echo RefineCast Return ${Macro.Return} 
   /if (${CommandParam.NotEqual[0]}) { 
      /call CheckForBuffIcon ${Macro.Return.Arg[1,;]} "${Macro.Return.Arg[2,;]}" 
      /if (${DebugList.Find[spell]}) /echo CheckForBuffIcon Return ${Macro.Return} 
      /if (${Macro.Return}) { 
         /if (${String[|${BuffSelfIconList}|].Find[|${CommandParam}|]}) { 
            /call AddCast "${CommandParam}" "${Me.Name}" b-0 
         } else { 
            /call ListAppendElement BuffSelfIconList "${CommandParam}" | 
         } 
      } else { 
         /call AddCast "${CommandParam}" "${Me.Name}" b-0 
      } 
   } 
/return 

sub CheckSelfBuffs 
   /declare GenFor int local 
   /declare BuffType string local 
   /declare BuffName string local 
   /declare BuffSpell string local 
   /varset ST-CheckSelfBuffs 5s 
   /if (${BuffSelfIconList.Length}) { 
      /for GenFor 1 to ${Math.Calc[${BuffSelfIconList.Count[|]}+1]} 
         /varset BuffType ${BuffSelfIconList.Arg[${GenFor},|].Arg[1,;].Arg[1,-]} 
         /varset BuffName ${BuffSelfIconList.Arg[${GenFor},|].Arg[2,;]} 
         |/if (${DebugList.Find[spell]}) /echo Sub CheckSelfBuffs BuffSelfIconList ${BuffSelfIconList} BuffType ${BuffType} BuffName ${BuffName} 
         /call CheckForBuffIcon ${BuffType} "${BuffName}" 
         |/if (${DebugList.Find[spell]}) /echo CheckForBuffIcon Return ${Macro.Return} 
         /if (!${Macro.Return}) /call AddCast "${BuffType};${BuffName}" ${Me.Name} b-s 
      /next GenFor 
   } 
/return 

Sub CheckForBuffIcon(string BuffType,string BuffCast) 
   /declare BuffSpell string local 
   /if (${BuffType.Arg[1,-].Equal[spell]}) { 
      /varset BuffSpell ${Spell[${BuffCast}].Name} 
   } else /if (${BuffType.Arg[1,-].Equal[item]}) { 
      /varset BuffSpell ${FindItem[${BuffCast}].Spell.Name} 
   } else /if (${BuffType.Equal[alt]}) { 
      /varset BuffSpell ${AltAbility[${BuffCast}].Spell.Name} 
   } 
   /if (${String[|${TimedBuffList}].Find[|${BuffSpell};]}) { 
      /call ListFindStringArg TimedBuffList "|${BuffSpell};" | 
      /if (${Me.Buff[${TimedBuffList.Arg[${Macro.Return},|].Arg[3,;]}].ID}) { 
         /return 1 
      } else { 
         /return 0 
      } 
   } 
   /if (${Me.Buff[${BuffSpell}].ID}) /return 1 
/return 0 

Sub Command-bufflist 
   /declare GenFor int local 
   /call ChatOut 1 "Buffs I have on myself now:" 
   /for GenFor 1 to 15 
      /if (${Me.Buff[${GenFor}].ID}) { 
         /call ChatOut 1 "${Me.Buff[${GenFor}].Name} with ${Me.Buff[${GenFor}].Duration.Minutes} minutes ${Me.Buff[${GenFor}].Duration.Seconds} seconds left." 
      } 
   /next GenFor 
   /if (${BuffPtrList.Length}) { 
      /call ChatOut 1 "Buffs I am timing for myself or others:" 
      /for GenFor 1 to ${Math.Calc[${BuffPtrList.Count[ ]}+1]} 
         /call ChatOut 1 "${GenFor}. ${Buff-${GenFor}-Text.Arg[1,;]} ${Buff-${GenFor}-Text.Arg[2,;]} for ${Spawn[${Buff-${GenFor}-Text.Arg[3,;]}]} to be cast in ${Math.Calc[${ST-BuffRefresh-${GenFor}}\600].Int} minutes ${Math.Calc[${ST-BuffRefresh-${GenFor}}%600/10].Int} seconds." 
      /next GenFor 
   } else { 
      /call ChatOut 1 "I am keeping up no other buffs at the moment." 
   } 
/return 


Sub Command-chainnuke 
   /if (${ChainNuke.Equal[${ChainNuke-DefaultValue}]}) /return 
   /declare NukeNum int local 1 
   /call StandardTarget "${CommandParam}" 
   :ChainNukeLoop 
      /if (!${Target.ID}) /return 
      /if (${Me.Gem[${ChainNuke.Arg[${NukeNum},|]}]}) /cast "${ChainNuke.Arg[${NukeNum},|]}" 
      /varcalc NukeNum ${NukeNum}+1 
      /if (!${ChainNuke.Arg[${NukeNum},|].Length}) /varset NukeNum 1 
   /goto :ChainNukeLoop 
/return 

Sub Command-chainstun 
   /if (${ChainStun.Equal[${ChainStun-DefaultValue}]}) /return 
   /call StandardTarget "${CommandParam}" 
   /if (!${Target.ID}) /return 
   /varset ChainStunNum 1 
   /call NextStun 
/return 

Sub Command-evac 
   /if (${EvacSpell.Equal[${EvacSpell-DefaultValue}]}) { 
      /call ChatOut 5 "Moving to you!" 
   } else { 
      /call ChatOut 5 "Moving to you and casting ${EvacSpell}!" 
   } 
   /varset CommandParam ${MasterName} 
   /call Command-moveto ${MasterName} 
   /call Command-anchor off 
   /if (!${EvacSpell.Equal[${EvacSpell-DefaultValue}]}) { 
      /if (${DebugList.Find[spell]}) /echo Command-evac "${EvacSpell}" ${Me.Name} heal 
      /call AddCast "${EvacSpell}" ${Me.Name} h-com 
   } 
/return 

Sub Command-loadlist(string Spellset) 
   /if (!${Defined[Spellset]}) /return 
   /memspellset ${Spellset} 
/return 

Sub Command-mana 
   /if (!${Me.Class.CanCast}) /return 
   /declare RoundMana int local ${Math.Calc[${Math.Calc[${Me.PctMana}/5].Int}*5].Int} 
   /if (${RoundMana}==100) { 
     /call ChatOut 2 "fm" 
   } else { 
     /call ChatOut 2 "${RoundMana}m" 
   } 

/return 

Sub Command-sn(string newSpell) 
   /declare snTarget string local 
   /call AssignCastTarget 0 
   /varset snTarget ${Macro.Return} 
   /if (!${Defined[newSpell]} && ${LastSn.Equal[NA]}) /return 
   /if (!${Defined[newSpell]}) /varset CommandParam "${LastSn}" 
   /if (${snTarget.Equal[0]}) { 
      /return 
   } 
   /varset LastSn ${CommandParam} 
   /if (${DebugList.Find[spell]}) /echo Command-sn "${CommandParam}" "${snTarget}" 
   /call AddCast "${CommandParam}" "${snTarget}" 
/return 

Sub Command-snt 
   /if (!${Defined[Param0]}) /return 
   /if (${Param0.Equal[on]} && ${LastSn.NotEqual[NA]}) /return 
   /declare sntCastText string local ${Param0} 
   /declare ParamCount int local 1 
   /declare sntTarget string local 0 
   /if (${Param0.Equal[on]}) { 
      /varset sntCastText ${LastSn} 
      /goto :Command-sntTargetStart 
   } 

   :Command-sntSpellLoop 
      /if (${Defined[Param${ParamCount}]}) { 
         /if (${Param${ParamCount}.Equal[on]}) /goto :Command-sntTargetStart 
         /varset sntCastText ${sntCastText} ${Param${ParamCount}} 
         /varcalc ParamCount ${ParamCount}+1 
         /goto :Command-sntSpellLoop 
      } 
   :Command-sntTargetStart 
   /varcalc ParamCount ${ParamCount}+1 
   /if (${Defined[Param${ParamCount}]}) { 
      /varset sntTarget ${Param${ParamCount}} 
      /varcalc ParamCount ${ParamCount}+1 
      :Command-sntTargetLoop 
         /if (${Defined[Param${ParamCount}]}) { 
            /varset sntTarget ${sntTarget} ${Param${ParamCount}} 
            /varcalc ParamCount ${ParamCount}+1 
            /goto :Command-sntTargetLoop 
         } 
   } 
   /if (${sntTarget.Equal[0]}) { 
      /if (${CombatTargetID}) { 
         /varset sntTarget id ${CombatTargetID} 
      } else /if (${Target.ID}) { 
         /varset sntTarget ${Target.Type} id ${Target.ID} 
      } else { 
         /varset sntTarget 0 
      } 
   } else { 
      /call AssignCastTarget "${sntTarget}" 
      /varset sntTarget ${Macro.Return} 
   } 
   /if (${DebugList.Find[spell]}) /echo Command-snt ${sntCastText} ${sntTarget} 
   /call AddCast "${sntCastText}" "${sntTarget}" 
   /varset LastSn ${sntCastText} 
/return 

Sub Command-spellgem 
   /if (!${Defined[Param0]}) { 
      /call ChatOut 3 "I use Gem ${SpellGem} when I need to mem new spells." 
      /return 
   } 
   /varset SpellGem ${Param0} 
   /call ChatOut 3 "I will now use Gem ${SpellGem} when I need to mem new spells." 
/return 




|||| Called Subs 

Sub AddCast(string AddCastText,string AddCastTarget,string AddCastInfo) 
   /declare AddCastType string local 
   /if (!${Defined[AddCastTarget]}) /declare AddCastTarget string local ${Target.Name} 
   /if (!${Defined[AddCastInfo]}) /declare AddCastInfo string local 0 
   /if (!${String[ item spell alt ].Find[ ${AddCastText.Lower.Arg[1,;].Arg[1,-]} ]}) { 
      /if (${DebugList.Find[spell]}) /echo AddCastText ${AddCastText} 
      /call RefineCast "${AddCastText}" 
      /if (${Macro.Return.Equal[0]}) /return 
      /varset AddCastText ${Macro.Return} 
   } 
   /if (${AddCastText.Arg[1,;].Arg[1,-].Equal[spell]}) { 
      /if (${String[|pb ae|self|ae pc v2|group v1|].Find[|${Spell[${AddCastText.Arg[2,;]}].TargetType.Lower}|]}) { 
         /varset AddCastTarget 0 
      } 
   } else /if (${AddCastText.Arg[1,;].Arg[1,-].Equal[item]}) { 
      /if (${String[|pb ae|self|ae pc v2|group v1|].Find[|${FindItem[${AddCastText.Arg[2,;]}].Spell.TargetType.Lower}|]}) { 
         /varset AddCastTarget 0 
      } 
   } 
   /if (!${String[ corpse pc npc pet assist- 0 ].Find[ ${AddCastTarget.Arg[1].Lower} ]}) { 
      /call RefineTarget "${AddCastTarget}" 
      /varset AddCastTarget ${Macro.Return} 
   } 
   /if (${DebugList.Find[spell]}) /echo AddCastText ${AddCastText}  AddCastTarget ${AddCastTarget} AddCastInfo ${AddCastInfo} 
   /if (!${CastQueue.Find[${AddCastText};${AddCastTarget};${AddCastInfo}]}) { 
      /if (${AddCastInfo.Left[1].Equal[h]}) { 
         /call ListPrependElement CastQueue "${AddCastText};${AddCastTarget};${AddCastInfo}" | 
      } else { 
         /call ListAppendElement CastQueue "${AddCastText};${AddCastTarget};${AddCastInfo}" | 
      } 
   } 
   /if (${DebugList.Find[spell]}) /echo CastQueue ${CastQueue} 
/return 

Sub CastFromQueue 
   /if (${Merchant.Open} || ${Window[BigBankWnd]}) /return 
   /declare ArgNum int local 0 
   /if (!${CastStep}) { 
      /if (!${CastQueue.Length}) /return 
      /if (${CastQueue.Find[assist-]}) { 
         /call Assist ${MasterName} 
         /if (${Target.ID}) { 
            /call RefineTarget "${Target.Name}" 
            /call StringReplaceAll CastQueue assist- "${Macro.Return}" 
         } else { 
            /call ChatOut 4 "Unable to assist you to find a target to cast on." 
         } 
      } 
      :gNextinQueue 
      /varcalc ArgNum ${ArgNum}+1 
      /if (!${Toggle-dobuff} && ${CastQueue.Arg[${ArgNum},|].Arg[4,;].Arg[1,-].Equal[b]}) /goto :gNextinQueue 
      /if (!${CastQueue.Arg[${ArgNum},|].Length}) /return 
      /varset CastType ${CastQueue.Arg[${ArgNum},|].Arg[1,;]} 
      /varset CastName ${CastQueue.Arg[${ArgNum},|].Arg[2,;]} 
      /varset CastTarget ${CastQueue.Arg[${ArgNum},|].Arg[3,;]} 
      /varset CastInfo ${CastQueue.Arg[${ArgNum},|].Arg[4,;]} 
      /if (${DebugList.Find[spell]}) /echo CastType ${CastType} CastName ${CastName} CastTarget ${CastTarget} 
      /varset CastTimer 0 
      /varset CastStep 1 
      /varset CastOldTargetID 0 
   } else /if (${Toggle-stopforheals} && ${CastQueue.Arg[1,|].Arg[4,;].Left[1].Equal[h]} && !${CastInfo.Left[1].Equal[h]}) { 
      /if (${Me.Casting.ID}) /stopcast 
      /varset CastStep 0 
      /call ChatOut 3 "Interrupted ${CastType.Arg[1,-]}: ${CastName}.  I need to heal somebody instead!" 
      /varset CastLastResult SPELL_IntentionalInterruption 
      /return 
   } 

   |/if (${DebugList.Find[spell]}) /echo CastType CastName CastStep ${CastType} ${CastName} ${CastStep} 
   /if (${CastQueue.Length}) /call Cast 
/return 

Sub Cast 
   /if (${String[ 1 2 3 4 5 6 7 ].Find[ ${CastStep} ]}) { 
      |/echo going to sub 
      /goto :gCast-${CastStep} 
   } else { 
      /if (${DebugList.Find[spell]}) /echo CastStep = ${CastStep} -- No corresponding goto found.  Returning. 
      /varset CastStep 5 
      /return 
   } 
   | Wait for spell to pop up, stand up, and target correctly. 
:gCast-1 
   |/if (${DebugList.Find[spell]}) /echo Cast 1 ${CastName} 
   /if (${CastTimer}) /return 
   /varset CastLastResult CHECKING_Casting 
   /if (${Me.Casting.ID}) /return 
    
   | Check the target conditions if a target required. 
   /if (!${CastTarget.Equal[0]}) { 
      /if (!${Spawn[${CastTarget}].ID}) { 
         /if (${CastInfo.Arg[1,-].NotEqual[b]} || ${CastInfo.Arg[1,-].Equal[b-0]}) { 
            /call ChatOut 3 "I couldn't find the target for ${CastType.Arg[1,-]} ${CastName}." 
         } 
         /varset CastStep 5 
         /varset CastLastResult TARGET_NOTEXIST 
         /return 
      } 
      /if (!${NearestSpawn[${CastTarget} radius ${MaxTargetRange}].ID}) { 
         /call ChatOut 3 "${NearestSpawn[${CastTarget}]} is out of range of ${CastType.Arg[1,-]} ${CastName}." 
         /varset CastStep 5 
         /varset CastLastResult TARGET_OUTOFRANGE 
         /return 
      } 
      /if (${Target.ID}!=${NearestSpawn[${CastTarget}].ID}) { 
         /varset CastOldTargetID ${Target.ID} 
         /squelch /target ${CastTarget} 
         /delay 2s ${Target.ID}==${NearestSpawn[${CastTarget}].ID} 
         /varset CastTimer 5 
         /if (${Target.ID}!=${NearestSpawn[${CastTarget}].ID}) { 
            /call ChatOut 3 "Wasn't able to target: ${CastTarget}" 
            /varset CastStep 5 
            /varset CastLastResult TARGET_CANNOTTARGET 
            /return 
         } 
      } 
   } 
    
   /varset CastLastResult CHECKING_Moving 
   /if (${CastType.Arg[1,-].Equal[spell]}) { 
      /if (${Spell[${CastName}].MyCastTime}>0.1 && ${Me.Moving} && ${Me.Class.Name.NotEqual[Bard]}) { 
         /varset CastStep 2 
         /return 
      } 
      /varset CastLastResult CHECKING_SpellMemmed 
      /if (!${Me.Gem[${CastName}]}) { 
         /varset CastStep 3 
         /return 
      } 
      /varset CastLastResult CHECKING_SpellUp 
      /if (!${Me.SpellReady[${CastName}]}) /return 
   } else /if (${CastType.Arg[1,-].Equal[item]}) { 
      /if (${FindItem[${CastName}].CastTime}>0.1 && ${Me.Moving} && ${Me.Class.Name.NotEqual[Bard]}) { 
         /varset CastStep 2 
         /return 
      } 
   } 
    
   /varset CastLastResult CHECKING_Standing 
   /if (!${Me.Standing}) { 
      /stand 
   } 
   /if (${Toggle-sitaftercast}) /varset SitTimer 1140m 
   /varset CastLastResult CHECKING_Target 
   | Not accounting for items or alt yet. 
    
   | Announce the casting. 
   /if (${CastTarget.Equal[0]}) { 
      /call ChatOut 5 "Casting ${If[${CastInfo.Arg[1,-].Equal[b]},buff ,]}${CastType.Arg[1,-]} ${CastName}." 
   } else { 
      /call ChatOut 5 "Casting ${If[${CastInfo.Arg[1,-].Equal[b]},buff ,]}${CastType.Arg[1,-]} ${CastName} on ${Target.CleanName}." 
   } 
    
   | Cast the spell or item or alt. 
   /if (${CastType.Arg[1,-].Equal[spell]}) { 
      /cast "${CastName}" 
   } else /if (${CastType.Arg[1,-].Equal[item]}) { 
      /cast item "${CastName}" 
   } else { 
      /alt activate ${AltAbility[${spellName}].ID} 
   } 

   /varset CastLastResult CAST_StillCasting 
   /varset CastStep 4 
   /varset CastTimer 0 
   /return 
   |Stop moving 
:gCast-2 
   /if (${Me.Moving}) { 
      /if (!${CastTimer}) { 
         /call ChatOut 3 "Can't cast since I'm moving." 
         /keypress forward 
         /keypress back 
         /varset CastTimer 8 
      } 
      /return 
   } 
   /varcalc CastStep 1 
   /varset CastTimer 0 
   /return 
   | Memorize the spell 
:gCast-3 
   /if (!${Me.Gem["${CastName}"]}) { 
      /if (!${CastTimer}) { 
         /varset SpellNeedToRemem 1 
         /if (${CastType.Arg[2,-].Length}) { 
            /memspell ${CastType.Arg[2,-]} "${CastName}" 
            /call ChatOut 6 "Memorizing spell: ${CastName} in slot ${CastType.Arg[2,-]}." 
         } else { 
            /memspell ${SpellGem} "${CastName}" 
            /call ChatOut 6 "Memorizing spell: ${CastName} in default slot ${SpellGem}." 
         } 
         /varset CastTimer 5s 
      } 
      /return 
   } 
   /varset CastStep 1 
   /varset CastTimer 0 
   /return 
   | Wait for spell to finish 
:gCast-4 
   /if (${Me.Casting.ID}) { 
      /if (!${Me.Mount.ID} && !${Spawn[${CastTarget} radius ${MaxTargetRange}].ID} && ${CastTarget.NotEqual[0]}) { 
         /stopcast 
         /varset CastStep 6 
         /call ChatOut 3 "Interrupted ${CastType.Arg[1,-]}: ${CastName}.  Target ${NearestSpawn[${CastTarget}].CleanName} died, poofed, or came back to life!" 
         /varset CastLastResult SPELL_IntentionalInterruption 
         /return 
      } 
      /if (${Toggle-stopifhealed} && ${CastInfo.Left[1].Equal[heal]} && ${CastTarget.NotEqual[0]}) { 
        
        
         /if (${Spawn[${CastTarget}].Type.Equal[pet]}) { 
            /if (${Spawn[${CastTarget}].PctHPs}>${PetPctHeal}+5) { 
               /varset CastStep 6 
            } 
         } else /if (${TankList.Find[${Spawn[${CastTarget}].Class}]}) { 
            /if (${Spawn[${CastTarget}].PctHPs}>${TankPctHeal}+5) { 
               /varset CastStep 6 
            } 
         } else /if (${CasterList.Find[${Spawn[${CastTarget}].Class}]}) { 
            /if (${Spawn[${CastTarget}].PctHPs}>${CasterPctHeal}+5) { 
               /varset CastStep 6 
            } 
         } 
         /if (${CastStep}==6) { 
            /stopcast 
            /call ChatOut 3 "Interrupted ${CastType.Arg[1,-]}: ${CastName}.  ${NearestSpawn[${CastTarget}].CleanName} was healed while I was casting!" 
            /varset CastLastResult SPELL_IntentionalInterruption 
         } 
      } 
      /return 
   } 
   /varcalc CastStep ${CastStep}+1 
   /return 
   | Wait for cast result 
:gCast-5 
   /if (${CastTimer.OriginalValue}<>2) { 
      /varset CastTimer 2 
      /return 
   } 
   /if (${CastTimer}==0) { 
      /varset CastTimer 0 
      /varcalc CastStep ${CastStep}+1 
   } 
   /return 
   | Delete old spell as cast and update status to successful unless otherwise. 
:gCast-6 
   /if (${CastLastResult.Equal[CAST_StillCasting]}) /varset CastLastResult CAST_Successful 
   /if (${CastInfo.Arg[1,-].Equal[b]} && ${CastInfo.Arg[2,-].NotEqual[s]}) { 
      /call BuffResult ${CastType} "${CastName}" "${CastTarget}" ${CastInfo.Arg[2,-]} 
   } 
   /if (${CastOldTargetID}) /squelch /target id ${CastOldTargetID} radius ${MaxTargetRange} 
   /if (${DebugList.Find[spell]}) /echo CastLastResult ${CastLastResult} 
   /if (${Toggle-remem} && ${SpellNeedToRemem}) { 
      /memspellset ${DefaultSpellSet} 
      /call ChatOut 6 "Re-memorizing original spells." 
      /varcalc CastStep ${CastStep}+1 
      /return 
   } 
   /call ListDelbyName CastQueue "${CastType};${CastName};${CastTarget};${CastInfo}" | 
   /varset CastStep 0 
   /if (${Toggle-sitaftercast}) /varset SitTimer ${DelayBeforeSit} 
   /return 
   | Wait until spells are rememmed to continue 
:gCast-7 
   /if (${Window[SpellBookWnd].Open}) /return 
   /call ChatOut 6 "Done memorizing original spells." 
   /varset SpellNeedToRemem 0 
   /if (${Toggle-sitaftercast}) /varset SitTimer ${DelayBeforeSit} 
   /call ListDelbyName CastQueue "${CastType};${CastName};${CastTarget};${CastInfo}" | 
   /varset CastStep 0 
/return 

Sub AssignCastTarget(string ACTarget) 
   /if (!${Defined[ACTarget]} || !${ACTarget.Length} || ${ACTarget.Equal[0]}) { 
      /if (${CastStep}==1 || ${Me.Casting.ID}) { 
         /return assist- 
      } else { 
         /call Assist ${MasterName} 
         /if (${Target.ID}) { 
            /return id ${Target.ID} 
         } else { 
            /call ChatOut 4 "Unable to /assist you to find a target to cast on." 
            /return 0 
         } 
      } 
   } else /if (${ACTarget.Equal[yourself]} || ${ACTarget.Equal[${Me.CleanName}]}) { 
      /return pc ${Me.CleanName} 
   } else /if (${ACTarget.Equal[me]} || ${ACTarget.Equal[${MasterName}]}) { 
      /return pc ${MasterName} 
   } 
/return ${ACTarget} 

Sub CheckCann 
   /if (!${Me.Moving}) { 
      /if (${Me.CurrentMana}<${Me.MaxMana}-1066 && ${Me.CurrentHPs}>${Me.MaxHPs}\5+1924 && ${CannAATimer}<=0) { 
         /alt activate 47 
         /varset CannAATimer 3m 
      } 
      /if (${Me.PctMana}<95 && ${Me.PctHPs}>=${CanniLimit} && ${CannTimer}<=0 && !${CastQueue.Length}) { 
         /call AddCast "${CanniSpell}" ${Me.Name} buff 
         /varset CannTimer 1 
      } 
   } 
/return 


Sub CheckLich
/declare myBuff int inner

    /if (${LichTimer}<=0) { 
  	/if (${Me.PctHPs}<=${LichLimit}) { 

		/if (${Me.Buff[${LichSpell}].ID}) {

			/varset myBuff ${Math.Calc[${Me.Buff[${LichSpell}].ID}-1].Int} 
			/notify BuffWindow Buff${myBuff} leftmouseup
	       		/call ChatOut 5 "Deactivating Lich" 
         		/varset LichTimer 1m 
		}
      	} 


	/if (${Me.PctHPs}>=80) { 

		/if (!${Me.Buff[${LichSpell}].ID}) {
			/call AddCast "${LichSpell}" ${Me.Name} buff
	       		/call ChatOut 5 "Activating Lich" 
         		/varset LichTimer 1m 
		}
      	} 
      




   } 
/return 


Sub CheckMana 
   /if (${LomTimer}<=0) { 
      /if (${Me.PctMana}<${LomPct}) { 
         /call ChatOut 5 "${LomMsg}" 
         /varset LomTimer 2m 
      } 
   } 
/return 

Sub CheckYaulp 
   /if (!${Me.Moving}) { 
      /if ((${Me.PctMana}<95 || ${CombatTargetID}) && !${Me.Buff["${YaulpSpell}"].ID}) { 
         /if (${DebugList.Find[spell]}) /echo CheckYaulp "${YaulpSpell}" "${Me.Name}" 
         /call AddCast "${YaulpSpell}" ${Me.Name} buff 
      } 
   } 
/return 

Sub NextStun 
   /if (!${Target.ID}) /return 
   :JumpStunSpell 
      /if (${Me.Gem[${ChainStun.Arg[${ChainStunNum},|]}]}) { 
         /cast "${ChainStun.Arg[${ChainStunNum},|]}" 
         /varset ChainStunTime 50 
      } else { 
         /varcalc ChainStunNum ${ChainStunNum}+1 
         /goto :JumpStunSpell 
      } 
   /varcalc ChainStunNum ${ChainStunNum}+1 
   /if (!${ChainStun.Arg[${ChainStunNum},|].Length}) /varset ChainStunNum 1 
/return 

Sub RefineCast(string RCText) 
   /declare RCType string local ${RCText.Arg[1]} 
   /declare RCName string local ${RCText.Right[-${RCType.Length}]} 
   /if (${String[ gem1 gem2 gem3 gem4 gem5 gem6 gem7 gem8 gem9 ].Find[ ${RCType.Lower} ]}) { 
      /varset RCType spell-${RCType.Right[1]} 
      /varset RCName ${RCName.Right[-${RCName.Arg[1].Length}]} 
   } 
   /if (${RCType.Arg[1,-].Equal[spell]}) { 
      /if (!${Int[${Me.Book[${RCName}]}]}) { 
         /call ChatOut 3 "Spell: ${RCName} not found in your book." 
         /return 0 
      } 
      /return ${RCType};${Spell[${RCName}]} 
   } 
   /if (${RCType.Equal[slot]}) { 
      /varset RCType item-${RCName.Arg[1]} 
      /varset RCName ${RCName.Right[-${RCName.Arg[1].Length}]} 
   } 
   /if (${RCType.Arg[1,-].Equal[item]}) { 
      /if (!${FindItem[${RCName}].InvSlot}) { 
         /call ChatOut 3 "Cannot find item: ${RCText} " 
         /return 0 
      } 
      /return ${RCType};${FindItem[${RCName}]} 
   } 
   /if (${RCType.Equal[alt]}) { 
      /if (!${AltAbility[${RCName}].ID}) { 
         /call ChatOut 3 "Do not understand Alt Ability: ${RCText} " 
         /return 0 
      } 
      /return ${RCType};${AltAbility[${RCName}]} 
   } 
   /if (!${Me.Book[${RCText}]}) { 
      /if (${DebugList.Find[spell]}) /echo Name |${RCText}| 
      /call ChatOut 3 "Spell: ${RCText} not found in your book." 
      /return 0 
   } 
/return spell;${Spell[${RCText}]} 

Sub RefineTarget(string RFTarget) 
   /if (${RFTarget.Equal[assist-]}) /return assist- 
   /if (${NearestSpawn[pc ${RFTarget} radius ${MaxTargetRange}].ID}) { 
      /varset RFTarget pc ${NearestSpawn[pc ${RFTarget}].Name} 
   } else { 
      /varset RFTarget ${NearestSpawn[${RFTarget}].Type} id ${NearestSpawn[${RFTarget}].ID} 
   } 
/return ${RFTarget} 

|||| Events 
Sub Event_CastFizzle 
   /if (${CastStep}) { 
      /varset CastStep 0 
      /varset CastLastResult CAST_Fizzled 
   } 
/return 

Sub Event_CastInterrupt 
   /if (${CastStep} && !${CastLastResult.Equal[SPELL_IntentionalInterruption]}) { 
      /varset CastStep 0 
      /varset CastLastResult CAST_Interrupted 
   } 
/return 

Sub Event_CastNoMana 
   /if (${CastStep}) { 
      /varset CastLastResult CAST_CastNoMana 
      /if (${IsPally}) { 
         /varset CastLastResult CAST_CastNoMana 
         /if (${CastTimer}==0) { 
            /call ChatOut 5 "${MasterName} I am OOM!" 
            /varset CastTimer 10s 
            /return 
         } 
      } 
      /call ChatOut 5 "OOM. Medding 13 seconds and trying again. " 
      /if (!${Me.Sitting} && !${DoMelee}) /sit 
      /varset CastTimer 13s 
   } 
/return 

Sub Event_CastResist 
   /if (${CastStep}) { 
      /varset CastStep 6 
      /if (${CastLastResult.Equal[CAST_StillCasting]}) { 
         /varset CastLastResult CAST_Resisted 
         /call ChatOut 3 "${Target.CleanName} resisted ${CastType} ${CastName}." 
      } 
   } 
/return 

Sub Event_CastTooFar 
   /if (${CastStep}) { 
      /call ChatOut 3 "${NearestSpawn[${CastTarget}]} is out of range" 
      /varset CastStep 6 
      /varset CastLastResult CAST_CastTooFar 
   } 
/return 

Sub Event_Collapse 
   /if (${CastStep}) { 
      /varset CastStep 0 
   } 
/return 

Sub Event_Distracted 
   /if (${CastStep}) { 
      /call ChatOut 5 "I can't cast. I'm too distracted. " 
      /varset CastStep 6 
      /varset CastLastResult CAST_Distracted 
   } 
/return 

Sub Event_ImmuneRoot 
   /if (${CastStep}) { 
      /call ChatOut 3 "Cannot Root or Snare this Target!" 
      /varset CastStep 6 
      /varset CastLastResult CAST_ImmuneRoot 
   } 
/return 

Sub Event_ImmuneSlow 
   /if (${CastStep}) { 
      /call ChatOut 3 "Cannot Slow this Target (Immune)!" 
      /varset CastStep 6 
      /varset CastLastResult CAST_ImmuneSlow 
   } 
/return 

Sub Event_MissedNote 
   /if (${CastStep}) { 
      /varset CastStep 0 
   } 
/return 

Sub Event_NoLOS 
   /if (${CastStep} && ${CastStep}!=6) { 
      /call ChatOut 3 "I can't see my target. " 
      /varset CastStep 6 
      /varset CastLastResult CAST_NoLOS 
   } 
/return 

Sub Event_NoMem 
   /if (${CastStep}) { 
      /call ChatOut 5 "That spell is not memed. " 
      /varset CastStep 0 
      /varset CastLastResult CAST_NoMem 
   } 
/return 

Sub Event_NoOverWrite 
   /if (${CastStep}) { 
      /call ChatOut 3 "The spell won't take hold on the target." 
      /varset CastStep 6 
      /varset CastLastResult CAST_NoOverWrite 
   } 
/return 

Sub Event_NoTarget 
   /if (${CastStep}) { 
      /call ChatOut 3 "I don't know what target to cast on. " 
      /varset CastStep 6 
      /varset CastLastResult CAST_NoTarget 
   } 
/return 

Sub Event_Recovered 
      /varset CastStep 0 
   /if (${CastStep}) { 
      /varset CastLastResult CAST_Recovered 
   } 
/return 

Sub Event_RootOff 
   /call ChatOut 5 "Root has worn off. " 
/return 

Sub Event_Sitting 
   /if (${CastStep}) { 
      /varset CastStep 0 
      /varset CastLastResult CAST_NotStanding 
   } 
/return 

Sub Event_Stunned 
   /if (${CastStep}) { 
      /call ChatOut 5 "I'm STUNNED. Waiting a second to try again." 
      /varset CastStep 0 
      /varset CastTimer 1s 
      /varset CastLastResult CAST_Stunned 
   } 
/return

javelinl
a lesser mummy
a lesser mummy
Posts: 70
Joined: Thu Mar 11, 2004 12:40 pm

Pet Buff's

Post by javelinl » Sat Sep 11, 2004 3:00 pm

I'm looking at making a modification of the self buff list to check for buffs on your pet, but I'm not sure of the correct syntax to change

/call AddCast "${CommandParam}" "${Me.Name}" b-0

to target my pet.

inthrall
orc pawn
orc pawn
Posts: 13
Joined: Sun Mar 14, 2004 3:57 pm

? NameS ?

Post by inthrall » Sun Sep 12, 2004 9:25 pm

Looking over the genbotdoc I saw this:

[Shortcuts]
sowon=buff spirit of wolf on NameS

I looked at all the code and NameS is not a variable, telling the bot /t Bot sowon the macro recognizes the command, but doesnt cast on anyone.

I then tried to /t Bot setvar NameS <insert name here> and it reports NameS is now set to NULL. so I tried to varset directly and it tells me NameS is not a variable.

So can someone PLEASE tell me what I'm overlooking?

I saw that NameS is used in other places in the bot_BOT.ini but im at a loss. Thanks

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

Post by A_Druid_00 » Mon Sep 13, 2004 7:34 am

on NameS tells genbot to cast it on whatever name you provide after the shorcut. So:

sowon Bob

Will cast SoW on Bob

I believe if you put nothing after the shortcut its supposed to just use your current target, but I could be wrong.
[quote]<DigitalMocking> man, A_Druid_00 really does love those long ass if statements
<dont_know_at_all> i don't use his macro because i'm frightened of it[/quote]
[quote][12:45] <dont_know_at_all> never use a macro when you can really fuck up things with a plugin[/quote]

Stabber
decaying skeleton
decaying skeleton
Posts: 2
Joined: Sat Sep 11, 2004 11:22 am

Post by Stabber » Tue Sep 14, 2004 6:17 pm

I am having a problem with the anchor. Erratically, my toon will go back to the anchor point and start spinning. I am assuming it hasn't found the point therefore it never continues the macro unless I restart it. I have seen several posts throughout the forums about the same problem but with no resolutions to any of them. I love this macro but I don't know how to fix this? I posted above thinking it was a problem with the puller but I am not even using that anymore, just the anchor.

Can someone please help?

ascii38
a grimling bloodguard
a grimling bloodguard
Posts: 506
Joined: Sat Jul 17, 2004 8:06 pm

Post by ascii38 » Tue Sep 14, 2004 10:14 pm

Stabber,

Vexix wrote a lot of this code and was quite familiar with the bits that he inhertited. Vexix hasn't been around for a little while. There are a few people who are getting their heads wrapped around the code. Nobody is currently at the point where they can replace Vexix (and I'm hoping he comes back soon).

Before I try and figure out where the problem may lie, can you let us know which movetomode you have set in your INI? Whichever option you are using, try using the other one (e.g. if you have "movetomode 1" try "movetomode 2")

I will say this, moveto doesn't work at all for me and I don't use anchors.

botia
decaying skeleton
decaying skeleton
Posts: 8
Joined: Fri Sep 03, 2004 7:47 pm

Vexix is gone

Post by botia » Tue Sep 14, 2004 10:21 pm

Doesn't look like he's coming back this time :(


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

-Botia