This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
fatmanguy88's profile picture

how to make a turtle drop everything in his slot except for 1 item

Started by fatmanguy88, 19 January 2013 - 06:56 AM
fatmanguy88 #1
Posted 19 January 2013 - 07:56 AM
I know i could do turtle.drop(63) but the thing is its a random amount of items each time and i need him to drop all except for 1, is this possible?
remiX #2
Posted 19 January 2013 - 08:10 AM
According to the Turtle API, turtle.drop(63) should drop 63 items within the selected slot…
fatmanguy88 #3
Posted 19 January 2013 - 08:16 AM
According to the Turtle API, turtle.drop(63) should drop 63 items within the selected slot…
ya i know but like i said its a random amount of items so i cant do turtle.drop(63) because that would drop all the items because its between 20 and 30 items
The Lone Wolfling #4
Posted 19 January 2013 - 09:12 AM
turtle.drop(turtle.getItemCount(i) - 1), assuming you know what slot the itemstack is in.
fatmanguy88 #5
Posted 19 January 2013 - 05:49 PM
turtle.drop(turtle.getItemCount(i) - 1), assuming you know what slot the itemstack is in.
Thank you, this has been very helpful!