Jump to content

Changing what objects are made in a Cons script


Recommended Posts

Posted (edited)

So the code is as follows(I think it's the right part?):

   public void Building() throws InterruptedException {
        this.log("Building");
        RS2Widget Chair = this.widgets.get(162, 546);
        RS2Widget Bookcase = this.widgets.get(394, 1);
        if (Bookcase != null || Chair != null) {
            this.Animating();
            if (!this.myPlayer().isAnimating()) {
                if (this.Kies_object(this.skills.getDynamic(Skill.CONSTRUCTION)) == 0) {
                    if (this.widgets.get(394, 4) != null) {
                        this.mouse.click(main.random((int)46, (int)65), main.random((int)75, (int)96), false);
                    }
                } else {
                    this.mouse.click(main.random((int)46, (int)65), main.random((int)108, (int)120), false);
                }
            }
        }
    }

This makes normal bookcases, I need it to make Oak. Do I change the widget ID? How do I find of the ID of the thing I want to build? Bearing in mind it shows the build screen.

Edited by GetBackToOSRS
Posted (edited)

So the code is as follows(I think it's the right part?):

   public void Building() throws InterruptedException {
        this.log("Building");
        RS2Widget Chair = this.widgets.get(162, 546);
        RS2Widget Bookcase = this.widgets.get(394, 1);
        if (Bookcase != null || Chair != null) {
            this.Animating();
            if (!this.myPlayer().isAnimating()) {
                if (this.Kies_object(this.skills.getDynamic(Skill.CONSTRUCTION)) == 0) {
                    if (this.widgets.get(394, 4) != null) {
                        this.mouse.click(main.random((int)46, (int)65), main.random((int)75, (int)96), false);
                    }
                } else {
                    this.mouse.click(main.random((int)46, (int)65), main.random((int)108, (int)120), false);
                }
            }
        }
    }

This makes normal bookcases, I need it to make Oak. Do I change the widget ID? How do I find of the ID of the thing I want to build? Bearing in mind it shows the build screen.

 

You have to change the widget aswell as the confirmation clicks (this stuff: this.mouse.click(main.random((int)46, (int)65), main.random((int)75, (int)96), false); )

Edited by Zappster

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