-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIsInKaramja.java
51 lines (40 loc) · 1.48 KB
/
IsInKaramja.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
package com.remco1337.bots.ImpHunter;
import com.runemate.game.api.hybrid.location.Coordinate;
import com.runemate.game.api.hybrid.region.Players;
import com.runemate.game.api.hybrid.util.calculations.Distance;
import com.runemate.game.api.script.framework.tree.BranchTask;
import com.runemate.game.api.script.framework.tree.TreeTask;
// import path.to.your.CheckItems
// import path.to.your.IsInBank
/**
* NOTES:
*
*/
public class IsInKaramja extends BranchTask {
private CheckItems checkitems = new CheckItems();
private IsInBank isinbank = new IsInBank();
Settings setting = new Settings();
Coordinate karamjaArea = new Coordinate(2918, 3176, 0);
@Override
public boolean validate() {
if (setting.gettingDebugBot()) {
System.out.println("IsInKaramja.java: started");
if (Players.getLocal() != null && Distance.between(karamjaArea, Players.getLocal()) < 500) {
System.out.println("IsInKaramja.java: Is in karamja!");
return true;
} else {
System.out.println("IsInKaramja.java: Is not in karamja!");
return false;
}
}
return Players.getLocal() != null && Distance.between(karamjaArea, Players.getLocal()) < 500;
}
@Override
public TreeTask failureTask() {
return isinbank;
}
@Override
public TreeTask successTask() {
return checkitems;
}
}