Jump to content

how can i check my worn Equipment


bulv3e3

Recommended Posts

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

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...