Jump to content

Pick up items above X gp


MarWo22

Recommended Posts

@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.

Link to comment
Share on other sites

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;
    }

 

Link to comment
Share on other sites

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.

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...