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
  • Do widget containers have scroll support?


    Silabsoft

    Recommended Posts

    Posted

    I ask because I've been writing a clue solver but my bot is getting stuck on emote tasks that involve scrolling the emote list. I've checked over the API but I am not finding anything that stands out.

    Posted

    Use: http://dreambot.org/javadocs/org/dreambot/api/input/Mouse.html#scrollWhile-boolean-int-org.dreambot.api.utilities.impl.Condition-

    getMouse().scrollWhile(boolean up, int timeout, Condition c);
    
    Scrolls mouse until the condition is true, with specified timeout

    Parameters:

    • up - true to scroll up
    • timeout - timeout in milliseconds
    • c - condition to check

     

    Example:

            Rectangle viewableArea = getWidgets().getWidgetChild(1).getRectangle();
            getMouse().scrollWhile(false/*scroll down*/, 2000 /*2 seconds*/, () -> !viewableArea.contains(getWidgets().getWidgetChild(1).getRectangle()));
    

    The 'viewableArea' rectangle needs to be the rectangle of the emote box itself. It's literally just a way to check if the emote you want to click is on the screen or not...

     

    Then, find the widget of the emote icon you want to click on, and that's the widget you're going to re-check the viewableArea.contains() on the widget of the emote icon. That way, if the viewable area contains the rectangle of the icon to click on, you know that you're able to click on the emote you want.

     

    Understand?

    Posted

    I ask because I've been writing a clue solver but my bot is getting stuck on emote tasks that involve scrolling the emote list. I've checked over the API but I am not finding anything that stands out.

    easy / medium / hard?

     

    I was planning on making an easy solver lol

    Posted

    easy / medium / hard?

     

    I was planning on making an easy solver lol

    Too simple cardozz :P Not complex enough :D

    Posted

    Too simple cardozz :P Not complex enough :D

    I know right.. But I honestly think this would be an awesome script to make :D

    Posted

    I know right.. But I honestly think this would be an awesome script to make :D

    The difficult part about hard clues is making the puzzle box solver :P

    I ask because I've been writing a clue solver but my bot is getting stuck on emote tasks that involve scrolling the emote list. I've checked over the API but I am not finding anything that stands out.

    I think getEmotes().doEmote(Emote emote) might autoscroll not sure

    Posted

    The difficult part about hard clues is making the puzzle box solver :P

     

    I think getEmotes().doEmote(Emote emote) might autoscroll not sure

    So that would be the challenge ay :D

    Posted

    easy / medium / hard?

     

    I was planning on making an easy solver lol

     I am doing easy clues to start with its a cumbersome task because of the number of clue scrolls available 

    Archived

    This topic is now archived and is closed to further replies.

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