SHARE
TWEET

run

a guest May 21st, 2019 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. os.loadAPI("button")
  2. m = peripheral.wrap("back")
  3. m.clear()
  4. rs.setOutput("bottom", true)
  5.  
  6.  
  7. function fillTable()
  8.   button.setTable("Room of Requirement", but1,1,30,1,4)
  9.   button.setTable("Node Room", but2,1,30,5,8)
  10.   button.setTable("RESTRICTED LEVEL", but3,1,30,9,12)
  11.   button.screen()
  12. end
  13.  
  14. function preLoad()
  15. rs.setOutput("top", true)
  16. --rs.setOutput("bottom", false)
  17. sleep(10)
  18. rs.setOutput("top",false)
  19. --rs.setOutput("bottom", true)
  20. --sleep(1)
  21. end
  22. function getClick()
  23.   event,side,x,y = os.pullEvent("monitor_touch")
  24.   button.checkxy(x,y)
  25. end
  26. function but1()
  27.   button.flash("Room of Requirement")
  28.   preLoad()
  29.   rs.setOutput("left",true)
  30.   sleep(10)
  31.   rs.setOutput("top", true)
  32.   sleep(1)
  33.   rs.setOutput("top",false)
  34.   sleep(5)
  35.   rs.setOutput("left", false)
  36.   print("req")
  37. end
  38. function but2()
  39.   button.flash("Node Room")
  40.   preLoad()
  41.   rs.setOutput("front",true)
  42.   sleep(10)
  43.   rs.setOutput("top", true)
  44.   sleep(1)
  45.   rs.setOutput("top",false)
  46.   sleep(5)
  47.   rs.setOutput("front", false)
  48.   print("req")
  49. end
  50. function but3()
  51.   button.flash("RESTRICTED LEVEL")
  52.   preLoad()
  53.   rs.setOutput("right",true)
  54.   sleep(10)
  55.   rs.setOutput("top", true)
  56.   sleep(1)
  57.   rs.setOutput("top",false)
  58.   sleep(5)
  59.   rs.setOutput("right", false)
  60.   print("req")
  61. end
  62.  
  63. fillTable()
  64. button.heading("Test")
  65.  
  66. while true do
  67.   getClick()
  68. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top