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. I'm going to assume that with "non-aggressive" you mean "sleeping" and not "not automatically attacking the player". If I'm assuming wrongly then there's no way to find out if a monster is aggressive (in the API at least, that I'm aware of) but crabs in the "awake" state are ALWAYS NPCs. "Sleeping" crabs are classified as Object (I'm pretty sure they are at least). You can verify yourself with this debugger: NPC crab = //GET AWAKE CRAB HERE. if (crab.getInteracting() != null) { if (getInteracting().equals(myPlayer()) { // CRAB IS INTERACTING WITH ME } else { // CRAB IS INTERACTING WITH OTHER PLAYER (OR NPC) } } Hope this helped. Edit: like APA said, not sure if there's room for another RC script on the market tbh :p
  2. PSG beat Chealsea, so PSG.
  3. I seem to be having some trouble with caching the inventory amounts. Halp :x import java.util.Map; import java.util.TreeMap; import org.osbot.rs07.api.model.Item; import dependencies.script.BotreScript; /** * @author Bjorn Krols (Botre) * @version 0.0 * @since April 20, 2015 */ public class InventoryListener extends Thread { private final BotreScript script; private Map<String, Integer> oldCache, newCache; public InventoryListener(final BotreScript script) { this.script = script; oldCache = new TreeMap<String, Integer>(); newCache = new TreeMap<String, Integer>(); } @Override public void run() { while (script.isRunning()) { if (script.isOnline()) { oldCache = newCache; newCache.clear(); for (Item item : script.getInventory().getItems()) if (item != null && !newCache.containsKey(item.getName())) newCache.put(item.getName(), (int) script.getInventory().getAmount(item.getName())); onUpdate(); } try { Thread.sleep(3000); // SLOW FOR READABILITY } catch (InterruptedException e) { e.printStackTrace(); } } } public void onUpdate() { } public int getDifference(String name) { if (oldCache.containsKey(name) && newCache.containsKey(name)) { script.log("old " + oldCache.get(name)); script.log("new" + newCache.get(name)); return newCache.get(name) - oldCache.get(name); } else return 0; } } How it currently logs: [INFO][Bot #1][04/21 02:55:09 AM]: old 7 [INFO][Bot #1][04/21 02:55:09 AM]: new7 [INFO][Bot #1][04/21 02:55:12 AM]: old 9 [INFO][Bot #1][04/21 02:55:12 AM]: new9 [INFO][Bot #1][04/21 02:55:15 AM]: old 10 [INFO][Bot #1][04/21 02:55:15 AM]: new10 [INFO][Bot #1][04/21 02:55:18 AM]: old 12 [INFO][Bot #1][04/21 02:55:18 AM]: new12 How it's supposed to log: [INFO][Bot #1][04/21 02:55:09 AM]: old 5 [INFO][Bot #1][04/21 02:55:09 AM]: new7 [INFO][Bot #1][04/21 02:55:12 AM]: old 7 [INFO][Bot #1][04/21 02:55:12 AM]: new9 [INFO][Bot #1][04/21 02:55:15 AM]: old 9 [INFO][Bot #1][04/21 02:55:15 AM]: new10 [INFO][Bot #1][04/21 02:55:18 AM]: old 10 [INFO][Bot #1][04/21 02:55:18 AM]: new12 Solved: if (script.isOnline()) { oldCache.clear(); oldCache.putAll(newCache); newCache.clear(); for (Item item : script.getInventory().getItems()) if (item != null && !newCache.containsKey(item.getName())) newCache.put(item.getName(), (int) script.getInventory().getAmount(item.getName())); onUpdate(); }
  4. myPlayer().isAnimating(); isAnimating() - Method in class org.osbot.rs07.api.model.Character Whether the character is performing an animation.
  5. You'd still need a client to read the data from the game + control the main mouse Oo edit: nvm misread.
  6. You're overthinking this, I doubt changing the seed would change much if anything.
  7. y u break my hard?
  8. beep boop boop yes beep boop boop
  9. I'll get in touch ;)
  10. public class AutoPlayerResponder { private final Script script; private final int cooldownSeconds; private Map<PlayerMessageContentType, MilliTimer> cooldownMap; public AutoPlayerResponder(final Script script) { this.script = script; cooldownSeconds = 180; cooldownMap = new EnumMap<PlayerMessageContentType, MilliTimer>(PlayerMessageContentType.class); } public void respond(String message) { PlayerMessageContentType type = PlayerMessageInterpreter.getInstance().getContentType(message); if (type == null || (cooldownMap.containsKey(type) && cooldownMap.get(type).getElapsedSeconds() < cooldownSeconds)) return; String response = null; switch (type) { case BOT_ACCUSATION: response = "beep boop boop"; break; case BOT_QUERY: response = "beep boop boop yes beep boop"; break; case SKILL_QUERY: Skill skill = PlayerMessageInterpreter.getInstance().getSkillMention(message); response = script.getSkills().getStatic(skill) + ", beep boop boop"; break; case TOTAL_LEVEL_QUERY: response = BotreMethodProvider.getMyTotalLevel(script) + " ...beep boop boop"; break; } if (response != null) { script.getKeyboard().typeString(response, true); cooldownMap.put(type, new MilliTimer()); } } }
  11. Beginners swag. public static int getMyTotalLevel(Script script) { int total = 0; for (Skill skill : Skill.values()) total += script.getSkills().getStatic(skill); return total; }
  12. Botre replied to Zach's topic in Releases
    weeeeeeeeeeeeeeeeeeeeeeeeee
  13. It's not my native language but I'm an English lit student and also a freelance proofreader. So... yeah :x
  14. Botre replied to Botre's topic in Spam/Off Topic
  15. : ' ( @OP: http://2007.runescape.wikia.com/wiki/Magic_shortbow_%28i%29
  16. Might be a game tick timing trick (?).
  17. Botre replied to Botre's topic in Spam/Off Topic
    Really really unhappy :saddoge: ...
  18. Final isn't a type. If you want to change the monster you would change the assigned value from: private static final String NAME = "Lesser demon"; to: private static final String NAME = "Goblin"; //For example, this is a comment btw. If you want to make it search from multiple monster names you could use an array like this: private static final String[] NAMES = new String[]{"Lesser demon", "Goblin"};
  19. Botre replied to Botre's topic in Spam/Off Topic
    1236 would really make me unhappy
  20. R00d

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.