Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.awt.*;
- import java.util.*;
- import java.util.List;
- import java.util.logging.Level;
- import javax.accessibility.*;
- import javax.swing.*;
- import org.rsbot.bot.Bot;
- import org.rsbot.script.*;
- import org.rsbot.script.wrappers.*;
- import org.rsbot.accessors.*;
- import org.rsbot.event.listeners.PaintListener;
- import org.rsbot.event.listeners.ServerMessageListener;
- import org.rsbot.event.events.ServerMessageEvent;
- import org.rsbot.util.ScreenshotUtil;
- @ScriptManifest(authors = { "Silhouettic" }, category = "Other", name = "Accumulator", version = 1.00, description = "<html><head>Accumulator</head><body>Start the script in draynor bank with money and steel arrows in your inventory.</body></html\n")
- public class Accumulator extends Script implements PaintListener, ServerMessageListener {
- // Path Arrays
- RSTile[] BankToManor = {new RSTile(3105, 3251), new RSTile(3104, 3267),
- new RSTile(3109, 3285), new RSTile(3109, 3299),
- new RSTile(3112, 3312), new RSTile(3112, 3325),
- new RSTile(3109, 3335), new RSTile(3109, 3346), };
- RSTile[] Door1 = { new RSTile(3108, 3352) };
- RSTile[] Door2 = { new RSTile(3109, 3357) };
- RSTile[] Door3 = {new RSTile(3107, 3362), new RSTile(3106, 3367) };
- RSTile[] Door4 = {new RSTile(3103, 3365) };
- RSTile[] Bookcase = { new RSTile(3098, 3359) };
- RSTile[] ToAva = { new RSTile(3094, 3357) };
- private int runEnergy = random(40, 95);
- private final int Ava = 5199;
- private final ScriptManifest properties = getClass().getAnnotation(ScriptManifest.class);
- public boolean onStart(Map<String, String> args) {
- return true;
- }
- public int loop() {
- if (!isLoggedIn())
- return random(50, 100);
- startRunning(runEnergy);
- try {
- walkPath(BankToManor);
- return random(50, 100);
- if (getObjectAt(Door1) == null && distanceTo(new RSTile(3109, 3347)) <= 3) {
- if (onTile(Door1, "Open", random(0.39, 0.61), random(0, 0.05), random(20, 50))) {
- failCount = 0;
- while (getObjectAt(Door1) {
- wait(random(50, 100));
- }
- }
- if (getObjectAt(Door1) == null)
- return random(50, 100);
- }
- return 100;
- }
- public void serverMessageRecieved(final ServerMessageEvent arg0) {
- final String serverString = arg0.getMessage();
- }
- public void onRepaint(Graphics g) {
- if(!isLoggedIn() || isLoginScreen()) {
- return;
- }
- /* TODO Paint here */
- }
- public void onFinish() {
- ScreenshotUtil.takeScreenshot(true);
- }
- }
Add Comment
Please, Sign In to add comment