EphemeralKap

Untitled

Apr 26th, 2014
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.85 KB | None | 0 0
  1. os.loadAPI("ba")
  2. local c
  3. m = peripheral.wrap("left")
  4. m.clear()
  5.  
  6. function fillTable()
  7. ba.setTable("Lava", lava, 3,13,7,9)
  8. ba.setTable("Water", water, 15,25,7,9)
  9. --ba.setTable("DICK", dick, 27,37,7,9)
  10. --ba.setTable("Empty1", empty ,15,25,15,17)
  11. --ba.setTable("Empty2", emptyy ,27,37,15,17)
  12. --ba.setTable("Empty3", emptyyy ,3,13,19,21)
  13. --ba.setTable("Empty4", emptyyyy ,15,25,19,21)
  14. --ba.setTable("Empty5", emptyyyyy ,27,37,19,21)
  15.  
  16. ba.screen()
  17. end
  18.  
  19. function getClick()
  20. event,side,x,y = os.pullEvent("monitor_touch")
  21. ba.checkxy(x,y)
  22. end
  23.  
  24. local function addcol(col, side)
  25. rs.setBundledOutput(side, colors.combine(rs.getBundledOutput(side),col))
  26. end
  27.  
  28. local function remcol(col, side)
  29. rs.setBundledOutput(side, colors.subtract(rs.getBundledOutput(side),col))
  30. end
  31.  
  32. function getTank()
  33. addcol(colors.white, 'bottom')
  34. sleep(4)
  35. addcol(colors.pink, 'bottom')
  36. sleep(2)
  37. remcol(colors.white, 'bottom')
  38. remcol(colors.pink, 'bottom')
  39. end
  40.  
  41. function lava()
  42. ba.flash("Lava")
  43.  
  44. addcol(colors.yellow, 'bottom')
  45. sleep(1)
  46. addcol(colors.orange, 'bottom')
  47. sleep(2)
  48. getTank()
  49. sleep(1)
  50. remcol(colors.yellow, 'bottom')
  51. remcol(colors.orange, 'bottom')
  52. end
  53.  
  54. function water()
  55. ba.flash("Water")
  56.  
  57. addcol(colors.black, 'bottom')
  58. sleep(1)
  59. addcol(colors.red, 'bottom')
  60. sleep(2)
  61. getTank()
  62. sleep(1)
  63. remcol(colors.black, 'bottom')
  64. remcol(colors.red, 'bottom')
  65. end
  66.  
  67. function dick()
  68. ba.flash("DICK")
  69. addcol(colors.brown, 'bottom')
  70. sleep(2)
  71. addcol(colors.pink, 'bottom')
  72. sleep(1)
  73. remcol(colors.brown, 'bottom')
  74. remcol(colors.pink, 'bottom')
  75. sleep(1)
  76. end
  77.  
  78.  
  79. fillTable()
  80. ba.heading("Free liquid!")
  81. ba.label(5,10, "Insert empty openblock tank. Choose liquid. Get full tank!")
  82.  
  83. while true do
  84. getClick()
  85. end
Advertisement
Add Comment
Please, Sign In to add comment