RuneHive-Game
Loading...
Searching...
No Matches
BankObjective.java
Go to the documentation of this file.
1package com.runehive.content.bot.objective.impl;
2
3import com.runehive.content.bot.PlayerBot;
4import com.runehive.content.bot.objective.BotObjective;
5import com.runehive.content.bot.objective.BotObjectiveListener;
6import com.runehive.game.world.position.Position;
7import com.runehive.util.RandomUtils;
8
9public class BankObjective implements BotObjectiveListener {
10
11 /** The positions of all the bank locations for the bot to access. */
12 private static final Position[] BANK_LOCATIONS = {
13 new Position(3096, 3493),
14 new Position(3098, 3493),
15 new Position(3095, 3491),
16 new Position(3095, 3489)
17 };
18
19 @Override
20 public void init(PlayerBot bot) {
22 bot.walkTo(position, () -> finish(bot));
23 }
24
25 @Override
26 public void finish(PlayerBot bot) {
27 bot.schedule(RandomUtils.random(6, 12), () -> BotObjective.RESTOCK.init(bot));
28 }
29
30}
static final Position[] BANK_LOCATIONS
The positions of all the bank locations for the bot to access.
Represents a single tile on the game world.
Definition Position.java:14
A static-util class that provides additional functionality for generating pseudo-random numbers.
static< T > T random(T[] array)
Pseudo-randomly retrieves a element from array.