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.

PLEASE HELP: how to make my bot eat need a source text to fill in

Featured Replies

currently i have this:


import org.osbot.script.ScriptManifest
import org.osbot.script.rs2.map.Position
import org.osbot.script.rs2.model.NPC
import org.osbot.script.Script
 
import java.awt.*
 
@ScriptManifest(name = "LBcowKiller", author = "Liam Baby", version = 1.0D, info = "Script launched at V1.0")
 
class LBcowKiller extends Script {
 
    Monster[] Monsters = [new Monster("experiment", [ 1677,1678 ] as int[])] as Monster[];
    Monster Monster = this.Monsters[0];
 
    int[] cowhide = [1739];
    def startTime = 0;
 
 
    void onPaint(Graphics g) {
    }
 
    void onExit() {
        log("You have exited CowKiller by Liam Baby");
    }
 
    void onStart() {
        startTime = System.currentTimeMillis();
    }
 
    int onLoop() {
if (!randoms()){
            def cow = closestNPC(Monster.getIds());
            if (cow != null) {
                if (cow.facing == null) {
                if (selectEntityOption(cow, "Attack")) {
                    return 4000 + random(500, 750);
                }
            }
            }
}
        while (client.myPlayer.getFacing() != null) {
            sleep(150);
        }
        return random(50, 150);
    }
  boolean randoms(){
GroundItem[] list = client.currentRegion.getItems()
for(GroundItem g : list){
for(int i : cowhide){
if (i == g.getId()){
selectEntityOption(g,"Take")
sleep(500 + random(500,1000))
return true
}
}
}
 
}
 
    class Monster {
 
        private final String name;
        private final int[] ids;
 
        public Monster(String name, int[] ids) {
            this.name = name;
            this.ids = ids;
        }
 
        public String getName() {
            return name;
        }
 
        public int[] getIds() {
            return ids;
        }
 
 
    }
 
}



Please someone help me add lobsters to this script. I need this script to eat lobsters when low on health.

Please help. This script was originally a cow killer, but i changed the monster id to experiments.

This script works great for experiments! I JUST NEED TO ADD A FOOD EATING CAPABILITY. PLEASE HELP!!

Edited by Raflesia

put this right after the onLoop.

 

if(client.getMyPlayer().getSkills().getCurrentLevel(HITPOINTS) < 20){

foodID.interact("Eat");

sleep(gRandom(500,1000);

}

 

That should be enough. Or just put the last curly brace right before the return statement so it won't do anything until hp is over 20.

Guest
This topic is now closed to further replies.

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.