View difference between Paste ID: iXQqQp9F and 1G4rVqXs
SHOW: | | - or go back to the newest paste.
1
anz = 0
2
schlaf = 0.05
3
count = 64
4
side = "back"
5
function cut()
6
        sleep(schlaf)
7
        shell.run("clear")
8
        sleep(schlaf)
9
end
10
----------------------------------------
11
function suck()
12
       
13
        turtle.select(num)  
14
        sleep(0.08)
15
        turtle.dropUp()
16
        sleep(0.08)          
17
        turtle.suckDown()
18
        sleep(0.2)
19
        m = turtle.getItemCount(num)
20
        sleep(0.2)
21
 
22
        if m == 0 then
23
        shell.run("reboot")
24
        else
25
--        m1 = m - 1
26
--        turtle.drop(m1)
27
       
28
        sleep(0.2)
29
        anz = anz+1
30
 
31
        end
32
end
33
----------------------------------------
34
function doIt()
35
       
36
        turtle.select(16)
37
        sleep(0.2)
38
        i = 0
39
	while i < 64 do
40
           i = i + 1
41
           turtle.craft(64)
42-
           sleep(0.02)
42+
           sleep(0.32)
43
           turtle.dropUp()
44-
           sleep(0.02)
44+
           sleep(0.32)
45
        end
46
        print(" Gecraftete Items : " .. anz)
47
        cut()
48
end
49
 
50
 
51
while true do
52
        while rs.getInput(side) == true do
53
        num = 2
54
        suck()
55
        num = 3
56
        suck()
57
        num = 5
58
        suck()
59
        num = 6
60
        suck()
61
        doIt() 
62
       
63
 
64
 
65
        end
66
        print("Kein Signal")
67
        cut()
68
end