-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTeleport.java
More file actions
39 lines (33 loc) · 959 Bytes
/
Teleport.java
File metadata and controls
39 lines (33 loc) · 959 Bytes
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
import java.awt.Point;
import org.parabot.environment.api.utils.Time;
import org.parabot.environment.input.Mouse;
import org.parabot.environment.scripts.framework.Strategy;
import org.rev317.min.api.wrappers.Tile;
public class Teleport implements Strategy
{
@Override
public boolean activate() {
int distance;
distance = (int) new Tile(2665, 3311).distanceTo();
if (distance > 75) {
return true;
}
return false;
}
@Override
public void execute() {
//Points to click in the game
Point spellBook = new Point(743, 186);
Point skillZone = new Point(641, 288);
Point thievingSkill = new Point(260, 400);
Point inventory = new Point(659,187);
Mouse.getInstance().click(spellBook);
Time.sleep(300);
Mouse.getInstance().click(skillZone);
Time.sleep(300);
Mouse.getInstance().click(thievingSkill);
Time.sleep(5000); //sleep while thieving animation finishes
Mouse.getInstance().click(inventory);
Time.sleep(300);
}
}