This repository has been archived by the owner on Nov 28, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Main.java
105 lines (80 loc) · 3.08 KB
/
Main.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
package scripts.spxaiolooter;
import org.tribot.api2007.types.RSArea;
import org.tribot.script.ScriptManifest;
import org.tribot.script.interfaces.*;
import scripts.spxaiolooter.data.Vars;
import scripts.spxaiolooter.tasks.DepositItems;
import scripts.spxaiolooter.tasks.PickupItem;
import scripts.spxaiolooter.tasks.SwitchWorlds;
import scripts.spxaiolooter.tasks.WalkToLootLocation;
import scripts.task_framework.framework.Task;
import scripts.tribotapi.AbstractScript;
import scripts.tribotapi.game.utiity.Utility07;
import scripts.tribotapi.gui.GUI;
import scripts.tribotapi.painting.paint.Calculations;
import scripts.tribotapi.painting.paint.enums.DataPosition;
import scripts.tribotapi.painting.projection.ProjectionManager;
import java.awt.*;
import java.net.MalformedURLException;
import java.net.URL;
/**
* Created by Sphiinx on 10/3/2016.
*/
@ScriptManifest(authors = "Shpiinx", category = "Money making", name = "[SPX] AIO Looter", version = 0.2)
public class Main extends AbstractScript implements Painting, MousePainting, MouseSplinePainting, EventBlockingOverride, MessageListening07, Ending {
private ProjectionManager projection_manager = new ProjectionManager();
@Override
protected GUI getGUI() {
try {
return new GUI(new URL("http://www.spxscripts.com/spxaiolooter/GUI.fxml"));
} catch (MalformedURLException e) {
e.printStackTrace();
}
return null;
}
@Override
public void run() {
Vars.reset();
super.run();
}
@Override
public void addTasks(Task... tasks) {
super.addTasks(new DepositItems(), new WalkToLootLocation(), new SwitchWorlds(), new PickupItem());
}
@Override
public void onPaint(Graphics g) {
super.onPaint(g);
paint_manager.drawGeneralData("Looted: ", Vars.get().items_looted + Calculations.getPerHour(Vars.get().items_looted, this.getRunningTime()), DataPosition.TWO, g);
paint_manager.drawGeneralData("Status: ", task_manager.getStatus() + Utility07.getLoadingPeriods(), DataPosition.THREE, g);
if (gui.isOpen()) {
if (Vars.get().loot_radius_center_tile == null)
return;
final RSArea radius_area = new RSArea(Vars.get().loot_radius_center_tile, Vars.get().looting_radius);
projection_manager.drawArea(radius_area, g);
projection_manager.drawMinimapArea(Vars.get().loot_radius_center_tile, Vars.get().looting_radius, g);
}
}
@Override
public void serverMessageReceived(String s) {
}
@Override
public void playerMessageReceived(String s, String s1) {
}
@Override
public void duelRequestReceived(String s, String s1) {
}
@Override
public void clanMessageReceived(String s, String s1) {
}
@Override
public void tradeRequestReceived(String s) {
}
@Override
public void personalMessageReceived(String s, String s1) {
}
@Override
public void onEnd() {
SignatureData.sendSignatureData(this.getRunningTime() / 1000, Vars.get().items_looted);
super.onEnd();
}
}