Jump to content

Ex0rcism

Members
  • Posts

    60
  • Joined

  • Last visited

  • Feedback

    100%

Everything posted by Ex0rcism

  1. I was having troubles for a little bit trying to get the closest bank, then stumbled upon Chris's post on how getting the closest bank works. So all credits go to him for this one. All I did was modified the coding a little bit to make it compatible with task usage. Code: import java.util.HashMap; import java.util.LinkedHashMap; import java.util.Map; import java.util.stream.Stream; import org.osbot.rs07.api.map.Area; import org.osbot.rs07.api.map.Position; import org.osbot.rs07.script.MethodProvider; public enum WebBank { GRAND_EXCHANGE(new Area(new Position(3161, 3493, 0), new Position(3168, 3486, 0))), VARROCK_EAST(new Area(new Position(3250, 3423, 0), new Position(3257, 3416, 0))), VARROCK_WEST(new Area(new Position(3180, 3447, 0), new Position(3185, 3433, 0))), EDGEVILLE(new Area(new Position(3091, 3499, 0), new Position(3098, 3487, 0))); private final Area area; WebBank(Area area) { this.area = area; } public static Area closestTo(MethodProvider e) { HashMap<WebBank, Integer> distMap = new HashMap<WebBank, Integer>(); for (WebBank b : WebBank.values()) { distMap.put(b, e.myPosition().distance(b.area.getRandomPosition())); } HashMap<Integer, WebBank> distMapSorted = sortByDistance(distMap); Area cBank = distMapSorted.values().toArray(new WebBank[WebBank.values().length])[0].area; return cBank; } private static <K, V extends Comparable<? super V>> HashMap<V, K> sortByDistance(Map<K, V> map) { HashMap<V, K> result = new LinkedHashMap<>(); Stream<Map.Entry<K, V>> st = map.entrySet().stream(); st.sorted(Map.Entry.comparingByValue()).forEachOrdered(e -> result.put(e.getValue(), e.getKey())); return result; } } Usage: import org.osbot.rs07.event.WebWalkEvent; import org.osbot.rs07.event.webwalk.PathPreferenceProfile; import org.osbot.rs07.script.MethodProvider; public class DropTask extends Task { public DropTask(MethodProvider api) { super(api); } @Override public void startBankWalk() { WebWalkEvent webEvent = new WebWalkEvent(WebBank.closestTo(api)); webEvent.useSimplePath(); PathPreferenceProfile ppp = new PathPreferenceProfile(); ppp.setAllowObstacles(true); webEvent.setPathPreferenceProfile(ppp); api.execute(webEvent); return; } }
  2. Bot is bugging out, when it runs in a certain spot in the tanning store it sits there and does nothing. It also likes to withdraw all at least 4-5 times before closing the bank and likes to run off when drinking a staminia potion instead of banking then running off. Took screenshot for more help. EDIT: Also it doesn't count how many hides were tanned. Went from 450 to 504 when it got inside bank.
  3. Replied to your message, hope you find your answer clear.
  4. So why is anti-profiling highly not recommended and what does it do? UPDATE: Energy pots work fine, but I suggest different click method. Instead of clicking every second with no delay you should be clicking after the animation of the player drinking is done and back too null and have a slight delay to it. This way the bot becomes more "human-like" and less likely to get caught. Also If energy pot becomes lower than 20% withdraw 2 and drink both. So the bot does not have to open bank everytime the energy gets less than 40% which always does in 1 run and has to re-open to drink another potion. Thats $2 more value towards the bot for the information provided. I'm sure there can be more ideas for this bot, but I'm currently making my own tanner and I was curious to see what yours provided which isn't bad at all for a start.
  5. Thank you will test it out sometime later tomorrow. Can't wait to use it now more profit and less time!
  6. Don't want to spend 5k on a stamina potion think you could add a feature for energy potions?
×
×
  • Create New...