I believe the solution is this:
When there are [ 'no targets' ] , wait 15 seconds (in case we are just waiting for more to spawn within our tiny area) and if still no targets, then walk the combat region(175 tile radius in this case). Eventually, the bot will walk past 'rocks' (rock crabs hide as 'rocks' until a player walks by them.
When there are [ 'no targets' ] , wait 15 seconds (in case we are just waiting for more to spawn within our tiny area) and if still no targets, then walk the combat region(175 tile radius in this case). Eventually, the bot will walk past 'rocks' (rock crabs hide as 'rocks' until a player walks by them.