Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- programm for cowspwanwer kühe runter schlagen bewegt ini nem 7x7 ring
- local heading
- local x, y, z = 0, 0, 0
- --die Richtung in die er jetzt gerade guckt
- local direction = 1
- local blcokkdata
- function turnleft()
- turtle.turnLeft()
- if(direction == 1)
- then
- direction = 4
- else
- direction = direction - 1
- end
- end
- function turnright()
- turtle.turnRight()
- if(direction == 4)
- then
- direction = 1
- else
- direction = direction + 1
- end
- end
- function digmove(schritte)
- for i = 1, schritte do
- if(direction == 1)
- then
- x = x + 1
- elseif(direction == 2)
- then
- z = z + 1
- elseif(direction == 3)
- then
- x = x - 1
- elseif(direction == 4)
- then
- z = z - 1
- end
- for i = 1, schritte, 1 do
- while(turtle.detect()) do
- turtle.dig()
- end
- turtle.forward()
- end
- end
- end
- -- ändern wenn ich cooleres fuel habe
- function refuel()
- turtle.drop(turtle.getItemCount())
- turtle.suckDown(1)
- turtle.refuel()
- turtle.dropDown(1)
- end
- --programm start
- while(true) do
- if(turtle.detectDown() and turtle.getFuelLevel() < 100)
- then
- refuel()
- end
- --- nächsten 5
- for i = 1, 5 do
- digmove(1)
- turnleft()
- turtle.attack()
- turnright()
- turnright()
- turtle.attack()
- turnleft()
- end
- --letzter block
- digmove(1)
- turnleft()
- turtle.attack()
- turnright()
- turtle.attack()
- turnright()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement