Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.awt.Color;
- import java.awt.Point;
- import java.util.LinkedList;
- import java.util.List;
- import java.awt.Rectangle;
- import org.runedream.api.Script;
- import org.runedream.api.ScriptManifest;
- import org.runedream.api.methods.Bank;
- import org.runedream.api.methods.Camera;
- import org.runedream.api.methods.Game;
- import org.runedream.api.methods.Mouse;
- import org.runedream.api.util.Log;
- import org.runedream.api.util.Random;
- import org.runedream.api.methods.ImageUtil;
- @ScriptManifest(authors = {"Scott"}, name = "Stanner", version = 0.1, description = "Tans Stuff.", keywords = {"Tanning"})
- public class Stan extends Script {
- private List<Point> tannerPoints = new LinkedList<Point>();
- private static final Color tanner = new Color(234, 225, 235);
- private static final Rectangle VIEWPORT = new Rectangle(4, 4, 690, 334);
- private void bank() {
- Game.clickCompass();
- Camera.pitchUp(1200);
- Mouse.move(221, 159);
- Mouse.click();
- Script.sleep(1420, 1750);
- Mouse.moveSlightly();
- Bank.depositAll();
- Mouse.moveSlightly();
- Mouse.move(55, 108);
- Mouse.click(55, 108, false);
- Mouse.move(83, 215);
- Mouse.click();
- Mouse.moveSlightly();
- Mouse.move(490, 35);
- Mouse.click();
- toTanner();
- }
- private void toTanner() {
- Mouse.setSpeed(Random.random(8, 12));
- Log.log("Heading to the Tanner");
- Mouse.moveSlightly();
- Mouse.move(662, 29);
- Script.sleep(250, 600);
- Mouse.click();
- Mouse.moveSlightly();
- Script.sleep(7420, 7650);
- Mouse.move(616, 48);
- Mouse.click();
- Script.sleep(8000, 8500);
- tanning();
- }
- private void tanning() {
- Mouse.setSpeed(Random.random(8, 12));
- Mouse.moveSlightly();
- tannerPoints = ImageUtil.getPointsWithColor(Game.getImage(), tanner, 0.01);
- if (tannerPoints.size() > 0) {
- Point tanner = tannerPoints.get(Random.random(0, tannerPoints.size()));
- Log.log("Getting tanner points");
- if (VIEWPORT.contains(tanner)) {
- Mouse.move(tanner);
- Mouse.click(false);
- Log.log("Clicking tanner");
- Mouse.click(Mouse.getLocation().x, Mouse.getLocation().y + 40 , 2 , 3 );
- Script.sleep(1400, 1600);
- Mouse.move(92, 226);
- Mouse.click(Mouse.getLocation().x, Mouse.getLocation().y + 1 , 2 , 4, false);
- Mouse.click(Mouse.getLocation().x, Mouse.getLocation().y + 88 , 1 , 2);
- Script.sleep(900, 1100);
- toBank();
- }
- }
- }
- private void toBank() {
- Mouse.setSpeed(Random.random(8, 12));
- Mouse.move(625, 155);
- Mouse.click();
- Script.sleep(7000, 7150);
- Mouse.click(600, 121);
- Script.sleep(6200, 7000);
- }
- @Override
- public int loop() {
- Mouse.setSpeed(Random.random(8, 12));
- bank();
- return 0;
- }
- }
Add Comment
Please, Sign In to add comment