• API
• FAQ
• Tools
• Archive
A Pastebin account makes a great Christmas gift
SHARE
TWEET

# Untitled

a guest Oct 11th, 2018 60 Never
ENDING IN00days00hours00mins00secs

1. turtle.refuel()
2. distance = 50
3. x = 0
4. y = 0
5. start = true
6. space =0
7.
8. function mine(distance)
9.   x = 0
10.   while x < distance do
11.     space = turtle.getItemSpace()
12.     turtle.dig()
13.     turtle.digUp()
14.
15.     turtle.forward()
16.     x = x + 1
17.   end
18. end
19. --[[
20. function isFull()
21.   if turtle.getItemSpace() = space then
22.     return true
23.   else
24.     return false
25.   end
26.
27. function goBack()
28.     turtle.turnRight()
29.     turtle.turnRight()
30.     for i = 1, x, 1
31.     do
32.     turtle.forward()
33.     end
34.     turtle.turnRight()
35.     for i = 1, y, 1
36.     do
37.     turtle.forward()
38.     end
39.     error()
40.     end
41. --]]
42.
43. function mineBack(distance)
44.   turtle.turnRight()
45.   turtle.dig()
46.   turtle.digUp()
47.   turtle.forward()
48.   y = y + 1
49.   turtle.turnRight()
50.
51. end
52. if not (turtle.getFuelLevel() - ( distance * 2 ) + y) > 0 then
53.   turtle.refuel()
54. end
55. while turtle.getFuelLevel() - ( distance * 2 ) + y > 0 do
56.     if start then
57.     start = false
58.     else
59.     print("beep")
60.     turtle.turnLeft()
61.     turtle.dig()
62.   turtle.digUp()
63.     turtle.forward()
64.     turtle.turnLeft()
65.     y = y + 1
66.     end
67.   mine(distance)
68.   mineBack(distance)
69.  mine(distance)
70.
71.   end
72.
73.   turtle.turnRight()
74.
75.   for i = 1, y, 1
76.   do
77.   turtle.forward()
78.   end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.

Top