Proxiez Posted June 11, 2015 Posted June 11, 2015 Would love to see more stuff added in this thread but sadly the creator got banned. If anyone could give me a hand with calculating xp/hour and some more stuff like an option to hide the paint or adding the status of what the bot is doing feel free to hit me up. I'm also interested in changing the standard green text color etc. I'm new to all this but I already learned quite a few things by trying out the things i've found here!
Sebastian Posted November 10, 2015 Posted November 10, 2015 (edited) Great tutorial. Very useful! But i don't know if i'm doing this the right way. Do i need to set a background with: g.Fill or can i just create an image with everything in it. Because when i do so, my TimeRan will not be displayed because the background overlays the TimeRan. Wich we dont want. public void onPaint(Graphics2D g) { timeRan = System.currentTimeMillis() - this.timeBegan; g.drawString(ft(timeRan), 158, 369); g.setColor(Color.BLACK); g.drawImage(bg, 8, 334, null); } Thanks alot, OSRS Sebastian. Edited November 10, 2015 by OSRS Sebastian
nyan Posted November 15, 2015 Posted November 15, 2015 (edited) Great tutorial. Very useful! But i don't know if i'm doing this the right way. Do i need to set a background with: g.Fill or can i just create an image with everything in it. Because when i do so, my TimeRan will not be displayed because the background overlays the TimeRan. Wich we dont want. public void onPaint(Graphics2D g) { timeRan = System.currentTimeMillis() - this.timeBegan; g.drawString(ft(timeRan), 158, 369); g.setColor(Color.BLACK); g.drawImage(bg, 8, 334, null); } Thanks alot, OSRS Sebastian. Image getImage(String url) { try { return ImageIO.read(new URL(url)); } catch (IOException e) { } return null; } Image picture = getImage("http://i.imgur.com/vGxY3dv.jpg"); @Override public void onPaint(Graphics2D g) { g.drawImage(picture, 7, 345, null); timeRan = System.currentTimeMillis() - this.timeBegan; g.drawString(ft(timeRan), 158, 369); } Another simple copy and paste for ya. Put the run time further down in the code. It goes from top to bottom when drawing the paint, so the run time gets covered if it's put first. Good luck Edited November 15, 2015 by Shiny 1
Sebastian Posted November 15, 2015 Posted November 15, 2015 Another simple copy and paste for ya. Put the run time further down in the code. It goes from top to bottom when drawing the paint, so the run time gets covered if it's put first. Good luck Thanks bro, but i just don't copy pasta things. I write it so i understand each line!
Trivial Posted December 21, 2016 Posted December 21, 2016 Still the best paint tutorial on the whole site.
sensorium Posted February 7, 2017 Posted February 7, 2017 Thanks for the awesome guide! There's just one thing: In the "Adding Gold Made" section you mentioned that, to calculate the gp gained, you need to multiply the amount of items made by their price: gpGained = itemsMade - costOfItem; But in this case it's subtracting, and not multiplying, isn't it? Needs to be changed to: gpGained = itemsMade * costOfItem; 1
Nicholas99GHz Posted December 18, 2019 Posted December 18, 2019 Thanks for the guide! Easy to follow & was able to get mine working in like 30 mins