• You've discovered RedGuides 📕 an EverQuest multi-boxing community 🛡️🧙🗡️. We want you to play several EQ characters at once, come join us and say hello! 👋
  • IS THIS SITE UGLY? Change the look. To dismiss this notice, click the X --->
  • Unfortunately, yes, there is a suspension wave happening around the new tlp launch. :'( Please keep regular discussion to Suspension MegaThread and please consider submitting a Suspension report to RG.

Target problem (1 Viewer)

Jinx

New member
Joined
Mar 8, 2006
RedCents
OK I use the Puller.mac as many of you prolly have in the past or currently. And I am not having any luck fixing my problem. I keep targeting mobs above me and I need to target mobs around me. I have played with the /declare max and min Z over and over. It targets a mob above me because it is the closest say 30 and then it spams "mob is above max z range, picking another...." Now I am standing next to a mob at 80 but it just will not pick it up and pull it.

Any suggestions or has anyone worked with this in the past that can point me in the right direction?

Rich (BB code):
| Puller Macro
| Puller.mac
| Author      : Alatyami: Ripped by robdawg :Ripped by Jdelpheki :Ripped Again By hakcenter
| Version     : v3 2004-12-16 5:50pm PST
| Useage      : /macro pull
| Description : This macro will run your character around Pulling any mobs.
|      This is definitely a work in progress and I am sure
|      someone can think of plenty of upgrades for this.
| : Ripped section Jdelpheki
|      Modified for pull to area where Macro is started.  I have been using this
|      2 level 45's Cleric Running genbot and Warrior running Pull2.  Ran for 4 hours
|      Max with one cleric death. Needs Throwing weapon or arch support too
|      Needs Genbot to announce its getting hit or get a new cleric script
| : Ripped section hakcenter
|      Pulls Any Mobs within radius (regardless of level)
|      No Mob Array Required
|      Looting Added
|      *Looting -stuck on corpse bug fixed-
|      Loot Table Array Support
|      *Puller runs to pull spot after mob looting is finished
|      *Removed Target Fail Counters
|      *Checks for mobs every 30seconds, 1second 50radius checks
|      *Reformated
|      *On zoning(death whatever), quits everquest
|      *Added more checks
|
|      2004-12-11
|
|      Added some squelching, always looking for mobs within range, 5 distance intervals
|      Jacked Item Coding from Rogue Helper
|      Fixed UI locking up
|      Fixed Long Buff Casts
|      Added Disarm to the Special Combat abilities
|
|      2004-12-16
|      Revamped Close mob checking to 0.1second 100radius squelched
|      Revamped Item casting to check for local mobs during.. and interupt if mob is near 100radius
|      Removed mass escaping.. cause its retarded
|      Fixed cool errors when accidently pushing esc while on a mob
|      Fixed cool errors when accidently pushing esc while pulling a mob
|      Added 1second before first item cast, incase item is worn... you get interupted cause its too fast
|
|------------------------------------------------------------------------------------

#turbo 10
#include AutoLooter.inc
#include Exp_Tracking.inc
#Event Slain "#*# slain#*#"
#Event Zoned "LOADING, PLEASE WAIT..."
#Event ItemSet "[MQ2] ItemSet#*#"
#Event ItemBounce "[MQ2] ItemBounce#*#"
#Event ItemCast "[MQ2] ItemCast#*#"

Sub Main

   |------------------------------------------------------------
   |How far would you like to target a mob?
   |------------------------------------------------------------
   /declare RV_MaxRadius        int outer  100
   |------------------------------------------------------------
   |How far is the fast movement range?
   |------------------------------------------------------------
   /declare RV_FastRange        int outer  100
   |------------------------------------------------------------
   |How far is the maximum combat range?
   |------------------------------------------------------------
   /declare RV_RangeMax         int outer  7
   |------------------------------------------------------------
   |How far is the minimum combat range?
   |------------------------------------------------------------
   /declare RV_RangeMin         int outer  8
   |------------------------------------------------------------
   |What is the minimum Z Value of mobs I should target?
   |------------------------------------------------------------
   /declare RV_MinZRange        int outer  -10
   |------------------------------------------------------------
   |What is the maximum Z Value of mobs I should target?
   |------------------------------------------------------------
   /declare RV_MaxZRange        int outer  30

   |------------------------------------------------------------
   |Variables that you don't need to worry about.
   |------------------------------------------------------------
   /declare RV_MyTargetID       int outer  0
   /declare RV_MyTargetName     string outer
   /declare RV_MyTargetDead     int outer  0
   /declare RV_InvalidTargetID  int outer  0
   /declare RV_HasTarget        int outer  0
   /declare RV_RandomWait       int outer  0
   /declare RV_LootSlot         int outer  0
   /declare RV_CheckLook        int outer  0
   /declare RV_Fighting         int outer  0
   /declare RV_TargetDead       int outer  0
   /declare RV_MyXLOC           int outer  0
   /declare RV_MyYLOC           int outer  0
   /declare RV_ObstacleCount    int outer  0
   /declare RV_hitcount         int outer  0
   /declare RV_healcheck        int outer  0
   /declare RT_MyXLOC           int outer  ${Me.X}
   /declare RT_MyyLOC           int outer  ${Me.Y}

   /declare lastevent string outer None
   /declare CheckBuffs int outer 0
   /declare i int outer
   /declare ialias string outer None
   /declare doIclick bool outer FALSE
   /declare bouncenum int outer 1
   /declare ibounce string outer None
   /declare itemspellname string outer None
   /declare clicktimer timer outer 0
   /squelch /alias /iset /echo ItemSet
   /squelch /alias /ibounce /echo ItemBounce
   /squelch /alias /iclick /echo ItemCast

   /varset CheckBuffs 1
   /call ExpPrep
   :Start
      /doevents
      /call GMCheck
      /call GetTarget
      /if (${RV_HasTarget}) /call Pull
      /if (${RV_HasTarget}) /call CombatSub
      /call ResetSub
      /call MoveToLoc ${RT_MyyLOC} ${RT_MyXLOC}
      /goto :Start
/return

|--------------------------------------------------------------------------------
|SUB: GMCheck
|--------------------------------------------------------------------------------
Sub GMCheck
   /if (${Spawn[gm].ID}) {
      /beep
      /beep
      /beep
      /echo GM has entered the zone!
      /echo FUCK HIM but ending the macro...
      /keypress forward
      /keypress back
      /quit
      /endmacro
   }
/return

|--------------------------------------------------------------------------------
|SUB: AquireTarget
|--------------------------------------------------------------------------------
Sub GetTarget
   /doevents
   /declare SpawnTimer         int local
   /declare RV_CurrentRadius   int local
   /declare RV_TargetSub       int local
   /echo Looking for Close Range Mobs
   :Acquire
      /doevents
      /for RV_CurrentRadius 100 to ${RV_MaxRadius} step 5
      /squelch /target radius ${RV_CurrentRadius} npc
      /varset RV_MyTargetID ${Target.ID}
      /varset RV_MyTargetDead 0
      /if (${Target.ID}) {
         /if (${Int[${Target.Z}]}<${RV_MinZRange}) {
            /echo Mob is BELOW Min Z Range, picking another...
            /varset RV_InvalidTargetID ${Target.ID}
            /call ResetSub
            /goto :Acquire
         }
         /if (${Int[${Target.Z}]}>${RV_MaxZRange}) {
            /echo Mob is ABOVE Max Z Range, picking another...
            /varset RV_InvalidTargetID ${Target.ID}
            /call ResetSub
            /goto :Acquire
         }
         /varset RV_HasTarget 1
         /varset RV_MyTargetName ${Target.Name}
         /echo Acquired ${Target.Name} at range ${Int[${Target.Distance}]}
         /return
      }

      /next RV_CurrentRadius
      /goto :Acquire
/return

|--------------------------------------------------------------------------------
|SUB: Pull
|--------------------------------------------------------------------------------
Sub Pull
   /doevents
   /echo Pulling Mob
   /declare TargDist float local
   :PullLoop
      /doevents
      /if (!${Me.Combat}) /attack on
      /call MoveToMob
      /if (!${Target.ID}) /return
      /face fast
      /if (${Target.PctHPs}==100) /goto :PullLoop
      /if (${Target.PctHPs}<21) /return
      /call MoveToLoc ${RT_MyyLOC} ${RT_MyXLOC}
      /if (!${Target.ID}) /return
      /face fast
   :Engage
      /varset TargDist ${Math.Distance[${Target.Y},${Target.X},0:${Me.Y},${Me.X},0]}
      /if ( ${TargDist}<30 ) /return
      /delay 1s
      /goto :Engage
/return

|--------------------------------------------------------------------------------
|SUB: MovetoMob
|--------------------------------------------------------------------------------
Sub MoveToMob
   /doevents
   /varset RV_MyXLOC ${Int[${Me.X}]}
   /varset RV_MyYLOC ${Int[${Me.Y}]}
   /varset RV_ObstacleCount 0
   :MovementLoop
      /doevents
      /if (!${Target.ID}) /return
      /face fast
      /varcalc RV_ObstacleCount ${RV_ObstacleCount}+1
      /if (${Int[${Target.Distance}]}>${RV_FastRange}) /keypress forward hold
      /if (${Int[${Target.Distance}]}<${RV_FastRange}&&${Int[${Target.Distance}]}>${RV_RangeMax}) /keypress forward
      /if (${Int[${Target.Distance}]}<${RV_RangeMin}) /keypress back
      /if (${RV_ObstacleCount}>=15) {
         /call CheckObstacle
         /goto :Movementloop
      }
      /if (${Int[${Target.Distance}]}>${RV_FastRange}) /goto :MovementLoop
/return

|--------------------------------------------------------------------------------
|SUB: MoveToLocation
|--------------------------------------------------------------------------------
Sub MoveToLoc(MoveToY, MoveToX)
   /doevents
   /declare running int local
   /declare distanceNow float local
   /declare distanceBefore float local
   /declare distanceModifier int local
   /declare distanceTimer timer 15
   /varset running 0
   /varset distanceBefore ${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}
   /varset distanceModifier 1
   /echo Moving to Location: ${MoveToY}, ${MoveToX}.
   /echo Distance: ${distanceBefore}
   :moveToLocation
      /doevents
      /face fast nolook loc ${MoveToY},${MoveToX}
      /if (${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}<10) {
         /keypress forward
         /return
      }
      /if (${distanceTimer}==0) {
         /if (${Me.Sneaking}) {
            /varset distanceModifier 2
         } else {
            /varset distanceModifier 1
         }
         /varset distanceNow ${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}
         /if (${Math.Calc[${distanceBefore}-${distanceNow}]}<${Math.Calc[10/${distanceModifier}]}) {
         /call HitObstacle
         }
         /varset distanceBefore ${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}
         /varset distanceTimer 15
      }
      /if (${running}==0) {
         /keypress forward
            /if (${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}>10) {
               /varset running 1
               /keypress forward hold
            }
      } else {
         /if (${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}<11) {
            /varset running 0
            /keypress forward
         }
      }
      /goto :moveToLocation
/return

|--------------------------------------------------------------------------------
|SUB: ObstacleCheck
|--------------------------------------------------------------------------------
Sub CheckObstacle
   /doevents
   /if ((${RV_MyXLOC}==${Int[${Me.X}]})&&(${RV_MyYLOC}==${Int[${Me.Y}]})) /call HitObstacle
   /varset RV_MyXLOC ${Int[${Me.X}]}
   /varset RV_MyYLOC ${Int[${Me.Y}]}
   /varset RV_ObstacleCount 0
/return

|--------------------------------------------------------------------------------
|SUB: ObstacleAvoidance
|--------------------------------------------------------------------------------
Sub HitObstacle
   /echo Obstacle hit, moving around it...
   /keypress forward
   /keypress back hold
   /delay 3
   /keypress back
   /if (${Math.Rand[2]}) {
      /keypress strafe_right hold
   } else {
      /keypress strafe_left hold
   }
   /delay 5
   /keypress strafe_right
   /keypress strafe_left
   /keypress forward hold
/return

|--------------------------------------------------------------------------------
|SUB: Combat
|--------------------------------------------------------------------------------
Sub CombatSub
   /doevents
   /varset RV_Fighting 1
   /varset RV_TargetDead 0
   /echo Attacking Mob NOW!
   :CombatLoop
      /if (!${Me.Combat}) /attack on
      /if (!${Target.ID}) /return
      /call MoveToMob
      /call SpecialIT
      /if (!${RV_TargetDead}) /goto :CombatLoop
      /doevents
/return

|--------------------------------------------------------------------------------
|SUB: SpecialCombat
|--------------------------------------------------------------------------------
Sub SpecialIt
   /doevents
   /declare TempID    int inner  0
   /if (${Target.Distance}<=17 && ${Me.AbilityReady[Kick]}) {
      /doability "Kick"
   }
   /if (${Target.Distance}<=17 && ${Me.AbilityReady[Disarm]}) {
      /doability "Disarm"
   }
   /if (${Target.Distance}<=17 && ${Me.AbilityReady[Taunt]}) {
      /doability "Taunt"
   }
   /if (${Target.Distance}<=17 && ${Me.AbilityReady[Bash]}) {
      /doability "Bash"
   }
/return

|--------------------------------------------------------------------------------
|SUB: Slain
|--------------------------------------------------------------------------------

Sub Event_Slain
   /varset RV_TargetDead 1
   /varset RV_Fighting 0
   /attack off
   /call ExpTrack
   /target clear
   /keypress forward
   /keypress back
   /squelch /target radius 30 corpse
   /face fast
   /if (${RV_HasTarget}) /call AutoLoot
/return

|--------------------------------------------------------------------------------
|SUB: Zoned
|--------------------------------------------------------------------------------
Sub Event_Zoned
  /echo Zoned
  /delay 60s
  /quit
  /endmacro

|--------------------------------------------------------------------------------
|SUB: Looting
|--------------------------------------------------------------------------------
Sub LootMob
   /doevents
   /call AutoLoot
/return

|--------------------------------------------------------------------------------
|SUB: Reset
|--------------------------------------------------------------------------------
Sub ResetSub
   /doevents
   /varset RV_HasTarget 0
   /varset RV_TargetDead 0
   /varset RV_Fighting 0
/return
 
Last edited:
The sub AquireTarget is seriously over kill.

The whole sub can be reduced to one line.

/target npc los radius # zradius # range <minLevel#> <maxLevel#>

The way it is built now, it keeps searching for an npc by just increasing the radius. The problem is the first mob in the radius is the one it always finds, then determines it is outside the z range. Not to mention the /goto send you back outside the "for loop" making you do the identical search over and over.
 
OK I changed the Aquire target in the mac above and I commented out Gettarget.

here is what happens- It spams the following. Like I said I don't know much about macro language.

" Moving to Location: x, y"
" Distance: .15"
 
Put the original code back so I can review it :)

Also, it was calling GetTarget, but the sub was called AquireTarget?

When you changed the sub contents, you also removed the "Sub GetTarget" enclosing line

Sub GetTarget
/target npc los radius 110 zradius 10 range 1 80
/return

And dont block out the call to GetTarget, it still has to be called to execute the /target
 
OK EQ here is the code that is working. Woot. Thx for your help.

Rich (BB code):
| Puller Macro
| Puller.mac
| Author      : Alatyami: Ripped by robdawg :Ripped by Jdelpheki :Ripped Again By hakcenter
| Version     : v3 2004-12-16 5:50pm PST
| Useage      : /macro pull
| Description : This macro will run your character around Pulling any mobs.
|      This is definitely a work in progress and I am sure
|      someone can think of plenty of upgrades for this.
| : Ripped section Jdelpheki
|      Modified for pull to area where Macro is started.  I have been using this
|      2 level 45's Cleric Running genbot and Warrior running Pull2.  Ran for 4 hours
|      Max with one cleric death. Needs Throwing weapon or arch support too
|      Needs Genbot to announce its getting hit or get a new cleric script
| : Ripped section hakcenter
|      Pulls Any Mobs within radius (regardless of level)
|      No Mob Array Required
|      Looting Added
|      *Looting -stuck on corpse bug fixed-
|      Loot Table Array Support
|      *Puller runs to pull spot after mob looting is finished
|      *Removed Target Fail Counters
|      *Checks for mobs every 30seconds, 1second 50radius checks
|      *Reformated
|      *On zoning(death whatever), quits everquest
|      *Added more checks
|
|      2004-12-11
|
|      Added some squelching, always looking for mobs within range, 5 distance intervals
|      Jacked Item Coding from Rogue Helper
|      Fixed UI locking up
|      Fixed Long Buff Casts
|      Added Disarm to the Special Combat abilities
|
|      2004-12-16
|      Revamped Close mob checking to 0.1second 100radius squelched
|      Revamped Item casting to check for local mobs during.. and interupt if mob is near 100radius
|      Removed mass escaping.. cause its retarded
|      Fixed cool errors when accidently pushing esc while on a mob
|      Fixed cool errors when accidently pushing esc while pulling a mob
|      Added 1second before first item cast, incase item is worn... you get interupted cause its too fast
|
|------------------------------------------------------------------------------------

#turbo 10
#include AutoLooter.inc
#include Exp_Tracking.inc
#Event Slain "#*# slain#*#"
#Event Zoned "LOADING, PLEASE WAIT..."
#Event ItemSet "[MQ2] ItemSet#*#"
#Event ItemBounce "[MQ2] ItemBounce#*#"
#Event ItemCast "[MQ2] ItemCast#*#"

Sub Main

   |------------------------------------------------------------
   |How far would you like to target a mob?
   |------------------------------------------------------------
   |/declare RV_MaxRadius        int outer  100
   |------------------------------------------------------------
   |How far is the fast movement range?
   |------------------------------------------------------------
   /declare RV_FastRange        int outer  10
   |------------------------------------------------------------
   |How far is the maximum combat range?
   |------------------------------------------------------------
   /declare RV_RangeMax         int outer  7
   |------------------------------------------------------------
   |How far is the minimum combat range?
   |------------------------------------------------------------
   /declare RV_RangeMin         int outer  8
   |------------------------------------------------------------
   |What is the minimum Z Value of mobs I should target?
   |------------------------------------------------------------
   |/declare RV_MinZRange        int outer  -10
   |------------------------------------------------------------
   |What is the maximum Z Value of mobs I should target?
   |------------------------------------------------------------
   |/declare RV_MaxZRange        int outer  30

   |------------------------------------------------------------
   |Variables that you don't need to worry about.
   |------------------------------------------------------------
   /declare RV_MyTargetID       int outer  0
   /declare RV_MyTargetName     string outer
   /declare RV_MyTargetDead     int outer  0
   /declare RV_InvalidTargetID  int outer  0
   /declare RV_HasTarget        int outer  0
   /declare RV_RandomWait       int outer  0
   /declare RV_LootSlot         int outer  0
   /declare RV_CheckLook        int outer  0
   /declare RV_Fighting         int outer  0
   /declare RV_TargetDead       int outer  0
   /declare RV_MyXLOC           int outer  0
   /declare RV_MyYLOC           int outer  0
   /declare RV_ObstacleCount    int outer  0
   /declare RV_hitcount         int outer  0
   /declare RV_healcheck        int outer  0
   /declare RT_MyXLOC           int outer  ${Me.X}
   /declare RT_MyyLOC           int outer  ${Me.Y}

   /declare lastevent string outer None
   /declare CheckBuffs int outer 0
   /declare i int outer
   /declare ialias string outer None
   /declare doIclick bool outer FALSE
   /declare bouncenum int outer 1
   /declare ibounce string outer None
   /declare itemspellname string outer None
   /declare clicktimer timer outer 0
   /squelch /alias /iset /echo ItemSet
   /squelch /alias /ibounce /echo ItemBounce
   /squelch /alias /iclick /echo ItemCast

   /varset CheckBuffs 1
   /call ExpPrep
   :Start
      /doevents
      /call GMCheck
      /call GetTarget
      /if (${RV_HasTarget}) /call Pull
      /if (${RV_HasTarget}) /call CombatSub
      /call ResetSub
      /call MoveToLoc ${RT_MyyLOC} ${RT_MyXLOC}
      /goto :Start
/return

|--------------------------------------------------------------------------------
|SUB: GMCheck
|--------------------------------------------------------------------------------
Sub GMCheck
   /if (${Spawn[gm].ID}) {
      /beep
      /beep
      /beep
      /echo GM has entered the zone!
      /echo FUCK HIM but ending the macro...
      /keypress forward
      /keypress back
      /quit
      /endmacro
   }
/return

|--------------------------------------------------------------------------------
|SUB: AquireTarget
|--------------------------------------------------------------------------------
Sub GetTarget
/target npc los radius 190 zradius 10 range 1 80
   /doevents
   /declare SpawnTimer         int local
   /declare RV_CurrentRadius   int local
   /declare RV_TargetSub       int local
   /echo Looking for Close Range Mobs
|   :Acquire
|      /doevents
|      /for RV_CurrentRadius 100 to ${RV_MaxRadius} step 5
|      /squelch /target radius ${RV_CurrentRadius} npc
|      /varset RV_MyTargetID ${Target.ID}
|      /varset RV_MyTargetDead 0
|      /if (${Target.ID}) {
|         /if (${Int[${Target.Z}]}<${RV_MinZRange}) {
|            /echo Mob is BELOW Min Z Range, picking another...
|            /varset RV_InvalidTargetID ${Target.ID}
|            /call ResetSub
|            /goto :Acquire
|         }
|         /if (${Int[${Target.Z}]}>${RV_MaxZRange}) {
|            /echo Mob is ABOVE Max Z Range, picking another...
|            /varset RV_InvalidTargetID ${Target.ID}
|            /call ResetSub
|            /goto :Acquire
         }
         /varset RV_HasTarget 1
         /varset RV_MyTargetName ${Target.Name}
         /echo Acquired ${Target.Name} at range ${Int[${Target.Distance}]}
         /return
      }

      /next RV_CurrentRadius
      /goto :Acquire
/return

|--------------------------------------------------------------------------------
|SUB: Pull
|--------------------------------------------------------------------------------
Sub Pull
   /doevents
   /echo Pulling Mob
   /declare TargDist float local
   :PullLoop
      /doevents
      /if (!${Me.Combat}) /attack on
      /call MoveToMob
      /if (!${Target.ID}) /return
      /face fast
      /if (${Target.PctHPs}==100) /goto :PullLoop
      /if (${Target.PctHPs}<21) /return
      /call MoveToLoc ${RT_MyyLOC} ${RT_MyXLOC}
      /if (!${Target.ID}) /return
      /face fast
   :Engage
      /varset TargDist ${Math.Distance[${Target.Y},${Target.X},0:${Me.Y},${Me.X},0]}
      /if ( ${TargDist}<30 ) /return
      /delay 1s
      /goto :Engage
/return

|--------------------------------------------------------------------------------
|SUB: MovetoMob
|--------------------------------------------------------------------------------
Sub MoveToMob
   /doevents
   /varset RV_MyXLOC ${Int[${Me.X}]}
   /varset RV_MyYLOC ${Int[${Me.Y}]}
   /varset RV_ObstacleCount 0
   :MovementLoop
      /doevents
      /if (!${Target.ID}) /return
      /face fast
      /varcalc RV_ObstacleCount ${RV_ObstacleCount}+1
      /if (${Int[${Target.Distance}]}>${RV_FastRange}) /keypress forward hold
      /if (${Int[${Target.Distance}]}<${RV_FastRange}&&${Int[${Target.Distance}]}>${RV_RangeMax}) /keypress forward
      /if (${Int[${Target.Distance}]}<${RV_RangeMin}) /keypress back
      /if (${RV_ObstacleCount}>=15) {
         /call CheckObstacle
         /goto :Movementloop
      }
      /if (${Int[${Target.Distance}]}>${RV_FastRange}) /goto :MovementLoop
/return

|--------------------------------------------------------------------------------
|SUB: MoveToLocation
|--------------------------------------------------------------------------------
Sub MoveToLoc(MoveToY, MoveToX)
   /doevents
   /declare running int local
   /declare distanceNow float local
   /declare distanceBefore float local
   /declare distanceModifier int local
   /declare distanceTimer timer 15
   /varset running 0
   /varset distanceBefore ${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}
   /varset distanceModifier 1
   /echo Moving to Location: ${MoveToY}, ${MoveToX}.
   /echo Distance: ${distanceBefore}
   :moveToLocation
      /doevents
      /face fast nolook loc ${MoveToY},${MoveToX}
      /if (${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}<10) {
         /keypress forward
         /return
      }
      /if (${distanceTimer}==0) {
         /if (${Me.Sneaking}) {
            /varset distanceModifier 2
         } else {
            /varset distanceModifier 1
         }
         /varset distanceNow ${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}
         /if (${Math.Calc[${distanceBefore}-${distanceNow}]}<${Math.Calc[10/${distanceModifier}]}) {
         /call HitObstacle
         }
         /varset distanceBefore ${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}
         /varset distanceTimer 15
      }
      /if (${running}==0) {
         /keypress forward
            /if (${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}>10) {
               /varset running 1
               /keypress forward hold
            }
      } else {
         /if (${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}<11) {
            /varset running 0
            /keypress forward
         }
      }
      /goto :moveToLocation
/return

|--------------------------------------------------------------------------------
|SUB: ObstacleCheck
|--------------------------------------------------------------------------------
Sub CheckObstacle
   /doevents
   /if ((${RV_MyXLOC}==${Int[${Me.X}]})&&(${RV_MyYLOC}==${Int[${Me.Y}]})) /call HitObstacle
   /varset RV_MyXLOC ${Int[${Me.X}]}
   /varset RV_MyYLOC ${Int[${Me.Y}]}
   /varset RV_ObstacleCount 0
/return

|--------------------------------------------------------------------------------
|SUB: ObstacleAvoidance
|--------------------------------------------------------------------------------
Sub HitObstacle
   /echo Obstacle hit, moving around it...
   /keypress forward
   /keypress back hold
   /delay 3
   /keypress back
   /if (${Math.Rand[2]}) {
      /keypress strafe_right hold
   } else {
      /keypress strafe_left hold
   }
   /delay 5
   /keypress strafe_right
   /keypress strafe_left
   /keypress forward hold
/return

|--------------------------------------------------------------------------------
|SUB: Combat
|--------------------------------------------------------------------------------
Sub CombatSub
   /doevents
   /varset RV_Fighting 1
   /varset RV_TargetDead 0
   /echo Attacking Mob NOW!
   :CombatLoop
      /if (!${Me.Combat}) /attack on
      /if (!${Target.ID}) /return
      /call MoveToMob
      /call SpecialIT
      /if (!${RV_TargetDead}) /goto :CombatLoop
      /doevents
/return

|--------------------------------------------------------------------------------
|SUB: SpecialCombat
|--------------------------------------------------------------------------------
Sub SpecialIt
   /doevents
   /declare TempID    int inner  0
   /if (${Target.Distance}<=17 && ${Me.AbilityReady[Kick]}) {
      /doability "Kick"
   }
   /if (${Target.Distance}<=17 && ${Me.AbilityReady[Disarm]}) {
      /doability "Disarm"
   }
   /if (${Target.Distance}<=17 && ${Me.AbilityReady[Taunt]}) {
      /doability "Taunt"
   }
   /if (${Target.Distance}<=17 && ${Me.AbilityReady[Bash]}) {
      /doability "Bash"
   }
/return

|--------------------------------------------------------------------------------
|SUB: Slain
|--------------------------------------------------------------------------------

Sub Event_Slain
   /varset RV_TargetDead 1
   /varset RV_Fighting 0
   /attack off
   /call ExpTrack
   /target clear
   /keypress forward
   /keypress back
   /squelch /target radius 30 corpse
   /face fast
   /if (${RV_HasTarget}) /call AutoLoot
/return

|--------------------------------------------------------------------------------
|SUB: Zoned
|--------------------------------------------------------------------------------
Sub Event_Zoned
  /echo Zoned
  /delay 60s
  /quit
  /endmacro

|--------------------------------------------------------------------------------
|SUB: Looting
|--------------------------------------------------------------------------------
Sub LootMob
   /doevents
   /call AutoLoot
/return

|--------------------------------------------------------------------------------
|SUB: Reset
|--------------------------------------------------------------------------------
Sub ResetSub
   /doevents
   /varset RV_HasTarget 0
   /varset RV_TargetDead 0
   /varset RV_Fighting 0
/return
 
Target problem

Users who are viewing this thread

Back
Top