View difference between Paste ID: VkZUR3u0 and LW73CDyL
SHOW: | | - or go back to the newest paste.
1
for l=1,10 do
2
if fs.exists("goto") == false 
3
then do
4
print("downloading goto")
5
shell.run("pastebin","get","Rj9UiYUJ","goto")
6
end
7
else do
8
 if fs.exists("rebootafter15mins") == false then
9
print("downloading rebooter")
10
shell.run("pastebin","get","uCziMjxu","rebootafter15mins")
11
end 
12
shell.run("rebootafter15mins")             
13
            
14
while true do
15
if turtle.getItemCount(4) ~= 0
16
then do
17
turtle.turnLeft()
18
shell.run("goto", "303", "67", "330")
19
shell.run("goto", "303", "67", "329")
20
shell.run("goto", "301", "66", "328")
21
turtle.select(4)
22
turtle.drop()
23
end
24
else do
25
26
                        
27
---------------------                        
28
---------------------                        
29
--------------------- 
30
--CHANGE HERE START--
31
---------------------
32
---------------------                        
33
---------------------                         
34
wait_time = 45                        
35
-------------------                        
36
-------------------
37
--CHANGE HERE END--
38
-------------------        
39
-------------------                        
40
                        
41
                        
42
if turtle.getItemCount(1) == 0
43
then do
44
turtle.select(1)
45
shell.run("goto", "303", "69", "347")
46
shell.run("goto", "303", "69", "348")
47
print("grab!")
48
49
  while turtle.getItemCount(1) == 0 do  
50
    turtle.suck()                                  
51
                                    
52
  if turtle.getItemCount(1) == 0 then
53
                                    
54
                                  
55
  sleep(wait_time)
56
  end
57
end
58
end
59
else
60
61
if turtle.getItemCount(2) == 0
62
then do
63
shell.run("goto", "303", "66", "333")
64
shell.run("goto", "303", "66", "331")
65
turtle.select(2)
66
67
                                    
68
                                    
69
    while turtle.getItemCount(2) == 0 do 
70
     turtle.suck()                                  
71
  if turtle.getItemCount(2) == 0 then
72
                                    
73
  sleep(wait_time)
74
  end
75
end                                  
76
end
77
else
78
79
if turtle.getItemCount(3) == 0
80
then do
81
82
83
turtle.turnLeft()
84
shell.run("goto", "307", "65", "329")
85
shell.run("goto", "307", "65", "328")
86
shell.run("goto", "305", "65", "327")
87
turtle.select(3)
88
89
  while turtle.getItemCount(3) == 0 do  
90
      turtle.suck()                                       
91
  if turtle.getItemCount(3) == 0 then
92
                                   
93
  sleep(wait_time)
94
  end
95
end
96
end
97
else 
98
99
if turtle.getItemCount(1) and turtle.getItemCount(2) and turtle.getItemCount(3) ~= 0
100
then do
101
turtle.select(4)
102
turtle.craft()
103
104
end
105
else
106
os.reboot()
107
end
108
end
109
end
110
end
111
end
112
end
113
end
114
end
115
end
116
end
117