Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local args = {...}
- vor = args[1]-1
- rechts = args[2]-1
- hoch = args[3]
- ---nur 1/2 bei rechts
- ---nur 1/3 bei "hoch" eingeben
- --------------
- function dig()
- while turtle.detect() do
- turtle.dig()
- os.sleep(0.5)
- end
- end
- function digUp()
- while turtle.detectUp() do
- turtle.digUp()
- os.sleep(0.5)
- end
- end
- function forward()
- while turtle.forward()==false do
- os.sleep(1)
- dig()
- end
- end
- function up()
- while turtle.up()==false do
- os.sleep(1)
- digUp()
- end
- end
- function down()
- while turtle.down()==false do
- os.sleep(1)
- turtle.digDown()
- end
- end
- -----------------------
- function line()
- for i=1,vor,1 do
- digUp()
- turtle.digDown()
- dig()
- forward()
- end
- digUp()
- turtle.digDown()
- end
- function R()
- turtle.turnRight()
- dig()
- forward()
- turtle.turnRight()
- end
- function L()
- turtle.turnLeft()
- dig()
- forward()
- turtle.turnLeft()
- end
- ---------------------
- function ebene()
- for t=1,rechts,2 do
- line()
- R()
- line()
- L()
- end
- line()
- turtle.turnRight()
- turtle.turnRight()
- end
- -----------------------------------------------------------------------------------
- for h=1,hoch,3 do
- ebene()
- for b=1,3,1 do
- up()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement