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
  • johnosrs1337

    Members
    • Posts

      4
    • Joined

    • Last visited

    Reputation Activity

    1. Like
      johnosrs1337 reacted to BeepBoopBop in Switching attack styles   
      Combat.setCombatStyle(CombatStyle.*******);  
      https://dreambot.org/javadocs/org/dreambot/api/methods/combat/Combat.html#setCombatStyle(org.dreambot.api.methods.combat.CombatStyle)
    2. Like
      johnosrs1337 reacted to 420x69x420 in Help using array for banking items.   
      To discriminate the activities your bot is doing you should compare stuff, and depending on what you're doing you want to use the easiest / most consistent / least complicated method of categorizing your bot's behavior. You already did it by saying if(Bank.isOpen()) because then you know only the code inside that if() block will execute if the bank is open.

      If your script is one Main class then u want to declare that int bankItem; inside your Main class, then find out what your bot is doing by comparing like I said, and depending on what your bot is doing you can set one of these:
      bankItem = itemArray[0]; bankItem = itemArray[1]; bankItem = itemArray[2]; then after making sure u set that bankItem correctly in the right spot, u can start banking with a generic banking function using bankItem etc.
      another option to ur array handling situation but basically equivalent is giving english names to ur int variables:
      int axe = 232; int pickaxe = 1337; int jar = 6969; int bankItem = jar;
      and if u want to really have them in an array then I don't like arrays personally... I use Lists...
       
      List<Integer> bankItems = new ArrayList<Integer>(); bankItems.add(234); bankItems.add(1337); bankItems.add(6969); int bankItem = bankItems.get(0);
      one difference in arrays and lists is that you can initialize the Lists in the Main class itself but only add to it in the @Override onLoop() / onStart() methods whereas you can initialize arrays as populated in just the Main class itself.
    ×
    ×
    • 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.