Jump to content

Blinking widgets, mouse clicks and tut island progress track


Kramnik

Recommended Posts

Hi,

Wanted to give me some scripting challenge so decided to make my personal tutorial island script and got few question to talk about.

First of all how do you deal with blinking widgets? They are switching between e.g. 194, 35 to 194, 48. 194, 35 being wrench widget and other whole bar. Tried using wrench widgets but it simple doesn't click it.

To solve this at least for now I implemented simple mouse click. So what you think about using simple mouse clicks in scripts in general? At first I though it just so easy to detect because of clicking same exact pixel every time, but later I though if I just measure approx area where the widget is and make rand num generating so it wouldn't click the pixel every time so this in my mind could be quite easy solutions in some situations and also in this case there won't be any headaches when widget id changes :)

And lastly still haven't fully sorted out how to track progress in tutorial island. Maybe with items in inventory? With others maybe icons and just go backwards. Like:

if(runes is inventory){
mageGuide();

} else if(friends widget is visible{

monkGuide();

}

and etc. :) 

Link to comment
Share on other sites

Definitely as FuryShark said, configs are a must for any quest like task. I think for tutorial island the config id you will be using is 281.

If you want to get a widget based on an interaction you can do something like this:

private RS2Widget getWidgetContainingInteraction(String interaction) {
    for (RS2Widget widget : getWidgets().getAll()) {
        String[] actions = widget.getInteractActions();
        if (actions != null)
            for (String action : actions) {
                if (action != null && action.equals(interaction))
                    return widget;
            }
    }
    return null;
}
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...