Jump to content

Explv

Scripter II
  • Posts

    2314
  • Joined

  • Last visited

  • Days Won

    6
  • Feedback

    100%

Everything posted by Explv

  1. sleep x Where x is in seconds by default
  2. I believe getWidgetContainingText ignores widgets in the chatbox (with root 162). You should use your own filter instead
  3. Perhaps you should learn what public and static mean?
  4. Best practice is to place a method below the method that is calling it. So that you can follow the code more easily from top to bottom.
  5. Make sure you have Java installed. Then download the .jar file And open the .jar file with Java I can't explain it any simpler than that.
  6. First you need Java 8. You can download and install it from here: http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html Then, download the OSBot .jar from http://osbot.org/mvc/get Open the OSBot .jar file with Java, do not extract it.
  7. It will only run the next script if the current one stops. It does this by detecting the stop message in the log
  8. I have implemented this functionality (running one script after another) in my OSBot manager. The link is in my signature
  9. There are tonnes of algorithms you can use... Just do some research on Google.
  10. Try: name = name.replace(' ', '\u00A0');
  11. Just to add though, that method I wrote uses the random method to choose a point to move the mouse to. That isn't very human like, although nor is moving the mouse instantly.
  12. Doesn't make sense to put it in the if statement though. It should be before you retrieve the closest chicken. Why look for a chicken if you aren't going to attack it?
  13. So your snippet is just the API method: getMap().canReach() ?... I think most people are already aware of the existence of that method Also you probably want to put the null check before the call to canReach()
  14. Well yes, obviously you will need to check your player isn't already attacking a chicken. I just didn't think it was necessary to write out the entire script
  15. Are you just trying to download the .jar file? If so, the latest file can be found here: https://github.com/Explv/osbot_manager/releases/download/7.4/explv_osbot_manager_7.4.jar
  16. What if the closest chicken is not attackable? Your script will just sit there and do nothing. It should be something more like: NPC chicken = getNpcs().closest(npc -> npc.getName().equals("Chicken") && npc.isAttackable()); if (chicken != null && chicken.interact("Attack")) { new ConditionalSleep(5000) { @Override public boolean condition() { return !chicken.isAttackable() || myPlayer().isInteracting(chicken); } }.sleep(); } If that doesn't work it is something else in your script that is broken.
  17. I don't think that is the point of his question...
  18. Java is pass by value, not pass by reference. Consider reading this: http://jonskeet.uk/java/passing.html
  19. Have you tried: getWidgets().closeOpenInterface();
  20. Or just: getWalking().webWalk(Banks.LUMBRIDGE_UPPER);
  21. If you're talking about MethodProvider.gRandom, then yes it does.
  22. Shouldn't it be (sorry on phone): getWidgets().getWidgetContainingText("Bronze").Interact("Smelt X Bronze"); I think the interaction is "Smelt X Bronze" rather than "Smelt X"
  23. I don't think @Easy said anywhere in his post that those images represented OSBot. Correct me if I'm wrong though.
×
×
  • Create New...