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.

Need help with attack

Featured Replies

So before I got to serious into the script I was at vwest and tried to make a simple fighter that would kill guards, after that id make my script for me to get max cb, but I cant seem to make it work out. The one I made will attempt to try and click one after a min of following it with the mouse, than it will interact with it, than it will fight it, than wont do anything, it seems to not loop at all even tho I know it clearly does. Here is my script as it is, id like to add camera movement as well if that isnt in the interact with method already, Im not sure but seems to be but this script has so many bugs idk what is right or wrong. Thanks a bunch!

package com.embah.AIOFighter;

import java.awt.Graphics2D;

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

@ScriptManifest(author = "Boyyo11", info = "AIO Fighter for 99 combat in the stat of your choice!", name = "AIO FIGHTER", version = 0, logo = "oo embah forever oo")
public class AIOFighter extends Script{
	private Area fightingLocation = new Area(3169, 3423, 3184, 3432);
	private Area bankLocation;
	private boolean isBanking;
	private Walker walker;
	private int[] startPoint = new int[2];
	private int[] endPoint = {3185, 3436};
	
	private NPC guard;
	
	private String status = "Loading";
	
	@Override
	public void onStart() throws InterruptedException {
		
	}

	@Override
	public int onLoop() throws InterruptedException {
		status = "In Loop: ";
		guard = npcs.closest(3011);
		if(guard != null){
			status = "In Loop: guard != null";
			if(!guard.isVisible()){
				status = "In Loop: guard is not visible";
//				while(camera.toEntity(guard) != true){
//					status = "In Loop: moving camera to guard than waiting";
//					sleep(random(300, 400));
//				}
			} else if(!guard.isUnderAttack() && fightingLocation.contains(guard) && myPlayer().isAttackable()){
				status = "In Loop: Attacking if guard is in location and both opponents arent under attack";
				guard.interact("Attack");
				sleep(random(100, 200));
			} else {
				status = "In Loop: Sleeping because nothing else worked, prolly no guards";
				sleep(random(500, 600));
			}
		}
		return random(50, 100);
	}

	@Override
	public void onExit() {
		log("Cya later!");
	}

	@Override
	public void onPaint(Graphics2D g) {
		g.drawString(status, 5, 10);
	}
}

Guest
This topic is now closed to further replies.

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.