Jump to content

Paint hiding behind runescape client?


Recommended Posts

Posted (edited)

The paint will show up on screen, but if say i place it over inventory or chat box its not visible ? sad.png

import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;

import java.awt.*;
import javax.imageio.ImageIO;
import java.io.IOException;
import java.net.URL;
import java.awt.Image;


@ScriptManifest(author="Sponsor", version=0.01, info="Test", name="Sponsor", logo="")
public class antiCollect extends Script {

    private final BasicStroke stroke1 = new BasicStroke(1);
    private final Font font1 = new Font("Arial", 1, 18);
    private final Image img1 = getImage("http://www.runehq.com/image/geitems/s/super-antipoison-3.gif");
    private final Image img2 = getImage("http://i.imgur.com/b2EdUMF.png");
    private final Color color1 = new Color(204, 204, 204, 116);
    private final Color color2 = new Color(0, 0, 0);
    private final Color color3 = new Color(255, 0, 153);



    private Image getImage(String url) {
        try {
            return ImageIO.read(new URL(url));
        } catch (IOException e) {
            return null;
        }
    }

    public void onStart() throws InterruptedException {
        log("Starting Script :)");

    }

    public int onLoop() throws InterruptedException {
        return 100;
    }

    public void onPaint(Graphics2D g) {
        Graphics2D gr = g;
        g.setColor(color1);
        g.fillRoundRect(554, 214, 177, 248, 16, 16);
        g.setColor(color2);
        g.setStroke(stroke1);
        g.drawRoundRect(554, 214, 177, 248, 16, 16);
        g.drawImage(img1, 535, 375, null);
        g.drawImage(img1, 654, 210, null);
        g.drawImage(img2, 101, 5, null);
        g.setFont(font1);
        g.setColor(color3);
        g.drawString("Time :", 565, 325);
        g.drawString("Collected :", 563, 346);
        g.drawString("Profit :", 562, 368);

    }

    public void onExit() throws InterruptedException {
        this.log("We have finished");
    }
}


http://imgur.com/a/dcw8i

 

 

Edited by Sponsor
Posted

put this in your onStart()

 

img1 = getImage("http://www.runehq.com/image/geitems/s/super-antipoison-3.gif");

img2 = getImage("http://i.imgur.com/b2EdUMF.png");

And what do you really mean by "The paint will show up on screen, but if say i place it over inventory or chat box its not visible" ?

 

So the screen area you see runescape player on will show the paint but if the destination of the paint is on chat or inventory area, it seems to hide behind it (shows on log in screen then when ingame its gone.) I'm using mirror mode to write this so dunno if thats an issue?

Not an answer on your question but

public void onPaint(Graphics2D g) {
        Graphics2D gr = g;

Why do you re-declare your variable?

 

 

I believe he used Enfilade's easel and it came with the generated code.

Correct,

 

See link for images in detail of what I mean...

 

http://imgur.com/a/dcw8i

Posted

So the screen area you see runescape player on will show the paint but if the destination of the paint is on chat or inventory area, it seems to hide behind it (shows on log in screen then when ingame its gone.) I'm using mirror mode to write this so dunno if thats an issue?

 

 

Correct,

 

See link for images in detail of what I mean...

 

http://imgur.com/a/dcw8i

Do you start the script before you log in?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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