this works, but ...
Code: Select all
Sub Do-turn
/if n $spawn(@MyTarget,distance)<=10 /press down
/declare newHeading local
/if n $spawn($spawn($id(necroCharName),pet),heading)>=180 {
/varset newHeading $calc($spawn($spawn($id(necroCharName),pet),heading)-180)
} else {
/varset newHeading $calc($spawn($spawn($id(necroCharName),pet),heading)+180)
}
/face fast
/if n $char(heading)>$calc(@newHeading+20) {
/sendkey down ctrl
/press left
/face fast
/press left
/sendkey up ctrl
}
/if n $char(heading)<$calc(@newHeading-20) {
/sendkey down ctrl
/press right
/face fast
/press right
/sendkey up ctrl
}
/return
is that possible? I'm not completely familiar with the heading things and such
Thanks!
*edit maybe someone just needs to break down cos acos and sin cause i have no idea what they do =P
/if n $distance($calc($target(y)-$cos($target(heading))*10),$calc($target(x)-$sin($target(heading))*10))<3 {
