Jump to content

Joseph

Trade With Caution
  • Posts

    4692
  • Joined

  • Last visited

  • Feedback

    91.3%

Everything posted by Joseph

  1. could be shorten to this: private boolean clickMiniMapPosition(Position position) throws InterruptedException { return scriptInstance.mouse.click(new MiniMapTileDestination(script.bot, position)); }
  2. There a osbot 1 deposit box snippet, just port it over
  3. do it pussy but really they came to help the community. I also created my own walker because i wanted something that could use path finder, rather then having to make my own path. The when i stated i couldn't create a obstacle handler. They help out by giving out a snippet so.....
  4. i know, i was actually trying to do that. But he beat me to the punch
  5. http://osbot.org/forum/topic/13575-walking-class-doorgate-handler/
  6. i really would like that, i know you could use clipping flags, for obstacle handling but ive never used them so i dont know
  7. It uses the local path finder. When using entity, they must have been loaded. Also canReach() is bugged when checking to see if your on top of the position. So i tweaked it a bit. This doesnt contain obstacle handling, im still a bit confused on how im going to add it in. If you have an idea i would love to hear it. import java.util.LinkedList; import org.osbot.rs07.api.map.Position; import org.osbot.rs07.api.model.Entity; import org.osbot.rs07.api.util.LocalPathFinder; import org.osbot.rs07.input.mouse.MiniMapTileDestination; import org.osbot.rs07.script.MethodProvider; import org.osbot.rs07.script.Script; public class Walking { /* * Doesn't contain obstacle handling. */ private LocalPathFinder pathFinder; private Script script; public Walking(Script script) { this.script = script; this.pathFinder = new LocalPathFinder(script.bot); } public boolean canReach(Position pos) { if (script.myPlayer().getPosition().equals(pos)) return true; else return script.map.canReach(pos); } public boolean setRun(int amount) { if (script.settings.getRunEnergy() >= amount && !script.settings.isRunning()) { if (script.settings.isDataOrbsActive()) return script.interfaces.getChild(548, 39).interact(); else return script.settings.setRunning(true); } return script.settings.getRunEnergy() >= amount && script.settings.isRunning(); } public boolean walkMiniMap(int threshold, Position pos) throws InterruptedException { MiniMapTileDestination des = new MiniMapTileDestination(script.bot, pos); if (canReach(pos)) { int fail = 0; script.mouse.click(des); //script.log("tries: " +fail); while (script.myPosition().distance(pos) > threshold && fail < 10) { MethodProvider.sleep(500); if (!script.myPlayer().isMoving()) fail++; } return fail != 10; } return false; } public void walkPath(int threshold, Entity entity) throws InterruptedException { LinkedList<Position> path = pathFinder.findPath(entity); if (pathFinder.foundPath()) { for (Position pos: path) { if (pos != null && script.myPosition().distance(pos) > threshold) { if (canReach(pos)) { this.walkMiniMap(threshold, pos); }else{ script.log("cant reach pos: " +pos.toString()); } } } }else script.log("error looking for path"); } public void walkPath(int threshold, Position endPos) throws InterruptedException { LinkedList<Position> path = pathFinder.findPath(endPos); if (pathFinder.foundPath()) { for (Position pos: path) { if (pos != null && script.myPosition().distance(pos) > threshold) { if (canReach(pos)) { this.walkMiniMap(threshold, pos); }else{ script.log("cant reach pos: " +pos.toString()); } } } }else script.log("error looking for path"); } }
  8. @Divinity please move this to the right section
  9. you dont bot but you still make scripts. How do i know your not lying . But naw, that some flaw shit, you should try fighting it.
  10. correct me if im wrong, but i havent seen any random that disable all tabs. and i love randomization
  11. else { // DEAD SPACE Rectangle deadSpaceLeftColumn = new Rectangle(520, 205, 25, 260); Rectangle deadSpaceRightColumn = new Rectangle(740, 205, 25, 260); Rectangle deadSpaceRightFromMap = new Rectangle(720, 10, 45, 155); Rectangle[] deadSpaceAll = new Rectangle[] { deadSpaceLeftColumn, deadSpaceRightColumn, deadSpaceRightFromMap }; int i = MethodProvider.random(0, deadSpaceAll.length - 1); if (deadSpaceAll[i] != null && MoveMouse.toRectangle(script, deadSpaceAll[i], true, 3)) { MethodProvider.sleep(MethodProvider.random(600, 900)); } } where you have this at is a bit useless since. The code below will never be empty nor null if (openableTabs != null && !openableTabs.isEmpty()) { So you should add a boolean to switch between both methods. Also, rather then putting the tabs in an arraylist couldnt you loop through all tab, add a boolean that check to see if it isnt open. Interact with it and add a break statement to end the loop. Plus, why does the method return item is selected true return script.inventory.isItemSelected();
  12. its better because even though you iterating through all players. You not consistently checking to see if that player is interacting with you especially with people that are like 10 tiles away. Also i was talking about this method script.myPlayer().getArea(radius);
  13. I think there a method that creates an area around an entity. You could use that, and loop through everybody in the area to see if they are interacting with you. Also it should be smaller or equal to one
  14. you could always use a enhanced for loop for (Item item: script.inventory.getItems()) { if (item != null && item.getName().equalsIgnoreCase(argument)) { blah blah } }
  15. im just wonder, i want to try out local path finder. they have a method that will find a path for you, using findPath(entity) but what if is the entity isnt in the loaded region. how would that method work? Also i read somewhere that local path finder returns npe. That there another way to do it. How? Thank you to who ever, is trying to help me out
  16. This is why @Ely said to be be patience, because this is a new market. We dont know what we want, and what other people want. So were trying to work on it. The new market hasnt been out for that long.
  17. Joseph

    MagicTracker

    That's on the todo list, I'll hit you up soon, I have other things a bit more important, but I will comeback and update it soon
  18. Joseph

    MagicTracker

    Yes I typed it all
  19. or you could use my script, which i feel might be better link: http://osbot.org/forum/topic/53910-ds-aio-crafter/
  20. This is exactly the same reason why, we moved into a monthly payment. Because of the word lifetime. Nothing is life time, so your tell me because you brought a script from osbot 1 lifetime. We should give you osbot 2 scripts. That doesn't work out like that. Osbot 1 & 2 are to different products. It like saying I brought free runs 1, and you guys came out if free runs 2. I should get it for free because I had free runs 1, and they are obsolete. It doesn't work like that. I say if you had a lifetime script, and it was longer then a month. No refund. If you had a monthly script, and you didn't get to use up the whole month, you could get a refund. If you had lifetime, and was able to use it for a month, then you could get a refund
×
×
  • Create New...