Jump to content







YellowDyes - gets yellow dyes from Aggie [70k+/h][NO REQS][F2P]


  • Please log in to reply
16 replies to this topic

#1
Striker

Striker
  • Members
  • 250 posts
  • Joined 18-March 09
So I was bored and made this little script. It will buy yellow dyes from Aggie at Draynor village.

You will need 2 onions and 5 coins for a dye. Make sure you have coins in your inventory, otherwise it will stop.

Features:
Stops when out of coins or onions.
Opens the door if it's closed.
Fast.

Changelog:
0.1 Initial release.

Script:

import java.awt.*;

import org.rsbot.event.listeners.PaintListener;

import org.rsbot.script.*;

import org.rsbot.script.wrappers.*;


@ScriptManifest(authors = {"Striker"}, keywords = {""}, name = "YellowDyes",

description = "Gets Dyes", version = 0.1)


public class YellowDyes extends Script implements PaintListener {

	

	int onionID = 1957;

	int dyeID = 1765;

	int coins = 995;

	int aggieID = 922;

	

	int dyesGot, profit, profith, dyesAtm, dyePrice, onionPrice;

	public long runtime, starttime, millis, seconds, minutes, hours;

	

	private boolean atAggie() {

		RSNPC aggie = npcs.getNearest(aggieID);

				if (aggie != null) {

					if (aggie.isOnScreen()) {

						return true;

					}

				}

				return false;

	}

	

	private boolean atBank() {	   

		RSArea area = new RSArea(new RSTile(3092, 3242), new RSTile(3095, 3250));

		return area.contains(getMyPlayer().getLocation());

	}

	

	public void getDye() {

		RSNPC aggie = npcs.getNearest(aggieID);

		if (aggie != null) {

			if (aggie.isOnScreen()) {

				if (!interfaces.canContinue()) {

					if (!interfaces.get(230).isValid()) {

				aggie.doAction("dyes");

				sleep(500, 1000);

					}

			} else {

					if (!interfaces.get(519).isValid()) {

					interfaces.clickContinue();

					sleep(400, 500);

					}

				}

				if (interfaces.get(230).isValid()) {

					interfaces.getComponent(230, 4).doClick();

					sleep(500, 700);

				}

				if (interfaces.get(519).isValid()) {

					if (inventory.contains(onionID)) {

					aggie.doAction("dyes");

					sleep(500, 1000);

					}

				}

			}

		}

	}

	

	public void walkBank() {

		if (!getMyPlayer().isMoving()) {

		walking.walkTileMM(new RSTile(3093, 3245).randomize(2, 2));

		sleep(1000, 1500);

		}

	}

	

	public void walkAggie() {

		if (!getMyPlayer().isMoving()) {

		walking.walkTileMM(new RSTile(3085, 3260).randomize(2, 2));

		sleep(1000, 1500);

		}

	}

	

	public void bank() {

	   bank.open();	

	   sleep(500, 1000);	

	   if (bank.isOpen()) {

		   bank.depositAllExcept(coins);

		   sleep(500, 700);

		   if (inventory.getCount(onionID) <= 2 && bank.getItem(onionID) != null) {

		   bank.withdraw(onionID, 26);

		   sleep(200, 500);

		   } else {

			   log ("Out of onions");

			   bank.close();

			   sleep(200, 500);

			   stopScript();

		   }

	   }

	}

	

	@Override

	public boolean onStart() {

	   dyesAtm = inventory.getCount(dyeID);

	   dyePrice = grandExchange.lookup(dyeID).getGuidePrice();

	   onionPrice = grandExchange.lookup(onionID).getGuidePrice();

	   starttime = System.currentTimeMillis();

	   log("Onion price: " + onionPrice + " " + "Dye price: " + dyePrice);

	   log("Profit per dye: " + (dyePrice - (2 * onionPrice) - 5));

		return true;

	}

	

	@Override

	public int loop() {

		if (!inventory.contains(coins)) {

			log("No coins in inventory, stopping.");		  

			stopScript();

		}

		 if (!walking.isRunEnabled() && walking.getEnergy() > random(30, 40)) {

				walking.setRun(true);

				sleep(300, 1000);

			}

		RSObject door = objects.getTopAt(new RSTile(3088, 3259));

		if (door != null) {

			door.doClick();

			sleep(300, 500);

		}

			if (inventory.getCount(onionID) >= 2 ) {

				if (atAggie()) {

				getDye();				

			} else {

					walkAggie();

				}

		} else {

				if (atBank()) {

					bank();

				} else {

					walkBank();

				}

			}

		return random(200, 400);

	}			  

	   //START: Code generated using Enfilade's Easel	

	private final Color color2 = new Color(0, 0, 0, 180);


	private final BasicStroke stroke1 = new BasicStroke(1);


	private final Font font1 = new Font("Arial", 0, 11);


	public void onRepaint(Graphics g1) {

		millis = System.currentTimeMillis() - starttime;

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

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

		minutes = millis / (1000 * 60);

		millis -= minutes * (1000 * 60);

		seconds = millis / 1000;

		runtime = System.currentTimeMillis() - starttime;

		profit = dyesGot * (dyePrice - (2 * onionPrice) - 5);

		profith = + (int) (profit * 3600000D / runtime);

		Graphics2D g = (Graphics2D)g1;

		g.setColor(new Color(0, 0, 0, 180));

		g.fillRoundRect(29, 32, 137, 109, 16, 16);

		g.setColor(color2);

		g.setStroke(stroke1);

		g.drawRoundRect(29, 32, 137, 109, 16, 16);

		g.setFont(new Font("Tahoma", Font.BOLD, 11));

		g.setColor(Color.RED);

		g.drawString("YellowDyes By Striker", 36, 46);

		g.setColor(Color.WHITE);

		g.setFont(font1);

		g.drawString("Time: " + hours + ":" + minutes + ":" + seconds, 36, 66);

		g.drawString("Dyes got: " + dyesGot , 36, 88);

		g.drawString("Profit: " + profit, 37, 110);

		g.drawString("Profit/h: " + profith, 37, 134);

		

		if (dyesAtm > inventory.getCount(dyeID)) {

			dyesAtm = inventory.getCount(dyeID);

		} else if (dyesAtm < inventory.getCount(dyeID)) {

			dyesGot++;

						dyesAtm = inventory.getCount(dyeID);  

		}

	}

	//END: Code generated using Enfilade's Easel

}


Edited by Striker, 08 June 2011 - 01:39 PM.


#2
xPac3

xPac3
  • Members
  • 73 posts
  • Joined 09-February 11
Will try to get a proggy

#3

  • Guests
  • Joined --
Appears to be clean, I'll try this out. By the way how many dyes per hour does this do?

EDIT: Could only get 1k onions from GE, so guess I'm making 500 dyes for now :P

Edited by hamzacooly, 09 June 2011 - 12:17 AM.


#4
Jorn_Piler

Jorn_Piler
  • Members
  • 106 posts
  • Joined 22-November 10
why not add blue dye? cuz.... yellow dyes are like 1gp? if you can sell? cuz of the MASS flow of onions now xD

#5

  • Guests
  • Joined --
Dude, yellow dyes are freakin 250 gp are you high dude?

EDIT: getting around 55k~ 60k /hr profit according to the paint, pretty great bot if you ask me :D

HERES A PROGGIE OF 500 DYES

Posted Image

EDIT: damn might take a while to sell all these dye, do yellow dye sell the fastest?

EDIT AGAIN: Ok just check prices on GE, and realized Jorn is actually making a point. blue dyes have WAAY MORE PROFIT

Edited by hamzacooly, 09 June 2011 - 04:02 AM.


#6
Striker

Striker
  • Members
  • 250 posts
  • Joined 18-March 09
True, blue dyes would be better, but it's hard to buy woad leaves for them. Onions are very easy to get, but it's hard to sell the yellow dyes too. :/ I guess I didn't too much research before making this script.

Edited by Striker, 09 June 2011 - 08:43 AM.


#7
ayyah

ayyah
  • Members
  • 33 posts
  • Joined 08-June 11
It would be better off making with blue dye, but then hey, you made a script to help the community ;D
nice work

#8
Striker

Striker
  • Members
  • 250 posts
  • Joined 18-March 09
I will make a blue dye version later, have to change only few ID-s, now I'm off to the beach.

#9
manofskate

manofskate
  • Members
  • 58 posts
  • Joined 10-April 11
1k dyes proggy :)

Left them in G.E. overnight and actually sold most of them.

EDIT: It says 996 but it actually did 1000.
Posted Image

#10
imahacking

imahacking
  • Members
  • 90 posts
  • Joined 27-July 09
Hope you dont mine but i changed a few things to make it run red dye instead. little bit cash/hr
import java.awt.*;

import org.rsbot.event.listeners.PaintListener;

import org.rsbot.script.*;

import org.rsbot.script.wrappers.*;


@ScriptManifest(authors = {"Striker"}, keywords = {""}, name = "RedDyes",

description = "Gets Dyes", version = 0.1)


public class RedDyes extends Script implements PaintListener {

	

	int berryID = 1951;

	int dyeID = 1763;

	int coins = 995;

	int aggieID = 922;

	

	int dyesGot, profit, profith, dyesAtm, dyePrice, berryPrice;

	public long runtime, starttime, millis, seconds, minutes, hours;

	

	private boolean atAggie() {

				RSNPC aggie = npcs.getNearest(aggieID);

				if (aggie != null) {

					if (aggie.isOnScreen()) {

						return true;

					}

				}

				return false;

		}

	

	private boolean atBank() {	   

				RSArea area = new RSArea(new RSTile(3092, 3242), new RSTile(3095, 3250));

				return area.contains(getMyPlayer().getLocation());

		}

	

	public void getDye() {

		RSNPC aggie = npcs.getNearest(aggieID);

		if (aggie != null) {

			if (aggie.isOnScreen()) {

				if (!interfaces.canContinue()) {

					if (!interfaces.get(230).isValid()) {

				aggie.doAction("dyes");

				sleep(500, 1000);

					}

			} else {

					if (!interfaces.get(519).isValid()) {

					interfaces.clickContinue();

					sleep(400, 500);

					}

				}

				if (interfaces.get(230).isValid()) {

					interfaces.getComponent(230, 2).doClick();

					sleep(500, 700);

				}

				if (interfaces.get(519).isValid()) {

					if (inventory.contains(berryID)) {

					aggie.doAction("dyes");

					sleep(500, 1000);

					}

				}

			}

		}

	}

	

	public void walkBank() {

		if (!getMyPlayer().isMoving()) {

		walking.walkTileMM(new RSTile(3093, 3245).randomize(2, 2));

		sleep(1000, 1500);

		}

	}

	

	public void walkAggie() {

		if (!getMyPlayer().isMoving()) {

		walking.walkTileMM(new RSTile(3085, 3260).randomize(2, 2));

		sleep(1000, 1500);

		}

	}

	

	public void bank() {

	   bank.open();	

	   sleep(500, 1000);	

	   if (bank.isOpen()) {

		   bank.depositAllExcept(coins);

		   sleep(500, 700);

		   if (inventory.getCount(berryID) <= 3 && bank.getItem(berryID) != null) {

		   bank.withdraw(berryID, 27);

		   sleep(200, 500);

		   } else {

			   log ("Out of berries");

			   bank.close();

			   sleep(200, 500);

			   stopScript();

		   }

	   }

	}

	

	@Override

	public boolean onStart() {

	   dyesAtm = inventory.getCount(dyeID);

	   dyePrice = grandExchange.lookup(dyeID).getGuidePrice();

	   berryPrice = grandExchange.lookup(berryID).getGuidePrice();

	   starttime = System.currentTimeMillis();

	   log("berry price: " + berryPrice + " " + "Dye price: " + dyePrice);

	   log("Profit per dye: " + (dyePrice - (3 * berryPrice) - 5));

		return true;

	}

	

	@Override

	public int loop() {

		if (!inventory.contains(coins)) {

			log("No coins in inventory, stopping.");		  

			stopScript();

		}

		 if (!walking.isRunEnabled() && walking.getEnergy() > random(30, 40)) {

				walking.setRun(true);

				sleep(300, 1000);

			}

		RSObject door = objects.getTopAt(new RSTile(3088, 3259));

		if (door != null) {

			door.doClick();

			sleep(300, 500);

		}

			if (inventory.getCount(berryID) >= 3 ) {

				if (atAggie()) {

				getDye();				

			} else {

					walkAggie();

				}

		} else {

				if (atBank()) {

					bank();

				} else {

					walkBank();

				}

			}

		return random(200, 400);

	}			  

	   //START: Code generated using Enfilade's Easel	

	private final Color color2 = new Color(0, 0, 0, 180);


	private final BasicStroke stroke1 = new BasicStroke(1);


	private final Font font1 = new Font("Arial", 0, 11);


	public void onRepaint(Graphics g1) {

		millis = System.currentTimeMillis() - starttime;

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

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

		minutes = millis / (1000 * 60);

		millis -= minutes * (1000 * 60);

		seconds = millis / 1000;

		runtime = System.currentTimeMillis() - starttime;

		profit = dyesGot * (dyePrice - (3 * berryPrice) - 5);

		profith = + (int) (profit * 3600000D / runtime);

		Graphics2D g = (Graphics2D)g1;

		g.setColor(new Color(0, 0, 0, 180));

		g.fillRoundRect(29, 32, 137, 109, 16, 16);

		g.setColor(color2);

		g.setStroke(stroke1);

		g.drawRoundRect(29, 32, 137, 109, 16, 16);

		g.setFont(new Font("Tahoma", Font.BOLD, 11));

		g.setColor(Color.RED);

		g.drawString("RedDyes By Striker", 36, 46);

		g.setColor(Color.WHITE);

		g.setFont(font1);

		g.drawString("Time: " + hours + ":" + minutes + ":" + seconds, 36, 66);

		g.drawString("Dyes got: " + dyesGot , 36, 88);

		g.drawString("Profit: " + profit, 37, 110);

		g.drawString("Profit/h: " + profith, 37, 134);

		

		if (dyesAtm > inventory.getCount(dyeID)) {

						dyesAtm = inventory.getCount(dyeID);

				} else if (dyesAtm < inventory.getCount(dyeID)) {

						dyesGot++;

						dyesAtm = inventory.getCount(dyeID);  

		}

	}

	//END: Code generated using Enfilade's Easel

}


#11
superobby

superobby
  • Members
  • 65 posts
  • Joined 25-February 11
what do you save it as???

#12
darkblade_690

darkblade_690
  • Members
  • 13 posts
  • Joined 03-September 11
save as yellowDyes.java

#13
PhoenixPwn

PhoenixPwn
  • Restricted
  • 335 posts
  • Joined 28-July 11
Nice script , usin it , damn good!

#14
Brad_Pitt

Brad_Pitt
  • Restricted
  • 234 posts
  • Joined 12-September 11
More pics also plox. Nice anyways , phoenix is OMG LOL

#15
SDoctorJew

SDoctorJew
  • Members
  • 26 posts
  • Joined 11-October 11
is this actually 70k/hour? might try it!

#16
Excliper

Excliper
  • Members
  • 89 posts
  • Joined 13-January 12
fankyou heeeps ahaha (:

#17
Frozen2

Frozen2
  • Members
  • 16 posts
  • Joined 08-February 12
hmh interesting