-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcore.java
More file actions
58 lines (39 loc) · 1.28 KB
/
core.java
File metadata and controls
58 lines (39 loc) · 1.28 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
package scripts;
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import java.util.ArrayList;
import java.util.Collections;
import org.tribot.api.General;
import org.tribot.api.Timing;
import org.tribot.api.input.Mouse;
import org.tribot.api2007.Player;
import org.tribot.api2007.Skills;
import org.tribot.api2007.Skills.SKILLS;
import org.tribot.script.Script;
import org.tribot.script.ScriptManifest;
import org.tribot.script.interfaces.Painting;
@ScriptManifest (authors = {"Yaw"}, category = "Tutorial Script", name = "Tutscript1", description = "example script")
public class core extends Script implements Painting {
public static int profit;
public static ArrayList<Node> nodes = new ArrayList();
public final long startTime = System.currentTimeMillis();
public void run() {
Mouse.setSpeed(100);
Collections.addAll(nodes,new coreTask()); //add all nodes to the ArrayList
loop(20, 40);
}
private void loop(int min, int max) {
while (true) {
for (final Node node : nodes) { //loop through the nodes
if (node.validate()) { //validate each node
node.execute(); //execute
sleep(General.random(min, max)); //time inbetween executing nodes
}
}
}
}
@Override
public void onPaint(Graphics arg0) {
}
}