Alakazizam Posted July 22, 2023 Share Posted July 22, 2023 (edited) 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 July 22, 2023 by Alakazizam Quote Link to comment Share on other sites More sharing options...