Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Ini locals
- local SPRUCE = 0
- --Ini Functions
- function clear()
- term.clear()
- term.setCursorPos(1,1)
- end
- --End Ini
- --Main code
- clear()
- print("Want some living wood?")
- while true do
- turtle.select(1)
- if turtle.compare == true then
- print("spruce detected")
- SPRUCE = 1
- end
- turtle.select(2)
- if turtle.compare() == true then
- turtle.dig()
- elseif SPRUCE == 0 then
- turtle.select(1)
- turtle.place()
- print("placed new spruce")
- os.sleep(2)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement