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

Identifying whether or not a player is on your friends list

Featured Replies

I got a method down for making an array of friends on your friends list. I run this on start for a muling script. Apparently even if your trade settings are set to friends only, osbot still sees other people trying to trade you even though the runescape client doesn't display the trade. I run this onStart so adding friends after the script has started will not add them to the list.

Wanted to share the code I used to help anyone trying to do the same thing and any advice on how to improve it is more than welcome.

 

	String Friends[];




	void GetFriendsList() {
        tabs.open(Tab.FRIENDS);
        for (RS2Widget Wid : getWidgets().get(429,11).getChildWidgets()) {
            String Name = Wid.getMessage();
            Name.replaceAll(" ", "\\u00a0");
            if (!Name.contains("Offline") && !Name.contains("<col=ffff00>") && Name != "") {
                log("Adding friend: " + Name);
                if (Friends != null) {
                    Friends = AddName(Friends.length, Friends, Name);
                } else {
                    Friends = new String[]{Name};
                }
            }
        }
        log("finished adding friends. Friends are : " + Arrays.toString(Friends));
    }




    String[] AddName(int n, String arr[], String x)
    {
        int i;
        String newarr[] = new String[n + 1];
        for (i = 0; i < n; i++)
            newarr[i] = arr[i];
        newarr[n] = x;
        return newarr;
    }



 

Edited by Alakazizam

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

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.