Trees Posted October 21, 2016 Share Posted October 21, 2016 Not really sure why this is happening, but after interacting with an item in the inventory, it hovers over the item again or something like that?In this example it involves dropping, but even things like ID'ing herbs causes this to happen.Any ideas how to fix? I am just looping over inventory.getItems(), and it's only iterating once... Quote Link to comment Share on other sites More sharing options...
Explv Posted October 21, 2016 Share Posted October 21, 2016 Not really sure why this is happening, but after interacting with an item in the inventory, it hovers over the item again or something like that? In this example it involves dropping, but even things like ID'ing herbs causes this to happen. Any ideas how to fix? I am just looping over inventory.getItems(), and it's only iterating once... Show us the code? And by the way for dropping you just probably just use getInventory().dropAll(itemName); Quote Link to comment Share on other sites More sharing options...
Trees Posted October 21, 2016 Author Share Posted October 21, 2016 Show us the code? And by the way for dropping you just probably just use getInventory().dropAll(itemName); Like I said I'm literally just iterating inventory.getItems and interacting with the item. And that built in method got me banned so I made my own. Quote Link to comment Share on other sites More sharing options...
Explv Posted October 21, 2016 Share Posted October 21, 2016 (edited) Like I said I'm literally just iterating inventory.getItems and interacting with the item. And that built in method got me banned so I made my own. How do you know it was the built in drop method that got you banned And just so you know, all the built in method does is: Filter nameFilter = new NameFilter("Trout"); for (int slot = 0; slot < 28; slot ++) { Item itemInSlot = getInventory().getItemInSlot(slot); if(itemInSlot != null && nameFilter.match(itemInSlot)) { getInventory().interact(slot, "Drop"); sleep(gRandom(75, 25)); } } So I fail to see how what you are doing will be any different. Edited October 21, 2016 by Explv Quote Link to comment Share on other sites More sharing options...
House Posted October 21, 2016 Share Posted October 21, 2016 (edited) How do you know it was the built in drop method that got you banned And just so you know, all the built in method does is: Filter nameFilter = new NameFilter("Trout"); for (int slot = 0; slot < 28; slot ++) { Item itemInSlot = getInventory().getItemInSlot(slot); if(itemInSlot != null && nameFilter.match(itemInSlot)) { getInventory().interact(slot, "Drop"); sleep((long)gRandom(75, 25.0D)); } } So I fail to see how what you are doing will be any different. randomized drop patterns are gud? They are pretty to watch Edited October 21, 2016 by House Quote Link to comment Share on other sites More sharing options...
Explv Posted October 21, 2016 Share Posted October 21, 2016 (edited) randomized drop patterns are gud? They are pretty to watch Well he isn't randomizing it, he's just iterating over the inventory and dropping the items in order? And I don't think randomizing it would make any difference, and would probably be slower lol Edited October 21, 2016 by Explv Quote Link to comment Share on other sites More sharing options...
House Posted October 21, 2016 Share Posted October 21, 2016 Well he isn't randomizing it, he's just iterating over the inventory and dropping the items in order? And I don't think randomizing it would make any difference, and would probably be slower lol bbbut its pretty and will stop his paranoia about it getting him banned Quote Link to comment Share on other sites More sharing options...
Trees Posted October 21, 2016 Author Share Posted October 21, 2016 Well he isn't randomizing it, he's just iterating over the inventory and dropping the items in order? And I don't think randomizing it would make any difference, and would probably be slower lol Not really a problem for it going slower. Thanks for showing me how to use Filters and getItemInSlot kappa. But shouldn't it be < 27 Quote Link to comment Share on other sites More sharing options...
Lemons Posted October 21, 2016 Share Posted October 21, 2016 (edited) Not really a problem for it going slower. Thanks for showing me how to use Filters and getItemInSlot kappa. But shouldn't it be < 27 What you are experiencing is the fact that the Inventory doesn't update immediately. Either loop all 28 slots in 1 onLoop, or keep an iterator between onLoops to know where to continue from. Also, its < 28 cause indexes 0-27 need to be iterated over :p Edited October 21, 2016 by Lemons 1 Quote Link to comment Share on other sites More sharing options...
Explv Posted October 21, 2016 Share Posted October 21, 2016 (edited) Not really a problem for it going slower. Thanks for showing me how to use Filters and getItemInSlot kappa. But shouldn't it be < 27 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27 0 < 28 Edited October 21, 2016 by Explv Quote Link to comment Share on other sites More sharing options...
Team Cape Posted October 21, 2016 Share Posted October 21, 2016 Not really a problem for it going slower. Thanks for showing me how to use Filters and getItemInSlot kappa. But shouldn't it be < 27 no lol Quote Link to comment Share on other sites More sharing options...