Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Face North--
- -- buffer --
- sleep(3)
- ------------
- --define--
- x = 0
- y = 0
- z = 0
- tx = 0
- ty = 0
- tz = 0
- height = 200
- rotation = 1
- ----------
- --functions--
- function bomb(inventoryS, Times)
- for i = 0, Times do
- rs.setOutput("bottom",true)
- turtle.placeDown()
- sleep(0.5)
- rs.setOutput("bottom",false)
- sleep(2)
- end
- end
- function rotate(w)
- while rotation ~= w do
- rotation = rotation + 1
- turtle.turnRight()
- if rotation == 5 then
- rotation = 1
- end
- end
- end
- function GoX(cx,gx)
- if cx > gx then
- rotate(4)
- for i = cx, gx + 1, -1 do
- turtle.forward()
- end
- elseif cx < gx then
- rotate(2)
- for i = cx, gx - 1 do
- turtle.forward()
- end
- end
- end
- function GoY(cy,gy)
- if cy > gy then
- for i = cy, gy - 1, -1 do
- turtle.down()
- end
- elseif cy < gy then
- for i = cy, gy - 1 do
- turtle.up()
- end
- end
- end
- function GoZ(cz,gz)
- if cz > gz then
- rotate(1)
- for i = cz, gz+1, -1 do
- turtle.forward()
- end
- elseif cz < gz then
- rotate(3)
- for i = cz, gz - 1 do
- turtle.forward()
- end
- end
- end
- function Drop()
- end
- -------------
- --main--
- GoY(y,height)
- GoX(x,tx)
- GoZ(z,tz)
- GoY(height,ty)
- bomb(1,10)
- GoY(ty,height)
- GoX(tx,x)
- GoZ(tz,z)
- GoY(height,y)
- --------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement