Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Chop extends MethodProvider {
- private String name;
- private Area area;
- public Chop(final String name, final Area area) {
- this.area = area;
- this.name = name;
- }
- private RS2Object getGameObject() {
- return getObjects().closest(i -> i.getName().equals(name) && area.contains(i) && i.hasAction("Chop down"));
- }
- public boolean uInteract() {
- final RS2Object go = getGameObject();
- if (go == null) return false;
- if (go.isVisible()) {
- return go.interact("Chop down");
- }
- return getWalking().webWalk(go.getPosition());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement