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.

Mage tower lesser killer (1st script)

Featured Replies

Kills lesser demon in mage tower

package lesser;

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


import java.awt.*;


@ScriptManifest(name = "lesser demon", author = "combat", version = 1.0, info = "", logo = "") 
public class main extends Script {


    @[member=Override]
    public void onStart() {
        //Code here will execute before the loop is started


    }
    
    @[member=Override]
    public void onExit() {
        //Code here will execute after the script ends


    }


    @[member=Override]
    public int onLoop() throws InterruptedException {
		//Script on loop
		NPC lesser = npcs.closest("Lesser demon");
		 {
			if(lesser != null) {
			if (lesser.isVisible()) {
				lesser.interact("Attack");
				sleep(random(3000, 6000));
			} else {
				camera.toEntity(lesser);
			}
		  }
		
			sleep(random(3000, 6000));
		}
		
		
	


        return 100; //The amount of time in milliseconds before the loop starts over
    }


    @[member=Override]
    public void onPaint(Graphics2D g) {
        //This is where you will put your code for paint(s)




    }


}

Nice, its wizard's tower btw lul Cx

didn't make it downloadable for us code inept fucks

There's a lesser demon. Never even realised lol but gz

he tried feels.png

 

True :boge:

 

Kills lesser demon in mage tower

package lesser;

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


import java.awt.*;


@ScriptManifest(name = "lesser demon", author = "combat", version = 1.0, info = "", logo = "") 
public class main extends Script {


    @[member='Override']
    public void onStart() {
        //Code here will execute before the loop is started


    }
    
    @[member='Override']
    public void onExit() {
        //Code here will execute after the script ends


    }


    @[member='Override']
    public int onLoop() throws InterruptedException {
		//Script on loop
		NPC lesser = npcs.closest("Lesser demon");
		 {
			if(lesser != null) {
			if (lesser.isVisible()) {
				lesser.interact("Attack");
				sleep(random(3000, 6000));
			} else {
				camera.toEntity(lesser);
			}
		  }
		
			sleep(random(3000, 6000));
		}
		
		
	


        return 100; //The amount of time in milliseconds before the loop starts over
    }


    @[member='Override']
    public void onPaint(Graphics2D g) {
        //This is where you will put your code for paint(s)




    }


}

 

Try to check if your player is not allready fighting / in combat.

Also check if the current health of the demon is > 0 --> meaning the demon isn't death. Otherwise the script will try to attack the demon even though it's doing the death animation.

 

Nice, its wizard's tower btw lul Cx

Isn't the apostrophe after the s? hehe xd

Good start mate, now try to slowly add in what everyone is suggesting and you'll be scripting in no time.

should add a sleep condition to check if you're attacking instead of a sleep(3000,6000); because that will cause it to click every 3-6 seconds


Also, i don't think you need to spin the camera to it as the client handles that when you attack it 

 

Overall not a bad start 

 

Kills lesser demon in mage tower

package lesser;

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


import java.awt.*;


@ScriptManifest(name = "lesser demon", author = "combat", version = 1.0, info = "", logo = "") 
public class main extends Script {


    @[member='Override']
    public void onStart() {
        //Code here will execute before the loop is started


    }
    
    @[member='Override']
    public void onExit() {
        //Code here will execute after the script ends


    }


    @[member='Override']
    public int onLoop() throws InterruptedException {
		//Script on loop
		NPC lesser = npcs.closest("Lesser demon");
		 {
			if(lesser != null) {
			if (lesser.isVisible()) {
				lesser.interact("Attack");
				sleep(random(3000, 6000));
			} else {
				camera.toEntity(lesser);
			}
		  }
		
			sleep(random(3000, 6000));
		}
		
		
	


        return 100; //The amount of time in milliseconds before the loop starts over
    }


    @[member='Override']
    public void onPaint(Graphics2D g) {
        //This is where you will put your code for paint(s)




    }


}

 omfg was looking for exactly this, can you make it into a .jar?

should add a sleep condition to check if you're attacking instead of a sleep(3000,6000); because that will cause it to click every 3-6 seconds

Also, i don't think you need to spin the camera to it as the client handles that when you attack it 

 

Overall not a bad start 

 

how come the AIO fighter cant attack NPCs behind bars?:(

 

 omfg was looking for exactly this, can you make it into a .jar?

 

how come the AIO fighter cant attack NPCs behind bars?sad.png

 

Because there's only like 3 monsters like that in the game and didn't custom code that. 

Because there's only like 3 monsters like that in the game and didn't custom code that. 

 

but but why cant it just click on the NPC?:(

 

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.