Advertisement
Muzze77

Smooth Crafty 3

Mar 28th, 2014
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.00 KB | None | 0 0
  1. -----------------------------------------------------
  2. -- Turtle SmoothCraft2-- (c) Muzze77 ----------------
  3. -----------------------------------------------------
  4. anz = 0
  5. schlaf = 0.05
  6. count = 64
  7. side = "back"
  8. function cut()
  9.         sleep(schlaf)
  10.         shell.run("clear")
  11.         sleep(schlaf)
  12. end
  13. ----------------------------------------
  14. function suck()
  15.    
  16.         turtle.select(num)            
  17.     sleep(0.2)
  18.         turtle.suckDown()
  19.     sleep(0.2)
  20.     m = turtle.getItemCount(num)
  21.     sleep(0.2)
  22.  
  23.     if m == 0 then
  24.     shell.run("reboot")
  25.     else
  26.     m1 = m - 1
  27.     turtle.drop(m1)
  28.    
  29.     sleep(0.2)
  30.     anz = anz+1
  31.  
  32.     end
  33. end
  34. ----------------------------------------
  35. function doIt()
  36.    
  37.     turtle.select(16)
  38.     sleep(0.2)
  39.     turtle.craft()
  40.     sleep(0.2)
  41.     turtle.dropUp()
  42.     print(" Gecraftete Items : " .. anz)
  43.     cut()
  44. end
  45.  
  46.  
  47. while true do
  48.     while rs.getInput(side) == true do
  49.     num = 1
  50.     suck()
  51.     num = 2
  52.     suck()
  53.     num = 5
  54.     suck()
  55.     num = 6
  56.     suck()
  57.     doIt() 
  58.    
  59.  
  60.  
  61.     end
  62.     print("Kein Signal")
  63.     cut()
  64. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement