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.

todamach

Members
  • Joined

  • Last visited

Everything posted by todamach

  1. thanks. Method, if someone might be interested: public Position positionInFront(){ int dir = myPlayer().getRotation()/256; Position myPos = myPlayer().getPosition(); Position pos = null; if(dir == 0){ pos = new Position(myPos.getX(),myPos.getY()-1,myPos.getZ()); }else if(dir==2){ pos = new Position(myPos.getX()-1,myPos.getY(),myPos.getZ()); }else if(dir == 4){ pos = new Position(myPos.getX(),myPos.getY()+1,myPos.getZ()); }else if (dir == 6){ pos = new Position(myPos.getX()+1,myPos.getY(),myPos.getZ()); } return pos; }
  2. I scrolled throught this sooooo many times. What is character exactly? Isn't it player or smth?
  3. Hey, maybe someone has a method that returns position in front of a player?
  4. Divinity's is soft on the eyes. Your is the one that hurts the eyes... It look like it's not fully loaded or something....
  5. todamach replied to iMute's topic in Botting & Bans
    You'll get banned after first day.
  6. Shneaky
  7. Title. paying first if trusted or smth.
  8. Thanks for setting me in the right direction. Just restarted a browser.
  9. I see flashing cursor. I can change world. But my I can't type anything. Any ideas what's the probem?
  10. Yeah, I agree, my algorithm is very weird and not efficient. I created mineArea's with areas that cointains ores. Now, if i = 0, it goes to Area[0], mine all ores there, then goes to Area[1] and etc. Also, I changed this part of the code, after posting here. Entity oreVein = objects.closest(DIRT_NAME); is now insade that while lopp. People in the other thread pointed out to me, that ores I was trying to mine were dynamic. It changes state even if it still exists. That's why this happened. BTW, really appreciate your help, and discussions
  11. Pay-dirt at Motherlode.
  12. Apparently, ores I try to mine are dynamic/has multiple states. So this method doesn't quite work. Botrepreneur suggested to track it's depleted model/id instead. I'll try that in the evening today. I'll be busy all day.
  13. What if someone else gets the last ore, and you are left animating at the depleted one?
  14. Thanks. This will make my script run much smoother. I'll try to implement it tomorrow (today..... -.-), because it's very late (early -.-) now. I hope you won't mind if I will PM you with a question or two.
  15. Well, I'm mining it, so I'm standing in front of it. Not sure what dynamic or multiple states exactly is, but I don't think so. I'm mining Pay-dirt from Ore veins in motherlode. When ore veins are mined (depleted) it changes to other object with different id. So, I think, that's where my loop should exit. But it constantly exits even if ore vein is still there - not depleted, not changed to other object.
  16. Thanks for such informative answer. I don't think sleeping for a full cycle is an option, because mining animation is probobly close to 6 seconds, so it way too long to sleep. I'll try to do the timer thing. Also, what I was doing myself, but for some reason it doesn't work right for me: while(ore.exists(){ sleep(150); } So basically, it should be stuck in this loop while ore exists, but for some reason it exits after about 10 seconds.
  17. I completely understand the code. Let's say I'm mining. I'm standing still, and not animating. It will click on the rock. It will start animating. But animation isn't endless. It is looping, but between every loop, it stops for a short time. And in that momment it clicks again on the rock.
  18. if (!myPlayer().isAnimating()) { if (!myPlayer().isMoving()) { // click } } it will still click every animation reset. How can i fix this?
  19. 1. I can't change my while loops to ifs. Main one (while(ar)) is used because I need loop there - I need that part of the code to run multiple times. I can't change that to if, because in that case it will run only one time. And same applies to other 2 while loops - I need bot to sleep while something is happening, not to sleep once. 3. It is supposed to go to the Position, take closest object, interact with it, when it's done, if there's no another object in the area - go to next area, take closest object, etc.... 2. I start script, it goes to first Position (0), clicks on object couple of times and crashes. Ok, so I rewrote whole method, it works, but I have a problem with this part of code: while (oreVein.exists()){ sleep(250); logger.debug("Sleep while ore exists"); } if (!oreVein.exists()) { logger.debug("oreVein doesn't exist"); ar = false; } What I get: [DEBUG][Bot #1][06/22 04:35:04 AM]: Sleep while ore exists [DEBUG][Bot #1][06/22 04:35:04 AM]: oreVein doesn't exist Even though oreVein exists. I just want to make bot sleep while oreVein exists. In other words, while there's ore, don't do anything and wait until it's mined.
  20. It has 10 elements, so I think it's 9, right? I'm rewriting this method atm, will see how it goes.
  21. public void walkMine() throws InterruptedException { for (int i = 0; i < minePos.length; i++) { logger.debug(i); logger.debug("Walk."); map.walk(minePos[i]); logger.debug("Walking."); while (myPlayer().isMoving()) sleep(250); boolean ar = true; Entity oreVein = objects.closest(DIRT_NAME); logger.debug("Found closest: " + oreVein.getPosition().toString()); while (ar) { if (mineArea[i].contains(oreVein) && map.canReach(oreVein)) { if (!myPlayer().isAnimating() && !myPlayer().isMoving()) { if (myPlayer().isAnimating()) { sleep(random(150, 250)); } else { camera.toEntity(oreVein, true); logger.debug("Mining."); oreVein.interact("Mine"); while (oreVein.exists()) sleep(random(150, 250)); } } if (!oreVein.exists()) { logger.debug("Neegzistuoja oreVein"); ar = false; } } else if (mineArea[i].contains(oreVein) && !map.canReach(oreVein)) { logger.debug("In area, but can't reach."); mineRock(); } else { logger.debug("Entity not in area."); ar = false; } } } } ERROR][Bot #1][06/22 02:56:12 AM]: Error in bot executor! java.lang.Error: Interrupted attempt to aquire write lock at javax.swing.text.AbstractDocument.writeLock(Unknown Source) at javax.swing.text.AbstractDocument.insertString(Unknown Source) at javax.swing.text.PlainDocument.insertString(Unknown Source) at javax.swing.JTextArea.append(Unknown Source) at org.osbot.utility.Logger.IIiiIIiiiI(v:73) at org.osbot.utility.Logger.IIiiIIiiiI(v:196) at org.osbot.utility.Logger.log(v:96) at org.osbot.utility.Logger.log(v:169) at org.osbot.utility.Logger.log(v:5) at org.osbot.utility.Logger.debug(v:60) at GameMiner.walkMine(GameMiner.java:122) at GameMiner.onLoop(GameMiner.java:161) at org.osbot.rs07.event.ScriptExecutor$InternalExecutor.run(ScriptExecutor.java:99) at java.lang.Thread.run(Unknown Source) [DEBUG][Bot #1][06/22 02:56:06 AM]: 0 [DEBUG][Bot #1][06/22 02:56:06 AM]: Walk. [DEBUG][Bot #1][06/22 02:56:06 AM]: Walking. [DEBUG][Bot #1][06/22 02:56:06 AM]: Found closest: [x=3767, y=5657, z=0] [DEBUG][Bot #1][06/22 02:56:06 AM]: Mining. [DEBUG][Bot #1][06/22 02:56:06 AM]: 0 [DEBUG][Bot #1][06/22 02:56:06 AM]: Walk. [DEBUG][Bot #1][06/22 02:56:06 AM]: Walking. [DEBUG][Bot #1][06/22 02:56:06 AM]: Found closest: [x=3767, y=5657, z=0] [DEBUG][Bot #1][06/22 02:56:06 AM]: Mining. [DEBUG][Bot #1][06/22 02:56:06 AM]: 0 [DEBUG][Bot #1][06/22 02:56:06 AM]: Walk. [DEBUG][Bot #1][06/22 02:56:07 AM]: Walking. [DEBUG][Bot #1][06/22 02:56:07 AM]: Found closest: [x=3767, y=5657, z=0] [DEBUG][Bot #1][06/22 02:56:07 AM]: Mining. [DEBUG][Bot #1][06/22 02:56:07 AM]: 0 [DEBUG][Bot #1][06/22 02:56:07 AM]: Walk. [DEBUG][Bot #1][06/22 02:56:07 AM]: Walking. [DEBUG][Bot #1][06/22 02:56:07 AM]: 0 [DEBUG][Bot #1][06/22 02:56:07 AM]: Walk. [DEBUG][Bot #1][06/22 02:56:07 AM]: Walking. [DEBUG][Bot #1][06/22 02:56:07 AM]: 0 [DEBUG][Bot #1][06/22 02:56:07 AM]: Walk. [DEBUG][Bot #1][06/22 02:56:07 AM]: Walking. [DEBUG][Bot #1][06/22 02:56:07 AM]: 0 [DEBUG][Bot #1][06/22 02:56:07 AM]: Walk. [DEBUG][Bot #1][06/22 02:56:07 AM]: Walking. [DEBUG][Bot #1][06/22 02:56:07 AM]: 0 [DEBUG][Bot #1][06/22 02:56:07 AM]: Walk. [DEBUG][Bot #1][06/22 02:56:07 AM]: Walking. [DEBUG][Bot #1][06/22 02:56:07 AM]: 0 [DEBUG][Bot #1][06/22 02:56:07 AM]: Walk. [DEBUG][Bot #1][06/22 02:56:08 AM]: Walking. [DEBUG][Bot #1][06/22 02:56:08 AM]: 0 [DEBUG][Bot #1][06/22 02:56:08 AM]: Walk. [DEBUG][Bot #1][06/22 02:56:08 AM]: Walking. [DEBUG][Bot #1][06/22 02:56:08 AM]: 0 [DEBUG][Bot #1][06/22 02:56:08 AM]: Walk. [DEBUG][Bot #1][06/22 02:56:08 AM]: Walking. [DEBUG][Bot #1][06/22 02:56:08 AM]: 0 [DEBUG][Bot #1][06/22 02:56:08 AM]: Walk. [DEBUG][Bot #1][06/22 02:56:08 AM]: Walking. [DEBUG][Bot #1][06/22 02:56:08 AM]: 0 [DEBUG][Bot #1][06/22 02:56:08 AM]: Walk. [DEBUG][Bot #1][06/22 02:56:08 AM]: Walking. [DEBUG][Bot #1][06/22 02:56:09 AM]: 0 [DEBUG][Bot #1][06/22 02:56:09 AM]: Walk. [DEBUG][Bot #1][06/22 02:56:09 AM]: Walking. [DEBUG][Bot #1][06/22 02:56:09 AM]: 0 [DEBUG][Bot #1][06/22 02:56:09 AM]: Walk. [DEBUG][Bot #1][06/22 02:56:09 AM]: Walking. [DEBUG][Bot #1][06/22 02:56:09 AM]: 0 [DEBUG][Bot #1][06/22 02:56:09 AM]: Walk. [DEBUG][Bot #1][06/22 02:56:09 AM]: Walking. [DEBUG][Bot #1][06/22 02:56:09 AM]: 0 [DEBUG][Bot #1][06/22 02:56:09 AM]: Walk. [DEBUG][Bot #1][06/22 02:56:09 AM]: Walking. [DEBUG][Bot #1][06/22 02:56:09 AM]: 0 [DEBUG][Bot #1][06/22 02:56:09 AM]: Walk. [DEBUG][Bot #1][06/22 02:56:09 AM]: Walking. [DEBUG][Bot #1][06/22 02:56:09 AM]: Found closest: [x=3767, y=5657, z=0] [DEBUG][Bot #1][06/22 02:56:10 AM]: Mining. [DEBUG][Bot #1][06/22 02:56:10 AM]: 0 [DEBUG][Bot #1][06/22 02:56:10 AM]: Walk. [DEBUG][Bot #1][06/22 02:56:10 AM]: Walking. [DEBUG][Bot #1][06/22 02:56:10 AM]: Found closest: [x=3767, y=5657, z=0] [DEBUG][Bot #1][06/22 02:56:10 AM]: Mining. [DEBUG][Bot #1][06/22 02:56:10 AM]: 0 [DEBUG][Bot #1][06/22 02:56:10 AM]: Walk. [DEBUG][Bot #1][06/22 02:56:10 AM]: Walking. [DEBUG][Bot #1][06/22 02:56:10 AM]: Found closest: [x=3767, y=5657, z=0] [DEBUG][Bot #1][06/22 02:56:10 AM]: Mining. [DEBUG][Bot #1][06/22 02:56:10 AM]: 0 [DEBUG][Bot #1][06/22 02:56:10 AM]: Walk. [DEBUG][Bot #1][06/22 02:56:11 AM]: Walking. [DEBUG][Bot #1][06/22 02:56:11 AM]: Found closest: [x=3767, y=5657, z=0] [DEBUG][Bot #1][06/22 02:56:11 AM]: Mining. [DEBUG][Bot #1][06/22 02:56:11 AM]: 0 [DEBUG][Bot #1][06/22 02:56:11 AM]: Walk. [DEBUG][Bot #1][06/22 02:56:11 AM]: Walking. [DEBUG][Bot #1][06/22 02:56:11 AM]: Found closest: [x=3767, y=5657, z=0] [DEBUG][Bot #1][06/22 02:56:11 AM]: Mining. [DEBUG][Bot #1][06/22 02:56:11 AM]: 0 [DEBUG][Bot #1][06/22 02:56:11 AM]: Walk. [DEBUG][Bot #1][06/22 02:56:11 AM]: Walking. [DEBUG][Bot #1][06/22 02:56:11 AM]: Found closest: [x=3767, y=5657, z=0] [DEBUG][Bot #1][06/22 02:56:11 AM]: Mining. [DEBUG][Bot #1][06/22 02:56:11 AM]: 0 [DEBUG][Bot #1][06/22 02:56:11 AM]: Walk. [DEBUG][Bot #1][06/22 02:56:11 AM]: Walking. [DEBUG][Bot #1][06/22 02:56:11 AM]: Found closest: [x=3767, y=5657, z=0] [DEBUG][Bot #1][06/22 02:56:11 AM]: Mining. [DEBUG][Bot #1][06/22 02:56:11 AM]: 0 [DEBUG][Bot #1][06/22 02:56:11 AM]: Walk. [DEBUG][Bot #1][06/22 02:56:12 AM]: Walking. [DEBUG][Bot #1][06/22 02:56:12 AM]: Found closest: [x=3767, y=5657, z=0] [DEBUG][Bot #1][06/22 02:56:12 AM]: Mining. [DEBUG][Bot #1][06/22 02:56:12 AM]: 0 [DEBUG][Bot #1][06/22 02:56:12 AM]: Walk. [DEBUG][Bot #1][06/22 02:56:12 AM]: Walking. [DEBUG][Bot #1][06/22 02:56:12 AM]: Found closest: [x=3767, y=5657, z=0] [DEBUG][Bot #1][06/22 02:56:12 AM]: Mining. [DEBUG][Bot #1][06/22 02:56:12 AM]: 0 [DEBUG][Bot #1][06/22 02:56:12 AM]: Walk. [DEBUG][Bot #1][06/22 02:56:12 AM]: Walking. [DEBUG][Bot #1][06/22 02:56:12 AM]: Found closest: [x=3767, y=5657, z=0] Why loop resets to 0? Why it doesn't execute rest of the code, and why it doesn't increase (i++)?
  22. Bot bot = getBot(); Position pos = new Position(x,y,z); pos.interact(bot, "Mine"); Like this? Also since I have no clue about what Bot actually is, is that part also Ok?
  23. Ok, thanks. Any other way to interact with a position?
  24. Bot bot = getBot(); InteractionEvent IE = new InteractionEvent(bot, Mine[0], "Mine"); IE.execute(); [ERROR][Bot #1][06/21 03:43:00 AM]: Error in script executor! java.lang.NullPointerException at org.osbot.rs07.event.InteractionEvent.execute(InteractionEvent.java:264) at GameMiner.walkMine(GameMiner.java:43) at GameMiner.onLoop(GameMiner.java:72) at org.osbot.rs07.event.ScriptExecutor$InternalExecutor.run(ScriptExecutor.java:99) at java.lang.Thread.run(Unknown Source) Hey. I'm trying to make a method that interacts with a position. What I would really want to do is create an Entity from a position. But I don't think that's possible (?). So I browsed through the API and found InteractionEvent. Now, it looks like it would do exactly what I want. The thing is, I have no idea what "bot" is. No idea how to use, or why to use it. I'm pretty sure, that's why I get error, and I'd really appreciate if someone could explain it to me.
  25. Now that I look at API docs, it makes so much sense.... I understand, that I can find everything I need there, but I just don't understand a lot of things there. Thank you

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.