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.

Explv

Scripter II
  • Joined

  • Last visited

Everything posted by Explv

  1. For some reason getKeyboard().pressKey(c); getKeyboard().releaseKey(c); Does not work for me (maybe I am doing something wrong) However this does: private void typeStringInstant(String output){ for(int i = 0; i < output.length(); i ++){ char c = output.charAt(i); int code = KeyEvent.getExtendedKeyCodeForChar(c); // Type the character getBot().getKeyEventHandler().generateBotKeyEvent(400, System.currentTimeMillis(), 0, code, c); } // Press enter getBot().getKeyEventHandler().generateBotKeyEvent(401, System.currentTimeMillis(), 0, 10, '\u0000', 1); // Release enter getBot().getKeyEventHandler().generateBotKeyEvent(402, System.currentTimeMillis(), 0, 10, '\u0000', 1); } Edit: GIF demonstration: https://gyazo.com/36757b8e49c1abbcc4b0a4090bb6322e
  2. Make sure your script is correct, and that 'compiled output' is added to your .jar Sometimes deleting the OSBot folder, restarting OSBot, and then copying the .jar into the newly created OSBot/Scripts folder works for me
  3. It's just because if Fagex change the IDs you'll have to change all your scripts. But each to their own i guess ^_^
  4. Why aren't you just using the names e.g. "Stamina potion(1)" ??? ^_^
  5. Stamina mix(1) : 12635 Stamina mix(2) : 12633 Stamina potion(1) : 12631 Stamina potion(2) : 12629 Stamina potion(3) : 12627 Stamina potion(4) : 12625 Don't know why you would need the IDs though
  6. But how is that any different
  7. "As far as other APIs are concerned, they are typically made to bridge the gap between no knowledge and full knowledge (at least mine is). There are a lot of things that OSBot's API does that it shouldn't do" That IS what it should do, it makes sense in your program to write NPC dwarf = getNpcs().closest("Dwarf"); if( dwarf != null ) dwarf.interact("Attack"); So that you can then handle the case where there isn't a Dwarf nearby. NPC dwarf = getNpcs().closest("Dwarf"); if( dwarf != null ) dwarf.interact("Attack"); else log("Where's he gone??"); It doesn't make sense to create a seperate method in an API to handle the null case, just sayin' ;)
  8. Read about Java Swing and how to use its components.
  9. List<String> messages = getChatbox().getMessages(MessageType.PLAYER); it returns a list of messages, not a single message. Edit: If you are trying to get the most recent message you would use something like: List<String> messages = getChatbox().getMessages(MessageType.PLAYER); String message = messages.get(messages.size() - 1);
  10. I have now implemented some changes like this, the SDN script should be updated
  11. Sounds like a good idea, I will implement something like this today Thanks for the feedback
  12. These changes have been made and committed
  13. Thanks for checking it out I'll get on with fixing those things
  14. The script does resume Tutorial Island from where it left off. If sometimes this does not work, I think it may be due to the configs in the client not loading properly.
  15. I will take a look now, thanks I have added some more checks into the Fishing section which should hopefully prevent that from happening. I could not however recreate the mining bug, I will continue to test and see if it happens. For now I will post an update for the fishing bug. Please let me know if the problems still occur, thanks
  16. So would I if you want it to look nice, just trying to show its more commonly understood alternative
  17. You could use the IDs of the different chests, although this might break if the IDs ever change. Or yes use Loud packs technique, where you just create two positions, one for each Chest, and interact with the chest in the relevant position: Without the use of a filter, to loot "Chest 1" would look like: Position chest1 = new Position(x, x, x); for ( RS2Object obj : getObjects() ){ if (obj.getPosition() == chest1 ){ obj.interact(); break; } } Or with a filter: getObjects().closest(o -> o.getPosition().equals(new Position(x, x, x))).interact();
  18. Thanks dude
  19. I made a little class that will hopefully deal with this ( not properly tested ) import org.osbot.rs07.api.ui.RS2Widget; import org.osbot.rs07.api.ui.Tab; import org.osbot.rs07.script.Script; import java.util.Random; public class ClanChatter{ private Script script; public ClanChatter(Script script){ this.script = script; } public boolean notInClanChat(){ RS2Widget notInChat = script.getWidgets().getWidgetContainingText("Not in chat"); return (notInChat != null && notInChat.isVisible()); } public void openClanChatTab(){ script.getTabs().open(Tab.CLANCHAT); } public boolean isClanChatTabOpen(){ return Tab.CLANCHAT.isOpen(script.getBot()); } public boolean isInClanChat(){ RS2Widget talkingIn = script.getWidgets().getWidgetContainingText("Talking in:"); return (talkingIn != null && talkingIn.isVisible() && !talkingIn.getMessage().contains("Not in chat")); } public void joinClanChat(String name){ //RS2Widget enterName = getWidgets().getWidgetContainingText("Enter the player name whose channel you wish to join:"); RS2Widget enterName = script.getWidgets().get(162, 32); RS2Widget joinChat = script.getWidgets().getWidgetContainingText("Join Chat"); if (enterName != null && enterName.isVisible()){ script.getKeyboard().typeString(name); sleep(4000, 5000); } else if (joinChat != null && joinChat.isVisible()) clickOnWidget(joinChat); } public void leaveClanChat(){ RS2Widget leaveWidget = script.getWidgets().getWidgetContainingText("Leave Chat"); if (leaveWidget != null && leaveWidget.isVisible()) clickOnWidget(leaveWidget); } public boolean isInClan(String name){ RS2Widget talkingIn = script.getWidgets().getWidgetContainingText("Talking in:"); return talkingIn.getMessage().contains(name); } public boolean isOwner(String name){ RS2Widget owner = script.getWidgets().getWidgetContainingText("Owner:"); return owner.getMessage().contains(name); } public void talkInClanChat(String output){ script.getKeyboard().typeString(String.format("/%s", output)); sleep(1500, 2000); } private void clickOnWidget(RS2Widget widget){ widget.hover(); script.getMouse().click(false); sleep(1500, 2000); } private void sleep(int min, int max){ try{ script.sleep(new Random().nextInt(max-min) + min); } catch(Exception e){ script.log(e); } } }
  20. Consider these bugs squashed.
  21. That's strange, it's worked for me every time. I'm sure there's still some bugs that need fixing in small places. I'm currently working on some new features, but will take a look at that straight after. Thanks for letting me know
  22. I think Tutorial Island is generally a banning hotspot. But don't worry i'm working on some more antiban stuff as we speak, update will be later today. Hopefully will improve
  23. Put it into the OSBot/Scripts folder, then reload OSBot
  24. Weird, I'll have to work on some nice antiban features
  25. Wubalubadubdub

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.