Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- m = peripheral.wrap("right")
- m.setFreq(226)
- function refuel()
- if turtle.getFuelLevel() < 1000 then
- turtle.select(3)
- turtle.suckDown()
- turtle.refuel()
- end
- end
- function day()
- for n=1,1 do
- turtle.select(2)
- turtle.digDown()
- sleep(1)
- for i=1,24 do
- turtle.down(i)
- end
- turtle.select(3)
- turtle.digDown()
- turtle.down()
- turtle.down()
- turtle.placeUp()
- sleep(2)
- end
- end
- function night()
- for n=1,1 do
- refuel()
- turtle.select(1)
- turtle.digUp()
- turtle.up()
- turtle.up()
- turtle.placeDown()
- for i=1,24 do
- turtle.up(i)
- end
- turtle.select(2)
- turtle.placeDown()
- end
- end
- while true do
- turtle.select(5)
- if turtle.compare(5) == true then
- if m.get() then
- day()
- elseif
- if m.get() == false then
- night()
- end
- sleep(10)
- end
Advertisement
Add Comment
Please, Sign In to add comment