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

A few basic turtle functions

Started by Overthot, 19 September 2014 - 11:36 PM
Overthot #1
Posted 20 September 2014 - 01:36 AM
I started playing with turtles to teach myself how to code (no previous experience). This is the result my labors.

pastebin = 03sPu8Hv

functions include:

clearBlock(side, storageChest, delay, slotNumber, lastSlot)
move(side, blocks, fuelChest, storageChest, delay)
clearInventory(side, storageChest, slotNumber, lastSlot)
consolidateInventory(side, storageChest, slotNumber, lastSlot)
findSlot(side, slotNumber, lastSlot)
findEmptySlot(excludedSlot)
getTotal(slotNumber, lastSlot)
slot(operation, side, slotNumber, lastSlot, quantity, delay)
chestSlot(operation, side, chest, slotNumber, lastSlot, quantity)
refuel(side, fuelChest, threshold)

Please try them out and let me know what you think. Be sure to read the comments for further details.
peanutinky #2
Posted 20 September 2014 - 04:13 PM
nice
Overthot #3
Posted 20 September 2014 - 08:06 PM
I built a quick program to test most of these functions out.

pastebin = r50FL9Fy

How to dig a 5x5 hole the hard way.