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.

Loot task

Featured Replies

Wanted to ask a question about my loot class. I'm fairly new to script writing and when I created this loot task, and add it to my task list, it makes the entire bot really laggy compared to when I remove it from my task list. I'm guessing this is because im calling a really heavy method or something on my activate or execute? So far, this is what I'm using:
 

Quote

//activate


@Override
public boolean canProcess() throws InterruptedException {
    return script.getGroundItems().closest(GroundID).exists();
}

//execute


@Override
public void process() throws InterruptedException {
    script.currentState = Status.LOOTING;

    GroundItem loot = script.getGroundItems().closest(GroundID);

    if (GroundID != null && !script.getInventory().isFull()) {
        loot.interact("Take");
        sleep(random(999,1777));
    }
}

Any thoughts on why it literally makes my client feel as if i'm using a computer from 2002 because it's that laggy, lol?? 
Any advice appreciated!

 

2 hours ago, mark jacobs said:

Wanted to ask a question about my loot class. I'm fairly new to script writing and when I created this loot task, and add it to my task list, it makes the entire bot really laggy compared to when I remove it from my task list. I'm guessing this is because im calling a really heavy method or something on my activate or execute? So far, this is what I'm using:
 

Any thoughts on why it literally makes my client feel as if i'm using a computer from 2002 because it's that laggy, lol?? 
Any advice appreciated!

bcs it's probably giving you a nullpointer exception, if you call a method of an instance that doesn't exist this will happen :)
You have to check != null instead of .exists()

Edited by Khaleesi

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.