Please let me know how I could clean it up.
Code: Select all
|Chase.mac -- 1/25/2004
|
|Parts stolen from Bash.mac ieatacid
|Parts stolen from Hunter.mac grimjack
|
|Once combat is started you will stay 15 from your target.
|If attacking from range with a bow it will not close to the target.
|Presses bash and taunt so you don't have to.
Sub Main
/echo chase.mac Started....
/declare RangeLong global
/declare RangeMax global
/declare RangeMin global
/declare FastRange global
/declare MyXLOC global
/declare MyYLOC global
/varset RangeLong 25
/varset RangeMax 15
/varset RangeMin 10
/varset FastRange 14
:Start
/if $combat=="TRUE" {
/if n $target(distance)=<@RangeMax /call BashLoop
}
/if $combat=="TRUE" {
/if n $target(distance)<@RangeLong {
/if n $target(distance)>@RangeMax /call MoveToMob
}
}
/goto :start
/return
Sub MoveToMob
/face fast
/if n $target(distance)>=@FastRange /call Fastmove
/if n $target(distance)>@RangeMax {
/press up
}
/if n $target(distance)<@RangeMin {
/press down
}
/return
Sub Fastmove
/varset MyXLOC $char(x)
/varset MyYLOC $char(y)
:fastmoveloop
/if $target()=="FALSE" {
/sendkey up up
/if $combat=="TRUE" {
/attack off
/return
}
}
/face fast
/if n $target(distance)>@FastRange {
/sendkey down up
}
/if n $target(distance)<=@FastRange {
/sendkey up up
/return
}
/goto :fastmoveloop
/return
Sub BashLoop
/if $combat=="TRUE" {
/if n $char(ability,"Bash")>0 /doability "Slam"
}
{
/if n $char(ability,"Taunt")>0 /doability "Taunt"
}
/return
