RuneHive-Tarnish
Neural OSRS Enhancement Framework
Loading...
Searching...
No Matches
WildernessWalkObjective.java
1package com.osroyale.content.bot.objective.impl;
2
3import com.osroyale.content.bot.PlayerBot;
4import com.osroyale.content.bot.objective.BotObjectiveListener;
5import com.osroyale.game.world.position.Position;
6import com.osroyale.util.RandomUtils;
7
27
28public class WildernessWalkObjective implements BotObjectiveListener {
29
30 @Override
31 public void init(PlayerBot bot) {
32 bot.loop(1, () -> {
33 if (bot.movement.needsPlacement()) {
34 return;
35 }
36
37 int x = bot.getX() + RandomUtils.inclusive(-5, 5);
38 int y = bot.getY() + RandomUtils.inclusive(-5, 5);
39 if (x < 3061) x = 3061;
40 if (y < 3525) y = 3525;
41 if (x > 3101) x = 3101;
42 if (y > 3547) y = 3547;
43
44 bot.walkExactlyTo(Position.create(x, y));
45 bot.pause(RandomUtils.inclusive(4, 15));
46 });
47 }
48
49 @Override
50 public void finish(PlayerBot bot) {
51 }
52
53}
static Position create(int x, int y, int z)