Guest User

Untitled

a guest
Feb 22nd, 2013
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.09 KB | None | 0 0
  1. local wireless = peripheral.wrap("bottom")
  2.  
  3. local function setWireless(freq)
  4.   wireless.setFreq(freq)
  5.   rs.setOutput("bottom", true)
  6.   sleep(0.5)
  7.   rs.setOutput("bottom", false)
  8. end
  9.  
  10. local function south()
  11.   setWireless(4205)
  12. end
  13.  
  14. local function west()
  15.   setWireless(?)
  16. end
  17.  
  18. local function up()
  19.   setWireless(?)
  20. end
  21.  
  22. local function down()
  23.   setWireless(?)
  24. end
  25.  
  26. local function dig()
  27.   setWireless(?)
  28. end
  29.  
  30. local function wait()
  31.   print("Sleeping For 5")
  32.   sleep(5)
  33.   print("Iam Awake! - Let's Go")
  34. end
  35.  
  36. local function quarry()
  37.   term.clear()
  38.   term.setCursorPos(1,1)
  39.   print ("Mining Started...")
  40.   for i = 1, 3 do
  41.     down()
  42.   end
  43.   for i = 1, 73 do
  44.     dig()
  45.     down()
  46.   end
  47.   -- Up
  48.   sleep(3)
  49.   print ("Returning to surface")
  50.   for i = 1, 76 do
  51.     up()
  52.   end
  53.   print ("Arrived at surface. Ready to move on")
  54. end
  55.  
  56. for i = 1, 9 do
  57.   quarry()
  58.   for j = 1, 7 do
  59.     south()
  60.   end
  61.   wait()
  62. end
  63.  
  64. for i = 1, 7 do
  65.   west()
  66. end
  67.  
  68. wait()
  69.  
  70. for i = 1, 9 do
  71.   quarry()
  72.   for j = 1, 7 do
  73.     north()
  74.   end
  75.   wait()
  76. end
  77.  
  78. for i = 1, 7 do
  79.   west()
  80. end
Advertisement
Add Comment
Please, Sign In to add comment