1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Resource Methods to check?

Discussion in 'Tutorials & Resources' started by daher, Oct 7, 2015.

  1. daher

    Joined:
    Mar 3, 2015
    Messages:
    17
    Likes Received:
    1
    Trying to check if an Pouch is full, I am using booleans but its going bad since its not 100% accurate. I can't use Settings since Runemate doesn't suppport it? And also, GameMessages doesn't work for me for some reason?
     
  2. SlashnHax

    Joined:
    Dec 10, 2014
    Messages:
    3,198
    Likes Received:
    1,041
    If the booleans aren't accurate, then it's probably your implementation? If you show some code I could look through it for you.
    Varps are the equivalent of settings.
    You've got to add the listener to the event dispatcher.
     
  3. daher

    Joined:
    Mar 3, 2015
    Messages:
    17
    Likes Received:
    1
    I'm not at home but I remember my code, so I'll type it here.

    I'm using a method like this (something like this but just written fast):

    boolean Pouch = false;
    if(Inventory.contains(23) && Pouch == false){
    Inventory.getItems(23).interact("Fill");

    }else if(Inventory.getQuanitity() == 20){
    Pouch = true;
    }
     
  4. Twinki

    Joined:
    Sep 30, 2015
    Messages:
    86
    Likes Received:
    9
    }else if(Inventory.getQuanitity() == 20){
    Pouch = true;
    }

    Is this for RS3? I'm guessing you're trying to use Bank Presets?

    Bank Presets won't auto-fill pouches on withdraw. In a seperate RC script bot I made for another bot platform, I simply had a preset to take out all 4 pouches and an inventory full of pure ess, then I opened the bank again and had it right click each pouch and select fill. It will take Pure Ess out of the bank instead of inventory as long as the bank is open.
     
  5. daher

    Joined:
    Mar 3, 2015
    Messages:
    17
    Likes Received:
    1
    Lol, I appreciate you replying to my thread, but you've misunderstood my method completely.

    Let me translate what it does:
    if(Inventory.contains(23) && Pouch == false){ // When inventory contains Pure ess and boolean Pouch is false then
    Inventory.getItems(23).interact("Fill"); // interact with Pure ess and fill (This is while bank is open)

    }else if(Inventory.getQuanitity() == 20){ // After the interaction to fill the Players inventory should have exactly 8 slots that are free to use. 20-28 = 8
    Pouch = true; //While my inventory has 8 slots free my bot assumes that I have successfully filled my Pouch, thus returning Pouch true.
    }
     
  6. Twinki

    Joined:
    Sep 30, 2015
    Messages:
    86
    Likes Received:
    9
    No-where did the code you posted indicate that this is when the bank is open.

    Also, if you're trying to fill pouches while the bank is open, it takes pure ess from the bank directly, assuming RS3/DS. I'm aware what those lines of code do.

    I was only trying to help, please post your entire method next time so we know exactly what you're trying to accomplish.
     
  7. daher

    Joined:
    Mar 3, 2015
    Messages:
    17
    Likes Received:
    1
    It doesn't matter whether the bank is open or not I just made it clearer, it still Fills my pouches without the help of Bank Presets. I have no idea what you are even talking about.
     
  8. Twinki

    Joined:
    Sep 30, 2015
    Messages:
    86
    Likes Received:
    9
    You're trying to use Pure Ess as condition. If pure ess is missing from the inventory obviously the pouches were filled. However if you're trying to go off that with banking, it doesn't work because when you fill a pouch while the bank is open in RS3/DS it will take the ess from the bank directly instead of the Inventory.

    So this:
    }else if(Inventory.getQuanitity() == 20){
    Pouch = true;
    }

    Will never happen, therefore pouch will always be false.


    My entire point was, I have an RC script bot I put together and runs perfectly fine. The way I handle it is simply using a Bank Preset to take out all 4 pouches and the rest is Pure Ess. It then opens the bank again, and "fills" each pouch, as long as it interacted with each one then all pouches should be filled. Add a boolean to check if the bank contains essence, and you should have a 99.9% stable pouch filling method.

    I'm honestly not even sure what this thread is about, all I could conclude was you trying to create a pouch filling method, so i'm simply trying to help.
     
  9. Aidden

    Aidden Author of MaxiBots

    Joined:
    Dec 3, 2013
    Messages:
    6,482
    Likes Received:
    990
    What twinki is saying is, the ess never enters your inventory directly because it goes straight into the pouch. So you can't base whether or not it successfully filled on the count of the inventory. And you should just be using varps anyway.
     
  10. daher

    Joined:
    Mar 3, 2015
    Messages:
    17
    Likes Received:
    1
    Don't worry man I fixed it. Also, in DS somehow Pouches don't get filled by the bank. I'm not stupid enough to not actually learn the method to RC before making my script bot lol. Also, lmfao... varps is fucking settings? RIP my ass.
     
    Aidden likes this.
  11. Aidden

    Aidden Author of MaxiBots

    Joined:
    Dec 3, 2013
    Messages:
    6,482
    Likes Received:
    990
    iirc they're actually called varps inside the game files and that's why cloud called it that.
     

Share This Page

Loading...