Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Try following our getting started guide
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS/Crypto gold? You can purchase vouchers from other users
  • Try asking for help in the chatbox
  • Dealing with Resizable Window in Tutorial Island


    m4rr3co
     Share

    Recommended Posts

    This snippet is meant to be used at the very first NPC encounter your brand new account have at Tutorial Island when opening Tab.Options isn't available. It will start a conversation with the npc and from then it's normal getDialogues management.

            if (c.getClientSettings().isResizableActive()) {
                NPC guide = c.getNpcs().closest(npcName);
                if (c.getDialogues().getOptions() != null && c.getDialogues().chooseOption(1))
                    MethodProvider.sleepUntil(() -> c.getDialogues().canContinue(), Calculations.random(3000, 3500));
                else if (c.getDialogues().canContinue() && c.getDialogues().spaceToContinue())
                    MethodProvider.sleepUntil(() -> c.getDialogues().canContinue() ||
                            c.getDialogues().getOptions() != null,Calculations.random(3000,3500));
                else if(guide != null) {
                    Point p = guide.getModel().calculateCenterPoint();
                    Rectangle GAME_SCREEN = new Rectangle(5, 5, 511, 333);
                    Rectangle CANVAS = new Rectangle(0, 0, 765, 503);
                    int heightAdjust = 0;
                    int widthAdjust = 0;
                    p.setLocation(p.getX() * (CANVAS.getWidth() / GAME_SCREEN.getWidth())+widthAdjust, p.getY() * (CANVAS.getHeight() / GAME_SCREEN.getHeight())+heightAdjust);
                    c.getMouse().hop(p);
                    if (c.getClient().getMenu().contains("Talk-to")) {
                        c.getMouse().click();
                        MethodProvider.sleepUntil(() -> c.getDialogues().canContinue(), 10000);
                    }
                }
            }

    Would love to hear opinions on how to optimize this.

    ps.: i'm not the original author, i just can't find his topic

    Edited by m4rr3co
    Link to comment
    Share on other sites

    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
     Share

    ×
    ×
    • Create New...

    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.