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. Your mom could have Herpes though.
  2. You might be right since onPaint gets called before onStart. @OP try this public class Script { public static BufferedImage PAINT_BACKGROUND; static { try { PAINT_BACKGROUND = ImageIO.read(new URL("http://i.imgur.com/hxNYgK6.jpg")); } catch (MalformedURLException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } // onstart ... // onloop ... }
  3. Why? If it was initialized correctly there's no need to check if it's null 30 times per second. @OP empty try-catch blocks are a big no-no.
  4. Try this one. http://johann.loefflmann.net/en/software/jarfix/index.html
  5. Botre posted a topic in Tutorials
    onPaint caveats Description of onPaint: "called when the script should paint it's debug". We are generously going to assume the onPaint(Graph) method gets called 30 times per seconds. @Override public void onPaint(Graphics2D g2d) { super.onPaint(g2d); // Insert custom behavior here. } 1. The method's thread of execution should never be ceased or paused This will lead to inaccurate or lagged rendering, stuttering and an overall unpleasant experience for your end-user. @Deprecated @Override public void onPaint(Graphics2D g2d) { super.onPaint(g2d); /* * BAD CODE! */ try { Thread.sleep(1000); } catch (InterruptedException e) { e.printStackTrace(); } try { sleep(2000); } catch (InterruptedException e) { e.printStackTrace(); } } If your IDE notifies you about an unhandled InterruptedException in your onPaint method, you're probably doing something wrong. 2. Calculate values at efficient intervals Always keep in mind that this method gets called 30 times per seconds however: - Accurate calculation of elapsed seconds requires only one or two calculations per second. - Other calculations (experience, profit, etc...) require even less than that. 3. ... and cache them where possible Avoid recalculation of values (such as elapsed time) used in other calculations, store and re-use where possible! Demonstration of caveats 2 and 3: @ScriptManifest(author = "Traum", info = "Tutorial", logo = "", name = "Tutorial - Paint", version = 0) public class TutorialPaint extends Script { // The String component that will be rendered. private String paintcomponentTime = "Time:"; // We store the starting system's clock time in milliseconds. private long startMilliseconds = System.currentTimeMillis(); // We store the elapsed amount of milliseconds (so we can reuse it instead of having to recalculate it when necessary. private long elapsedMilliseconds = 0; // We use this single thread executor to automatically recalculate / update the paint-required values (every 500 milliseconds). private ScheduledExecutorService paintValueExecutor = Executors.newSingleThreadScheduledExecutor(); // The runnable that will be executed by the executor. private Runnable paintValueRunnable = () -> { // We calculate the elapsed amount of milliseconds. elapsedMilliseconds = System.currentTimeMillis() - startMilliseconds; // We also build the string value of the component that our onPaint method is going to draw, doing this here will save the cost of rapid repeated concatenation. paintcomponentTime = "Time: " + elapsedMilliseconds; }; @Override public void onStart() throws InterruptedException { super.onStart(); paintValueExecutor.scheduleAtFixedRate(paintValueRunnable, 0, 500, TimeUnit.MILLISECONDS); } @Override public int onLoop() throws InterruptedException { // ... return 200; } @Override public void onPaint(Graphics2D g2d) { super.onPaint(g2d); // No object or value is being calculated or created here! (except for the mandatory pixel arrays and stuff like that of course). g2d.drawString(paintcomponentTime, 50, 50); } @Override public void onExit() throws InterruptedException { super.onExit(); paintValueExecutor.shutdown(); } } 4. Avoid transparency Avoid using transparency in your colors and images, your CPU and those of your end-users will thank me later. Only use transparency cleverly where it improves usability, don't use it just for the looks of it. More to come soon, feel free to suggest your best onPaint() tip(s)!
  6. Steve jobs is turning over in his grave. What a joke.
  7. This thread Much Legendary
  8. The fact that you are even remotely caring about the status of your RS account when you're potentially facing prison makes me think there's something wrong in your head.
  9. Botre replied to Qubit's topic in Archive
    I would recommend you just go to your local computer shop and let them diagnose your hardware, just add that extra cost to the damages. Or just google ^^
  10. Botre replied to Qubit's topic in Archive
    If anything is electrically damaged it is most likely going to be the PSU and/or motherboard. GPU, CPU and RAM should be fine, unless you're unlucky. Remove all components and test the current flows of all units separately.
  11. Botre replied to Wind's topic in Archive
    Ouch I'm sure plenty of non-dev-whores would be willing to take over the project.
  12. Botre replied to Wind's topic in Archive
    Actually, if he were to leave after a month then I'm sure OSBot would gladly take over the rights and 100% of the profits of the script's future sales, they would probably make more money from the script that way. @OP, if you are not comfortable or don't feel like writing a free script: you can request to be put on payhold for a month or two instead Just ask the SDN manager ^^
  13. What if their system worked like this: Every time you get caught cheating you get a strike. Every x strikes you are penalized by an offence. This would justify botted accounts being worth less, because they could potentially already have strikes and would therefore be closer to an offence. Unless you can prove that there's no such thing as pre-offence strikes, it's hard to guarantee that botted accounts are an equally safe buy when compared to non-botted accounts.
  14. The example you provided is legal dw This however wouldn't be: List<String> list = new ArrayList<>(); Stream<String> stream1 = list.stream(); Optional<String> optional1 = stream1.findAny(); Optional<String> optional2 = stream1.findAny(); // <-- Illegal Stream<String> stream2 = stream1; Optional<String> optional3 = stream2.findAny(); // <-- Illegal That's why it's recommended to keep both the creation and consumption of Streams in the same one line of code.
  15. Stream<Player> ourStream = getPlayers().getAll().stream(); Stream<Player> ourFilteredStream = ourStream.filter(player -> (player.exists(); Keep in mind that you can only consume a stream once. Nice tutorial though
  16. http://programmers.stackexchange.com/questions/149563/should-we-avoid-object-creation-in-java (Just another side of the story I guess, not disagreeing with you but I saw an opportunity to confuse everyone a little bit more and so I figured: why not?)
  17. It's redundant code though. It might matter some day ^^
  18. System.gc() I'm not even kidding.
  19. Scrambled ETNTFWTPSRWS N-word Tower Eiffel Tiger Poo Rhymes Snotty Whiny Scotty
  20. An anonymous implementation would still make the filter custom, making it as a class makes it easier to reuse it in all your yak scripts I guess :p

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.