Avoided Posted May 5, 2020 Share Posted May 5, 2020 Hello All, I am currently trying to do some hosidius favour and I had a few questions some people probably have answers to, How do I check current percentage of hosidius favour? Pushing the plough is no problem but how would I check if I am on the correct side to push to plough in the correct direction as well as check state to repair? Thank you in advance to anyone that is able to provide me with any information, Avoided Quote Link to comment Share on other sites More sharing options...
Protoprize Posted May 5, 2020 Share Posted May 5, 2020 3 minutes ago, Avoided said: Hello All, I am currently trying to do some hosidius favour and I had a few questions some people probably have answers to, How do I check current percentage of hosidius favour? Pushing the plough is no problem but how would I check if I am on the correct side to push to plough in the correct direction as well as check state to repair? Thank you in advance to anyone that is able to provide me with any information, Avoided There isn't a method specifically for this, so what you'd have to do, is make a functions that compares the state/position of the selected plough, track its location and once it reaches a position on the edge of the farm, walk to the other side and repeat. This works if the character starts on the correct side, you'd have to make a separate start method for this 1 Quote Link to comment Share on other sites More sharing options...
Avoided Posted May 5, 2020 Author Share Posted May 5, 2020 9 minutes ago, Protoprize said: There isn't a method specifically for this, so what you'd have to do, is make a functions that compares the state/position of the selected plough, track its location and once it reaches a position on the edge of the farm, walk to the other side and repeat. This works if the character starts on the correct side, you'd have to make a separate start method for this I assumed that would be the method to do so, thank you for the help, any idea on how to check hosidius favour? Quote Link to comment Share on other sites More sharing options...
ExtraBotz Posted May 5, 2020 Share Posted May 5, 2020 (edited) How to check Hosidious favour: float favour = getFavour().getFavour(Favour.House.HOSIDIUS); This is a method from my script Extra House Favour that I use to push the plough. private NPC plough = null; private void pushPlough() { if (!myPlayer().isAnimating()) { if (plough == null) { plough = getNpcs().closest(o -> o.getId() == 6924); } if (plough != null) { log("Plough Position X:" + plough.getPosition().getX() + " Y: " + plough.getPosition().getY()); boolean infront = myPosition().equals(plough.getPosition().translate(3, 1)); boolean behind = myPosition().equals(plough.getPosition().translate(-1, 1)); if ((infront && plough.getPosition().getX() != 1763) || (behind && plough.getPosition().getX() != 1777)) { if (plough.hasAction("Repair")) { if (plough.interact("Repair")) { new ConditionalSleep(1000, 3000) { @Override public boolean condition() throws InterruptedException { return myPlayer().isAnimating(); } }.sleep(); } } else { if (plough.interact("Push")) { new ConditionalSleep(1000, 3000) { @Override public boolean condition() throws InterruptedException { return myPlayer().isAnimating(); } }.sleep(); } } } else { int front = plough.getPosition().distance(new Position(1777, plough.getY(), 0)); Position frontPos = plough.getPosition().translate(3, 1); int back = plough.getPosition().distance(new Position(1763, plough.getY(), 0)); Position backPos = plough.getPosition().translate(-1, 1); if (front > back) { getWalking().walk(backPos); } else { getWalking().walk(frontPos); } } } else { log("Plough is null!"); } } else { log("Pushing the plough"); } } EDIT: You also need to be in this area or it wont work. You can make it work for the other plough areas, but you'll have the replace the front and back coordinates. private Area farm = new Area(1762, 3557, 1780, 3543); Edited May 5, 2020 by ExtraBotz Added the area the player needs to be in 1 Quote Link to comment Share on other sites More sharing options...
Avoided Posted May 5, 2020 Author Share Posted May 5, 2020 9 minutes ago, ExtraBotz said: How to check Hosidious favour: float favour = methods.getFavour().getFavour(Favour.House.HOSIDIUS); This is a method from my script Extra House Favour that I use to push the plough. private NPC plough = null; private void pushPlough() { if (!myPlayer().isAnimating()) { if (plough == null) { plough = getNpcs().closest(o -> o.getId() == 6924); } if (plough != null) { log("Plough Position X:" + plough.getPosition().getX() + " Y: " + plough.getPosition().getY()); boolean infront = myPosition().equals(plough.getPosition().translate(3, 1)); boolean behind = myPosition().equals(plough.getPosition().translate(-1, 1)); if ((infront && plough.getPosition().getX() != 1763) || (behind && plough.getPosition().getX() != 1777)) { if (plough.hasAction("Repair")) { if (plough.interact("Repair")) { new ConditionalSleep(1000, 3000) { @Override public boolean condition() throws InterruptedException { return myPlayer().isAnimating(); } }.sleep(); } } else { if (plough.interact("Push")) { new ConditionalSleep(1000, 3000) { @Override public boolean condition() throws InterruptedException { return myPlayer().isAnimating(); } }.sleep(); } } } else { int front = plough.getPosition().distance(new Position(1777, plough.getY(), 0)); Position frontPos = plough.getPosition().translate(3, 1); int back = plough.getPosition().distance(new Position(1763, plough.getY(), 0)); Position backPos = plough.getPosition().translate(-1, 1); if (front > back) { getWalking().walk(backPos); } else { getWalking().walk(frontPos); } } } else { log("Plough is null!"); } } else { log("Pushing the plough"); } } Oh wow I cant thank you enough, this is amazing ! Quote Link to comment Share on other sites More sharing options...
ExtraBotz Posted May 5, 2020 Share Posted May 5, 2020 (edited) 7 minutes ago, Avoided said: Oh wow I cant thank you enough, this is amazing ! Be sure to see the edited note at the bottom. It wont work unless you're in that area. Let me know if you need any help Edited May 5, 2020 by ExtraBotz 1 Quote Link to comment Share on other sites More sharing options...
Avoided Posted May 5, 2020 Author Share Posted May 5, 2020 1 minute ago, ExtraBotz said: Be sure to see the edited note at the bottom. It wont work unless you're in that area. Let me know if you need any help Funny enough it turns out the be the same area I chose but I appreciate the help and will pm you if I have any issues, thank you again. Quote Link to comment Share on other sites More sharing options...