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

Using Strings and Ints from Enums

Featured Replies

Hi Guys,

I have been expanding on using Enum for storing multiple points of data, but I am unsure how to call upon certain aspects of them to use.  Also @Explv, I see you commonly recommend this when others post, so thank you for explaining in other peoples threads.

 public enum BoatOptions {
        NOVICE("Novice", 40, new Area(1, 2, 3, 4), 3),
        INTERMEDIATE("Intermediate", 70, new Area(2, 3, 4, 5), 4),
        VETERAN("Veteran", 100, new Area(3,4,5,6), 5);

       String name;
       int levelRequired;
       Area area;
       int pointBonus;

       BoatOptions(final String name, final int levelRequired, final Area area, final int pointBonus){
           this.name = name;
           this.levelRequired = levelRequired;
           this.area = area;
           this.pointBonus = pointBonus;
       }

       @Override
        public boolean toString(){
           return name;
       }
        public int getLevelRequired() {
            return levelRequired;
        }

        public int getPointBonus() {
            return pointBonus;
        }
    }

I want to set up a few methods based on the BoatOptions. Obvious examples are, area for walking to, pointBonus to display the number of PC points and I was planning to make the bot choose the best boat based on combat level.

I'm sure it's simple but I am confused. Any help is appreciated!

 

 

BoatOptions.NOVICE.getPointsBonus();

 

or

private BoatOptions opt;

onStart(){
      gui sets option
      opt = BoatOptions.NOVICE;

      //can now access getters/setters that are public

      opt.getBonusPoints();

      opt.getLevelReq();
}

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

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.