Jump to content

The Full Paint Tutorial - All aspects covered - Pug Tutorials


Pug

Recommended Posts

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. happy.png

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! smile.png

Link to comment
Share on other sites

  • 2 weeks later...
  • 4 months later...

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.

post-199385-0-02839000-1447146960_thumb.png

Edited by OSRS Sebastian
Link to comment
Share on other sites

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 smile.png

 

Edited by Shiny
  • Like 1
Link to comment
Share on other sites


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 smile.png

 

 

Thanks bro, but i just don't copy pasta things. I write it so i understand each line! :)

Link to comment
Share on other sites

  • 11 months later...
  • 4 weeks later...
  • 4 weeks later...
  • 1 month later...

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;
  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...
  • 2 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...