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.

jakealaka9

Members
  • Joined

  • Last visited

  1. I'm still pretty new to Botting and I know while/recursion loops are discouraged, but maybe this is an okay time to use one? I also haven't used widgets, but maybe this would work. while(!displaytaken.isVisible() && !displayabl.isVisible()) { sleep(10); } I don't know if I fully understand what you're asking, but I hope this helped.
  2. 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); } This works almost fine for me. You have to change one thing with the Press enter and release enter. I bet the method generateBotKeyEvent was updated because it shouldn't have the 1 at the end. Instead it should be getBot().getKeyEventHandler().generateBotKeyEvent(401, System.currentTimeMillis(), 0, 10, '\u0000'); and getBot().getKeyEventHandler().generateBotKeyEvent(402, System.currentTimeMillis(), 0, 10, '\u0000'); Of course there is also some natural delay between when the chat is sent and when it appears, but it instantly types and sends the message. The code I tested this with and worked is here: package net.chatbox.instantchat; import java.awt.event.KeyEvent; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; @ScriptManifest(author = "Helper", info = "Instant Chat", logo = "", name = "Instant Chatter", version = 0) public class InstantChat extends Script{ @Override public int onLoop() throws InterruptedException { return 100; } public void onStart(){ typeStringInstant("This probably will work just fine for me"); } public void onExit() { typeStringInstant("Double-checking this"); } 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'); // Release enter getBot().getKeyEventHandler().generateBotKeyEvent(402, System.currentTimeMillis(), 0, 10, '\u0000'); } }
  3. From what I've heard, Anti-ban is a meme and getting banned is inevitable if you're trying to 99 all skills. Not an if, but a when. Especially since no one has any real clue about what the bot-detecting actually does to detect bots.
  4. Okay, the problem was that Ferns and Daisies and such are InteractableObject, not GroundDecoration. I see this got a few views and no replies so hope this helped someone.
  5. Hello, I'm making a firemaking script, and I'm having a problem with a line of code. I'm checking to see if my location has any GroundDecoration entities on it. If I'm not mistaken, some examples of GroundDecorations are Fire, Flowers, Fern, Small Fern. I don't understand why this code sometimes does, sometimes doesn't detect that the entity on the location is a GroundDecoration. It worked with one Fern, reaching "here3", and for another Fern with the same ID in a different location it didn't work, it only reached "here2". Can anyone help? boolean move = false; if(script.objects.get(script.myPosition().getX(), script.myPosition().getY()) != null) { script.log("here1"); for(RS2Object item : script.objects.get(script.myPosition().getX(), script.myPosition().getY())) { script.log("here2"); if(item instanceof GroundDecoration) //Problem Line { script.log("here3"); move = true; } } }
  6. Thank you, I have resolved my problems with some more workarounds and cleaned up my if statements. I don't know how to resolve a topic, I would if I knew how to.
  7. Hello, I'm still very new to OSBot coding, and I don't understand why my doing (inventory.interact("Use", "Tinderbox", "Logs")) only selects either logs or tinderbox, whichever comes first. Could someone explain? EDIT: Okay so I found a workaround, although I would still like original question answered. Also, now I'm having problems with what it returns. For some reason this doesn't seem to return false, so my player wont move. I decided I would just paste this snippet. I realize it's not made the best way it can be right now, so if you guys have any suggestions, feel free to add them. while(script.inventory.contains("Logs")) { if(!script.myPlayer().isAnimating()) { script.inventory.interact("Use", "Tinderbox"); if(!script.inventory.interact("Use", "Logs")) { if(!script.walking.walk(new Position(script.myPlayer().getX()+1, script.myPlayer().getY(), script.myPlayer().getZ()))) { if(!script.walking.walk(new Position(script.myPlayer().getX()-1, script.myPlayer().getY(), script.myPlayer().getZ()))) { if(!script.walking.walk(new Position(script.myPlayer().getX(), script.myPlayer().getY()+1, script.myPlayer().getZ()))) { script.walking.walk(new Position(script.myPlayer().getX(), script.myPlayer().getY()-1, script.myPlayer().getZ())); } } } } } MethodProvider.sleep(MethodProvider.random(300, 400));

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.