Ezud.com Forum Home  
Ezud Home Ezud Forum  

Contact Us Members List Today's Posts
Go Back   Ezud.com - Trolling Assistance Forum > Runescape General and Market > Runescape Botting

Reply
 
Post New Thread Thread Tools Display Modes
  #1  
Old 07-02-2009, 11:14 AM
thr33 thr33 is offline
Ezudian
 
Join Date: Jul 2009
Posts: 23
Reputation: 58
thr33 will become famous soon enough
Default Thr33's Ardy Vials [Rsbot]

Hey again, this is my ardy vial buyer.

Just stick starting cash in 1st slot of invy, and start in the ardy bank nearest to the ardy square.

Please note its buggy.

Code:
import java.awt.Color;

import java.awt.Graphics;

import com.speljohan.rsbot.bot.Bot;

import com.speljohan.rsbot.event.listeners.PaintListener;

import com.speljohan.rsbot.script.Script;

import com.speljohan.rsbot.script.wrappers.RSNPC;

import com.speljohan.rsbot.script.wrappers.RSObject;

import com.speljohan.rsbot.script.wrappers.RSTile;

public class Thr33Ardy extends Script implements PaintListener {

	public long startTime = System.currentTimeMillis();

	public int VialID = 227;
	public int MoneyID = 995;

	public int vialsInBank;

	public int vialPrice = 10;

	public int VialGEPriceLow = 80;

	public int VialGEPriceMed = 84;

	public int VialGEPriceHigh = 88;

	public static final int rangeDoor = 34807;

	public int[] BankerIDs = new int[] { 34752 };

	public int StorekeeperID = 590;

	public int x;

	public int Vials = 0;

	// Tile paths:

	public RSTile[] ToBank = new RSTile[] { new RSTile(2614, 3293),

	new RSTile(2624, 3297), new RSTile(2633, 3289),

	new RSTile(2643, 3283), new RSTile(2652, 3283),

	new RSTile(2652, 3285) };

	public RSTile[] ToShop = reversePath(ToBank);

	// Other globals:

	public int ScriptState = 10;

	public int GambleInt;

	public double getVersion() {

		return 1.0;

	}

	public String getScriptCategory()

	{

		return "Thr33's Money";

	}

	public String getName() {

		return "Thr33Ardy";

	}

	public String getAuthor() {

		return "Thr33 Mage";

	}

	public String getScriptDescription() {

		String html = "<html>";

		html += "<head>";

		html += "<style type=\"text/css\"> body {background-image: url(\"http://s475.photobucket.com/albums/rr120/thr33mage/?action=view&current=Thr33svials.jpg\")}</style>";

		html += "</head>";

		html += "<body>\n";

		html += "<center>";

		html += "<h2>";

		html += getName();

		html += "</h2>";

		html += "</center>\n";

		html += "<b>Author:</b> ";

		html += getAuthor();

		html += "<br/>";

		html += "<b>Version:</b>";

		html += getVersion();

		html += "<br>";

		html += "<br>";

		html += "</center>\n";

		html += "Set up in Ardougne East Bank with cash! 50k lasts 4 and a half hours or so!";

		html += "</body>\n";

		html += "</html>";

		return html;

	}

	public boolean onStart(String[] Arguements) {

		startTime = System.currentTimeMillis();

		Bot.getEventManager().addListener(PaintListener.class, this);

		return (true);

	}

	public void onFinish() {

		Bot.getEventManager().removeListener(PaintListener.class, this);

	}

	public int loop() {

		switch (ScriptState) {

		case 10:

			WalkToShop();

			return (random(550, 900));

		case 20:

			TradeSeller();

			return (random(550, 800));

		case 25:

			BuyVials();

			return (random(550, 900));

		case 30:

			WalkToBank();

			return (random(450, 700));

		case 35:

			UseBank();

			return (random(400, 700));

		case 36:

			DepositVials();

			return (random(400, 600));

		case 37:

			ScriptState = 10;

			return (random(750, 1000));

		}

		return (-1);

	}

	public void WalkToBank() {

		if (distanceTo(ToBank[ToBank.length - 1]) < 5) {

			walkTileMM(ToBank[ToBank.length - 1]);

			ScriptState = 35;

			return;

		}

		walkPathMM(randomizePath(ToBank, 2, 2), 15);

	}

	public void WalkToShop() {

		if (distanceTo(ToShop[ToShop.length - 1]) < 5) {

			ScriptState = 20;

			return;

		}

		walkPathMM(randomizePath(ToShop, 2, 2), 15);

	}

	public void UseBank() {

		RSObject Banker = findObject(BankerIDs);

		if (Banker != null) {

			wait(random(400, 900));

			atObject(Banker, "Use-quickly");

			wait(random(100, 400));

			if (interfaceExists(INTERFACE_BANK))

				ScriptState = 36;

		}

	}

	@SuppressWarnings("deprecation")
	public void DepositVials() {

		if (getInventoryCount(VialID) >= 0) {

			Vials += getInventoryCount(VialID);

			bank.depositAllExcept(MoneyID);

			vialsInBank = getBankInventoryCount(VialID);

			{

				if (getInventoryCount(MoneyID) < 250)

					withdraw(MoneyID, 15000 - getInventoryCount(MoneyID));

				log("Checking if we have coins");

			}

			ScriptState = 37;

		}

	}

	public void TradeSeller() {

		RSNPC Storekeeper = getNearestNPCByID(StorekeeperID);

		{

			if (Storekeeper != null) {

				setRun(true);

				CheckDoor();

				atNPC(Storekeeper, "Trade");

				wait(random(400, 700));

				if (interfaceExists(620))

					ScriptState = 25;

			}

		}

	}

	public void BuyVials() {

		clickMouse(80, 118, 2, 2, false);

		wait(random(100, 201));

		atMenu("Buy X");

		wait(random(300, 700));

		buyXAmount();

		wait(random(900, 1050));

		if (isInventoryFull())

			ScriptState = 30;

	}

	public void buyXAmount() {

		int[] oftenUsedInputs = new int[] { 27 };

		int buyThisAmount = oftenUsedInputs[random(0, oftenUsedInputs.length)];

		wait(random(300, 500));

		sendText("" + buyThisAmount, true);

	}

	public void CheckDoor() {

		if (findObject(rangeDoor) != null) {

			if (distanceTo(findObject(rangeDoor)) < 6) {

				atDoor(findObject(rangeDoor), "South", "Open");

				wait(random(300, 1000));

			}

		}

	}

	public void onRepaint(Graphics g) {

		if (isLoggedIn()) {

			long millis = System.currentTimeMillis() - startTime;

			long hours = millis / (1000 * 60 * 60);

			millis -= hours * (1000 * 60 * 60);

			long minutes = millis / (1000 * 60);

			millis -= minutes * (1000 * 60);

			long seconds = millis / 1000;

			long minutes2 = minutes + (hours * 60);

			g.setColor(Color.WHITE);

			g.drawString("Thr33's Vial Buyer", 9, 30);

			g.drawString("Total amount of Money Spent : " + Vials * vialPrice

			+ ".", 9, 50);

			g.drawString("Average Vials per hour: " + Vials * 3600000L

			/ (System.currentTimeMillis() - startTime), 9, 70);

			g.drawString("Vials Bought : " + Vials, 9, 90);

			g.drawString("Profit made at GE Low: "

			+ ((Vials * VialGEPriceLow) - (Vials * vialPrice)) + ".",

			9, 110);

			g.drawString("Profit made at GE Med : "

			+ ((Vials * VialGEPriceMed) - (Vials * vialPrice)) + ".",

			9, 130);

			g.drawString("Profit made at GE High : "

			+ ((Vials * VialGEPriceHigh) - (Vials * vialPrice)) + ".",

			9, 150);

			g.drawString("Time running: " + hours + ":" + minutes + ":"

			+ seconds + ".", 9, 170);

		}

	}

}
gl.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Affiliates: Trik.com


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.