Jump to content

House

Trade With Caution
  • Posts

    510
  • Joined

  • Last visited

  • Feedback

    97.4%

Everything posted by House

  1. Objects.get() returns an array of objects at the position, .get(0) returns the first one and usually there is only one objects per tile. You could take an area around the player in a eg 10x10 grid and check if the mouse click or press event's .getPoint() is within the bounds of a tile. (Do not check every tile loaded, 10x10 is already a significant load) Idk if this is the best way to approach it but i know it works Useful snippets: ArrayList<Position> nearby_positions = new ArrayList<Position>(); private void updateNearbyPositions(int scan_radius) { Position my_position = myPosition(); int start_x = my_position.getX() - scan_radius; int start_y = my_position.getY() - scan_radius; int end_x = my_position.getX() + scan_radius; int end_y = my_position.getY() + scan_radius; for (int xx = start_x; xx <= end_x; xx++) { for (int yy = start_y; yy <= end_y; yy++) { Position pp = new Position(xx, yy, my_position.getZ()); nearby_positions.add(pp); } } } @[member=Override] public void mouseClicked(MouseEvent e) { for (Position p : nearby_positions) { if (p.isVisible(getBot()) && p.getPolygon(getBot()).contains(e.getPoint())) { if (mining_rock_positions.containsKey(p)) { mining_rock_positions.remove(p); e.consume(); } else if (!mining_rock_positions.containsKey(p)) { RS2Object rock = getObjects().get(p.getX(), p.getY()).get(0); if (rock != null) { mining_rock_positions.put(p, rock.getId()); e.consume(); } } } } } Apologies for the structure, its a pretty old code of mine
  2. You need to regrab the object on the position you store. You do not store the RS2Object. you can get an updated version of the current object on a tile using Objects.get(x,y).get(0);
  3. When you interact with the rock you have an instance of the object. You can store the position and see if the rock is still a valid mineable rock?
  4. Fair enough but if you look at my feedback i've been selling decent chunks of gold recently and i go first
  5. Status: SOLD Selling 120M 0.95$/M PP Leave your skype below or pm it
  6. Selling 140M PP 0.95$/M PM me or post your skype below!
  7. In general i personally don't recommend walking to current location + x because it will not work with WalkingEvent if the tile is not walkable which can be the case because you base it on current location + x Just my two cents
  8. hmm if he is around that area, what if he is attacked by the guards on the way?
  9. Did you open the forums with your bot client using the same proxy dbuffed used?
  10. create your own solution to handle the obstacle? add it into the break condition if the tree is X distance away and handle it yourself
  11. This ^ Also good to mention getTimeUntilBreak() returns the time in minutes OR you can write your own break manager with -allow norandoms
  12. Need It To Be Undetectable. -> Not possible Low Ban Rate. -> Possible Multi-Platform -> What does that even mean?
  13. Status: Sold Selling 100M 0.95$/M PP if you wouldn't sell to the account you are posting on yourself don't bother
  14. you know every bond is the result of "real money" right
  15. These should help for determining when to run the login task. public boolean isLoggedIn() { return // isHopping() || // getClient().getLoginStateValue() == 30 || // getClient().isLoggedIn() || // isLoading(); } public boolean isHopping() { return // getClient().getLoginStateValue() == 45 || // getClient().getLoginStateValue() == 25;// } public boolean isLoading() { return // getClient().getLoginState() == LoginState.LOADING || // getClient().getLoginState() == LoginState.LOADING_MAP; } Client.isLoggedIn() triggers false when hopping so these checks are good to add in
  16. I don't think using a position given like that is good, like you said it will fuck you over if its not walkable and not do anything. Usually you want to deagro with changing the Z coord aka walking up a ladder What if you are in a small area also?
  17. Well does it work? Create a method called isShopEmpty. have a for loop and if any of the items have an amount > 0 return as false;
×
×
  • Create New...