Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Wheat farming turtle by Razputin
- -- Modified and bugfixed by Pugnacious
- --[Code for the turtle to leave start position and go to farming level]--
- function start()
- turtle.forward()
- turtle.down()
- turtle.down()
- end
- --added this function (it was missing) - Pugnacious
- function m()
- turtle.forward()
- end
- --[Multiple move commands]--
- function m7()
- m()
- m()
- m()
- m()
- m()
- m()
- m()
- end
- --[Down Command]--
- function d()
- turtle.down()
- end
- --[Code for the turtle to return toward start position]--
- function re()
- m7()
- turtle.up()
- end
- --[Planting code]--
- function p()
- turtle.digDown()
- turtle.placeDown()
- end
- --[Code for returning turn depending on the 'tray' you end on. Odd/even]--
- function rlt()
- turtle.turnLeft()
- turtle.up()
- turtle.up()
- end
- --[Ditto]--
- function rrt()
- turtle.turnRight()
- turtle.up()
- turtle.up()
- end
- --[For turning at the end of each row of plots. Odd/even]--
- function lt()
- turtle.turnLeft()
- turtle.forward()
- turtle.turnLeft()
- end
- --[Ditto]--
- function rt()
- turtle.turnRight()
- turtle.forward()
- turtle.turnRight()
- end
- --[Function for each row of plots]--
- function row()
- p()
- m()
- p()
- m()
- p()
- m()
- p()
- m()
- p()
- m()
- p()
- end
- --['Tray' odd.]--
- -- Added a refuel for those of us who require fuel
- function to()
- turtle.refuel()
- row()
- rt()
- row()
- lt()
- row()
- rt()
- row()
- lt()
- row()
- rt()
- row()
- lt()
- row()
- rt()
- d()
- end
- --['Tray' even]--
- -- Added a refuel for those of us who require fuel
- function te()
- turtle.refuel()
- row()
- lt()
- row()
- rt()
- row()
- lt()
- row()
- rt()
- row()
- lt()
- row()
- rt()
- row()
- lt()
- d()
- end
- --[Start of the executable part of program]--
- -- Added refuel and set the order of inventory selections.
- -- Inventory box 1 is for fuel and the rest is for seeds.
- turtle.refuel()
- start()
- turtle.select (2)
- to()
- turtle.select(3)
- te()
- turtle.select(4)
- to()
- turtle.select(5)
- te()
- rlt()
- re()
- re()
- re()
- m7()
- turtle.turnRight()
- turtle.back()
- turtle.up()
- turtle.up()
- turtle.back()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement