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")