vreezer

Crafty Turtle 2:2 *4*4

Mar 29th, 2014
326
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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.dropDown()
  16.         sleep(0.08)          
  17.         turtle.suckDown()
  18.         sleep(0.08)
  19.         m = turtle.getItemCount(num)
  20.         sleep(0.08)
  21.  
  22.         if m == 0 then
  23.         shell.run("reboot")
  24.         else
  25.         m1 = m - 1
  26.         turtle.dropDown(m1)
  27.        
  28.         sleep(0.08)
  29.         anz = anz+1
  30.  
  31.         end
  32. end
  33. ----------------------------------------
  34. function doIt()
  35.        
  36.         turtle.select(16)
  37.         sleep(0.2)
  38.            turtle.craft()
  39.            sleep(0.08)
  40.            turtle.dropUp()
  41.            sleep(0.08)
  42.         cut()
  43. end
  44.  
  45.  
  46. while true do
  47.         while rs.getInput(side) == true do
  48.         num = 1
  49.         suck()
  50.         num = 2
  51.         suck()
  52.         num = 5
  53.         suck()
  54.         num = 6
  55.         suck()
  56.         doIt()
  57.        
  58.  
  59.  
  60.         end
  61.         print("Kein Signal")
  62.         cut()
  63. end
Advertisement
Add Comment
Please, Sign In to add comment