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.

Example Script - For educational purposes - Simple chicken Killer

Featured Replies

This is a educational release for a simple chicken killing script. The script will attack the monster (chicken). This will not eat or loot, just a basic bare bone for chicken killer.

//OSBot API
import org.osbot.rs07.api.model.NPC;
import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;

//Importing Java AWT
import java.awt.*;

//Script Details
@ScriptManifest(name = "Chicken Killer", author = "YOU!!", version = 1.0, info = "", logo = "")
public class main extends Script {
	
	@Override
	public void onStart() {
		log("Welcome - your first script!");
		
	}
	
	@Override
	public void onExit() {
		log("K Bye");
	}
	
	@Override
	public int onLoop() throws InterruptedException {
		//Script on loop
		NPC chicken = npcs.closest("Chicken");
 //Looking for non-player character chicken, which will be the closest NPC called chicken
		if(!myPlayer().isAnimating() && !myPlayer().isMoving()) {
			if(chicken != null) {
			if (chicken.isVisible()) {
				chicken.interact("Attack");
				sleep(random(300, 600));
//If chicken is available on the screen, we will perform interaction Attack on it.
			} else {
				camera.toEntity(chicken);
//Moving camera so that the chicken will be visible on the screen.
			}
		  }
		} else {
			sleep(random(300, 600));
//Sleeping for with devitation
		}
		
		return(random(100, 300));
//Starting the script over after random sleep in milliseconds.
	}
	
	@Override
	public void onPaint(Graphics2D g) {
		//Loading paint
		super.onPaint(g);
		g.setColor(Color.GREEN);
		g.drawString("Uncle Dolan had a chikun ", 5, 290);
//Text color is GREEN - printing a line in the client saying Uncle Dolan had a chikun
		
	}

}

K bye :)

You should probably use some sort of event-node state system as it's much more modular, manageable, and it just looks better. Not trying to be a dick or anything, but especially for new scripters that aren't familiar with Java it's better to show them the best way of doing things so they learn and get comfortable with it from early on.

Edited by lare96

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.