I have not used this in a long long time so it may have errors. This is more concept than anything and is not ment for production use without modifications. If anyone has a need for this and can't figure out an error or how to use it let me know in a pm or post here and I'll update it.
Code: Select all
|go to random mob
|Proof of concept. Pick a mob by name, move to it,
|then pick another one that is not within a random radius.
|useage randomly hunting for mobs.
#define MyXLoc v52
#define MyYLoc v53
#define alertradius v59
Sub Main
:begining
/call Getmob
/goto :begining
/return
Sub Movetomob
/varset MyXLoc $char(x)
/varset MyYLoc $char(y)
:gotopointloop
/if $target()==FALSE {
/sendkey up up
/return
}
/face fast
/if n $target(distance)>20 /sendkey down up
/if n $target(distance)<10 {
/sendkey up up
/return
}
/face fast
/call Detectobst
/goto :gotopointloop
}
/sendkey up up
/face
/varset v54 0
/return
Sub Getmob
:startgetmob
/alert clear 1
/varset v59 $rand(220)
/varadd v59 30
/alert add 1 radius $v59 large_widow
/target noalert 1 npc "large widow"
/if "$target()"!="TRUE" {
/delay 15s
/goto :startgetmob
}
/call movetomob
/return
Sub Detectobst
/if n $MyXLoc==$char(x) /if $MyYLoc==$char(y) /call Hitobst 5
/varset MyXLoc $char(x)
/varset MyYLoc $char(y)
/return
sub Hitobst
/sendkey up up
/sendkey down down
/if n $rand(99)>50 {
/delay 3s
/sendkey up down
/sendkey down Right
/delay $p0
/sendkey up Right
/sendkey down up
/delay 3s
/sendkey up up
} else {
/delay 3s
/sendkey up down
/sendkey down left
/delay $p0
/sendkey up left
/sendkey down up
/delay 3s
/sendkey up up
}
/sendkey up down
/sendkey up Right
/sendkey up Left
/sendkey down up
/return
