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
  • Bug with Corsair Cove bank?


    Diggington

    Recommended Posts

    Posted

    Hey guys,

    Wondering if this is a bug or a problem with my code. Basically, when my script goes to access the bank at Corsair Cove, for some reason after clicking to interact with the bank booth, it will change to the spellbook tab and click on Wind Strike. I have literally nothing in my code which should be causing this behavior. Here's the banking code:

     private void Bank(Player localPlayer)
        {
            Area bankArea = new Area(2562, 2866, 2572, 2858, 0);
    
            if (localPlayer.getZ() < 0)
            {
                ClimbUpLadder(localPlayer);
            }
    
            while (!bankArea.contains(localPlayer))
            {
                Walking.walk(bankArea.getRandomTile());
                sleep(Calculations.random(300, 2600));
            }
    
            if (bankArea.contains(localPlayer))
            {
                GameObject booth = GameObjects.closest("Bank booth");
                if (booth != null){
                    if (booth.interact("Bank")){
    
    //HERE'S WHERE IT OPENS THE SPELLBOOK AND CLICKS ON WIND STRIKE
    
    
                        if(Sleep.sleepUntil(() -> Bank.open(), Calculations.random(5142, 8694))){
                            if (Bank.depositAllItems()){
                                sleep(Calculations.random(1066, 2512));
                                if (localPlayer.getHealthPercent() <= 75)
                                {
                                    Bank.withdraw("Tuna", Calculations.random(3,6));
                                }
                                Bank.close();
                                sleep(Calculations.random(620, 1582));
                            }
                        }
                    }
                }

     

    I've got a video of the issue, but it's too big to attach. Happy to upload it to Google Drive or something and share link link, if that's allowed.

     

    • Diggington changed the title to Bug with Corsair Cove bank?
    • 2 months later...
    Posted

    I fixed this btw, it was a problem with caching the local player and starting the script when I was away from the bank :')

    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.