Code: Select all
#turbo
Sub Main
:Loop
/if (${Target.Distance}>60) /keypress forward hold
/if (${Target.Distance}<40) /keypress forward
/face fast
/if (${Target.ID}) /goto :Loop
/return
Moderator: MacroQuest Developers
Code: Select all
#turbo
Sub Main
:Loop
/if (${Target.Distance}>60) /keypress forward hold
/if (${Target.Distance}<40) /keypress forward
/face fast
/if (${Target.ID}) /goto :Loop
/return

Code: Select all
| /macro follow <distance>
Sub Main
/declare TheDistance global
/varset TheDistance @Param0
/if (!${Defined[Param0]}) {
/varset TheDistance 20
/echo Using default distance of 20
/echo Useage: /macro follow <distance>
}
/popup I am following ${Target.Name}
:Loop
/if (${Target.Distance}>@TheDistance) /keypress forward hold
/if (${Target.Distance}<@TheDistance) /keypress forward
/if (${Target.Distance}<=${Math.Calc[@TheDistance-5]}) /keypress back hold
/face fast
/if (${Target.ID}) /goto :Loop
:Stopping
/keypress forward
/popup I stopped following !!
/return
Would just like to add:bob_the_builder wrote:#turbo is implied default #turbo 20
And if were re doing it give it a Param0
/mac follow 20Code: Select all
| /macro follow <distance> Sub Main /declare TheDistance global /varset TheDistance @param0 :Loop /if (${Target.Distance}>@TheDistance) /keypress forward hold /if (${Target.Distance}<@TheDistance) /keypress forward /if (${Target.Distance}<=${Math.Calc[@TheDistance-5]}) /keypress back hold /face fast /if (${Target.ID}) /goto :Loop /return
Bob
Code: Select all
/if (!${Defined[Param0]}) /return |Or do something about no paramCode: Select all
| /macro follow <distance>
Sub Main
/declare TheDistance global
/varset TheDistance @Param0
/if (!${Defined[Param0]}) /varset TheDistance 10
:Loop
/if (${Target.Distance}>@TheDistance) /keypress forward hold
/if (${Target.Distance}<@TheDistance) /keypress forward
/if (${Target.Distance}<=${Math.Calc[@TheDistance-5]}) /keypress back hold
/face fast nolook
/if (${Target.ID}) /goto :Loop
/keypress forward
/return
Code: Select all
| /macro follow <distance>
Sub Main
/declare TheDistance outer
/varset TheDistance ${Param0}
/if (!${Defined[Param0]}) /varset TheDistance 10
:Loop
/if (${Target.Distance}>${TheDistance}) /keypress forward hold
/if (${Target.Distance}<${TheDistance}) /keypress forward
/if (${Target.Distance}<=${Math.Calc[${TheDistance}-5]}) /keypress back hold
/face fast nolook
/if (${Target.ID}) /goto :Loop
/keypress forward
/return