Polymorphism Posted May 3, 2017 Posted May 3, 2017 (edited) Didn't see anything in the API. I'd like to check if an item is noted or stackable so that my script can loot it while having a full inventory. Edited May 3, 2017 by Polymorphism
Explv Posted May 3, 2017 Posted May 3, 2017 (edited) 38 minutes ago, Polymorphism said: Didn't see anything in the API. I'd like to check if an item is noted or stackable so that my script can loot it while having a full inventory. Have you tried this to check if it is noted: groundItem.getDefinition().isNoted() Edited May 3, 2017 by Explv 1
Polymorphism Posted May 3, 2017 Author Posted May 3, 2017 Just now, Explv said: Have you tried: groundItem.getDefinition().isNoted() Damn..mustve looked right over #getDefinition Thanks man
Explv Posted May 3, 2017 Posted May 3, 2017 33 minutes ago, Polymorphism said: Didn't see anything in the API. I'd like to check if an item is noted or stackable so that my script can loot it while having a full inventory. If an item is stackable, it's noted id will be -1. Here is a test example: // Fire rune (stackable) log("Fire rune noted id: " + ItemDefinition.forId(554).getNotedId()); // Cannonball (stackable) log("Cannonball noted id: " + ItemDefinition.forId(2).getNotedId()); // Yew logs (not stackable) log("Yew logs noted id: " + ItemDefinition.forId(1515).getNotedId()); Output: [INFO][Bot #1][05/03 10:17:00 PM]: Fire rune noted id: -1 [INFO][Bot #1][05/03 10:17:00 PM]: Cannonball noted id: -1 [INFO][Bot #1][05/03 10:17:00 PM]: Yew logs noted id: 1516 So to check if a ground item is stackable: groundItem.getDefinition().getNotedId() == -1 2
Polymorphism Posted May 3, 2017 Author Posted May 3, 2017 1 hour ago, Explv said: If an item is stackable, it's noted id will be -1. Here is a test example: // Fire rune (stackable) log("Fire rune noted id: " + ItemDefinition.forId(554).getNotedId()); // Cannonball (stackable) log("Cannonball noted id: " + ItemDefinition.forId(2).getNotedId()); // Yew logs (not stackable) log("Yew logs noted id: " + ItemDefinition.forId(1515).getNotedId()); Output: [INFO][Bot #1][05/03 10:17:00 PM]: Fire rune noted id: -1 [INFO][Bot #1][05/03 10:17:00 PM]: Cannonball noted id: -1 [INFO][Bot #1][05/03 10:17:00 PM]: Yew logs noted id: 1516 So to check if a ground item is stackable: groundItem.getDefinition().getNotedId() == -1 Wow, good info! You are seriously an awesome guy