bulv3e3 Posted August 31, 2017 Share Posted August 31, 2017 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 ? Quote Link to comment Share on other sites More sharing options...
Explv Posted August 31, 2017 Share Posted August 31, 2017 (edited) 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 ? 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 August 31, 2017 by Explv Quote Link to comment Share on other sites More sharing options...
LeBron Posted August 31, 2017 Share Posted August 31, 2017 Click this button Quote Link to comment Share on other sites More sharing options...
Juggles Posted August 31, 2017 Share Posted August 31, 2017 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"); } 1 Quote Link to comment Share on other sites More sharing options...
bulv3e3 Posted August 31, 2017 Author Share Posted August 31, 2017 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 i though mb its cuz of libraries and still cannot resolve this problem Quote Link to comment Share on other sites More sharing options...