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.

HeyImJamie

Java Lifetime Sponsor
  • Joined

  • Last visited

Everything posted by HeyImJamie

  1. Awesome! Now I'd suggest you start looking at other things, such as better checks on the booleans available to you, and maybe neatening it even more? For example: You can use && to check for multiple conditions in one line!
  2. Does f not have a getName option? !f.equals("name")
  3. I'm not quite sure what your question is haha. Assuming you want it to be neater? The reason your else if's weren't working is likely due to how you had your code ordered. In regards to neatening it, why not simplify it a little? if (Inventory.isFull()){ // we can't mine, so bank bank(); } else { // all good, we can mine mine(); } private void bank() { // bank code } private void mine() { if !area.contains(player) { walk to the area! } else { we can mine, put mine code here } } There's obviously much nicer ways than this, but this would be a good starting point for you
  4. I haven't read all of the above comments, but the reason why your script wouldn't load is because you were trying to create your RSObject variable outside of the loop, where the script wouldn't have loaded properly. This was causing it to 'crash'.
  5. I haven't scripted for a while, but I believe it's GAME. You don't need to do getChatbox().getMessages() either.
  6. First suggestion would be to look at Enums for storing all your variables related to Trees. Next would just be improving code readability. Good start for 3 days though!
  7. Yes, but when do you set the state back to FISHING once you've set it to DROPPING? You don't, so it will get stuck.
  8. Like I stated, it will work once. Let it fish a full inventory, drop it, and get back to me.
  9. It's a learning lesson for all. No hatred, just discussing.
  10. You do not set your states anywhere, so the script you have posted will not work. ? Edit: Upon re-reading it, I've spotted where you set your state, but I still can't see it working. The script will inevitably get stuck dropping forever, as the state is never set back to fishing.
  11. Where are you setting your states? Also this may be preference, but wouldn't it be easier just to make use of a switch statement. Something like this perhaps. private int onLoop() [ switch (getBotState()) { case WALK_TO_AREA: // walk code break; case DROP: // dropping code break; case FISH: // fishing code break; } return 50; } private enum BotState { WALK_TO_AREA, DROP, FISH } private BotState getBotState() { if (!area.contains(Player)) { return BotState.WALK_TO_AREA; return Inventory.isFull ? BotState.DROP : BotState.FISH; }
  12. HeyImJamie replied to Master00j's topic in Spam/Off Topic
    Looks good, but I'd spell check it. I looked at it for about 10 seconds and found 4 mistakes. Can't see that coming off as very professional ?
  13. Looks good, but may I suggest making it a more 'universal' method? I've edited slightly on here so there may be a few errors etc, but this gives you an idea. This way instead of editing the method everytime to edit it to your combat style, you can just select which style you want. You could even make an AttackStyle enum for readability, rather than using ints. public boolean switchCombatStyle(int combatStyle) { int style = getConfigs().get(43); if (combatStyle == style) { return true; } switch (combatStyle) { case 0: RS2Widget attButton = getWidgets().get(593, 3); if (attButton != null && getTabs().open(Tab.ATTACK)) { if (attButton.interact()) { // sleep until style equals desired. } } break; case 1: RS2Widget strButton = getWidgets().get(593, 7); etc break; case 2: break; case 3: RS2Widget defButton = getWidgets().get(593, 15); etc break; } return combatStyle == getConfgs().get(43); }
  14. Why claim you've written the sleep class when you clearly haven't.
  15. Don't copy paste other peoples code and you won't get cucked like this.
  16. I wouldn't put that code in onMessage if I were you. Use it to set a boolean and hop based on that.
  17. If you let me know what quest it is I can see if I have the Varbits.
  18. Look into Varbits.
  19. HeyImJamie replied to Butta's topic in General Help
    Box it
  20. I'd still add a sleep. It's iterating far too fast for what it should, surprised it's even running tbh.
  21. Can you show your script?
  22. ???

    HeyImJamie replied to Arctic's topic in Spam/Off Topic
    As opposed to promoting someone else's stuff?
  23. It won't on one client. Multiple clients however and it becomes a nuisance. Cool idea though, will be nice to see how it develops.

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.