Jump to content

Blast Furnace Put-ore-on walking issue


crackyboi

Recommended Posts

I'm attempting to make a blast furnace script, and I am having issues with putting the ores on the conveyor belt.
I have attempted to walk to the ground level of the ramp and use this:

getObjects().closest("Conveyor belt").interact("Put-ore-on");

The client seems to have trouble interacting with it from the bottom of the ramp(works about 1/5 times)
I noticed that the client doesn't seem to have an issue if I start the script at the top of the ramp. This lead me to attempting to walk to the top of the ramp.
The problem I have is that the client tends to try to walk to the other side of the ramp, making it obvious that I am botting.

Even with a walk event with mindistancethreshold(0), The client seems to click on the other side of the ramp before clicking on the intended square
How should I address this problem?
I just want the client to walk to the bottom of the ramp, then the top without clicking on the other side of the ramp.
Thanks in advance!

Link to comment
Share on other sites

5 hours ago, crackyboi said:

I'm attempting to make a blast furnace script, and I am having issues with putting the ores on the conveyor belt.
I have attempted to walk to the ground level of the ramp and use this:


getObjects().closest("Conveyor belt").interact("Put-ore-on");

The client seems to have trouble interacting with it from the bottom of the ramp(works about 1/5 times)
I noticed that the client doesn't seem to have an issue if I start the script at the top of the ramp. This lead me to attempting to walk to the top of the ramp.
The problem I have is that the client tends to try to walk to the other side of the ramp, making it obvious that I am botting.

Even with a walk event with mindistancethreshold(0), The client seems to click on the other side of the ramp before clicking on the intended square
How should I address this problem?
I just want the client to walk to the bottom of the ramp, then the top without clicking on the other side of the ramp.
Thanks in advance!

I've never had this issue myself so I'm not sure. Here's the code I used for interacting with the belt. Might help you get it going as I imagine it's a problem in your code rather than the client.

package furnace.sections;

import org.osbot.rs07.api.model.Item;
import org.osbot.rs07.api.model.RS2Object;
import org.osbot.rs07.api.ui.EquipmentSlot;
import org.osbot.rs07.script.MethodProvider;
import settings.Settings;
import utils.Sleep;

import static org.osbot.rs07.api.ui.Skill.SMITHING;

public class Belt extends Section {

    public Belt(MethodProvider api, Settings settings) {
        super(api, settings);
    }

    public void placeOre() {
        if (!api.getEquipment().isWearingItem(EquipmentSlot.HANDS, "Goldsmith gauntlets")) {
            Item gloves = api.getInventory().getItem("Goldsmith gauntlets");
            if (gloves != null) {
                if (gloves.interact("Wear")) {
                    Sleep.sleepUntil(() -> api.getEquipment().isWearingItem(EquipmentSlot.HANDS, "Goldsmith gauntlets"), 10_000);
                }
            }
        } else {
            RS2Object belt = getBelt();
            if (belt != null) {
                if (belt.interact("Put-ore-on")) {
                    Sleep.sleepUntil(() -> !api.getInventory().contains("Gold ore") || mustPayForeman(), 10_000);
                    if (mustPayForeman()) {
                        settings.setShouldPayForeman(true);
                    } else {
                        Sleep.sleepUntil(() -> !api.getInventory().contains("Gold ore"), 10_000);
                        settings.setXpBeforePlacingOre(api.getSkills().getExperience(SMITHING));
                        if (!api.getInventory().contains("Gold ore")) {
                            settings.setOreOnBelt(true);
                        }
                    }
                }
            }
        }
    }

    private RS2Object getBelt() {
        return api.getObjects().closest(b -> b.getName().equals("Conveyor belt") && b.hasAction("Put-ore-on"));
    }

    private boolean mustPayForeman() {
        return api.getWidgets().singleFilter(api.getWidgets().getAll(),
                widget -> widget.isVisible() && (widget.getMessage().contains("You must ask the foreman's permission before using the blast<br>furnace"))) != null;
    }
}

 

  • Like 1
  • Heart 1
Link to comment
Share on other sites

  • 2 years later...
On 12/5/2018 at 4:48 AM, Ragnar Lothbrok said:

I've never had this issue myself so I'm not sure. Here's the code I used for interacting with the belt. Might help you get it going as I imagine it's a problem in your code rather than the client.


package furnace.sections;

import org.osbot.rs07.api.model.Item;
import org.osbot.rs07.api.model.RS2Object;
import org.osbot.rs07.api.ui.EquipmentSlot;
import org.osbot.rs07.script.MethodProvider;
import settings.Settings;
import utils.Sleep;

import static org.osbot.rs07.api.ui.Skill.SMITHING;

public class Belt extends Section {

    public Belt(MethodProvider api, Settings settings) {
        super(api, settings);
    }

    public void placeOre() {
        if (!api.getEquipment().isWearingItem(EquipmentSlot.HANDS, "Goldsmith gauntlets")) {
            Item gloves = api.getInventory().getItem("Goldsmith gauntlets");
            if (gloves != null) {
                if (gloves.interact("Wear")) {
                    Sleep.sleepUntil(() -> api.getEquipment().isWearingItem(EquipmentSlot.HANDS, "Goldsmith gauntlets"), 10_000);
                }
            }
        } else {
            RS2Object belt = getBelt();
            if (belt != null) {
                if (belt.interact("Put-ore-on")) {
                    Sleep.sleepUntil(() -> !api.getInventory().contains("Gold ore") || mustPayForeman(), 10_000);
                    if (mustPayForeman()) {
                        settings.setShouldPayForeman(true);
                    } else {
                        Sleep.sleepUntil(() -> !api.getInventory().contains("Gold ore"), 10_000);
                        settings.setXpBeforePlacingOre(api.getSkills().getExperience(SMITHING));
                        if (!api.getInventory().contains("Gold ore")) {
                            settings.setOreOnBelt(true);
                        }
                    }
                }
            }
        }
    }

    private RS2Object getBelt() {
        return api.getObjects().closest(b -> b.getName().equals("Conveyor belt") && b.hasAction("Put-ore-on"));
    }

    private boolean mustPayForeman() {
        return api.getWidgets().singleFilter(api.getWidgets().getAll(),
                widget -> widget.isVisible() && (widget.getMessage().contains("You must ask the foreman's permission before using the blast<br>furnace"))) != null;
    }
}

'

Wow thank you for this, can you give me some advice on the main loop how long you should put the return statement? do you have put it for 10seconds

Link to comment
Share on other sites

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