All pastes #180387 Raw Edit

Anonymous

public text v1 · immutable
#180387 ·published 2006-09-23 02:46 UTC
rendered paste body
import impsoft.ibot.methods.RGB;
import impsoft.ibot.methods.Script;
import impsoft.ibot.methods.XY;
import java.awt.Rectangle;
import impsoft.ibot.Areas;

public class Bank extends Script {
	private RGB bank;

	private XY matches;

	public static double version = 2.1;

	public static String[] commands = new String[] { "none" };

	public String author = "rikioh";

	public String description = "banking demo";

	public static String args[];

	private final Rectangle MINI_MAP = new Rectangle(542, 0, 181, 160);

	public boolean doStart(String cmd, String[] args) {
		if (bank == null) {
			bank = new RGB(244, 218, 93);
		}
		matches = findXYspiral(MINI_MAP, 50, 25, bank, 60, 60, 60);
		if (matches != null) {
			log("Found Bank Symbol!");
			mouseMove(matches.x, matches.y);
			int currentMouseX = currentMouseX();
			int currentMouseY = currentMouseY();
			mouseClickLeft(currentMouseX, currentMouseY);

		}
		return false;
	}

	public void script() throws InterruptedException {
		while (true) {
			sleep(10000);
		}
	}

	private RGB booth;
	{

		if (booth == null) {
			booth = new RGB(145, 128, 96);
		}
		matches = findXYspiral(Areas.GAME, 50, 25, booth, 0, 0, 0);
		if (matches != null) {
			log("Found Bank Booth!");
			mouseMove(matches.x, matches.y);
			int currentMouseX = currentMouseX();
			int currentMouseY = currentMouseY();
			if (getTopText().indexOf("Bank") != -1) {
				mouseClickRight(currentMouseX, currentMouseY);
				log("BankBooth Found!");

			}

		}

	}
}