Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --define--
- --edit the file to info.lua if using CC tweaked--
- file = fs.open("/disk/info","r")
- x = 0
- y = 0
- z = 0
- tz = 0
- ty = 0
- tx = 0
- height = 3
- rotation = 3
- ----------
- --functions--
- 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()
- print("gox>")
- end
- elseif cx < gx then
- rotate(2)
- for i = cx, gx - 1 do
- turtle.forward()
- print("gox<")
- end
- end
- end
- function GoY(cy,gy)
- if cy > gy then
- for i = cy, gy + 1, -1 do
- turtle.digDown()
- turtle.down()
- end
- elseif cy < gy then
- for i = cy, gy - 1 do
- turtle.digUp()
- turtle.up()
- end
- end
- end
- function GoZ(cz,gz)
- print("atleast it called")
- if cz > gz then
- rotate(1)
- for i = cz, gz+1, -1 do
- turtle.forward()
- print(i)
- end
- elseif cz < gz then
- rotate(3)
- for i = cz, gz - 1 do
- turtle.forward()
- print(i)
- end
- end
- end
- function Drop()
- end
- -------------
- --main--
- GoY(y,height)
- GoY(height,y)
- --------
Add Comment
Please, Sign In to add comment