Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/28/13 in all areas

  1. 3 points
  2. I was really bored one night and decided to do something productive and came up with this. public boolean interactWithTableItem(GroundItem tableItem, String action, int tableHeight) throws InterruptedException { Point p = org.osbot.script.rs2.utility.Utilities.getScreenCoordinates(bot, tableItem.getGridX(), tableItem.getGridY(), tableHeight); int height = (int) tableItem.getMouseDestination().getBoundingBox().getHeight(); int width = (int) tableItem.getMouseDestination().getBoundingBox().getWidth(); return selectOption(null, new RectangleDestination(p.x - width / 2, p.y - height / 2, width, height), action); } It seems to work well on small items like pots,garlics and books. Didn't test on anything bigger. You can get the table height by using: RS2Object table = closestObjectForName("Table"); int height = table.getModel().getHeight(); Not sure if that is the right value but it should be something around 100-125 for most tables/crates etc.
    2 points
  3. Have you cleaned out port 80 yet?
    2 points
  4. 2 points
  5. Why OSBOT is Awesome: Occazn is in it My Favourite Mod/Forum Mod Is: Occazn I Prefer (Rap/Metal/Other): Occazn
    2 points
  6. public boolean WalkAlongPath(int[][] path, boolean AscendThroughPath, int distanceFromEnd) { if (distanceToPoint(AscendThroughPath ? path[path.length - 1][0] : path[0][0], AscendThroughPath ? path[path.length - 1][1] : path[0][1]) <= distanceFromEnd) return true; else { WalkAlongPath(path, AscendThroughPath); return false; } } public void WalkAlongPath(int[][] path, boolean AscendThroughPath) { int destination = 0; for (int i = 0; i < path.length; i++) if (distanceToPoint(path[i][0], path[i][1]) < distanceToPoint(path[destination][0], path[destination][1])) destination = i; if (script.client.getMyPlayer().isMoving() && distanceToPoint(path[destination][0], path[destination][1]) > (script.isRunning() ? 3 : 2)) return; if (AscendThroughPath && destination != path.length - 1 || !AscendThroughPath && destination != 0) destination += (AscendThroughPath ? 1 : -1); try { log("Walking to node:" + destination); script.walk(new Position(path[destination][0], path[destination][1], 0)); Thread.sleep(700 + MethodProvider.random(600)); } catch (InterruptedException e) { e.printStackTrace(); } } private int distanceToPoint(int pointX, int pointY) { return (int) Math.sqrt(Math.pow(script.client.getMyPlayer().getX() - pointX, 2) + Math.pow(script.client.getMyPlayer().getY() - pointY, 2)); } This allows you to have your character walk along a path, starting at any point along the path. It will walk like a human, not like a bot. This is how you'd use it: private int[][] path1 = new int[][] { { 3206, 3209 }, { 3215, 3211 }, { 3217, 3218 }, { 3225, 3218 }, { 3235, 3220 }, { 3242, 3226 }, { 3252, 3226 }, { 3251, 3235 }, }; public void walkToGoblins() { WalkAlongPath(path1, true); } public void walkToBankFromGoblins() { WalkAlongPath(path1, false); } public void walkToGoblinsThenAttack() { if(WalkAlongPath(path1, true, 1)) //The 1 is the distance away from destination state = State.AttackGoblins; } Enjoy.
    1 point
  7. Simplest Thing Ever. I Love Ya'll In This Community. So Theres a Few Rules. & 2 Winners. WINNERS GET: 1 VIP Voucher 1M OldSchool RSGP (or 10M eoc) How It Works?: 1) Post The Form & Fill It Out 2) Star My Profile 3) Posts Stop August 11th/2013. 4) LIMIT: One Post Daily. 5) Will Use a Number Generator & Count Forum Posts. GOOD LUCK RULES: Write 1 thing why OSBOT Is Awesome. Who's your Fav Mod/Forum Mod? And Last but not least. Rap or Metal Music. Only Aloud To Post ONCE DAILY. (you can easily copy and paste the form below and submit it daily) CONTEST ENTERY: Why OSBOT is Awesome: My Favourite Mod/Forum Mod Is: I Prefer (Rap/Metal/Other):
    1 point
  8. I'll be doing any jobs that go under this topic.
    1 point
  9. this is what i had to do! thank you very much for your help guys
    1 point
  10. It depends on the scripts. Some more complex scripts require better CPU
    1 point
  11. I believe that's a computer problem, maybe you need something with more ram, most can run 3+ without any problems, i run 4 perfect and start lagging on my 5th account
    1 point
  12. Just watch the intros from season 1-7. Also its on NETFLIX or you can just google like SUPERNATURAL season 1 and youll find it. Trust me watch it its one of the best shows ever. Tell me what you think of the video.
    1 point
  13. I've reset the Java server.
    1 point
  14. I sent a request. Xbox controller feels so much nicer in my hands than a playstation's..idk. I think I'm just used to it.
    1 point
  15. 1 point
  16. Why OSBOT is Awesome: Because it's the best botting site with a lot of scripts My Favourite Mod/Forum Mod Is: smart I Prefer (Rap/Metal/Other): rap
    1 point
  17. CONTEST ENTERY: Why OSBOT is Awesome: Hard working staff, not many ignorant trolls. My Favourite Mod/Forum Mod Is: Don't pick favorites. But I think everyone makes good contributions. I Prefer (Rap/Metal/Other): Miley Cyrus.
    1 point
  18. Why OSBOT is Awesome: I LIKE BOTTING My Favourite Mod/Forum Mod Is: HERBZ FOR MOD I Prefer (Rap/Metal/Other): RAP
    1 point
  19. Why OSBOT is Awesome: There is a free option My Favourite Mod/Forum Mod Is: I would have to say that I don't have a favorite. I have favorites. I Prefer (Rap/Metal/Other): Other, R&B.
    1 point
  20. Why OSBOT is Awesome: i like turtles My Favourite Mod/Forum Mod Is: new so i dunno I Prefer (Rap/Metal/Other): most music is cool for me
    1 point
  21. That wasn't necessary. I'm very much looking forward to seeing his approach to writing a first, simple script and think it could be of some help to me.
    1 point
×
×
  • Create New...