-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathAbyte0_Nature.java
More file actions
74 lines (59 loc) · 1.57 KB
/
Abyte0_Nature.java
File metadata and controls
74 lines (59 loc) · 1.57 KB
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
public class Abyte0_Nature extends Abyte0_Script {
int fmode = 3;
int cpt = 0;
public Abyte0_Nature(Extension e) {
super(e);
}
@Override
public String[] getRandomQuotes() {
String[] result = {"Helllo", "Where that dam key!", "Lets steal that chest!", "I hope nobody catch me stealing that chest!", "I'm a pirate!"};
return result;
}
public void init(String params) {
String[] str = params.split(",");
if (str.length == 1) {
fmode = Integer.parseInt(str[0]);
}
print("Started Abyte0 Nat Thiever");
print("Version 3");
//Walk to avoid log out (work with the 2 houses)
//fix 1.1 Lower click time
//Version 3 Updated for OpenRSC
if (isAtApproxCoords(539, 1545, 15))
print("Cake Nat");
else
print("Line Nat");
print("Fmode = " + fmode);
}
public int main() {
SayRandomQuote();
if (getFightMode() != fmode) {
setFightMode(fmode);
return random(300, 2500);
}
if (getFatigue() > 75) {
useSleepingBag();
return random(921, 1000);
}
if (cpt > random(50, 100)) {
//print("Walk");
if (isAtApproxCoords(539, 1545, 15))
walkTo(539, 1545);
else
walkTo(582, 1525);
cpt = 0;
return 2000;
}
int[] natsChest = getObjectById(335);
if (natsChest[0] != -1) {
atObject2(natsChest[1], natsChest[2]);
}
int[] lottedChest = getObjectById(340); //might be lucky
if (lottedChest[0] != -1) {
if ((lottedChest[1] == 582 && lottedChest[2] == 1527) || (lottedChest[1] == 539 && lottedChest[2] == 1547))
atObject2(lottedChest[1], lottedChest[2]);
}
cpt++;
return random(random(126, 567), 642);
}
}