View difference between Paste ID: LSd6h8rZ and Gk1PUHL9
SHOW: | | - or go back to the newest paste.
1
bool=true
2
 
3
while bool==true do
4
  if rs.getInput("back", true) then
5
      print ("Waiting")
6
      sleep (1)
7
  else
8
    print ("Let's Roll!")
9
    bool=false
10
  end
11
end
12
 
13
X=66
14
 
15
print ("Startup Functions Activating")
16
print ("Going to lowest point")
17
 
18
turtle.select(1)
19
turtle.dig()
20
turtle.select(4)
21
turtle.back()
22
23
turtle.select(2)
24
turtle.dig()
25
turtle.select(4)
26
turtle.back()
27
 
28
while true do
29
  local mobsPresent = turtle.attackDown()
30
  local digSuccess = turtle.digDown()
31
  local movementSuccess = turtle.down()
32
 
33
  if not mobsPresent and not digSuccess and not movementSuccess then
34-
while ore == false and moves < 67 do
34+
    break
35
  end
36
end
37
 
38
for b = 1, X do
39
  turtle.digUp()
40
    while not turtle.up() do
41
      turtle.attackUp()
42
    end
43
  end
44
 
45
 
46
 
47
  print ("---------------------------")
48
  print ("Starting ORE FINDING PROTOCOLS!")
49
  print ("---------------------------")
50
 
51
 
52
 
53
  while true do
54
 
55
 
56
moves = 0
57
 
58
ore = false
59
 
60
turtle.select(3)
61
ore = turtle.compareDown()
62
turtle.select(4)
63
 
64
while ore == false and moves < 66 do
65
        turtle.digDown()
66
        moves = moves + 1
67
        while not turtle.down() do
68
                turtle.attack()
69
        end
70
	sleep(.5)
71-
      turtle.select(3)
71+
72
        ore = turtle.compareDown()
73
        turtle.select(4)
74
end
75
 
76
for q=1, moves do
77-
    for dropslot = 3, 16 do
77+
78
        while not turtle.up() do
79
                turtle.attack()
80
                turtle.digUp()
81
        end
82
end
83
 
84
 
85
86-
    turtle.select(3)
86+
87
       while not turtle.forward() do
88
         turtle.attack()
89
	 turtle.dig()
90
       end
91
92
 
93
    print ("Dropping off items")
94
 
95
        turtle.dig()
96
        turtle.attack()
97
     
98
 
99
    turtle.select(1)
100
    while not turtle.place() do
101
      turtle.select(4)
102
      turtle.attack()
103
      turtle.dig()
104
      turtle.select(1)
105
    end
106
 
107
    for dropslot = 4, 16 do
108
      turtle.select(dropslot)
109
      turtle.drop()
110
    end
111
112
 turtle.select(1)
113
 
114
    turtle.dig()
115
 
116
    turtle.select(4)
117
118
119
Fuel = turtle.getFuelLevel()
120
 
121
      print ("Fuel level is: "..Fuel)
122
 
123
      if Fuel >= 8192 then
124
 
125
        print ("Fuel level is above minimum safe limit.")
126
 
127
      else
128
 
129
        print ("Fuel is below safe limit! Refueling!")
130
 
131
       turtle.select(4)
132
        turtle.dig()          
133
        turtle.select(2)
134
        while not turtle.place() do
135
                turtle.select(4)
136
                turtle.dig()
137
                turtle.attack()
138
                turtle.select(2)
139
        end
140
        turtle.suck()
141
        turtle.refuel()
142
        turtle.dig()
143
       
144
        turtle.select(4)
145
         
146
    end
147
148
 
149
   
150
 
151
  end