I've started programing a little API that modificates the inbuild turtle commands.
This modification makes the using smpler/usefuller!
Commands I have finished:
Spoiler
- turtle.select()
- turtle.forward()
- turtle.detect()
Usage:
Spoiler
turtle.select(slotNum)
--Selects the give slot and saves it in a variable
YATAPI.getSelect()
--return the selected slot
turtle.forward(length)
--goes <length> blocks forward.
--If it detects a block in the front, the turtle goes above it
turtle.detect(isPowered)
--returns true if a block is detected
--If isPowered is true, it returns 1. True if a block is detected. 2. True if the block is powered by redstone
Example:
Spoiler
os.loadAPI("YATAPI")
turtle.forward(10)
instead of
for i = 1,10 do
turtle.forward()
end
yea, It saves one line, and if you use it more times it's realy usefull!
-Freack100-