Moderator: MacroQuest Developers
Code: Select all
sub Main
/goto :wait
/return
:wait
/if n $char(ability,"Backstab")!=-2 /goto :position
/goto :wait
:position
/varset v0 $target(heading)
/varcalc v1 $v0+485
/varcalc v2 $v0+515
/goto :positionsub
:positionsub
/varcalc v3 $char(heading)+500
/sendkey down ctrl
/if n $target(distance)>40 /sendkey down up
/if n $target(distance)<20 /sendkey up up
/face fast
/if n "$v3"<"$v1"||"$v3">"$v2") /sendkey down left
/if n ("$v3"=>"$v1"&&"$v3"<="$v2") /goto :backstab
/goto :positionsub
:backstab
/sendkey up ctrl
/sendkey up left
/echo $v0 target heading
/echo $v1 target heading +485
/echo $v2 target heading +515
/echo $v3 my heading
|/doability "Backstab"
/echo backstabin!
/end
/goto :wait
Code: Select all
#turbo 25
sub Main
:wait
/if n $char(ability,"Backstab")!=-2 /goto :position
/goto :wait
:position
/varset v0 $target(heading)
/varcalc v1 $v0+485
/varcalc v2 $v0+515
:positionsub
/varcalc v3 $char(heading)+500
/sendkey down ctrl
/if n $target(distance)>40 /sendkey down up
/if n $target(distance)<20 /sendkey up up
/face fast
/if n ("$v3"<"$v1"||"$v3">"$v2") /sendkey down left
/if n ("$v3">="$v1"&&"$v3"<="$v2") /goto :backstab
/goto :positionsub
:backstab
/sendkey up ctrl
/sendkey up left
/echo $v0 target heading
/echo $v1 target heading +485
/echo $v2 target heading +515
/echo $v3 my heading
/doability "Backstab"
/echo backstabin!
/goto :wait
/returnCode: Select all
|gets behind a target and backstabs.
|the moving behind the target was taken from grijack's movebehind.mac |
| movebehind.mac
| moves you behind current target and faces.
| Many parts where or are taken from macroquest2.com in the
| macro depot
#turbo 25
sub Main
/varset v1 $p0
/if "$p0"=="" {
/varset v1 7.5s
/echo you can define the amount of time for your BS refresh: /macro backstab 7.5s. The default timer is 7.6 seconds.
}
:wait
/if n $t1==0 /goto :position
/goto :wait
:position
/if n $distance($calc($target(y)-$cos($target(heading))*10),$calc($target(x)-$sin($target(heading))*10))<3 /goto :doublecheck
/sendkey down up
:gotopointloop
/if $target()==FALSE {
/attack off
/sendkey up up
/goto :wait
}
/face fast loc $calc($target(y)-$cos($target(heading))*10),$calc($target(x)-$sin($target(heading))*10)
/if n $distance($calc($target(y)-$cos($target(heading))*10),$calc($target(x)-$sin($target(heading))*10))>1 /goto :gotopointloop
/sendkey up up
/face fast nopredict
/goto :doublecheck
:doublecheck
/if n $distance($calc($target(y)-$cos($target(heading))*10),$calc($target(x)-$sin($target(heading))*10))<10 /goto :backstab
/goto :position
:backstab
/sendkey up ctrl
/sendkey up left
/if $t1==0 {
/doability "Backstab"
/varset t1 $v1
}
/goto :wait
/return
||||just some of my old code which I don't want to delete|||
|***
/if n "$abs($calc($calc($target(heading)+500)-$calc($char(heading)+500)))"<="40" {
/if "$target(distance)"<="15" /echo yup
}
/echo "$abs($calc($calc($target(heading)+500)-$calc($char(heading)+500)))"<="40" && "$target(distance)"<="15"
**|Just so you know, I did not come up with that. I got it from this post.Kint wrote:this one works correctly(tested). Unfortunatley, it can't do what you want it to do, whoch is get behind the mob and BS it solo. Infact, I don't think that's possible. By hand I ran behind my mob and typed /face fast, and then hit backstab. It didn't even think I was behind the mob. If you were to maybe stun the mob, or catch it casting, this one would work, but other then that no solo BSing.
this uses grimjacks getbehind system (would never have though to use trig). it will BS every 7.6 seconds if you're behind the mob.