Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[10 Minute Scripts] Make an AIO Agility Script in 10 Minutes???

Featured Replies

Quality video :) just goes to show how simple some scripts are to get into! looking forward to more content Fren :boge:

Cool, thanks! Can you elaborate on this line?

Entity nextObj = getObjects().closest(obj -> Arrays.asList(names).contains(obj.getName()) &&
                Arrays.asList(actions).contains(obj.getActions()[0]) &&
                (getMap().canReach(obj) || obj.getName().equals("Crate")) &&
                !obj.equals(previous));

Why .contains(obj.getActions()[0])? Why the [0], that's got me stuck. What is it's purpose here?

1 hour ago, Athylus said:

Cool, thanks! Can you elaborate on this line?


Entity nextObj = getObjects().closest(obj -> Arrays.asList(names).contains(obj.getName()) &&
                Arrays.asList(actions).contains(obj.getActions()[0]) &&
                (getMap().canReach(obj) || obj.getName().equals("Crate")) &&
                !obj.equals(previous));

Why .contains(obj.getActions()[0])? Why the [0], that's got me stuck. What is it's purpose here?

so you begin from the first object from the array. that's how agility courses work

  • Author
2 hours ago, Athylus said:

Cool, thanks! Can you elaborate on this line?


Entity nextObj = getObjects().closest(obj -> Arrays.asList(names).contains(obj.getName()) &&
                Arrays.asList(actions).contains(obj.getActions()[0]) &&
                (getMap().canReach(obj) || obj.getName().equals("Crate")) &&
                !obj.equals(previous));

Why .contains(obj.getActions()[0])? Why the [0], that's got me stuck. What is it's purpose here?

An object has some set of actions, for example: ["Jump-up", "Walk here", "Examine"]. For agility, we always want to do the first interaction which in most programming languages is the 0 element. So I check my list of actions contains the first action in the object's list of actions, if it does, then I know it is an agility obstacle and I should interact with it.

I see it now, cool! I was mixing up the the array result with the array actions. Thanks.

  • 1 month later...
On 7/29/2018 at 6:44 PM, ProjectPact said:

Why not use a Map with both the object and the action as strings or an Enum?

 

P.S - You have a perfect narrator's voice. <3 

That's what i do for mine ?‍♂️

  • 2 months later...

Hi I am struggling a little bit with compiling.

I want this to pump indefinntly until I stop getting str xp witch should be every 5 mins, then it should continue to the next object which is the coke and fill up until it recieves a message to continue (which mean all spades full x 28) then should move on to fill the stove with coke and wait for another message to continue, once it sees the message it should go back to pumping until the xp stop and loop again.

 

public int onLoop() throws InterruptedException {
        int starting = getExperienceTracker().getGainedXP(Skill.STRENGTH);
        Entity nextObj = getObjects().closest(obj -> Arrays.asList(names).contains(obj.getName()) &&
                Arrays.asList(actions).contains(obj.getActions()[0]) && (getMap().canReach(obj)) && !obj.equals(previous));
        if (nextObj != null && myPlayer().getInteracting() == null && !getDialogues().isPendingContinuation()) {
            if (nextObj.interact(nextObj.getActions()[0])) {
                new ConditionalSleep(10000) {
                    @Override
                    public boolean condition() throws InterruptedException {
                        return getExperienceTracker().getGainedXP(Skill.STRENGTH) < starting;
                    }
                }.sleep();
            } if (getExperienceTracker().getGainedXP(Skill.STRENGTH) > starting){
                previous = nextObj;
            }
        }
        return 250;
    }

Please help.

  • 2 weeks later...

Legend! I have been learning to code for a while now and all these snippets and tutorials are very useful :)

  • 1 month later...

So when I tryed this in Fally it would keep trying to go to previous "Jump" and "Ledge" spot. Is this because there are multiple "Jump" / "Ledge" spots and how would I make it go to the next spot instead of previous?

 

 

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.