Advertisement
Guest User

startup

a guest
Apr 24th, 2014
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.10 KB | None | 0 0
  1. os.loadAPI("button")--pastebin get 1iwuzsh8 button--and edit the side of monitor
  2. mon = peripheral.wrap("right")--Set Side Of Monitor
  3. mon.clear()
  4.  
  5. function fillTable()-- Add "button.setTable("{name}", {f-name},{xmin},{xmax},{ymin},{ymax})--this starts the button
  6.   button.setTable("ReplicatorOnly", replicatoronly,5,23,3,5)--example
  7.   button.setTable("MassOnly", massonly,5,23,7,9)
  8.   button.setTable("ScannerOnly", scanneronly,5,23,11,13)
  9.   button.setTable("RepAndReac", repandreac,28,46,3,5)
  10.   button.setTable("MassAndReac", massandreac,28,46,7,9)
  11.   button.setTable("ScanAndReac", scanandreac,28,46,11,13)
  12.   button.setTable("ReactorOnly", reactoronly,5,23,15,17)
  13.   button.setTable("Reset", reset,28,46,15,17)
  14.   button.screen()
  15. end
  16.  
  17. function getClick()--This do not edit [checks monitor for touch]
  18.   event,side,x,y = os.pullEvent("monitor_touch")
  19.   button.checkxy(x,y)
  20. end
  21.  
  22. --Add function {name from top}()-- new button
  23. --Then Add what you want is to do
  24. --Finally end()
  25.  
  26. function replicatoronly()--example
  27.   button.flash("ReplicatorOnly")
  28.   rs.setBundledOutput("left",1)
  29.   rs.setBundledOutput("bottom",0)
  30. end
  31.  
  32. function massonly()
  33.   button.flash("MassOnly")
  34.   rs.setBundledOutput("left",2)
  35.   rs.setBundledOutput("bottom",0)
  36. end
  37.  
  38. function scanneronly()
  39.   button.flash("ScannerOnly")
  40.   rs.setBundledOutput("left",4)
  41.   rs.setBundledOutput("bottom",0)
  42. end
  43.  
  44. function repandreac()
  45.   button.flash("RepAndReac")
  46.   rs.setBundledOutput("left",1)
  47.   rs.setBundledOutput("bottom",8)
  48. end
  49.  
  50. function massandreac()
  51.   button.flash("MassAndReac")
  52.   rs.setBundledOutput("left",2)
  53.   rs.setBundledOutput("bottom",8)
  54. end
  55.  
  56. function scanandreac()
  57.   button.flash("ScanAndReac")
  58.   rs.setBundledOutput("left",4)
  59.   rs.setBundledOutput("bottom",8)
  60. end
  61.  
  62. function reactoronly()
  63.   button.flash("ReactorOnly")
  64.   rs.setBundledOutput("left",0)
  65.   rs.setBundledOutput("bottom",8)
  66. end
  67.  
  68. function reset()
  69.   button.flash("Reset")
  70.   rs.setBundledOutput("left",0)
  71.   rs.setBundledOutput("bottom",0)
  72. end
  73.  
  74. fillTable()
  75.  
  76. button.heading("ThunderBadge's UU Matter Factory")--name on top
  77.  
  78. while true do--loop
  79.  getClick()
  80. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement