-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSettings.java
119 lines (93 loc) · 3.46 KB
/
Settings.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
package com.remco1337.bots.ImpHunter;
import com.runemate.game.api.hybrid.entities.GameObject;
import com.runemate.game.api.hybrid.entities.GroundItem;
import com.runemate.game.api.hybrid.local.Skill;
import com.runemate.game.api.hybrid.local.Skills;
import com.runemate.game.api.hybrid.location.Coordinate;
import com.runemate.game.api.hybrid.region.GameObjects;
import com.runemate.game.api.hybrid.region.GroundItems;
import com.runemate.game.api.hybrid.region.Players;
import com.runemate.game.api.hybrid.util.StopWatch;
public class Settings {
public boolean DEBUG_BOT = true;
public static int MAX_TRAPS = 5;
public static String botStatus;
private static StopWatch runTimer = new StopWatch();
private static int impsCaught;
public static int trapsSet;
public static int hunterXpGained;
public static int levelsGained;
private int xpGained = Skill.HUNTER.getExperience()-hunterXpGained;
private static String[] trapsLocations= {"None", "None", "None", "None", "None"};
public Settings() {
}
public void firstLoad() {
if (runTimer != null) {
runTimer.reset();
}
hunterXpGained = Skill.HUNTER.getExperience();
botStatus = "Bot status: Warming up";
impsCaught = 0;
trapsSet = 0;
levelsGained = Skill.HUNTER.getCurrentLevel();
trapsLocations = new String[]{"None", "None", "None", "None", "None"};
runTimer.start();
}
public void resetTrapsInBank() {
trapsSet = 0;
}
public int getMaxTraps() {
return MAX_TRAPS;
}
public void debugTraps() {
for (int i = 0; i < MAX_TRAPS; i++) {
System.out.println("DEBUGTRAPS: " + trapsLocations[i]);
}
}
public void addTrapLocation () {
for (int i=0; i<MAX_TRAPS; i++)
{
if (trapsLocations[i] == "None") {
trapsLocations[i] = Players.getLocal().getPosition().toString();
System.out.println("ADDTRAPLOCATION: (" + i + ") | " + Players.getLocal().getPosition());
break;
}
}
}
public void removeTrapLocation (Coordinate trapCoordinate) {
for (int i=0; i<MAX_TRAPS; i++)
{
if (trapsLocations[i] == trapCoordinate.toString()) {
trapsLocations[i] = "None";
System.out.println("removeTrapLocation: (" + i + ") | " + Players.getLocal().getPosition());
break;
}
}
}
public String getRunTime() { return runTimer.getRuntimeAsString(); }
public String getBotStatus() { return botStatus; }
public String getExperienceGained() {
return "" +xpGained;
}
public int getLevelsGained() { return levelsGained-Skill.HUNTER.getCurrentLevel(); }
public String getImpCount() { return "" +impsCaught; }
public void increaseImpCount() { impsCaught++; }
public void setBotStatus(String status) {
botStatus = status;
}
public int getTrapCount() {
return trapsSet;
}
public void deleteTrap() {
--trapsSet;
System.out.println("deleteTrap called: " + trapsSet);
}
public void addTrap() {
addTrapLocation();
trapsSet++;
System.out.println("addTrap called: " + trapsSet);
}
public boolean gettingDebugBot() {
return this.DEBUG_BOT;
}
}