November 22, 20169 yr public void vertical(){ for(int i = 0; i < 28; i = i + 4){ if(inventory.getItemInSlot(i) != null){ inventory.getItemInSlot(i).interact("drop"); } } } The result of using the above mentioned code is this: I've been fiddling around for the past hour with this, tried completely different methods, tried adding in sleep functions, nothing seems to work, any help would be greatly appreciated
November 22, 20169 yr think about that logic. you're going to go through: 0 4 8 12 16 20 24 and you (would) only drop those items. beside that, you're trying to drop the actual Item which is crucially different from the item in the slot. You would want to do something like: inventory.interact(i, "Drop")
November 22, 20169 yr Author Ah, I understand my error, foolish me, thankyou for your help Edited November 22, 20169 yr by viri
November 22, 20169 yr http://osbot.org/forum/topic/95710-autohotkey-like-vertical-droppingcustom-dropping/ might be helpful
November 22, 20169 yr Credits to this nub ^^^ http://osbot.org/forum/topic/95710-autohotkey-like-vertical-droppingcustom-dropping/
November 22, 20169 yr Author For those interested, I ended up going with the following code: for (int rep = 0; rep < 4; rep++) { for (int i = rep; i < 28; i = i + 4) { if (inventory.getItemInSlot(i) != null) { inventory.interact(i, "drop"); } } } Edited November 22, 20169 yr by viri
Create an account or sign in to comment