Add CAgility script
This commit is contained in:
39
CAgility/src/io/reisub/dreambot/cagility/Obstacle.java
Normal file
39
CAgility/src/io/reisub/dreambot/cagility/Obstacle.java
Normal file
@ -0,0 +1,39 @@
|
||||
package io.reisub.dreambot.cagility;
|
||||
|
||||
import org.dreambot.api.methods.interactive.GameObjects;
|
||||
import org.dreambot.api.wrappers.interactive.GameObject;
|
||||
|
||||
public class Obstacle {
|
||||
private final int id;
|
||||
private final boolean retry;
|
||||
private Obstacle next;
|
||||
|
||||
public Obstacle(int id, boolean canRetry) {
|
||||
this.id = id;
|
||||
this.retry = canRetry;
|
||||
}
|
||||
|
||||
public Obstacle(int id) {
|
||||
this(id, false);
|
||||
}
|
||||
|
||||
public int getID() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public boolean canRetry() {
|
||||
return this.retry;
|
||||
}
|
||||
|
||||
public GameObject getGameObject() {
|
||||
return GameObjects.closest(getID());
|
||||
}
|
||||
|
||||
public Obstacle getNext() {
|
||||
return this.next;
|
||||
}
|
||||
|
||||
public void setNext(Obstacle next) {
|
||||
this.next = next;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user