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.

Help Please

Featured Replies

  • Author
20 hours ago, Stimpack said:

what's the problem

 

editerino

from what i read you want to use a knife on item slot 27? sry if i misunderstood


if (getInventory().interact("Use", "Knife") && new ConditionalSleep(5_000) {
	@Override
	public boolean condition() throws InterruptedException {
		return getInventory().isItemSelected();
	}
}.sleep()) {
	final Item item = getInventory().getItemInSlot(27);
	if (item != null && getInventory().interact(27, "Use")) {
		log("KappaPride");
	}
}

 

Unfortunately this still doesn't work ): It says its going to use it but just spams my console saying using slot 27 but doesnt )':

that's strange, the only thing that's logged to console is "KappaPride". you should probably check there's only 1 script in your script folder and it's the one you just compiled

  • Author
31 minutes ago, Stimpack said:

that's strange, the only thing that's logged to console is "KappaPride". you should probably check there's only 1 script in your script folder and it's the one you just compiled

Yeah i changed the log to using slot 27 it just sits the logging that constantly; was I ment to add something else to make it click the slot ? i just assumed .interact even in an if would run the interact part as well ? or am i mistaken 

  • Author
22 minutes ago, Stimpack said:

should work :think:

I dunno what I am doing wrong then )':

	if (item != null && getInventory().interact(27, "Use")) {
		log("KappaPride");
	}

Do this instead:

if(item != null && item.interact()){


 

 

Edited by Molly

  • Author
2 hours ago, Molly said:

	if (item != null && getInventory().interact(27, "Use")) {
		log("KappaPride");
	}

Do this instead:


if(item != null && item.interact()){


 

 

Thanks mate Ill try when I get home from work !

  • Author
18 hours ago, Molly said:

	if (item != null && getInventory().interact(27, "Use")) {
		log("KappaPride");
	}

Do this instead:


if(item != null && item.interact()){


 

 

if (getInventory().interact("Use", "Knife") && new ConditionalSleep(5000) {
				@Override
				public boolean condition() throws InterruptedException {
					return getInventory().isItemSelected();
				}
			}.sleep()) {
				final Item item = getInventory().getItemInSlot(27);
				if (item != null && item.interact()) {
					log("Attempting to use slot 27");
					item.interact("Use");
				}
			}

This is what I have and for some reason it will log attempting to use slot 27 but it just stands there and does nothing ):

 

  • Author
7 minutes ago, Stimpack said:

show pic of ur inventory

you got skype ? 

  • Author

HOLY FUCK IM STUPID...... I just did a test

final String test = inventory.getIteminSlot(27).toString(); prints out slot 28....

I totally forgot that it goes 0 1 2 3 4 5 etc.... fuck sorry guys you were all right...

 

1 hour ago, whipz said:

HOLY FUCK IM STUPID...... I just did a test

final String test = inventory.getIteminSlot(27).toString(); prints out slot 28....

I totally forgot that it goes 0 1 2 3 4 5 etc.... fuck sorry guys you were all right...

 

:doge:

editerino

java uses zero based indexing

here's a quote

Quote

The index in an array is not really an index. It is simply an offset that is the distance from the start of the array. The first element is at the start of the array so there is no distance. Therefore the offset is 0.

 

Edited by Stimpack

  • Author
38 minutes ago, Stimpack said:

:doge:

editerino

java uses zero based indexing

here's a quote

 

Yeah man I just completely forgot haha feel like a douche haha thanks tho mate for all your help (:

 

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.