Jump to content

Botre

Members
  • Posts

    5883
  • Joined

  • Last visited

  • Days Won

    18
  • Feedback

    100%

Everything posted by Botre

  1. Those are just the position arrays, mind posting the method you feed them in to ? I'm talking about the walkPath(position array) method ^^
  2. You should try and provide some more details, which methods are successively called for example ? Edit: seems like walkPath(path2); is causing it, you should post the method / path in question ^^
  3. I like it! The thing is, there's no content except for the social media links (right?). Nothing wrong with that, but I recommend you make the linking tiles a bit more bigger, put some more emphasis on them (the color contrast already does a great job though).
  4. Gl man
  5. Dat mousehop tho
  6. Integer.MAX_VALUE speed yo! (it's getting early over here...)
  7. My bad :p
  8. getMouse().move(x, y); If you want it to hop instead of "glide" you'll probably have to extend the Mouse class.
  9. Dem updates tho
  10. I doubt it
  11. Multiple threads for different paint data is the best way to go imo, for example: you might want to have real-time display of the run time which would be relatively cheap in terms of processing but only a once every 5 seconds update of your experience tracker(s) which would be more costly. But if you don't mind applying the same performance cost restrictions to all calculations, then pausing your onPaint could do just that indeed ^^
  12. Botre

    Test

    I'm having some trouble with notifications myself, they seem to be loading extremely slowly sometimes..
  13. Very nice guide. However, having many recurring calculations in your onPaint could become unnecessarily expensive, I recommend creating separate looping threads with a custom loop times holding the values the paint should then draw . It does make a difference in performance cost to make the script calculate the data to be painted every 5 seconds instead of every lets say 500ms, and from a consumer point of view it doesn't make a huge difference because most of the time they aren't even around to watch that data (considering botting is essentially an AFK activity). Performance is key!
  14. Yes Me gusta
  15. Here's a lil' rewrite, hopefully you'll learn something(s) from it ^^ Gl coding! import java.awt.Graphics2D; import java.awt.Point; import java.awt.Rectangle; import java.util.Arrays; import java.util.List; import org.osbot.rs07.api.model.Item; import org.osbot.rs07.input.mouse.InventorySlotDestination; import org.osbot.rs07.script.Script; import org.osbot.rs07.script.ScriptManifest; @ScriptManifest(author = "Botrepreneur", info = "HerbIdentifier", name = "HerbIdentifier", version = 0.0, logo = "") public class HerbIdentifier extends Script { private enum Herb { GUAM(199, 200), MARRENTIL(201, 202), TARROMIN(203, 204), HARRALANDER(205, 206), RANARR(207, 208), IRIT(209, 210), AVANTOE(211, 212), KWUARM(213, 214), CANDANTINE(215, 216), DWARF_WEED(217, 218), TORSOL(219, 220), LANTADYME(2485, 2486), SNAPDRAGON(3051, 3052); private final Integer[] ids; private Herb(final Integer... ids) { this.ids = ids; } public List<Integer> getIds() { return Arrays.asList(ids); } } @Override public int onLoop() throws InterruptedException { return Integer.MAX_VALUE; } public void onPaint(Graphics2D paint) { int slot = -1; Item item = null; Rectangle rectangle = null; if (getBot().getClient().isLoggedIn()) { Point point = getMouse().getPosition(); for (int i = 0; i < 28; i++) { if ((InventorySlotDestination.getSlot(i)).contains(point)) { slot = i; break; } } if (slot > -1 && (item = getInventory().getItemInSlot(slot)) != null && item.getDefinition() != null && (rectangle = InventorySlotDestination.getSlot(slot)) != null) { int id = item.getId(); String string = null; for (Herb herb : Herb.values()) { if (herb.getIds().contains(id)) { string = herb.toString(); break; } } if (string != null) { paint.drawString(string, rectangle.x, rectangle.y); } } } } }
  16. Torrent it or extract an ISO from the CD you bought and boot it from a virtual cd drive.
  17. private String separator = System.getProperty("file.separator"); private String directoryOSBot = System.getProperty("user.home") + separator + "OSBot" + separator;
  18. It's been a while. But yeah, blunts obv
  19. How did you override it ? ^^
  20. You'd have to override the RBH's onLoop() Stop and restart, isn't what interruption is all about ?
  21. His snippet stops it from executing. The solvers automatically stop after executing. When exactly do you want it to stop ? :p
  22. What exactly are you trying to achieve? RandomExecutor re = new RandomExecutor(getBot()); re.interrupt(); re.terminate(); ... will not terminate the script's Bot's RandomExecutor but the new RandomExecutor you created, "re" . What you might want to try instead: this.getBot(). getRandomExecutor().terminate();
×
×
  • Create New...