Jump to content

How to Bank at the bank of my choice?


Recommended Posts

Posted

Imagine this...

 

String [] allBanks = {Banks.AL_KHARID,Banks.GRAND_EXCHANGE,Banks.LUMBRIDGE_UPPER,Banks.VARROCK_EAST,Banks.VARROCK_EAST};

Now here is where we ask the user when starting the script

 

USER -> STARTS SCRIPT -> SCRIPT THEN ASK -> Where would you like to go with the options 1-10, and names next to them

1. - AL KHARID BANK

2. G.E

AND so on.

 

Posted

I recommend what Ace99 said, learning the swing library will come in handy alot.

You can also use the class in java called JOptionPane. It allows you to show a dialog rather quickly.

The bank names will need to match the order of the banks areas.

private Area[] allBanks = new Area[]{Banks.AL_KHARID, Banks.GRAND_EXCHANGE, Banks.LUMBRIDGE_UPPER, Banks.VARROCK_EAST, Banks.VARROCK_WEST};
private String[] bankNames = new String[]{"Al-Kharid", "Grand Exchange", "Lumbridge Upper", "Varrock East", "Varrock West"};

 

int chosenOption = JOptionPane.showOptionDialog(getBot().getCanvas(), "Select location", "Location Selector",
        JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, bankNames, bankNames[0]);

if (chosenOption != -1)
    getWalking().webWalk(allBanks[chosenOption]);
  • Like 1

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...