As always thank you to all the people who's code I used in learning and for parts of this script. And also thank you to the people who put time into the documentation and posts on this forum.
Code: Select all
Sub Main
/attack on
/call combatsub
/return
Sub combatsub
:combatloop
/if $target()==FALSE {
/attack off
/sendkey up up
/endmacro
}
/if n $distance($calc($target(y)-$cos($target(heading))*10),$calc($target(x)-$sin($target(heading))*10))>15 {
/call behindsub
/goto :combatloop
}
/face
/if n $char(ability,"Backstab")!=-2 {
/if n $distance($calc($target(y)-$cos($target(heading))*10),$calc($target(x)-$sin($target(heading))*10))>15 {
/call behindsub
/goto :combatloop
}
/doability "Backstab"
}
/if n $char(ability,"Hide")!=-2 {
/if $target()==TRUE {
/attack off
/doability "Hide"
/doability "Pick Pockets"
/attack
}
}
/goto :combatloop
/return
Sub behindsub
/if $target()==FALSE {
/attack off
/sendkey up up
/endmacro
}
/sendkey down up
:gotopointloop
/if $target()==FALSE {
/attack off
/sendkey up up
/endmacro
}
/face fast loc $calc($target(y)-$cos($target(heading))*12),$calc($target(x)-$sin($target(heading))*12)
/if n $distance($calc($target(y)-$cos($target(heading))*12),$calc($target(x)-$sin($target(heading))*12))>1 /goto :gotopointloop
/sendkey up up
/face fast
/if n $char(ability,"Backstab")!=-2 /doability "Backstab"
/if n $char(ability,"Hide")!=-2 {
/if $target()==TRUE {
/attack off
/doability "Hide"
/doability "Pick Pocket"
/attack
}
}
/if $target()==FALSE {
/attack off
/sendkey up up
/endmacro
}
/return
