Posted 15 May 2013 - 08:46 PM
Hey guys I'm really not so good at this turtle coding business and wouldn't mind if someone could please fix my code up it would be much appreciated thanks.
Pastebin: http://pastebin.com/6Sq7eK8V
function refuel()
while turtle.getFuelLevel() == 0 do
turtle.selectSlot(2)
turtle.refuel(1)
end
end
–CHOP–Slot 2 Is Wood/Fuel
function chop()
turtle.selectSlot(2)
while turtle.comapare() == true do
turtle.dig()
turtle.digUp()
turtle.up()
else turtle.detectDown() == true
print("Can't Move Down)
else turtle.down()
end
end
end
end
–PLANT–Slot 1 Is For Saplings
function plant()
turtle.selectSlot(1)
turtle.place()
turtle.up()
end
–EMPTY
function empty()
turtle.select(3)
turtle.turnLeft()
turtle.turnLeft()
turtle.drop()
turtle.turnLeft()
turtle.turnLeft()
end
refuel()
plant()
chop()
sleep(2)
empty()
Pastebin: http://pastebin.com/6Sq7eK8V
Spoiler
–REFUEL–Slot 2 Is For Wood/Fuelfunction refuel()
while turtle.getFuelLevel() == 0 do
turtle.selectSlot(2)
turtle.refuel(1)
end
end
–CHOP–Slot 2 Is Wood/Fuel
function chop()
turtle.selectSlot(2)
while turtle.comapare() == true do
turtle.dig()
turtle.digUp()
turtle.up()
else turtle.detectDown() == true
print("Can't Move Down)
else turtle.down()
end
end
end
end
–PLANT–Slot 1 Is For Saplings
function plant()
turtle.selectSlot(1)
turtle.place()
turtle.up()
end
–EMPTY
function empty()
turtle.select(3)
turtle.turnLeft()
turtle.turnLeft()
turtle.drop()
turtle.turnLeft()
turtle.turnLeft()
end
refuel()
plant()
chop()
sleep(2)
empty()