Advertisement
Guest User

test

a guest
Dec 23rd, 2015
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.95 KB | None | 0 0
  1. --Welcome to test
  2. --local vars
  3. local side = "left"--CHANGE THIS TO MONITOR SIDE
  4.  
  5. intro()
  6.  
  7.  
  8. --FUNCTIONS
  9.  
  10. --Intro and program
  11. function intro()
  12. term.clear()
  13.   term.setCursorPos(1,1)
  14.   term.write("Welcome to Status Message")
  15.   askc()
  16.   sleep(1)
  17.   askq()
  18.   sleep(1)
  19.   status()
  20.   end
  21.  
  22. --Cart Status
  23. function askc()
  24.   term.clear()
  25.   term.setCursorPos(1,1)_
  26.   term.write("Is the cart running?")
  27.   cart = read()
  28.   if cart == "yes" then
  29.     local scart = "Cart: Mining"
  30.   else
  31.     local scart = "Cart: OFF"
  32.   end
  33. end
  34.  
  35. --Quarry Status
  36. function askq()
  37.   term.clear()
  38.   term.setCursorPos(1,1)
  39.   term.write("Is the Quarry on?")
  40.   quarry = read()
  41.   if quarry == "yes" then
  42.     local squarry = "Quarry: ON"
  43.   else
  44.     local squarry = "Quary: OFF"
  45.   end
  46. end
  47.  
  48. --Status Begin
  49. function status()
  50. mon = peripheral.wrap(side)
  51. mon.clear()
  52. mon.setTextSize(2)
  53. mon.setCursorPos(1,1)
  54. mon.write(scart)
  55. mon.write(squarry)
  56. mon.write(sneed)
  57. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement