Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Try following our getting started guide
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS/Crypto gold? You can purchase vouchers from other users
  • Errors when starting script


    MachineAIExp

    Recommended Posts

    13 hours ago, MachineAIExp said:

    So to explain: I try to make 2 kind of lists, 1 for each item and 1 for the GE limit of that item. I then try to assign each value in a for loop to a new variable that I call in the STATE methods. I hope you get what I mean? 

    The problem is that this is not really possible and I do not really know how to solve this, or whether there is maybe a much easier way to solve this problem.

    Use a Map (google if you're not familiar)

    Edit: I'm feeling helpful here you go:
     

    Map<String, Integer> limits = new HashMap<String, Integer>(){{
    		put("death rune", 10000);
    		put("law rune", 12000);
    		put("nature rune", 12000);
    		put("chaos rune", 12000);
      		put("steel bar", 10000);
      		put("yew logs", 12000);
    	}};

    Use the toLowercase() function when iterating through the map keys to avoid issues with capitalization.

    Link to comment
    Share on other sites

    Archived

    This topic is now archived and is closed to further replies.

    ×
    ×
    • Create New...

    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.