Jump to content
Sign in to follow this  
botelias

No reqs banks

Recommended Posts

Posted (edited)

You can access some predefined banks through the API by calling Banks

EX.

Area varrockWestBank = Banks.VARROCK_WEST;

Area[] banks = {Banks.VARROCK_EAST, Banks.VARROCK_WEST, Banks.AL_KHARID, Banks.DRAYNOR};

It has most of the banks in that class.

If you need to add banks you could create a class that extends from Banks than just add custom bank locations like so.

import org.osbot.rs07.api.map.Area;
import org.osbot.rs07.api.map.constants.Banks;

public final class BanksExtended extends Banks {
    public static final Area CUSTOM_BANK = new Area(0, 0, 0, 0);
}
Edited by BravoTaco

Share this post


Link to post
Share on other sites
8 hours ago, BravoTaco said:

You can access some predefined banks through the API by calling Banks

EX.


Area varrockWestBank = Banks.VARROCK_WEST;

Area[] banks = {Banks.VARROCK_EAST, Banks.VARROCK_WEST, Banks.AL_KHARID, Banks.DRAYNOR};

It has most of the banks in that class.

If you need to add banks you could create a class that extends from Banks than just add custom bank locations like so.


import org.osbot.rs07.api.map.Area;
import org.osbot.rs07.api.map.constants.Banks;

public final class BanksExtended extends Banks {
    public static final Area CUSTOM_BANK = new Area(0, 0, 0, 0);
}

The bank class just contains some pre defined bank areas, no?

So if your wanted bank is not in the class you have to define an Area constant yourself.

Final area *bankname* = new Area(x1, y1, x2, y2) ;

Add -*bankname* to an enum list.

 

Correct me if im wrong please. Im currently learning to code.

Share this post


Link to post
Share on other sites
6 hours ago, Promo said:

The bank class just contains some pre defined bank areas, no?

So if your wanted bank is not in the class you have to define an Area constant yourself.

Final area *bankname* = new Area(x1, y1, x2, y2) ;

Add -*bankname* to an enum list.

 

Correct me if im wrong please. Im currently learning to code.

Yeah for any banks not in that class you will have to create a new object that contains the area information. You can put this into an enum or you can create a class that extends from the Banks class so you don’t have to call two separate things to get all the banks.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...