Jump to content

TheAnswer

Members
  • Posts

    129
  • Joined

  • Last visited

  • Feedback

    0%

Profile Information

  • Gender
    Male
  • Location:
    New Zealand

TheAnswer's Achievements

Steel Poster

Steel Poster (4/10)

8

Reputation

  1. yeah apparently no matter how many times i re pasted it the tabs would not show up =[ tabbed version - http://pastebin.com/djSDJb2p You have to use spaces instead of tabs. Also the word wrapping can mess things up so, start any new line on a new line to prevent weird word wrapping. Hope you don't mind here is the code formatted below public long lastRun = 0; public Position lastClick = null; public int randomDistance = 0; public boolean walkToLocation(Position p) throws InterruptedException { int maxY; int maxX; boolean revY = false; boolean revX = false; Position playerPosition = myPlayer().getPosition(); if(playerPosition.getX() < p.getX()) { revX = true; int distance = p.getX()-playerPosition.getX(); if(distance > 17) { maxX = 17; } else { maxX = distance; } } else { int distance = playerPosition.getX()-p.getX(); if(distance > 17) { maxX = 17; } else { maxX = distance; } } if(playerPosition.getY() < p.getY()) { revY = true; int distance = p.getY()-playerPosition.getY(); if(distance > 17) { maxY = 17; } else { maxY = distance; } } else { int distance = playerPosition.getY()-p.getY(); if(distance > 17) { maxY = 17; } else { maxY = distance; } } int addX = (int) (10+(Math.random()*(maxX-10))); int addY = (int) (10+(Math.random()*(maxY-10))); if(maxX < 10) { addX = maxX; } if(maxY < 10) { addY = maxY; } if(!revX) { addX = addX*-1; } if(!revY) { addY = addY*-1; } if(lastClick == null) { if(walk(new Position(playerPosition.getX()+addX, playerPosition.getY()+addY, playerPosition.getZ()))) { lastClick = new Position(playerPosition.getX()+addX, playerPosition.getY()+addY, playerPosition.getZ()); randomDistance = (int) (3+(Math.random() * 3)); } } else { if(lastClick.distance(myPlayer().getPosition()) < randomDistance) { if(walk(new Position(playerPosition.getX()+addX, playerPosition.getY()+addY, playerPosition.getZ()))) { lastClick = new Position(playerPosition.getX()+addX, playerPosition.getY()+addY, playerPosition.getZ()); randomDistance = (int) (3+(Math.random() * 3)); } } } if(lastClick.distance(p) < 5) { lastClick = null; return true; } return false; }
  2. Nice work. One question, how does the "Context" part work? e.g Context.script.client.getInterface(12) You don't seem to use it for the search button part of the code. Just curious
  3. Haha. Dam my bad on the if, else thing failed when doing the formatting. Thanks for pointing it out. Anyway ,the "return" I added, is to break out of the for loop and exit the method so it can do other things, and not sit there going through the rest of the for loop painting the ID's when the tab has changed. I know the for loop is small and you wont notice the difference, but I added as practice for myself and is really useful with big for loops etc. You can also use a break if you just want to exit the for loop prematurely.
  4. Updated the code. Now simpler and a little better. Enjoy
  5. TheAnswer

    BETA v1.7.35

    You may need to clear your OSBot folder then restart client
  6. TheAnswer

    BETA v1.7.35

    Looks like the method .isFacing() is broken. Therefore most randoms will be broken. How to test: When talking to a NPC while having the "Entity Debugger" ticked, hover your mouse over the NPC your talking to. It no longer shows who the NPC is facing...
  7. Nice liverare. I was in my learning phase at the time but thanks for updating
  8. TheAnswer

    BETA v1.7.32

    My Randoms Solver Pack solves the above problems. Just follow the link "Randoms Solver Pack" below. You can use it until they patch the bugs.
  9. TheAnswer

    BETA v1.7.32

    I have a randoms solver pack you can use until they fix them. Just follow the "Randoms Solver Pack" link below.
  10. For the mean time you can use my randoms pack. Follow the link "Randoms Solver Pack" below Frog Queen & Frog Cave Work.
  11. TheAnswer

    BETA v1.7.32

    Thanks for the update If frog random fails I have a randoms pack that has a working frog random solver . Just Follow the Randoms Solver Pack link.
  12. Sorry to hear that. If you want, you can try my Randoms Solver Pack for the mean time until they patch the bugs. Follow the link, Randoms Solver Pack below
×
×
  • Create New...