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.

multiple ints

Featured Replies

int[] parentIDs = {1,2,3,4};
public boolean parentIsValid() {
  boolean result = false;
  for(int i : parentIDs){
    if(client.getInterface(i).isValid() || client.getInterface(i.isVisible()){
      result = true;
      break;
    }
  }
  return result;
}

y u boolean inside boolean :'(

Because that's what the function returns.

but if you're using it in an if statement why cant you

just return true or false instead

but if you're using it in an if statement why cant you

just return true or false instead

It's against convention to have more than one return per method.

The reason of that, it to make debugging easier. You don't have your methods randomly exiting at different lines.

Edited by dreamliner

It's against convention to have more than one return per method.

The reason of that, it to make debugging easier. You don't have your methods randomly exiting at different lines.

Your code caused me to faceplam

How are you an SDN scripter?

OSBot refuses to place restrictions because it's a "free market" :facep:

 

Thats your opinion, also its just that this is the first time i've had to use an array list, i learn as i go

Arrays are literally one of the first things you learn about in really any language.

Int[] var = new int[] {22, 444, 777}

^^ but this works too.

 

only reason id every use that = 

int[] var = new int[2];

var[0] = 22;
var[1] = 444;
var[2] = 777;
int[] String = new Char{ 2A3b, "???", 'c', false};

Always remember to use .equals() when comparing non-pr imitative datatypes(int, char, bool, etc)

 

And use == OR != when comparing primitive data types(String, Objects etc)

Edited by Booch

 

only reason id every use that = 

int[] var = new int[2];

var[0] = 22;
var[1] = 444;
var[2] = 777;

With this post I'm questioning if you even know Java..... :troll:

TBH my favorite way to do interfaces is to use an array of integer arrays.

int[][] interfaces = {{150,1},{150,2},{350,6}};

Then for loop through the int [][].

public int[] getOpenInterface(int[][] interfacesToCheck){
 for(int[] interface: interfacesToCheck){
  if(getInterface(interface[0])!=null && getInterface(interface[0]).isValid() && getInterface(interface[1]).siValid())
   return interface;
 }
 return null
}

Edited by Deffiliate

How are you an SDN scripter?

One of his scripts got approved and is now on the SDN. How he wrote that script, not a clue.

Guest
This topic is now closed to further replies.

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.