Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Paint hiding behind runescape client?

Featured Replies

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

Not an answer on your question but

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

Why do you re-declare your variable?

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.

  • Author

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

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?

  • Author

Do you start the script before you log in?

 

I've tried both, logged and logged in just out of curisity and thats when i noticed it..

 

Any ideas?

I've tried both, logged and logged in just out of curisity and thats when i noticed it..

 

Any ideas?

Is it visible when you start the script while character is logged in?

  • Author

It's working now doge.png... ​I did the old fashion turn off and on again...


Thanks for trying to help tho :)

Edited by Sponsor

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.