Jump to content

Help with my first script


Recommended Posts

Posted (edited)

Paste with comments to explain things.

//we check if our inventory is full and we are in bank area.
if (getInventory().isFull() && Banks.VARROCK_WEST.contains(myPlayer())) {
    //We are in the bank are, doing banking.
    //check if bank is open
    if(getBank().isOpen()){
        //Bank open, we are depositing it
        getBank().depositAll();
    }else{
        //if bank is closed, open it.
        getBank().open();
    }
}else{
    //We are walking to the bank area, because we are not in it.
    getWalking().webWalk(Banks.VARROCK_WEST);
}

Raw paste:

if (getInventory().isFull() && Banks.VARROCK_WEST.contains(myPlayer())) {
    if(getBank().isOpen()){
        getBank().depositAll();
    }else{
        getBank().open();
    }
}else{
    getWalking().webWalk(Banks.VARROCK_WEST);
}

 

Good luck tongue.png

Edited by Vilius
  • Like 2

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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