Jump to content

Butters

Lifetime Sponsor
  • Posts

    650
  • Joined

  • Last visited

  • Feedback

    100%

Everything posted by Butters

  1. I''m failing to find a way how to get a bunch of objects in a given slightly bigger area. It isn't really that big : x cord span: 38 y cord span: 45. When using methods like List<RS2Object> openableDoors = s.objects.getAll().stream().filter(f -> f.getName().equals("Door") && f.hasAction("Open")).collect(Collectors.toList()); or List<RS2Object> objList = s.objects.filter(f -> f.getName().equals(objectName) && f.hasAction(objectAction)); if (!objList.isEmpty()) { RS2Object lever = objList.get(0); // Do stuff } else { s.log("Couldn't find object: " + objectName); } I was hoping that this gives me all the objects that are loaded in region. (The objects exists and actually are visible) When I manually walk a lil closer to the object I want to interact, the script finds the object. I have a hunch that these methods have a "max search distance" or something. Anyway to get a full list of objects loaded or in a given (a lil bigger) area?
  2. Don't tag Alek in stuff It's a good suggestion. Post it in "Suggestions"section.
  3. There's a thing in osrs called configs. Each each config id holds information about the state of the quest. Eg. Cooks assistant config id is 29 and it has the following values: 0 - not started 1 - started quest by speaking to the cook 2 - finished quest after giving all items You can check config id's and values by enabling them in Osbot - Options - Configs. Then when you're doing a quest just write down which quest state represents which id/value. you can either use OSBot API quests.isCompleted(Quest.COOKS_ASSITANt); but it sometimes doesn't work properly (I think it uses colours in quest tab to determine the state), I recommend knowing each quest config id and it's completion value. Eg // Is cooks assistant finished if (configs.get(29) >= 2) { log("Quest is done!'); } int questPoints = quests.getQuestPoints(); // I think it's this method
  4. The doors don't have the option if they can't be opened
  5. Lol thought about that and actually have all the info needed to do this, but too ugly
  6. Really didn't want to resolve to this, but Thanks! Will be fun to mess around it with it. Gonna try Dijkstra
  7. What if it needs to go though X number of doors in a "non direct" pattern? I have a few solutions in mind, but all of them are ugly and might fail on some occasions. Really want to find a universal way for this. Btw had a hunch that maybe DoorHandler is failing, cause the Lever tile is unwalkable. Tested with a walkable tile in the dungeon - still nop.
  8. Thanks for the info. I've been playing around with DoorHandler and can't seem to make it work. Either I'm using it wrong or it doesn't support something. Situation screenshot below. Circled area is Lever D, player standing by the door, which has option "Open". Need to go past the door. Code used (for debugging) and trying to find out what doesn't work. "s" is reference to Script: private void interactWithLever(String leverName, BooleanSupplier sleepUntil) { RS2Object lever = s.objects.closest(f -> f.getName().equals(leverName) && f.hasAction("Pull")); if (lever != null) { s.log("Lever: " + leverName + " is present"); if (!s.map.canReach(lever)) { s.log("Cannot reach lever " + leverName); s.log("DoorHandler: Can reach or open: " + s.doorHandler.canReachOrOpen(lever)); s.log("DoorHandler: Obstacle count: " + s.doorHandler.getObstacles().size()); s.log("DoorHandler: Handled next object: " + s.doorHandler.handleNextObstacle(lever)); } else { s.log("Interacting with lever"); interactInMaze(lever, "Pull", sleepUntil); } } } Output: [INFO][Bot #1][01/10 02:58:16 PM]: Lever: Lever D is present [INFO][Bot #1][01/10 02:58:16 PM]: Cannot reach lever Lever D [INFO][Bot #1][01/10 02:58:16 PM]: DoorHandler: Can reach or open: false [INFO][Bot #1][01/10 02:58:16 PM]: DoorHandler: Obstacle count: 0 [INFO][Bot #1][01/10 02:58:16 PM]: DoorHandler: Handled next object: false Output loops forever. Clearly for whatever reason DoorHandler doesn't find the obstacles. Am I using it wrong or what? Additionally, if I do s.doorHandler.generatePath(lever) I get a NullPointer (refference to script is good and etc). If anyone has any ideas, they're greatly appreciated
  9. Will test it out, thanks. Still wanna know how people do this without the spoonfed stuff. For example you recently said that you added links for Stronghold in your slayer script which later ended up being added to webwalker (version 151 or 152). Used DoorHandler or something more fancy?
  10. Thanks In my mind the problem is a little more complex than "interact with a obstacle if I can't reach the desired position", but more like "FIND the best path to a given position while handling a number of obstacles TOWARDS that position". Still need a hint on how to do this from scratch. Btw thanks for mentioning DoorHandler, seems like it has everything I need. Looks like my question can be rephrased as "how does DoorHandler.generatePath() work?"
  11. So I was wondering what's best way/algorithm/technique to walk around in an area, where webwalker doesn't have any information about it. A nice example would probably be the Draynor mansion basement area (from Ernest the Chicken). A-F are levers which change which doors (marked by numbers) can be opened or not. Given that I can fetch the position of levers with something as simple as Position leverPos = objects.closest("Lever D").getPosition(); What would be the best way to WALK to this given object position meeting the criteria below: 1) If the path is blocked by a door (which can be opened) - open it and continue 2) Handle only those obstacles that are needed, eg. If I wanna go from lever A to lever E, I need to go through doors 1 7 6. If I start not from lever A, then shouldn't try to go through previous doors. Maybe there's something I could use in OSBot to add links to my script without writing the whole logic behind walking and obstacle handling? Basically, my question is what is the best way to map an area which webwalker doesn't know of, and how to handle obstacles gong to any position in the given area inteligently.
  12. 1) Either your proxy is bad 2) You haven't authenticated it to allow your machine IP to use it. 3) The IP youu authorized changed 4) Proxy payment/proxy server issues
  13. 1) Either your proxy is bad 2) You haven't authenticated it to allow your machine IP to use it.
  14. Check carefully if you really overwritten the jar (last change date in file system).
  15. Add the script in ".jar" format (I asume you have jar files) in OSBot Script folder, eg. Windows: C:\Users\nosepicker\OSBot\Scripts Linux/Mac /home/nosepicker/OSBot/Scripts Once you placed those there relaunch OSBot OR click refresh button in script selection window. If you see the script in the list - all bueno. If you're getting any errors alter on - those are script issues and not your concern.
  16. Lol each morning I get up and have to update all osbot clients Thanks for the fixes and improvements
  17. If I understood correctly, you want something like this? RS2Widget widget = widgets.get(432, 6, 1); if (widget != null && widget.isVisible()) String playerName = widget.getSpellName(); Edit: Or just use widget.getMessage(); instead of getSpellname();
  18. Nothing too special, last usage date, date created, p2p info, account skill stats, quest points, total runtime, total resources/gp made and etc.
  19. You posted about typical post update bans. Dunno been like this for years. Though now it seems that Jagex doesn't "press the button" on flagged accounts manually, but ban constantly.
  20. Howdy ho, Anyone else noticed that after the Thursday update bans started happening continually and not all at once? Usually there's been 1-4 ban waves a day, now it's constant after running an account for 8-9 hours. As you can see below, each accounts gets rekt every 2-7 minutes and it's constant 24/7
  21. Butters

    OSBot 2.4.151

    Really appreciate the work. Those missing links were a common headache.
  22. Check your java version installed, I bet it's Java 9. OSBot doesn't currently support java 9. Uninstall it and install java 8 instead
  23. You probably logged in when the morning ban wave hit. No way this is cause of new OSBot version. Btw thanks for the update. This is just a nicer version of this right? bank.getWithdrawMode() == BankMode.WITHDRAW_NOTE
  24. for (int i=0; i< 28; i++) { if (inventory.isItemSelected()) break; Item item = inventory.getItemInSlot(i); if (item != null && item.nameContains(Constants.ITEM_NAME)) { inventory.interact(i); if (i == 27) Utils.condSleep(5000, 20, () -> inventory.getItemInSlot(slot) == null); } } A rough solution to your problem Pay attention to the if (inventory.isItemSelected()) break; part + What Shudsy say. Deselect item if it's selected before doing shift dropping
×
×
  • Create New...