Jump to content

Teleporting to GE/Outside of House


faovbot

Recommended Posts

Hi the goal is a very simple script. Start at GE -> teleport OUTSIDE of house with empty buckets in inventory. Fill buckets with sand and teleport back to the GE to deposit and repeat. However, there are no teleport to grand exchange or outside house options so I end up teleporting to varrock square or inside my house which is NOT what I want? Any ideas on how to solve this? My script so far:

public final class FaovSand extends Script  {
    @Override
    public final void onStart() {
    }

    @Override
    public final int onLoop() throws InterruptedException {
        getTabs().open(Tab.MAGIC);
        getBank().open();
        getBank().withdrawAll("Bucket");
        getBank().close();
        if (getInventory().contains("Bucket")) {
            magic.castSpell(Spells.NormalSpells.TELEPORT_TO_HOUSE);
        }

        RS2Object sandpit = getObjects().closest("Sandpit");
        getTabs().open(Tab.INVENTORY);
        getInventory().getItem("Bucket").interact("Use");
        if (sandpit != null && sandpit.interact("Use")) {
            MethodProvider.sleep(5000);
        }
        long buckets = getInventory().getAmount("Bucket of sand");
        log(buckets);
        if (getInventory().contains("Bucket of sand") && getInventory().getAmount("Bucket of sand") >= 26) {
            getTabs().open(Tab.MAGIC);
            magic.castSpell(Spells.NormalSpells.VARROCK_TELEPORT);
        }
        return 10000;
    }
}

 

Link to comment
Share on other sites

1 hour ago, Medusaa said:

Does that script actually work? I feel like it'd be much easier for you if you switched to task based scripts, instead of throwing it all in the onLoop method.

It’s so small it really doesn’t matter, however I recommend better checks, and adding verification to booleans to make sure they return true before proceeding

Link to comment
Share on other sites

Sorry this is my first script I'm trying simple things for now but I definitely will implement checks for each step.

 

I CANNOT just change my house to teleport outside because that makes the left click option Outside house and the bot just right clicks and goes inside. Seems kinda counterproductive. Same thing for the GE but I'm not too worried about the bank location, there are other cities. I don't have a ring of wealth on this acc (low level ironman). Can anyone show me example code of right clicking on the spell or clicking on a house portal to exit the house? Thank you.

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