August 31, 20178 yr 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 ?
August 31, 20178 yr 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, 20178 yr by Explv
August 31, 20178 yr 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"); }
August 31, 20178 yr 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 i though mb its cuz of libraries and still cannot resolve this problem
Create an account or sign in to comment