Skip to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Shortening stuff

Featured Replies

How would I make this into like a smaller thing, I have like 13 of these and it's getting a little long...

 

ab06769fa02523c9fde59e28fe719c74.png

if (comboBox1.getSelectedItem().toString().equals("Varrock-East | Logs")) {
                c.BANK_AREA_SELECTED = c.BANK_AREA_VEAST;
                c.TREE_AREA_SELECTED = c.TREE_AREA_VEAST;
                c.selectedTree = c.TREE;
                c.SELECTED_PRICE = p.getSellingPrice(c.Logs);
                c.Area = 1;

Just make an enum and 1 void of loading the selected value


enum kinda example thing:

public enum Locations {
    VARROCK_EAST_NORMAL(new Area(0,0,0,0,), new Area(1,1,1,1), "Tree", "Logs");
    
    private Area bankArea;
    private Area treeArea;
    private String treeType;
    private String logs;


    Locations(Area bankArea,Area treeArea, String treeType, String logs){
     this.bankArea = bankArea;
        this.treeArea = treeArea;
        this.treeType = treeType;
    }
    
    public void load(){
        Global.BAKN_AREA_SELECTED = this.bankArea;
        Global.TREE_AREA_SELECTED = this.treeArea;
        Global.selectedTree = this.treeType;
        Global.SELECTED_PRICE = p.getSellingPrice(c.logs);
    }
}

 

then populate  a combo box with the values of the array in a way that suits you.
then you can do something like

(Locations) comoBox1.getSelectedItem().load();

Edited by Isolate

You could just have a List<enum> which is loaded in the same order as your combobox and then just grab the selected index eg

list.get(myCombo.getSelectedIndex());

you should use an enum for accessing similar datas of different types. The enum allows us to pre-define data. Then we create getter methods to help us grab the type of data we need. All you need to do is return the select enum variable. With that variable you can grab whatever data you need

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.