taco shack Posted August 17, 2015 Posted August 17, 2015 (edited) Hello, hopefully this is the right section for this question. I've been working on my first script which is a woodcutting/ firemaking script. I am having trouble selecting items in my inventory, I want to select the Tinderbox . I have tried the following inventory.interact("Tinderbox", "Use"); & inventory.interactWithNameThatContains("Tinderbox"); neither of these have been able to select the Tinderbox for me. Am I using them wrong? I've also seen people use client.getInventory().interactWithId(tinderbox, "Use"); client.getInventory().interactWithNameThatContains(strLogType, "Use"); Ive tried it this way too, however, using client.getInventory gives me the following error "The method getInventory() is undefined for the type Client" . is this an outdated method? Edited August 17, 2015 by taco shack
Apaec Posted August 17, 2015 Posted August 17, 2015 unconventional way to do it but it works: this.inventory.interact(this.inventory.getSlot("item name"), "item action"); gl! apa
Joseph Posted August 17, 2015 Posted August 17, 2015 unconventional way to do it but it works: this.inventory.interact(this.inventory.getSlot("item name"), "item action"); gl! apa Ugly lolGet inventory(). Get item(string array).interact (action)
taco shack Posted August 21, 2015 Author Posted August 21, 2015 Ugly lol Get inventory(). Get item(string array).interact (action) Thanks guys. This worked out. 1
FrostBug Posted August 21, 2015 Posted August 21, 2015 Hello, hopefully this is the right section for this question. I've been working on my first script which is a woodcutting/ firemaking script. I am having trouble selecting items in my inventory, I want to select the Tinderbox . I have tried the following inventory.interact("Tinderbox", "Use"); & inventory.interactWithNameThatContains("Tinderbox"); neither of these have been able to select the Tinderbox for me. Am I using them wrong? I've also seen people use client.getInventory().interactWithId(tinderbox, "Use"); client.getInventory().interactWithNameThatContains(strLogType, "Use"); Ive tried it this way too, however, using client.getInventory gives me the following error "The method getInventory() is undefined for the type Client" . is this an outdated method? The signature for the interact method you're trying to use is: public boolean interact(java.lang.String action, java.lang.String... names) Which means that what you're doing is trying to select the action "Tinderbox" on the item "Use" Swap these around and you should be good.