Jump to content

Darek855

Members
  • Posts

    14
  • Joined

  • Last visited

  • Feedback

    100%

Everything posted by Darek855

  1. UK worlds are back and it is working again so that was the reason
  2. Not working for me. just hovers the world it is trying to hop to. could be because uk worlds are down today due to maintenance (it is trying to hop to german world tho)
  3. Just an update if anyone else needs their script to be very exact and cant afford any misscliks. above woks but if the script decides to use minimap to walk (which it does like 50% of the time) it still misses the tile sometimes so adding event.setMiniMapDistanceThreshold(0); fixes the problem completely. public boolean walkExact(Position position) { WalkingEvent event = new WalkingEvent(position); event.setMinDistanceThreshold(0); event.setMiniMapDistanceThreshold(0); return execute(event).hasFinished(); }
  4. Thanks, that is what i tried in the first place but was getting errors, now it works tho those errors were unrelated to this Yup just gave the api a read again and found this is the reason it "missclicks" a bit dumb that the default is 2 but guess that is to add extra randomness to avoid patterns
  5. Thanks again! this works perfectly, but can you give me and example how to use this i am a pretty new to this so i dont get it currently just using it like this but rather not spam this every time i want to walk i assumed it woked like this walkExact(script, Tile1) but it didn't also is there a way to make this work for bigger areas rather than just a 1 tile WalkingEvent event = new WalkingEvent(Tile1); event.setMinDistanceThreshold(0); execute(event); Also will give this a look if it starts missclicking
  6. Well it did not change anything, still missclicks 1 tile off sometimes... Maybe i should try to make the 3 tiles into positions instead of area i don't know?
  7. I may have just realized what the problem is, it should be .contains(myPosition()) not myPlayer hmm.. will test and update,if this is the case and i just made this post for no reason fml
  8. So here is my code if (loot1 == null && !Tile1.contains(myPlayer()) && Tile2.contains(myPlayer())) { log ("going back to safe"); getWalking().walk(Tile1); new ConditionalSleep(5000, 1000) { @Override public boolean condition() { return Tile1.contains(myPosition()); } }.sleep(); } The idea is that it goes to loot and when there is no loot it runs back to safety where it can attack from distance but the problem is it missclicks? when it is moving to tile1 and clicks tile next to it and it wont run this again as it thinks its in safety for some reason even tho its not. here is picture explaining it better: So the bot thinks missclicks tile 2 when it was supposed to click tile 1 and even when it is in the orange area the above code should execute again as its not in tile 1 but it wont and i am stuck. First thing you would think that the areas/tiles are in wrong coordinates but i double checked all the coordinates and they should be correct unless you cant create rectangular area with 1x3 tiles here is also the area for Tile1: Area Tile1 = new Area (1289, 10097,1289, 10099); and Tile2 is the whole area above: Area Tile2 = new Area (1289,10093,1296,10100); I have had this same problem with others scripts before but i just fixed it by making the click area 1 tile smaller in every direction and the area that checks if i am in the correct place 1 tile bigger so even if it missclicks it still knows its in the correct place but in this case i cant do that as the area is very small and it needs to be exact.
  9. Right you can use filters for more than just npcs My next bot that i write will be so much more compact and clean. recently wrote a bot that kills 1 creature over and over and banks, and that is 1090 rows... of course it includes tons of checks so it never dies or gets stuck also tons of anti-pattern things even tho i am not sure how much that helps with banrates. wont hurt the GP hour so whatever. anyways, thanks for the tips!
  10. Filters looks super useful, i was also wondering how to make something like this shorter and cleaner if(getInventory().contains("Prayer potion(4)") && getInventoy().contains("Prayer potion(3)")) Would be nice to know for the future as many things has x amount of charges or doses etc
  11. Why does this not work? i am trying to see if there is an npc in 1 tile radius around my player. Not getting any errors on compiling but it wont run. (npc id is not correct in this example but it is correct in my code) NPC goblin = npcs.closest(123); @Override public int onLoop(){ if (myPlayer().getArea(1).contains(goblin)) { log("Goblin next to me"); } return random(200, 300); }
×
×
  • Create New...