Jump to content

Polymorphism

Members
  • Posts

    368
  • Joined

  • Last visited

  • Feedback

    100%

Everything posted by Polymorphism

  1. The clickbait title is so real and I love it. I wish there was a sequel to desert treasure, not gonna lie. Like maybe something where you are sided with Azzandra and have to fight off the gods Zamorak and Saradomin because they've come to destroy the world since Azzandra has been freed. Idk, a master quest where you fight the gods with a god by your side would be pretty cool.
  2. I could imagine those accs are difficult to do it on. @trek, thank you
  3. My Desert Treasure virginity. Nearly 13 years playing RS and never had done it until today (even on rs3). I thought it was pretty easy, just long as hell.
  4. No, you almost never have to use loops. It's easy to get stuck in a loop and your script hang (or even hang the whole client for that matter). This was the dumbest post possible.
  5. For scripting definitely, don't nest too many if-statements so that you're having redundant code. and package properly.
  6. Hey Molly, may i have a trial please. Looking to buy a thieving script but not sure which one yet.
  7. May i get a trial please. I am contemplating buying a thieving script, just not sure which one yet.
  8. Start by utilizing the boolean return on those method calls, this will make your script run smoother. if(!bankArea.contains(myPlayer()) webwalk(bankArea) if(!bank.isOpen())bank.open(); Even using dynamic sleeps is useful too if(bank.isOpen()){ if(inventory.contains("logs")){ if(bank.depositAll(item -> item.getName().contains("logs"))){ new ConditionalSleep(4500, 500){ //timeout, recheck so 4500ms is max sleep, check condition every 500ms //condition method goes here. Returns boolean, if return true the sleeping will stop, if false it will continue to sleep until timeout }.sleep(); } } Line 64, Item-> Item.getName()... Change the lambda variable to something like depositAll(it->i.getName().toLowerCase().contains("logs"). You're using a type as a variable name, but shouldn't be the issue. Read this http://stackoverflow.com/questions/1445233/is-it-possible-to-solve-the-a-generic-array-of-t-is-created-for-a-varargs-param
  9. Here is a 1hr prog, it killed almost 2k planks pretty quick.
  10. Thank you Can you add that to the OP for other people who may not know
  11. On progressive mode how does the script decide what to do next? Does it just do the highest thing it can?
  12. Try some debugging such as log the EventStatus. But still, why not webwalker?
  13. How long does it click underneath the player? Does it continue on the path eventually? How often does it do it? Also, why not just use the built in webWalker walking.webWalk(Area area)
  14. Here is finding the center using Centroid finite set of points. I passed in Area#getPolygon(), not sure how it'd react to Position#getPolygon() The function output Point2D.Double[6703.75, 3367.75] In my use I will always be rounding up, but you may choose to do either way. public Point2D.Double calcPolygonCenter(Polygon polygon) { double x = 0; double y = 0; int points = polygon.npoints; for (int i = 0; i < polygon.xpoints.length; i++) { x += polygon.xpoints[i]; } for (int i = 0; i < polygon.ypoints.length; i++) { y += polygon.ypoints[i]; } x = x / points; y = y / points; return new Point2D.Double(x, y); }
  15. No problem, hadn't noticed he already put down pretty much what i did lol. Mustve been writing it up nearly the same time.
  16. From what I understand you're simply trying to make the script wait until the wine is back on the table? This isn't perfect, but you could definitely build on it In your onLoop you shouldn't make the script DyanmicSleep while waiting, just don't make it do anything. onLoop(){ GroundItem item = groundItems.closest("item"); if(item != null || item.exists()){ //grab that shit } if(item == null || !item.exists()){ if(!magic.isSpellSelected()){ //check if can cast, then cast spell } if(magic.isSpellSelected()){ if(!magic.getSelectedSpellName().equalsIgnoreCase(NormalSpells.TELEKINETIC_GRAB.name())){ //deselect spell only } if(!hoverTile.getPolygon(bot).contains(mouse.getPosition()){ // hover the tile //return 600 or whatever here. Just make the script return inside onLoop() when waiting } } } }
  17. I don't have this problem on my laptop, but anyone who has this issue please try this. I may or may not work. Essentially disabling Java dpi awareness http://stackoverflow.com/questions/30555401/java-disable-dpi-aware-not-working
  18. I've noticed that a lot of scripts flick prayer to keep hp at 1. but why dont they just guzzle rock cake? I dont see a benefit over either one, just that for a split second you might have 2 hp using the rock cake method.
  19. Stranger Things - You'll be pissed about the way S1 ends, but the show is OMG good DCs Legends of Tomorrow Justice League/JL Unlimited/Young Justice
  20. I just set a field variable for the filter such as below private Predicate<NPC> npcFilter = n -> n != null && myPlayer().getArea(6).contains(n) && n.getName().contains("name") && n.hasAction("Attack") && n.isAttackable() && !n.isUnderAttack(); NPC npc = s.npcs.getAll().stream().filter(npcFilter).findFirst().get(); if (npc.interact("Attack")) { new ConditionalSleep(6500, 500) { @Override public boolean condition() throws InterruptedException { return combat.isFighting() || myPlayer().isInteracting(npc); } }.sleep(); //max sleep 6.5s, recheck every 500ms. Stops sleeping if fighting or interacting with the filtered npc } Edit: It'd also be useful to add map#canReach to the Predicate and sort the NPCs in the stream by distance .sorted((n1, n2) -> Integer.compare(s.map.realDistance(n1), s.map.realDistance(n2)))
  21. I just set a field variable for the filter such as below private Predicate<NPC> npcFilter = n -> n != null && myPlayer().getArea(6).contains(n) && n.getName().contains("name") && n.hasAction("Attack") && n.isAttackable() && !n.isUnderAttack(); NPC npc = s.npcs.getAll().stream().filter(npcFilter).findFirst().get(); if (npc.interact("Attack")) { new ConditionalSleep(6500, 500) { @Override public boolean condition() throws InterruptedException { return combat.isFighting() || myPlayer().isInteracting(npc); } }.sleep(); //max sleep 6.5s, recheck every 500ms. Stops sleeping if fighting or interacting with the filtered npc }
×
×
  • Create New...