Is this macro salvagable? Worth it?

Artemus

Lifetime Member
Joined
May 30, 2006
Messages
1,048
Reaction score
9
Points
38
Some time back, a friend took the Forgotten Halls hunter macro and modified the everloving shit out of it to pull the gators on the beach in Loping Plains. At one time he left it running three days straight. This was before the big crackdown on MQ.

He did some impressive stuff. The toon was programmed to save 10 muds from the gators, then run to a quest mob and turn them in, which gave a nice bump in exp. And if you died, you popped in the GL, bought a soulstone and waited for your merc to rez you.

I once modified it for a warrior to use but lost it. Still, most of the code is there. I'm wondering if it's worth modifying for modern toons and using in a nice open area, like Shards or EW. Or am I better off just using Bot?

Don't just dismiss this and say use Bot. Take a look first, at least. :p


Code:
| LPHunter Macro 
| Author : Nod77
| Original Code: From everywhere 
| Usage : : /macro LPHunter 
| Requirements: You need MQ2MoveUtils and spell_routines.inc              
|----------------------------------------------------------- 

#event FeignFailed "Your combat ability is interrupted."
#event FeignFailed "|${Me.CleanName}| has fallen to the ground."
#event Dead "You have been slain by #*#"
#event Exp "You gain experience!!" 
#event Exp "You gain party experience!!" 
#event SnareLand "#*# is engulfed by darkness." 
#event AAPoints "You have gained an ability point! #*#"
#event TagLand "#*# has been challenged."
#event SpellBlocked "Your spell did not #*#" 
#event SpellBlocked "Your spell would not #*#" 
#event BotsHaveAggro "#*# tells you, 'Aggro!'"

#include spell_routines.inc
#include advpath.inc

#define FeignHP		21
#define GetUpHP		51

#turbo 10 

Sub Main 
|------------------------------------------------------------ 
|Code: User Variables 
|------------------------------------------------------------ 

   /declare HPHealFight int outer 75 
   /declare ManaforPull int outer 30 

   /declare MaxRadius int outer 900
   /declare MaxZDistance int outer 70

   /declare Range int outer 12 
   /declare SnareNPC int outer 1 
   /declare NukeNPC int outer 1 
   /declare BuffSpells int outer 12

   /declare SKepic            string outer "Innoruuk's Dark Blessing" 
   /declare SKepicGem         string outer item 
   /declare SKepicPct         string outer 50 

   /declare Debuff1           string outer "Dire Restriction Rk. II" 

   /declare PullSpell         string outer "Confrontation for Power Rk. II" 


   /declare PullDistance      int    outer 110
   /declare Tagged                   outer FALSE 

   /declare DDSpell string outer "Blood of Malthiasiss Rk. II" 
   /declare HealSpell string outer "Touch of Tharoff"
   /declare HealSpell2 string outer "Dire Accusation"
 
   /declare SnareSpell string outer "Despairing Darkness Rk. II" 

   /declare BuffSpell1 string outer "Drape of Fear Rk. II" 
   /declare BuffSpell2 string outer "Amygdalan Horror Rk. II" 
   /declare BuffSpell3 string outer "Banshee Skin Rk. II"
   /declare BuffSpell4 string outer "Call of Dusk" 
   /declare BuffSpell5 string outer "Shroud of the Plagueborne Rk. II"
   /declare BuffSpell6 string outer "Taelosian Guard" 
   /declare BuffSpell7 string outer "Primal Guard"
   /declare BuffSpell8 string outer "Form of Defense VIII" 
   /declare BuffSpell9 string outer "Expanding Mind III"
   /declare BuffSpell10 string outer "Myrmidon's Skill IV" 
   /declare BuffSpell11 string outer "Knowledge of the Past VI" 
   /declare BuffSpell12 string outer "Illusionary Spikes III" 


   /declare BuffSpellName1 string outer "Drape of Fear Rk. II" 
   /declare BuffSpellName2 string outer "Amygdalan Horror Rk. II"
   /declare BuffSpellName3 string outer "Banshee Skin Rk. II"
   /declare BuffSpellName4 string outer "Call of Dusk"
   /declare BuffSpellName5 string outer "Shroud of the Plagueborne Rk. II"
   /declare BuffSpellName6 string outer "Ritual Blood Ring"
   /declare BuffSpellName7 string outer "Darkened Flowing Black Silk Sash" 
   /declare BuffSpellName8 string outer "Guardian's Jeweled Ring"
   /declare BuffSpellName9 string outer "Speckled Bunny Belt"
   /declare BuffSpellName10 string outer "Steely Vestment of the Grand Manipulator" 
   /declare BuffSpellName11 string outer "Royal Knight's Earring" 
   /declare BuffSpellName12 string outer "Drape of the Shellscale" 


   /declare BuffSpellGem1 string outer gem10
   /declare BuffSpellGem2 string outer gem2 
   /declare BuffSpellGem3 string outer gem4
   /declare BuffSpellGem4 string outer gem5
   /declare BuffSpellGem5 string outer gem11
   /declare BuffSpellGem6 string outer item
   /declare BuffSpellGem7 string outer item 
   /declare BuffSpellGem8 string outer item 
   /declare BuffSpellGem9 string outer item 
   /declare BuffSpellGem10 string outer gem10 
   /declare BuffSpellGem11 string outer item
   /declare BuffSpellGem12 string outer item


|------------------------------------------------------------ 
|Code: Array & Variable Information. 
|------------------------------------------------------------ 

   /declare BuffSub int outer 1 
   /declare BuffBlock[${BuffSpells}] int outer 0 
   /declare TargetID int outer 0 
   /declare AddCounter int outer 1 
   /declare AddIDArray[10] int outer 0 
   /declare AddIDCounter int outer 1 
   /declare RangeMax int outer 
   /declare RangeMin int outer  
   /varcalc RangeMax ${Range}+1 
   /varcalc RangeMin ${Range}-1 
   /declare MyXLOCA int outer 0 
   /declare MyYLOCA int outer 0 
   /declare BreakLoop int outer 0  
   /declare xDistance int outer 0 
   /declare AnchorX int outer ${Me.X} 
   /declare AnchorY int outer ${Me.Y} 
   /declare MyTargetName string outer 
   /declare MyTargetDead int outer 0 
   /declare InvalidTargetID int outer 0 
   /declare Fighting int outer 0 
   /declare TargetDead int outer 0 
   /declare Snared int outer 0 
   /declare MyXLOC int outer 0 
   /declare MyYLOC int outer 0 
   /declare Oktopull int outer 0 
   /declare Mobstoloot int outer 0
   /declare MobsKilled int outer 0
   /declare AACount int outer 0
   /declare engagePet bool outer 
   /declare MovePet bool outer 
   /declare FeignFailed	bool outer FALSE

   /call InitAPFVars 1 15 20 

   /call ReadINI HunterMob.ini "${Zone.Name}" Mob 
   /if (!${Defined[MobArray]}) { 
      /echo Mob Array Creation Error, ending macro... 
      /endmacro 
   } 
   /call ReadINI HunterLoot.ini "${Zone.Name}" Loot 
   /if (!${Defined[LootArray]}) { 
      /echo No Loot Array Created... 
   } 
   /cleanup 
   /fastdrop on 
   /lootn never 


|-------------------------------------------------------------------------------- 
|Code: Main Loop 
|-------------------------------------------------------------------------------- 

   :Start
   /echo Starting Main Loop
   /echo AA points earned this session: ${AACount} 
   /call GMCheck
   /squelch /target clear 
   /doevents
   /call CheckBuffs
   /call CheckHP
   /if (${Me.PctHPs} < FeignHP) /call Feign 
   /if (${Me.XTarget[1].ID}==0) /call CheckBuffs
   /call CheckAdds
   /if ((${Me.XTarget[1].ID}==0) && (${Me.PctMana}<30)) /call MedTime
   /if ((${Me.XTarget[1].ID}==0) && (${Me.PctHPs}<30)) /call RestTime 
   /if (${Oktopull}>0&&${Int[${Me.PctHPs}]}>80) /call GetTarget 
   /call CheckAnchor 
   /if ((!${TargetID}) && (${Me.XTarget[1].ID}==0)) { 
      /call CheckBuffs 
      /call CheckMana 
      /call CheckHP
   } 
   /goto :Start 
/return 


|-------------------------------------------------------------------------------- 
|Code: Aquire Target 
|-------------------------------------------------------------------------------- 
Sub GetTarget
/echo Next victim...
   /declare SpawnSub int local 
   /declare CheckSpawnSub int local 
   /declare IDArray[${MobArray.Size}] int local 
   /for SpawnSub 1 to ${MobArray.Size} 
      /varset IDArray[${SpawnSub}] ${NearestSpawn[npc radius ${MaxRadius} zradius ${MaxZDistance} los nopcnear 80 "${MobArray[${SpawnSub}]}"].ID}
   /next SpawnSub 
   /for CheckSpawnSub 1 to ${MobArray.Size} 
      /if (!${IDArray[${CheckSpawnSub}]}) /next CheckSpawnSub 
      /if (${TargetID}==0) /varset TargetID ${IDArray[${CheckSpawnSub}]}
      /if (${Spawn[npc id ${IDArray[${CheckSpawnSub}]}].Distance}<${MaxRadius} && ${Spawn[npc id ${IDArray[${CheckSpawnSub}]}].DistanceZ}<${MaxZDistance} && ${Spawn[npc id ${IDArray[${CheckSpawnSub}]}].LineOfSight} && ${Spawn[npc id ${IDArray[${CheckSpawnSub}]}].CurrentHPs} >= 100) { 
         /if (${Spawn[npc id ${IDArray[${CheckSpawnSub}]}].Distance}<${Spawn[npc id ${TargetID}].Distance}) { 
            /varset TargetID ${IDArray[${CheckSpawnSub}]} 
         } 
      } 
   /next CheckSpawnSub 
   /if (${TargetID}!=0) { 
      /squelch /target npc id ${TargetID} 
      /echo ${Target.Name} with ${Target.CurrentHPs}% HP's has been aquired at distance ${Target.Distance} 
   } else /return
  /if (${Target.ID} && ${Target.Distance} < ${PullDistance} && ${Target.CurrentHPs} >= 100) /call TagTarget 
  /if (${Target.Distance} > ${PullDistance} && ${Target.Distance} < ${MaxRadius} && ${Target.CurrentHPs} >= 100) /call MoveToTarget 
  /if (${Tagged} && ${Math.Distance[${AnchorY},${AnchorX}]} > 25) { 
    /call MoveToAnchor 
    /call CombatSub
    /return 
  } else /if (${Tagged}) { 
    /call CombatSub
    /return 
  } 
/return 

|-------------------------------------------------------------------------------- 
|Code: Move To Target
|--------------------------------------------------------------------------------

Sub MoveToTarget
  /stand
  /if (!${Target.ID}) /return 
  /if (${Target.Distance} < ${PullDistance} ) /return 
   :Moving 
    /face nolook 
    /keypress forward hold 
    /call CheckObstruction 
    /if (${Target.Distance} >= ${PullDistance}) /goto :Moving 
  /keypress forward 
  /keypress back 
  /call TagTarget 
  /doevents 
/return

|-------------------------------------------------------------------------------- 
|Code: TagTarget
|--------------------------------------------------------------------------------

Sub TagTarget 
  /doevents
  /if (!${Target.ID}) /return  
  /if (${Target.Distance} >= ${PullDistance}) { 
    /echo Not Close enough, even though we're Supposed to be! 
    /call ResetSub 
    /return 
  }    
  /face nolook 
  /keypress back 
  /delay 1s
    /call Cast ${PullSpell}  
/if (${Macro.Return.Equal[CAST_SUCCESS]}) /varset Tagged TRUE
/return 

|-------------------------------------------------------------------------------- 
|Code: Combat 
|-------------------------------------------------------------------------------- 
Sub CombatSub 
/echo Combat
   /stand 
   /echo Attacking ${Target.CleanName} NOW! 
   /varset Fighting 1 
   /varset TargetDead 0 
   /face nolook
    :CombatStart 
   /if (${Int[${Target.Distance}]}>30) { 
      /doevents
      /if (!${Me.Buff[${Debuff1IconName}].ID}) /call Cast ${Debuff1}  
      /if ((${Me.AltAbilityReady[6000]}) && (${Target.PctHPs}>90)) /call Cast "6000" alt  
      /if (${Me.AltAbilityReady[825]} && ${Target.Distance}<30) /call Cast "825" alt
      /goto :CombatStart 
   } 
   :CombatLoop 
     /face nolook
     /squelch /target id ${TargetID} 
     /squelch /stick ${Range} 
     /squelch /attack on
     /if (!${engagePet}) { 
        /pet attack 
        /varset engagePet TRUE
        /if ((${Me.AltAbilityReady[3822]}) && (!${Me.AltAbilityReady[6000]})) /call Cast "3822" alt
      }
     /if (!${MovePet}) { 
        /call Cast "3816" alt
        /varset MovePet TRUE 
     } 
     /doevents 
     /call CheckHP
     /if ((${Me.PctHPs} < 31 && ${Me.AltAbilityReady[87]}))  /call Cast "87" alt
     /if ((${Me.PctHPs} < 35 && !${Me.CombatAbilityReady[Umbral Carapace Rk. II]} && !${Me.CombatAbilityReady[Leechcurse Discipline]} && ${Me.CombatAbilityReady[Unholy Aura Discipline]})) /disc Unholy Aura Discipline
     /if ((${Me.PctHPs} < 35 && !${Me.CombatAbilityReady[Umbral Carapace Rk. II]} && ${Me.CombatAbilityReady[Leechcurse Discipline]})) /disc Leechcurse Discipline
     /if ((${Me.PctHPs} < 35 && ${Me.CombatAbilityReady[Umbral Carapace Rk. II]})) /disc Umbral Carapace Rk. II

     /call Cast "Dire Accusation"
     /call Cast "825" alt

     /if (${Me.PctHPs}<${SKepicPct} && ${FindItem[Innoruuk's Dark Blessing].Timer}==0) /call Cast ${SKepic} ${SKepicGem} 
     /if (${Me.PctHPs} < 60) /gsay fh
     /if (${Me.PctHPs} < FeignHP) /call Feign
 
|     /if ((${Target.PctHPs}>50&&${Me.PctMana}>20) && (${Me.State.NotEqual[STUNNED]}) && (${NukeNPC}==1)) /call Cast ${DDSpell} 

     /if ((${Snared}<1) && (${Spawn[npc id ${TargetID}].ID}!=NULL) && (${Target.Fleeing} && ${Target.Speed} > 15) && (${SnareNPC}==1)) /call Cast ${SnareSpell} 

/call CheckAdds

/if (${Me.XTarget[1].ID}!=0) {
/squelch /target npc id ${Me.XTarget[1].ID}
/delay 1s ${Target.ID}==${Me.XTarget[1].ID}
/varset TargetID ${Me.XTarget[1].ID}
/goto :CombatLoop 
}

/if (${Spawn[corpse id ${TargetID}].ID}!=NULL) { 
/squelch /attack off 
/squelch /target clear
/doevents 
/varset Snared 0 
/varset Tagged FALSE
/call CheckAdds 
/varset TargetDead 1 
/varset Fighting 0 
}

     /if (${engagePet}) { 
         /pet hold 
         /varset engagePet FALSE
     }
      /if (${MovePet}) { 
         /varset MovePet FALSE
      }
 /call ClearCorpses
/return 

|-------------------------------------------------------------------------------- 
|Code: Check Buffs 
|-------------------------------------------------------------------------------- 
Sub CheckBuffs
/echo CheckBuffs
/if (!${Me.PetBuff[Gift of Dyalgem Rk. II]}) {
/echo Buffing pet
/call Cast "Gift of Dyalgem Rk. II" gem12
}

   /if (${Me.Buff[Spirit of Resolve Rk. II].Duration}<2) {
     /gsay focus
     /delay 15s
   }
 
   /if (${Me.Buff[Talisman of Celerity].Duration}<2) {
     /target shaman
     /if (${Target.Distance} > 60) { 
         /echo Not close enough for Haste. Getting Closer...
         /stick 30
     }  
     /gsay haste
     /delay 10s
   }

   /for BuffSub 1 to ${BuffSpells} 
      /if ((${Me.Buff[${BuffSpell${BuffSub}}].Duration}<2)&&(${BuffBlock[${BuffSub}]}!=1)) { 
         /target ${Me.Name} 
         /call Cast ${BuffSpellName${BuffSub}}  ${BuffSpellGem${BuffSub}} 
      }
   /doevents 
   /next BuffSub 
   
   /varset BuffSub 1 
/return 

|-------------------------------------------------------------------------------- 
|Code: Check for Adds 
|-------------------------------------------------------------------------------- 

Sub CheckAdds 
/echo CheckAdds
/if (${Me.XTarget[2].ID}) {
/Echo More than one.
/squelch /target npc id ${Me.XTarget[1].ID}
/delay 1s ${Target.ID}==${Me.XTarget[1].ID}
/varset TargetID ${Me.XTarget[1].ID}
/call Cast "Explosion of Hatred" alt
/delay 1s
/call Cast "Explosion of Spite" alt
/call CombatSub
}
/return
|-------------------------------------------------------------------------------- 
|Code: HP/Mana Upkeep 
|-------------------------------------------------------------------------------- 

Sub CheckHP 
   |Do I need to heal during fight? 
   /if ((${Int[${Me.PctHPs}]}<${HPHealFight})&&${Fighting}) { 
	/call Cast ${HealSpell} ${HealSpellGem}
   } 
   /if ((${Int[${Me.PctHPs}]}<${HPHealFight})&&${Fighting}) { 
	/call Cast ${HealSpell2} ${HealSpell2Gem}
   }
   |Do I need to heal during downtime? 
   /if ((${Me.PctHPs} < 70) &&!${Fighting}) { 
      /tell shaman heal
   } 
/return 

Sub CheckMana 
/echo CheckMana
   |Enough Mana to pull? 
   /if (${Int[${Me.PctMana}]}<${ManaforPull}) { 
      /varset Oktopull 0 
   } 
   /if (${Int[${Me.PctMana}]}>${ManaforPull}) { 
      /varset Oktopull 1 
   } 
/return

Sub MedTime
 /echo Med Time!
  :Meditate
    /if (${Me.Standing}) /sit 
    /call CheckAdds
    /doevents
    /delay 1s 
    /if (${Me.PctMana}<100) /goto :Meditate
  /stand 
/return 

Sub RestTime
 /echo Rest Time!
  :Resting 
    /if (${Me.Standing}) /sit
    /call CheckAdds
    /doevents
    /delay 1s 
    /if (${Me.PctHPs}<100) /goto :Resting
  /stand 
/return  

|-------------------------------------------------------------------------------- 
|Code: Looting 
|-------------------------------------------------------------------------------- 
Sub ClearCorpses 
/echo ClearCorpses
   /declare CorpseSub int local 
   /for CorpseSub 1 to ${Mobstoloot} 
      /call LootMob  
   /next CorpseSub 
   /call ResetSub 
/return 

Sub LootMob 
/echo Starting LootMob
   /declare LootSlot int inner 0 
   /declare LootCheck int inner 0 
   /declare LootTotal int inner 0 
   /declare LootLoop int local 0 
   :WaitLootMobWnd 
   /squelch /target corpse radius 80 zradius 50
   /delay 5 
   /squelch /stick
   /if (${Target.Type.Equal[CORPSE]}) /loot 
   /delay 10 
   /varcalc LootLoop ${LootLoop}+1
   /if (${LootLoop}>2) /return 
   /if (!${Corpse}) /goto :WaitLootMobWnd 
   /if (!${Corpse.Items}) { 
      /echo NO LOOT! Cheap Bastard! 
      /notify LootWnd DoneButton leftmouseup 
      /delay 2 
      /return 
   } 
   /squelch /stick off 
   /varset LootTotal ${Corpse.Items}

   /for LootSlot 1 to ${LootTotal} 
      /shiftkey /itemnotify loot${LootSlot} leftmouseup 
      /delay 1s 
      /for LootCheck 1 to ${LootArray.Size} 
         /if (${Cursor.Name.Find[${LootArray[${LootCheck}]}]}) { 
            /echo Keeping a ${Cursor.Name}... WOOT! 
            /varcalc LootStats[${LootCheck}] ${LootStats[${LootCheck}]}+1 
            /autoinventory 
            /delay 1s 
         } 
      /next LootCheck  
      /if (${Cursor.Value}>45000 && ${Cursor.Stackable}) { 
         /echo Keeping a ${Cursor.Name}... 
         /autoi 
         /delay 1s 
      }  

      /if (${Cursor.NoDrop}&&!${Cursor.Magic}) { 
        /echo Destroying a ${Cursor.Name}... 
        /des 
        /delay 1s 
      }  
      /if (${Cursor.NoDrop}&&${Cursor.WornSlots}<1) { 
         /echo Destroying a ${Cursor.Name}... 
         /des 
         /delay 1s 
      }  
      /if (${Cursor.ID}) { 
         /echo Dropping a ${Cursor.Name}... 
         /drop 
         /delay 1s 
      } 
/autoinventory
   /next LootSlot 
   /notify LootWnd DoneButton leftmouseup 
/return 



|-------------------------------------------------------------------------------- 
|Code: Reset 
|-------------------------------------------------------------------------------- 
Sub ResetSub 
/echo ResetSub
   /keypress esc 
   /keypress esc 
   /keypress esc 
   /keypress esc 

   /doevents 
   /delay 1 
   /attack off 
   /squelch /target clear 
   /squelch /keypress esc 

   /varset Tagged FALSE 
   /varset Snared 0
   /varset Mobstoloot 0 
   /varset AddIDCounter 1 
   /varset AddCounter 1 
   /varset TargetID 0 
   /varset TargetDead 0 
   /varset Fighting 0 

/return 

|-------------------------------------------------------------------------------- 
|Code: GM Check 
|-------------------------------------------------------------------------------- 
Sub GMCheck 
   /if ( ( ${Spawn[gm].ID} ) || ( ${Spawn[GM].ID} ) ) { 
      /delay 10s !${Me.Casting.ID} 
      /beep 
      /beep 
      /echo GM or detected in zone. 
      /echo Macro Terminating... 
      /who all GM 
      /delay 1s 
      /keypress Num_Minus
      /delay 2s
      /quit
      /endmacro 
  } 
/return 

|-------------------------------------------------------------------------------- 
|Code: Reading from an INI File 
|-------------------------------------------------------------------------------- 
Sub ReadINI(FileName,SectionName,ArrayType) 
   /echo Attempting to Read Section "${SectionName}" Zone Information from ${FileName}... 
   /delay 1s 
   /if (${Ini[${FileName},${SectionName},-1,NO].Equal[NO]}) { 
      /echo "${SectionName}" is not a Valid Section for FILE:${FileName}, ending macro... 
      /delay 1s 
      /return 
   } 
   /declare nValues int local 1 
   /declare nArray int local 0 
   /declare KeySet string local ${Ini[${FileName},${SectionName}]} 
   :CounterLoop 
   /if (${Ini[${FileName},${SectionName},${ArrayType}${nValues},NOTFOUND].Equal[NOTFOUND]}) {    
     /varcalc nValues ${nValues}-1 
      /goto :MakeArray 
   } 
   /varcalc nValues ${nValues}+1 
   /goto :CounterLoop 
   :MakeArray 
   /if (!${nValues}) /return 
   /if (${FileName.Equal["HunterMob.ini"]}&&${nValues}>0) { 
      /echo Declaring Mob Array... 
      /declare MobArray[${nValues}] string outer 
      /declare MobStats[${nValues}] string outer 
   } 
   /if (${FileName.Equal["HunterLoot.ini"]}&&${nValues}>0) { 
      /echo Declaring Loot Array... 
      /declare LootArray[${nValues}] string outer 
      /declare LootStats[${nValues}] string outer 
   } 
   /for nArray 1 to ${nValues} 
      /if (${FileName.Equal["HunterMob.ini"]}) { 
         /varset MobArray[${nArray}] ${Ini[${FileName},${SectionName},${ArrayType}${nArray}]} 
         /varset MobStats[${nArray}] 0 
      } 
      /if (${FileName.Equal["HunterLoot.ini"]}) { 
         /varset LootArray[${nArray}] ${Ini[${FileName},${SectionName},${ArrayType}${nArray}]} 
         /varset LootStats[${nArray}] 0 
      } 
   /next nArray 
   /echo "${SectionName}" Zone Information Read Successfully from ${FileName}... 
   /delay 1s 
/return 

|-------------------------------------------------------------------------------- 
|Code: Anchor 
|-------------------------------------------------------------------------------- 
Sub MoveToAnchor 
/echo MoveToAnchor
   /squelch /stick off
   /declare iCount int local 
   /varset iCount 0 
   /echo Moving to Anchor at Loc: ${AnchorY}, ${AnchorX}. 
   :AnchorMoveLoop 
   /delay 1 
   /doevents 
   /face nolook loc ${AnchorY},${AnchorX} 
   /if (${Math.Distance[${AnchorY},${AnchorX}]}>12) { 
      /keypress forward hold 
   } else { 
      /keypress forward 
      /face away nolook loc ${AnchorY},${AnchorX} 
      /return 
   } 
   /if (${iCount}>2) {
      /call CheckObstruction 
      /face nolook loc ${AnchorY},${AnchorX} 
      /varset iCount 0 
   } 
   /varcalc iCount ${iCount}+1 
   /goto :AnchorMoveLoop 
/return 

Sub CheckAnchor 
   /if (${Math.Distance[${AnchorY},${AnchorX}]}>12) /call MoveToAnchor 
/return 


|-------------------------------------------------------------------------------- 
| OBSTRUCTION: Check
|-------------------------------------------------------------------------------- 
Sub CheckObstruction
|   /if (${Debug}) ${Debug_Channel} \agIn \atCheckObstruction
   /varset MyXLOCA ${Me.X} 
   /varset MyYLOCA ${Me.Y} 

   /delay 3
   /doevents
   /if (${MyXLOCA}==${Me.X.Int} && ${MyYLOCA}==${Me.Y.Int}) {
      /if (${AdvPath.Status}==1) /play pause
      /call Obstruction
      /if (${AdvPath.Status}==2) /play unpause
   }
|   /if (${Debug}) ${Debug_Channel} \a-rLeaving \a-tCheckObstruction
/return 

|-------------------------------------------------------------------------------- 
| OBSTRUCTION: Detected
|-------------------------------------------------------------------------------- 
Sub Obstruction
   /if (${Debug}) ${Debug_Channel} \agIn \atObstruction

   /cecho \arObstruction Detected...
   /if (${Me.State.NotEqual[STAND]}) /stand
   /if (${Stick.Active}) /stick off
   /keypress forward 
   /keypress back hold 
   /delay 5
   /keypress back
   /doevents
   /if (${Math.Rand[2]}) { 
      /keypress strafe_right hold 
      /delay 1s 
      /keypress strafe_right 
   } else { 
      /keypress strafe_left hold 
      /delay 1s 
      /keypress strafe_left 
   } 
   /keypress forward
   /keypress jump   

  /if (${Debug}) ${Debug_Channel} \a-rLeaving \a-tObstruction
/return






|-------------------------------------------------------------------------------- 
|Code: Feign Death
|-------------------------------------------------------------------------------- 

Sub Feign
	/echo HP down to ${Me.PctHPs}, feigning death!
        /squelch /stick off
	:FeignLoop
        /echo FeignLoop
	/varset FeignFailed FALSE
        /keypress 6
        /squelch /target clear
	/delay 1s
        /doevents 
	/if (!${Me.Feigning} && !${Me.State.Equal[FEIGN]} || ${FeignFailed}) {
		/stand
		/goto :FeignLoop
	}
	:WaitLoop
	/if (${Me.CombatState.NotEqual[COMBAT]} && ${Me.PctHPs} > GetUpHP) {
		/stand
                /call Cast "531" alt  
		/keypress ESC
		/call MoveToAnchor
                /call resetsub
		/call RestTime
		/return
	}
	/delay 2s
	/goto :WaitLoop
/return


|-------------------------------------------------------------------------------- 
|Code: Events 
|-------------------------------------------------------------------------------- 

Sub Event_ReTarget
/echo Event ReTarget
   /squelch /attack off 
   /squelch /target clear 
   /varset Snared 0 
   /varset TargetDead 1 
   /varset Fighting 0  

   /varset Mobstoloot 0 
   /varset AddIDCounter 1 
   /varset AddCounter 1 
   /varset TargetID 0 
/return

Sub Event_Exp 
/echo Event Exp
   /varset Snared 0
   /varset Tagged FALSE 
   /varcalc Mobstoloot ${Mobstoloot}+1 
   /varcalc MobsKilled (${MobsKilled}+1)
   /echo MobsKilled: ${MobsKilled}
/return 

Sub Event_AAPoints
   /varcalc AACount (${AACount}+1)
   /echo AA points earned this session: ${AACount}
/return 

Sub Event_SnareLand 
/echo Event Snare Landed
   /varcalc Snared ${Snared}+1 
/return 

Sub Event_TagLand
/echo Event Tag Landed
  /varset Tagged TRUE 
/return

Sub Event_FeignFailed
/echo Event FeignFailed
	/varset FeignFailed TRUE
/return

Sub Event_BotsHaveAggro
  /if (!${Me.Feigning} && !${Me.State.Equal[FEIGN]}) /call Cast "822" alt
/return

Sub Event_Dead 
   /declare l2 local int
/echo Event Dead... poop.
/echo Respawning....
   /delay 2s
   /notify RespawnWnd RW_OptionsList listselect 1
   /delay 1
   /notify RespawnWnd RW_SelectButton leftmouseup
   /delay 60s

/echo Buying Soulstone
   /target A Disciple of Luclin
   /face 
   /squelch /stick uw 8
   /delay 5s
   /click right target 
   /delay 5s 

 
    /varset l2 ${Window[MerchantWnd].Child[ItemList].List[Iridescent Soulstone,2]} 
    /if (!${l2}) { 
        /echo couldn't find slot for ${Iridescent Soulstone} 
        /endm 
    } else { 
        /notify MerchantWnd ItemList listselect ${l2} 
        /delay 2 
        /notify MerchantWnd ItemList leftmouse ${l2} 
        /delay 2 
    } 

    /if (!${Window[MerchantWnd].Child[MW_SelectedItemLabel].Text.Equal[Iridescent Soulstone]}) { 
        /echo bad select 
        /beep 
        /beep 
        /beep 
        /endm 
    } 
    /delay 5 
    /ctrl /notify MerchantWnd MW_Buy_Button leftmouseup 
    /delay 5
    /ctrl /notify MerchantWnd MW_Done_Button leftmouseup
   /keypress esc
   /keypress esc
   /squelch /stick off
   /delay 5s
/echo Turning in Soulstone
   /keypress inventory 
   /call SwapItem "Iridescent Soulstone" pack8 
   /delay 3s
   /nomodkey /itemnotify ${FindItem[=Iridescent Soulstone].InvSlot} leftmouseup 
   /delay 2s
   /target A Priest of Luclin
   /face
   /delay 5s
   /squelch /stick uw 8
   /delay 6s
   /nomodkey /click left target 
   /delay 3s ${Window[GiveWnd]} 
   /nomodkey /notify GiveWnd GVW_Give_Button leftmouseup 
   /squelch /stick off
   /delay 10s
/echo Unsuspending Merc Cleric
   /if (!${Window[MMGW_ManageWnd].Open}) /merc
   /delay 5s
   /nomodkey /notify MMGW_ManageWnd MMGW_SuspendButton LeftMouseUp
   /delay 5s
/echo Waiting for Rez
 :waitforrez 
   /if (!${Window[ConfirmationDialogBox].Open}) { 
      /delay 1s
      /goto :waitforrez 
   } 
/echo Accepting Rez
   /if (${Window[ConfirmationDialogBox].Open}) /notify ConfirmationDialogBox Yes_Button leftmouseup
/echo Suspending Merc Cleric
   /nomodkey /notify MMGW_ManageWnd MMGW_SuspendButton LeftMouseUp
/echo Ending Macro!
   /endmacro
/return
 
If it works for what you want, use it.
 
Well in its current state, I would need a level 80 shadowknight. :\

So much updating needs to be done, and since it has old code for things like casting spells that are handled by spell_routines. So I'm wondering if there's just too much customization and updating to be done.