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.

API REQUESTS

Featured Replies

1. myPlayer().isInteractingWithId(int)

 

2. myPlayer().isInteractingWithName(String)

 

3. closestGroundItemForNameThatContains(String)

 

4. closestObjectForName(Position, String) - currently only Area, String

 

5. dropForName(int, String) - Amount, item

 

6. dropForId(int, int) - Amount, Id

 

7. isMouseOn - for use in the settings tab to determine if the mouse setting is activated or not (1 button vs 2 button)

 

8. myPlayer().isPoisoned()

 

9. Get uptext

 

10. Tile clicking

 

11. Check options (if object.option("examine"){})

 

12. NPC getInteractingCharacter

 

13. Player getInteractingCharacter

 

14. closestGroundItemForNameThatContains

 

 

DO NOT POST IN HERE "MAKE IT YOURSELF", THAT IS NOT THE POINT OF AN API REQUEST.

Edited by Alek

I just shat myself after reading what purple posted. lol

package com.vendetta.api;

import org.osbot.script.Script;
import org.osbot.script.rs2.map.Position;
import org.osbot.script.rs2.model.NPC;
import org.osbot.script.rs2.model.RS2Object;

public class Methods {
	
	private final Script SCRIPT;
	
	public Methods(Script script) {
		SCRIPT = script;
	}
	
	public boolean interactingWith(int... ids) {
		org.osbot.script.rs2.model.Character<?> interacting = SCRIPT.myPlayer().getFacing();
		if(interacting != null && interacting instanceof NPC) {
			NPC n = (NPC)interacting;
			for(int i : ids) {
				if(i == n.getDefinition().getId())
					return true;
			}
		}
		return false;
	}
	
	public boolean interactingWith(String... names) {
		org.osbot.script.rs2.model.Character<?> interacting = SCRIPT.myPlayer().getFacing();
		if(interacting != null && interacting instanceof NPC) {
			NPC n = (NPC)interacting;
			for(String s : names) {
				if(s.equalsIgnoreCase(n.getDefinition().getName()))
					return true;
			}
		}
		return false;
	}
	
	public boolean is1Button() {
		return SCRIPT.client.getConfig(170) == 1;
	}
	
	public RS2Object closestObject(Position pos, String... names) {
		RS2Object closest = null;
		int bestDistance = 2000;
		RS2Object[] objects = SCRIPT.client.getObjects();
		for(RS2Object o : objects) {
			boolean matches = false;
			for(String s : names) {
				if(o.getDefinition().getName().equalsIgnoreCase(s)) {
					matches = true;
					break;
				}
			}
			if(matches) {
				int distance = pos.distance(o.getPosition());
				if(distance < bestDistance) {
					bestDistance = distance;
					closest = o;
				}
			}
		}
		return closest;
	}
	
	public boolean clickTile(Position p) {
		try {
			return p.walkHere(SCRIPT.bot);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return false;
	}

}

Do the rest urself

  • Author

How many times do I have to say this... It would nice for this to be in the API. I'm not asking for help.

How many times do I have to say this... It would nice for this to be in the API. I'm not asking for help.

 

They don't listen to suggestions, you should of learnt this by now. 

 

OT: Make your own API, you'll get done a lot quicker than waiting for Laz to add it to the exist API

  • Author

Yeah true :/ It's kind of annoying. It seems like all they do now is do random updates.

Most of the admin's are away dealing with life. Once Maxi comes back everything should get on track.

  • 2 weeks later...
  • Author

Diclonius, obviously you didn't read what I said because I said the following in big bold red words: 

 

 DO NOT POST IN HERE "MAKE IT YOURSELF", THAT IS NOT THE POINT OF AN API REQUEST.

 

 

 

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.