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.

Issue with Entitiy API methods

Featured Replies

Hi people, I am new to writing scripts and have a very frustrating issue preventing my script from running. I have a simple script to pick wheat but when I try to call the EntityAPI methods, I get the error: Cannot make a static reference to the non-static method closest(String...) from the type EntityAPI. I am also pretty rusty with Java coding so if somebody could explain my mistake here that would be helpful. It's probably a simple solution but I cannot figure it out sad.png

 

Some of my code:

 

import org.osbot.rs07.api.EntityAPI;
import org.osbot.rs07.api.model.Entity;
 

 

final String WHEAT_NAME = "wheat";

 

public int onLoop(){
 
/* Only error of program is on this line */
Entity wheat = closest(WHEAT_NAME); //I have also tried EntityAPI.closest(WHEAT_NAME);
 
return 0;
}

Edited by brandon417

I would personally use

RS2Object o = getObjects().closest("Wheat");
Rs2 object extend entity so it's the same shit.

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.