MarWo22 Posted April 9, 2018 Share Posted April 9, 2018 Im making a wilderness looting script. I was wondering if it is possible to make it pickup all items above X gp? Quote Link to comment Share on other sites More sharing options...
nvrsince Posted April 9, 2018 Share Posted April 9, 2018 No, it's impossible. Quote Link to comment Share on other sites More sharing options...
MarWo22 Posted April 9, 2018 Author Share Posted April 9, 2018 ok thank you Quote Link to comment Share on other sites More sharing options...
liverare Posted April 9, 2018 Share Posted April 9, 2018 Find items. Grab prices for items. Cache them. Calculate whether item is worth taking. Take item. Quote Link to comment Share on other sites More sharing options...
TheMcPker Posted April 9, 2018 Share Posted April 9, 2018 6 minutes ago, liverare said: Find items. Grab prices for items. Cache them. Calculate whether item is worth taking. Take item. the cashe part is most likely the most inportant part otherwise script will be slow af Quote Link to comment Share on other sites More sharing options...
Elixar Posted April 13, 2018 Share Posted April 13, 2018 Anything is possible -Barnical Boy Quote Link to comment Share on other sites More sharing options...
DeadPk3r Posted April 14, 2018 Share Posted April 14, 2018 @MarWo22 I have a looting script i can just give you the source code too its not completed still needs to have banking completed, and some other stuff but u can rip what u want from it, it can grab prices of all in game items, and has a price setting in GUI so it will only loot items that are more then whatever you set it too, just send me a PM if u want it or not. Quote Link to comment Share on other sites More sharing options...
HeyImJamie Posted April 14, 2018 Share Posted April 14, 2018 Something like this should work, but you'd need to check that your price grabber always returns an integer. HashMap<String, Integer> itemPrices = new HashMap<>(); private Integer getPrice(String item){ Integer itemPrice; if (itemPrices.containsKey(item)) return itemPrices.get(item); else { itemPrice = yourGetPriceMethod(item); itemPrices.put(item, itemPrice); } return itemPrice; } Quote Link to comment Share on other sites More sharing options...
dreameo Posted April 15, 2018 Share Posted April 15, 2018 10 hours ago, HeyImJamie said: Something like this should work, but you'd need to check that your price grabber always returns an integer. HashMap<String, Integer> itemPrices = new HashMap<>(); private Integer getPrice(String item){ Integer itemPrice; if (itemPrices.containsKey(item)) return itemPrices.get(item); else { itemPrice = yourGetPriceMethod(item); itemPrices.put(item, itemPrice); } return itemPrice; } You should have 2 levels of cache. First one pulls all the prices and you store it in some data structure. The second one would be this ^. You don't want to make an x number of GET requests while botting. 1 Quote Link to comment Share on other sites More sharing options...