Hi!
I'm trying to write my first script & have some questions.
I want my script to check if my bot's inventory has some items I selected & teleport if all the items are in its inventory.
So I made this:
if (getInventory().contains("Tinderbox","Falador teleport","Varrock teleport","Lumbridge teleport","Steel pickaxe")){
inventory.getItem("Lumbridge teleport").interact();
log("Teleporting to Lumbridge");
}else{
log("We don't have all the items we need");
}
The bot now teleports when it has one of these items instead of all of them. (So if one item is missing the getInventory().contains() statement is still true)
Do I have to write a long list "Ifs & elses" containing every item seperatley to make it work or are there other solutions that are less messy & less work?
Thanks in Advance!