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.

Explv

Scripter II
  • Joined

  • Last visited

Everything posted by Explv

  1. The webWalk method accepts an area. There are several predefined areas for banks: getWalking().webWalk(Banks.VARROCK_WEST); Or without using the Banks class: getWalking().webWalk(new Area(3180, 3433, 3185, 3447));
  2. This is how you integrate JavaFX into a Swing application: https://docs.oracle.com/javase/8/javafx/interoperability-tutorial/swing-fx-interoperability.htm It's probably safer to just use Swing though
  3. I have updated the account switching to use the built in OSBot method, so it will work without using the default account or disabling randoms
  4. Fixed, download the latest version
  5. I will fix it tonight and notify you when it is uploaded.
  6. Explv replied to Explv's topic in Others
    Thanks
  7. I'm a douche for not writing your script for you? I don't see how recommending that you spend some more time learning Java to help yourself makes me a douche either.
  8. String class: https://docs.oracle.com/javase/8/docs/api/java/lang/String.html A tutorial on variables: https://www.tutorialspoint.com/java/java_variable_types.htm
  9. Yes and I have helped you, this is the scripting help section, not the teaching basics of Java section You get the parameters String using: String parameters = getParameters(); Parse the information you need from the String, store the results. Then when you want to withdraw from the bank you use getBank().withdraw(String itemName, int amount); Using your stored information. I am not going to write down every line of code to do that, because you should be able to do it if you have basic knowledge of Java. Which is why I am recommending, that if you DONT know how to do that, then you should learn some more Java then come back to Scripting.
  10. I have shown you how to get the parameters String, parse the information you need from that String using whatever format you want. If you don't know what to do after that, I would recommend that you spend some more time learning Java, because this isn't really a scripting help question, it's just basic programming.
  11. You can withdraw items from the bank using: getBank().withdraw(String itemName, int amount); Consider reading the API documentation: http://osbot.org/api/org/osbot/rs07/api/Bank.html#withdraw-java.lang.String-int-
  12. You get the script parameters string using the getParameters() method in the Script class String parameters = getParameters();
  13. That would require the mule to be always logged on, which isn't really what op was trying to achieve
  14. You could try doing something like this: @ Override public void pause() { if (getBot().getRandomExecutor().getTimeUntilBreak() == 0) { pickUpCannon(); } }
  15. import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.net.URL; import java.net.URLConnection; import java.util.Optional; import java.util.regex.Matcher; import java.util.regex.Pattern; public class Example { public static void main(String[] args) { Example example = new Example(); example.getItemsJson().ifPresent(json -> { example.getItemID(json, "Greenman's ale").ifPresent(System.out::println); example.getItemID(json, "Cannonball").ifPresent(System.out::println); example.getItemID(json, "Raw trout").ifPresent(System.out::println); example.getItemID(json, "Rune scimitar").ifPresent(System.out::println); example.getItemID(json, "Lobster").ifPresent(System.out::println); }); } private Optional<Integer> getItemID(final String json, final String itemName) { return getItemFromJson(json, itemName).flatMap(this::getItemIDFromItemJson); } private Optional<String> getItemFromJson(final String json, final String itemName) { Matcher matcher = Pattern.compile("(\\{[^}]*\"name\"\\s*:\\s*\"" + Pattern.quote(itemName) + "\"[^}]*})").matcher(json); return matcher.find() ? Optional.of(matcher.group(1)) : Optional.empty(); } private Optional<Integer> getItemIDFromItemJson(final String json) { Matcher matcher = Pattern.compile("\"id\"\\s*:\\s*(\\d*)").matcher(json); return matcher.find() ? Optional.of(Integer.parseInt(matcher.group(1))) : Optional.empty(); } private Optional<String> getItemsJson() { try { URL url = new URL("https://rsbuddy.com/exchange/summary.json"); URLConnection con = url.openConnection(); con.setRequestProperty("User-Agent", "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36"); con.setUseCaches(true); try (InputStreamReader in = new InputStreamReader(con.getInputStream()); BufferedReader br = new BufferedReader(in)) { String json = br.readLine(); json = json.replaceAll("\\\\u0027", "'"); json = json.replaceAll("\\\\u0026", "&"); return Optional.of(json); } } catch (IOException e) { e.printStackTrace(); } return Optional.empty(); } } Output: 8522 2 335 1333 379
  16. I noticed there was a slight error in one of the regex patterns, it may have been causing issues for you. I have fixed it in the original post.
  17. Do you mean smelting? Because I just tested smelting gold bars and it works fine. I just tested making gold amulet (u)s and it doesn't stop after making 8 for me. Do you mean stringing amulets?
  18. I have pushed fixes for both of these issues, they will be available when the SDN is next updated, thanks.
  19. I have pushed a fix for selecting the option at the start of Tutorial Island. It will be available when the SDN is updated, thanks.
  20. I think that the space complexity is O(n) because the method returns a generator, essentially meaning that it generates each value on request. The only thing stored is the input which is O(n)Regarding time complexity, I would assume that it is O(n!) to generate all of the permutations.
  21. OP is asking if the time and space complexities he stated are correct, not for a 'shortcut'. Also big O notation is very useful as it is a high level way of expressing the efficiency of an algorithm, allowing you to see how it will scale and compare it with other algorithms. It isn't for showing off or just for homework...
  22. Do you have to do it that way? It seems very inefficient
  23. I support having a list of banned users and the reason for them being banned. However, the email suggestion I disagree with. Consider the case where someone is falsely banned for scamming, their personal email is now released for people to abuse. Secondly, it is unlikely a scammer created their OSBot account with a non-throwaway email address anyway, and even if they have, they will just make a new account after this rule is enforced. Even if the scammer did create an OSBot account with a non-throwaway email address, what are you going to do with that information? I'm pretty sure doxing them is illegal Hacking their email is illegal So all you have done by releasing their email address is cause the above. Regardless of those points, it is probably illegal for OSBot to release that information in the first place.
  24. You have several options. If you know what items you want to buy, just hardcode the item ids Write your own buy method that uses item names instead of ids Use an existing buy method that uses item names instead of ids, there are already snippets around on the forum, for example: http://osbot.org/forum/topic/90148-simple-ge-api

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.