May 3, 20178 yr 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, 20178 yr by Polymorphism
May 3, 20178 yr 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, 20178 yr by Explv
May 3, 20178 yr Author Just now, Explv said: Have you tried: groundItem.getDefinition().isNoted() Damn..mustve looked right over #getDefinition Thanks man
May 3, 20178 yr 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
May 3, 20178 yr Author 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
Create an account or sign in to comment