Jump to content

Butters

Lifetime Sponsor
  • Posts

    650
  • Joined

  • Last visited

  • Feedback

    100%

Everything posted by Butters

  1. Open command line and do java -version Most likely you have Java 9. If so, uninstall it and download java 8. Name will be something like Java 1.8.XXX and not Java 1.9.XXX
  2. 1. Honestly no clue. 2. This cannot be determined, cause no one really knows how Jagex detection system works. Pretty hard to say if your custom interaction method would save you from bans. And I'm almost positive that OSBot API uses the same MouseDestination behind the scenes. 3. Your mentioned solution differs from OSBot api in only that it has a non fixed break condition checking time. I wouldn't use it for several reasons: 3.1. Why clutter up your code with additional classes 3.2. As nothing runs perfectly, say you check your break condition every .5 seconds. It will never be exactly .5 seconds due to lag and what not. Though just my opinion. I'm guessing you're asking this in order to minimize bans. Writing custom interactions seems like a good idea, but is it really? Unless you prerecord human input and code a solution that replicates that input, the only difference I see when comparing custom stuff (like say MouseDestinations) and OSBot API is that you're doing the same exact thing, just probably gonna end up making it less refined.
  3. Use el traductor de Google desde aquí en adelante Go to the link below, click "Accept licence agreement" and downloadjre-8u161-windows-i586.exe http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html
  4. Say I have a situation where doing something by object name is not sufficient (all items have the same name) What's different - object ids and models ids. What would be the proper way to distinguish these items so it's least prone to break - hardcode object id or model id? Thanks
  5. Probably not gonna help you out here, but if there's at least a little posibility to use names and not ids - always use names.
  6. In short - yes. Can't really say that it's the best tool in general if you need to copy/paste stuff all the time.
  7. Howdy ho, Was wondering what tools are you using for designing GUI's for scripts? What I already tried was: * NetBeans - very lovely, though who codes in NetBeans? Hate to migrate code from it to Eclipse * Eclipse window builder - Honestly, didn't see something so horrible on such a high scale. Tried other Eclipce plugins, but they were either horrible or added external dependencies when exported as jar (no bueno for OSBot) Didn't try InteliJ solutions though. Maybe it has a lovely inbuilt Swing designer as NetBeans? Comments, discussion and general experience using various tools is welcome. Oh, and writing everything by hand is no bueno, reason being that this is not a university (jk) and might become hell real quick when doing something complex.
  8. CLI usage example (starting version v1.1) Script ID: 1005 Script parameters: Location. Atm only Falador and Varrock Usage: java -jar osbot.jar -login yourOsbotName:yourOsbotPassword -bot rsAccountName:AccountPassword:0000 - script 1005:Falador
  9. If 5 seconds have passed the sleep will end and your on your own. Best thing to do is to redo the whole loop if the item dropping failed. There's a simple rule (though not always easy to keep it this way): Only do one thing per one loop iteration. If your drop failed, then it will hang for 5 seconds, but after that a new loop iteration will begin and will try to drop the item once more. Hope you got the gist. Regards
  10. Pushed version v1.1 to SDN. Updates should be visible sometime soon. * Redid paint * After consulting with devs I removed web walking completely. The reason behind this is to save your PC resources (script will use much less RAM). Downside of this is that YOU MUST START THE SCRIPT NEAR THE BANK OR WATER SOURCE. If you start the script too far away from bank or water source it will just stand still and do nothing. * Removed container buying, cause removed webwalking
  11. Script.sleep is just a sleep. The bot thread just sleeps for the specified amount. Now Conditional sleep, as the name implies means the bot sleeps UNTIL A CERTAIN condition. Your example is a little shady, cause it sleeps until the item in inventory slot 1 is not null. Should move the checking logic inside the condition() method and check if the item IS NULL. Basically, a conditional sleep sleeps until the public boolean condition() method returns true. This allows for more responsive behavior and in certain cases let's your script to be more smooth. Edit: A little example using your code (changed to work if I understodd correctly what you want to do) Item item = script.getInventory().getItemInSlot(1); if (item != null && script.getInventory().interact(1, "Drop")) { new ConditionalSleep(5000, 500) { public boolean condition() { return script.getInventory().getItemInSlot(1) == null; } }; } What this does is sleep for a maximum of 5 seconds, checking the condition everyt .5 seconds. If the item in inventory slot 1 is null then the script stops to sleep and caries on. If the item is still not null after 5 seconds - stops sleeping and caries on.
  12. public boolean getCallisto(){ boolean b = false; NPC Callisto = getNpcs().closest(npc -> npc.getName().equals("Callisto")); if(Callisto != null && Callisto.hasAction("Attack")) { b = true; } return b; } To illustrate what people are telling here. ALWAYS NULL CHECK. Also, if spawning takes a while, also a good idea to check if it has the Attack option or any other stuff that's relevant.
  13. Something similar might be on its' way
  14. Check what Apa said. 10/10 would agree. Anyway if you're still having trouble just throw me a pm with your current code and I'll help out
  15. public class Main extends Script { private long timeStart; private String state = "Cannifis Rooftop Agility"; final Area area7 = new Area(3509, 3474, 3516, 3484); final Area area6 = new Area(3488, 3468, 3504, 3481); final Area area5 = new Area(3477, 3481, 3481, 3487); Add those here (class variables). You should get some compiler errors telling you what's wrong if it doesn't work
  16. Great of you for sharing. First things first final Area area7 = new Area(3509, 3474, 3516, 3484); final Area area6 = new Area(3488, 3468, 3504, 3481); final Area area5 = new Area(3477, 3481, 3481, 3487); final Area area4 = new Area(3474, 3491, 3480, 3500); final Area area3 = new Area(3485, 3498, 3493, 3505); final Area area1 = new Area(3508, 3491, 3504, 3498); final Area area2 = new Area(3496, 3503, 3504, 3507); final Area area = new Area(3473, 3461, 3513, 3508); area.setPlane(0); area7.setPlane(2); area6.setPlane(3); area5.setPlane(2); Move all of these outside of onLoop method. There's no need to reinitialize there variables on each loop iteration. Also can do this in one line final Area area = new Area(3473, 3461, 3513, 3508).setPlane(0); Also might want to ditch hardcoded object ids Entity gap1 = objects.closest(10820); Maybe replace with Positions or names Entity gap1 = objects.closest(f -> f.getName().equals("Gap") && f.getPosition().equals(GAP_POSITION)); Also, use conditional sleeps, this is bad if (area1.contains(myPlayer())) { if (!myPlayer().isMoving() & !myPlayer().isAnimating()) { gap1.interact("Jump"); sleep(random(2500, 3500)); } Can't remember the correct syntax, but this would be much better (sleep until you're in the other area) if (area1.contains(myPlayer())) { if (!myPlayer().isMoving() & !myPlayer().isAnimating()) { gap1.interact("Jump"); new ConditionalSleep(5000, 250) { public boolean condition() { return AREA_TO_GO_TO.contains(myPlayer()); } } }
  17. start it from command line, shows us the log output (probably getting an error somewhere) and we'll probably sort it out real quick
  18. Not wise to use ids for rocks, check this out Also, though basically the same, check what Chris wrote. His snippet is basic and clean.
  19. Butters

    rome

    Bots as in scripts or you missed the "how many phrase"?
  20. Butters

    OSBot 2.5.2

    Seconding this. If possible, best to make users aware of the consequences when pausing threads. That pause button is a nice feature.
  21. Stuff is bad enough without new anti-cheating coming into play Dunno what he'll do that's any different. Probably just ditched some old dude and hired him as a new guy
  22. Well dunno why you call your example advanced, cause the mule will need to be logged in 24/7. Unless you override login handler. The ones in lumby are beyond horrible, due to that anyone can trade them. Though valid point on lowering the risk of bans while doing splashing. Something that sounds about right would be to splash/do something else and then naturally do breaks. If a bot needs the mule, either the mule stops what it's doing or logs in.
  23. This gets the prayer potion with the lowest dose first, cause it's ordered by name. Prayer pot(1) comes before Prayer pot(2)
×
×
  • Create New...