Jump to content

Trying to enter a friends POH


Recommended Posts

Posted

I'm having trouble with a function to enter a friends POH. I'm familiar enough with using dialogue that involves simple continues and selecting options, but I can't find out how to enter text when asked for it.
I do have a String variable MyHost I would like to use. Any help would be appreciated.

    void GoHome() throws InterruptedException {
        if (OutsideArea.contains(myPosition())) {
            if(getDialogues().inDialogue()) {

                //Not sure what to put here  <<<-------

            } else {
                RS2Object MyPortal = getObjects().closest("Portal");
                MyPortal.interact("Friend's house");
                sleep(3000);
            }

        } else if (inventory.contains("Teleport to house")) {
            getInventory().getItem("Teleport to house").interact("Outside");
            sleep(5000);
        } else {
            log("Stopping script... No way home");
            stop();
        }
    }

 

Posted
9 minutes ago, Alakazizam said:

I'm having trouble with a function to enter a friends POH. I'm familiar enough with using dialogue that involves simple continues and selecting options, but I can't find out how to enter text when asked for it.
I do have a String variable MyHost I would like to use. Any help would be appreciated.

 

https://osbot.org/api/org/osbot/rs07/api/Keyboard.html#typeString-java.lang.String-

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