Advertisement
semasimo

row_farm#3

May 29th, 2015
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.87 KB | None | 0 0
  1. -- Copyright by Sebastian M. Simon (bastisimon) , 2015
  2.  
  3. -- config vars
  4.     lengh = 5 -- + 1 Turtle self
  5.  
  6.  
  7. -- funtionen
  8.     function head()
  9.         shell.run("clear")
  10.         print("--------------------------------------")
  11.         print("")
  12.         print("Row-Farmer is running...")
  13.         print("")
  14.         print("--------------------------------------")
  15.     end
  16.    
  17.     function work()
  18.         turtle.refuel()
  19.         turtle.up()
  20.        
  21.         i = 0
  22.        
  23.         turtle.select(15)
  24.         turtle.equipLeft()
  25.         while (i < 5) do       
  26.            
  27.             turtle.turnLeft()
  28.             turtle.attack()
  29.             turtle.turnRight()
  30.             turtle.turnRight()
  31.             turtle.attack()
  32.             turtle.turnLeft()
  33.            
  34.             turtle.forward()
  35.             i = (i + 1)
  36.         end
  37.         i = 0
  38.     end
  39.    
  40.    
  41.    
  42.    
  43.    
  44.     head()
  45.    
  46.    
  47.     print("press enter to start")
  48.     input = read()
  49.     if(input == "") then
  50.         work() 
  51.     else
  52.         print("Only Press enter to start...")
  53.         sleep(5)       
  54.         os.reboot()
  55.     end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement