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.

Token

Script Officer
  • Joined

  • Last visited

Everything posted by Token

  1. Mirror mode doesn't officially support OSBuddy, you will have to load runescape in a browser instead
  2. public static int rec1(int n) { c1++; if (n == 1) { return 1; } else if (n % 2 != 0) { return 1 + rec1(n - 1); } else { return 1 + rec1(n / 2); } } static int c2 = 0; public static int rec2(int n) { c2++; if (n == 1) { return 1; } else if (n % 2 != 0) { return 1 + rec2(n - 1); } else { int sum = 0; do { n = n / 2; sum++; } while (n % 2 == 0); if (n == 1) return 1 + sum; return 1 + sum + rec2(n - 1); } } public static void main(String[] args) { System.out.println(rec1(3128) + "; iterations: " + c1); System.out.println(rec2(3128) + "; iterations: " + c2); } Output: 16; iterations: 16 16; iterations: 5 If you studied CPU architecture you should know every function call creates a new stackframe and new local variables with each call, taking up a lot of memory. SP = stack pointer register BP = base pointer register They are in your CPU, BP points to the base of the stack and SP points to the top stackframe aka the function call being executed by the CPU at a given moment. Recursion is very inefficient memory-wise so the second function, which is still recursive but has an iterative component for powers of 2, is obviously superior.
  3. No matter what you use, you will still check what you actually have in your inventory The API fortunately doesn't provide a Herblore#cleanAllGrimyHerbsInInventoryThenBank()
  4. Try mouse.click(), it should be faster than interact() because it has no sleeps
  5. All successful people dropped out of ivy league, people who actually graduate are no better than others
  6. Token replied to Bucket1337's topic in General Help
    Nope HTTPS proxies only work in browsers
  7. Token replied to Bucket1337's topic in General Help
    Remove the proxy and script flags, if either makes the command work then you know which flag is wrong
  8. Token replied to Bucket1337's topic in General Help
    Is it a local script or SDN? Is your proxy functional?
  9. Token replied to Bucket1337's topic in General Help
    Replace the sensitive information with fake information instead of blocking it, there is definitely a syntax error in there that we cannot see
  10. That's not a mention so he didn't get notified
  11. @Maxi
  12. @@House @Maldesto is COMMUNITY ADMINISTRATOR, not SDN ADMINISTRATOR SDN and git requests are reviewed by the development team
  13. I have that heart beat rate while sleeping
  14. Token replied to Krys's topic in Spam/Off Topic
    If I were ruling the internet I would send all weebs to Auschwitz
  15. The blue light filter is on the glasses in that pic
  16. No, just took a break from the weebs Well, I use many programs since I'm a programmer, but mostly Eclipse, Linux terminal, PhpStorm, Visual Studio or Google Chrome
  17. I use them for programming but I got blue light filter (not orange like in that vid), my doctor recommended me to use them because she knows I work a lot on my PC (at least 10 hours a day) I got them for ~$100
  18. Token replied to melomel's topic in Spam/Off Topic
    Handle them in your script code if you really want to
  19. I always had good grades because I didn't care about grades at all. It's like women - you have to treat them bad to get them
  20. Just post your whole source code, I doubt there is anything wrong with the code above
  21. Then canReach may not be good enough either, just insert a max distance of 8 or so to your tree as condition
  22. Yes it is a problem in the CHOP case as I stated. Invoking interact() on an Entity will create a default InteractionEvent instance which will walk to that Entity if it's too far. InteractionEvent will create a WalkingEvent instance and set it as its child. This WalkingEvent instance will create a LocalPathFinder instance that will generate a path to the closest position from which the target of the InteractionEvent can be accessed. The problem in here is that LocalPathFinder will only generate paths to tiles that are on map, which results in this weird behavior depending on how the current region loaded. Those entities that are not on minimap cannot be walked to, but they are not null so your bot will be stuck there trying to find a path to it. case CHOP: Entity treeToChop = objects.closest(tree); GroundItem birdNest = groundItems.closest("Bird nest"); treeToChop.interact("Chop down"); StatusUpdate = "Chopping " + tree + " logs"; new ConditionalSleep(10000) { public boolean condition() throws InterruptedException { return !treeToChop.exists(); } }.sleep(); if (birdNest != null && pickupBirdsNests == true) { birdNest.interact("Take"); } break; Adjusted some code in there. You already null check the tree in your getState() so the if is redundant. There are many ways to check to check if you can walk to that specific Entity, easiest would be private State getState() { Entity treeToChop = objects.closest(tree); if (inventory.isFull() && powerChop == false) return State.BANK; if(inventory.isFull() && powerChop == true) return State.POWERCHOP; if (treeToChop != null && map.canReach(treeToChop)) return State.CHOP; else return State.WALK; } You can also go with LocalPathFinder lpf = new LocalPathFinder(bot); lpf.findPath(tree); And use lpf.foundPath() As condition to verify if you can walk to your tree. tree.getPosition().isOnMiniMap(bot) Is good but not perfect, it leaves out the 1 in a million case where trees are arranged in such way that the tree is on minimap, but there is no tile on minimap from which you can access it
  23. You missed the case where you are outside the bank but there are no nearby trees, using areas or any other predefined sets of data is generally not a good idea. Remove the areas in your logic and it should look like this private State getState() { Entity treeToChop = objects.closest(tree); if (inventory.isFull() && powerChop == false) return State.BANK; if(inventory.isFull() && powerChop == true) return State.POWERCHOP; if (treeToChop != null) return State.CHOP; else return State.WALK; } And a state that doesn't do anything at all is just bad practice, simply returning from the current loop iteration without performing any actions will yield the same result. PS: you also have the case where you are at the desired location to chop trees but all tree instances are depleted, but since you know the destination you can add this condition to your states Edit: You should post the case CHOP as the error is definitely there

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.