Guest User

startup

a guest
May 7th, 2016
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.98 KB | None | 0 0
  1. -----------------------------------------------------
  2. -- Turtle SmoothCraft2-- (c) Muzze77 ----------------
  3. -----------------------------------------------------
  4. pc = 897
  5. anz = 0
  6. schlaf = 0.04
  7. suckTime = schlaf
  8. count = 64
  9. side = "back"
  10. function cut()
  11.         sleep(schlaf)
  12.         shell.run("clear")
  13.         sleep(schlaf)
  14. end
  15. ----------------------------------------
  16. function suck()
  17.        
  18.         turtle.select(num)            
  19.         sleep(suckTime)
  20.         if turtle.suckUp() == false then
  21.     sleep(10)
  22.     else
  23.     turtle.suckUp()
  24.         end
  25.     sleep(suckTime)
  26.         m = turtle.getItemCount(num)
  27.         sleep(suckTime)
  28.  
  29.         if m == 0 then
  30.         start()
  31.         else
  32.         m1 = m - 1
  33.         turtle.dropDown(m1)
  34.        
  35.         sleep(0.2)
  36.         anz = anz+1
  37.  
  38.         end
  39. end
  40.  
  41. function pull()
  42.         turtle.select(num)
  43.         sleep(suckTime)
  44.         turtle.dropDown()
  45. end
  46. ----------------------------------------
  47. function doIt()
  48.        
  49.         turtle.select(16)
  50.         sleep(suckTime)
  51.         turtle.craft()
  52.         sleep(suckTime)
  53.         turtle.dropDown()
  54.         print(" Gecraftete Items : " .. anz)
  55.         cut()
  56. end
  57.  
  58.  
  59.  
  60.  
  61. while true do
  62.    
  63.         while rs.getInput(side) == true do
  64.     sleep(0.01)
  65.    
  66.         sleep(0.01)
  67.     function start()
  68.         num = 2
  69.         suck()
  70.         num = 5
  71.         suck()
  72.         num = 6
  73.         pull()
  74.         num = 3
  75.         pull()
  76.         num = 4
  77.         pull()
  78.         num = 7
  79.         pull()
  80.         num = 8
  81.         pull()
  82.         num = 9
  83.         pull()
  84.         num = 10
  85.         pull()
  86.         num = 11
  87.         pull()
  88.         num = 12
  89.         pull()
  90.         num = 13
  91.         pull()
  92.         num = 14
  93.         pull()
  94.         num = 15
  95.         pull()
  96.         num = 16
  97.         pull()
  98.  
  99.  
  100.     -- rednet.send(922, "On")
  101.         doIt()
  102.        
  103.    
  104.         end
  105.         sleep(0.03)
  106.         start()
  107.  
  108.         end
  109.         print("Kein Signal")
  110.     -- rednet.send(922, "Off")
  111.         cut()
  112. end
Add Comment
Please, Sign In to add comment