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.

Botre

Members
  • Joined

  • Last visited

Everything posted by Botre

  1. Botre replied to 2007's topic in Spam/Off Topic
    1026 1026
  2. Dw it's a common mistake, glad you solved it
  3. Botre replied to 2007's topic in Spam/Off Topic
    1024
  4. Make sure you are using the OSBot API import. That is: org.osbot.rs07.api.map.Position and not: javax.swing.text.Position
  5. Botre replied to 2007's topic in Spam/Off Topic
    1022
  6. Botre replied to 2007's topic in Spam/Off Topic
    1019
  7. Botre replied to VladBots's topic in Resolved
    Why would you even make a thread about this, ever heard about PMs?
  8. Botre replied to 2007's topic in Spam/Off Topic
    1016
  9. Appreciative of your recent burst of activity and overall work in general :--)
  10. If you use this, make sure you only call this method when clicking. Not the kind of method you want to call every couple of ms.
  11. This release seems extremely CPU extensive / laggy indeed, even when not running a script :-/
  12. Botre replied to Gundamwing00's topic in Introductions
    Welcome
  13. Welcome Back
  14. Botre replied to dudeyoyo's topic in Introductions
    Welcome!
  15. Thanks : x
  16. Welcome young padawan.
  17. Botre replied to 2007's topic in Spam/Off Topic
    1009
  18. I'm pretty sure it's something they are working on (one proxy / tab)
  19. Yes looks good, I recommend you do the same for the bones cheers
  20. //IMPORTS public class main extends Script { private NPC one_goblin_per_scan; // GLOBAL GOBLIN VARIABLE private long timeBegan; private long timeRan; //... private State getState() { one_goblin_per_scan= npcs.closest("Goblin"); // STORE GOBLIN // ... } @Override public int onLoop() throws InterruptedException { switch (getState()) { //... case KILL: if (one_goblin_per_scan!= null && !myPlayer().isAnimating() && !(one_goblin_per_scan.isUnderAttack()) { (one_goblin_per_scan.interact("Attack"); sleep(random(800, 1000)); //... }
  21. Sure: 1. The WAIT state doesn't require a sleep, this just makes your script slower and less responsive which I wouldn't call desirable. I suggest you leave that state blank. Keep in mind every time the script loops it already sleeps for the onLoop()'s return value (in your case 200-300 ms). 2. Every time getState() is called you look for both the closest goblins and the closest bones. I suggest you look first for the goblin to check if the KILL state is valid. If the KILL state is not valid, then and only then look for the closest bones. Only try and get a value when that value is required. Like so: // mhm let's search the closest goblin to see if the KILL state is valid. NPC goblin = npcs.closest("Goblin"); if (goblin != null && !myPlayer().isAnimating() && !goblin.isUnderAttack()) return State.KILL; // if the code reaches this point it means the KILL state isn't valid. // what should I do next? mhm perhaps I should try and find the closest bones now. GroundItem bones = groundItems.closest("Bones"); if (bones != null && !myPlayer().isUnderAttack()) return State.PICKUP; 3. This one is also related to goblins and bones. I'm going to demonstrate the issue with the goblin case. In your getState() you scan all NPCs and try to get the closest goblin, you then store the value of that goblin locally and when the method has finished the value is discarded. Ok so a goblin was found, you are ready to kill but... you already forgot which one to kill (the previously locally stored value is already gone *sadface*). You rescan all NPCs again for the closest goblin and now you can finally attack it. That's two scans for one goblin. If you were to store the closest goblin found in the getState() method in a global value then you could just re-use that value in your onLoop(), boom: one goblin, one scan. 4. These are small errors, you are doing a great job and you might not even notice the difference when fixing these inefficiencies ;)
  22. You just can't resist a gentle tease eh... :$
  23. I've seen a lot of scripts and I can tell you that this one is really clean / easy to read, especially for a first one! There are a few things that are redundant / could be more efficient but overall this is really nice Gratz!

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.