Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function craftPlanks()
- turtle.suck(15)
- print("count: " .. turtle.getItemCount(1))
- if turtle.getItemCount(1) ~= 15 then
- turtle.suck(15 - turtle.getItemCount(1))
- if turtle.getItemCount(1) ~= 15 then
- turtle.drop()
- print("PLANK ERROR")
- os.exit(1)
- end
- end
- turtle.craft()
- turtle.turnRight()
- turtle.drop()
- end
- function craftSlabs()
- turtle.suck(30)
- if turtle.getItemCount(1) ~= 30 then
- turtle.suck(30 - turtle.getItemCount(1))
- if turtle.getItemCount(1) ~= 30 then
- turtle.drop()
- print("SLAB ERROR")
- os.exit(1)
- end
- end
- turtle.transferTo(2, 10)
- turtle.transferTo(3, 10)
- turtle.craft()
- turtle.turnRight()
- turtle.drop()
- end
- function craftLogs()
- turtle.suck(60)
- if turtle.getItemCount(1) ~= 60 then
- turtle.suck(60 - turtle.getItemCount(1))
- if turtle.getItemCount(1) ~= 60 then
- turtle.drop()
- print("LOG ERROR 1")
- os.exit(1)
- end
- end
- turtle.transferTo(2, 60)
- turtle.suck(60)
- if turtle.getItemCount(1) ~= 60 then
- turtle.suck(60 - turtle.getItemCount(1))
- if turtle.getItemCount(1) ~= 60 then
- turtle.drop()
- print("LOG ERROR 2")
- os.exit(1)
- end
- end
- turtle.craft()
- turtle.turnLeft()
- turtle.turnLeft()
- end
- function depositProfits()
- turtle.drop(15)
- turtle.turnLeft()
- turtle.drop()
- turtle.turnRight()
- end
- turtle.turnLeft()
- while true do
- turtle.select(1)
- craftPlanks()
- craftSlabs()
- turtle.turnLeft()
- craftSlabs()
- craftLogs()
- depositProfits()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement