View difference between Paste ID: mYP2D4i9 and 52ydWe6F
SHOW: | | - or go back to the newest paste.
1
for l=1,10 do
2-
if fs.exists("goto") == false 
2+
    if fs.exists("sugurapi/gt") == false then do
3-
then do
3+
        print("downloading goto api")
4-
print("downloading goto")
4+
        shell.run("mkdir","sugurapi")
5-
shell.run("pastebin","get","Rj9UiYUJ","goto")
5+
        shell.run("cd","sugurapi")
6-
end
6+
        shell.run("pastebin","get","a3GBewNp","gt")
7
        shell.run("cd","..")
8-
else do
8+
         if fs.exists("sugurapi/gt") == true then
9-
while true do
9+
            print("download complete") 
10
        elseif fs.exists("sugurapi/gt") == false then
11-
if turtle.getItemCount(2) ~= 0
11+
            print("download failed")
12-
then do
12+
         end
13-
turtle.select(2)
13+
    end
14-
turtle.turnLeft()
14+
    else do
15-
shell.run("goto", "300", "66", "331")
15+
    os.loadAPI("sugurapi/gt")
16-
shell.run("goto", "302", "66", "330")
16+
    while true do
17-
while turtle.getItemCount(2) ~= 0 do
17+
    
18-
turtle.drop()
18+
19-
turtle.turnRight()
19+
20-
end
20+
--wait time
21-
end
21+
 wait_time = 0.83
22-
else do
22+
--chest location
23
chtgetloc = {300, 67, 333, "s"}
24-
if turtle.getItemCount(1) ~= 0
24+
25-
then do
25+
                
26-
turtle.turnLeft()
26+
--chest2 location                      
27-
shell.run("goto", "300", "67", "331")
27+
chtputloc = {302, 66, 330, "e"}
28-
shell.run("goto", "300", "67", "333")
28+
29-
turtle.select(2)
29+
30-
turtle.craft()
30+
31-
end
31+
32-
else do
32+
33
34-
turtle.select(1)
34+
35-
  
35+
36-
if turtle.getItemCount(1) == 0
36+
37-
then do
37+
    if turtle.getItemCount(2) ~= 0
38
    then do
39-
shell.run("goto", "301", "67", "331")
39+
    turtle.select(2)
40-
--sleep(2)
40+
    turtle.turnLeft()
41-
shell.run("goto", "300", "67", "333")
41+
    gt.goto(chtputloc)
42-
turtle.suck()
42+
    while turtle.getItemCount(2) ~= 0 do
43-
turtle.turnLeft()
43+
    turtle.drop()
44-
end
44+
    turtle.turnRight()
45-
if turtle.getItemCount(1) == 0
45+
    end
46-
then do
46+
    end
47-
print("nothing")
47+
    else do
48-
sleep(10)
48+
    
49-
end
49+
    if turtle.getItemCount(1) ~= 0
50-
print("grab")
50+
    then do
51-
end
51+
    --turtle.turnLeft()
52
    --gt.goto(chtgetloc)
53-
else do
53+
    turtle.select(2)
54-
end
54+
    turtle.craft()
55
    end
56-
shell.run("goto", "300", "67", "331")
56+
    else do
57-
shell.run("goto", "300", "67", "333")
57+
    
58
    turtle.select(1)
59-
os.reboot()
59+
      
60-
end
60+
    if turtle.getItemCount(1) == 0
61-
end 
61+
    then do
62-
end
62+
     
63-
end
63+
        gt.goto(chtgetloc)
64-
end
64+
        while turtle.getItemCount(1) == 0 do
65-
end
65+
            turtle.suck()                                        
66-
end
66+
            if turtle.getItemCount(1) == 0 then                          
67-
end
67+
                sleep(wait_time)
68-
end
68+
            end
69-
69+
        end
70
    turtle.turnLeft()
71
    end
72
    if turtle.getItemCount(1) == 0
73
    then do
74
    print("nothing")
75
    --sleep(10)
76
    end
77
    print("grab")
78
    end
79
    
80
    else do
81
    end
82
     
83
    gt.goto(chtgetloc)
84
     
85
    os.reboot()
86
    end
87
    end 
88
    end
89
    end
90
    end
91
    end
92
    end
93
    end
94
    end
95