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.

how can i check my worn Equipment

Featured Replies

so its my first script and i need a little help :) title pretty much says all

my code:

import org.osbot.rs07.api.map.Area;
import org.osbot.rs07.api.ui.RS2Widget;
import org.osbot.rs07.api.ui.Skill;
import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;
import org.osbot.rs07.api.ui.EquipmentSlot;
import org.osbot.rs07.api.Equipment;

if (!equipment.isWearingItem(EquipmentSlot.RING, duelring -> duelring.getName().contains("Ring of dueling"))){
            getBank().withdraw("Ring of dueling(8)",1);
            sleep(random(500, 1000));
            bank.close();
            sleep(random(500,1000));
            inventory.getItem("Ring of dueling(8)").interact("Wear");
            sleep(random(500,1000));

and one more question why i am getting this error ? 

5EDz4nYoT36lda5DtvBc_w.png

3 minutes ago, bulv3e3 said:

so its my first script and i need a little help :) title pretty much says all

my code:


import org.osbot.rs07.api.map.Area;
import org.osbot.rs07.api.ui.RS2Widget;
import org.osbot.rs07.api.ui.Skill;
import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;
import org.osbot.rs07.api.ui.EquipmentSlot;
import org.osbot.rs07.api.Equipment;

if (!equipment.isWearingItem(EquipmentSlot.RING, duelring -> duelring.getName().contains("Ring of dueling"))){
            getBank().withdraw("Ring of dueling(8)",1);
            sleep(random(500, 1000));
            bank.close();
            sleep(random(500,1000));
            inventory.getItem("Ring of dueling(8)").interact("Wear");
            sleep(random(500,1000));

and one more question why i am getting this error ? 

5EDz4nYoT36lda5DtvBc_w.png

 

You are getting that error because the file name should match the name of the public class inside of it. Also class names should start with a capital letter.

Not sure what your are asking in the first part, you check equipment using the isWearingItem method..

Edited by Explv

PLEASE DON'T CODE LIKE THIS. CHANGE IT TO

if (!getInventory.contains("Ring of dueling(8)") {
			getBank().withdraw("Ring of dueling(8)",1);
} else if (getBank.isOpen) {
            bank.close();
} else {      
			inventory.getItem("Ring of dueling(8)").interact("Wear");
}

 

  • Author
42 minutes ago, Explv said:

 

You are getting that error because the file name should match the name of the public class inside of it. Also class names should start with a capital letter.

Not sure what your are asking in the first part, you check equipment using the isWearingItem method..

yes im checking at the bank area and trying to check if ring is worn and if its not then bot should withdraw a new one to be able to teleport to a clan wars and my in my code im getting this error 44iakCA6Rb61NPi2UY_NzA.png i though mb its cuz of libraries and still cannot resolve this problem 

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.