Advertisement
EphemeralKap

Untitled

Apr 28th, 2014
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.15 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("Mob Ess.", mob, 27,37,7,9)
  10. ba.setTable("Liq. XP", xp, 3,13,13,15)
  11. --ba.setTable("Empty2", emptyy ,15,25,13,15)
  12. --ba.setTable("Empty3", emptyyy ,27,37,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 mob()
  68. ba.flash("Mob Ess.")
  69. addcol(colors.lightBlue, 'bottom')
  70. sleep(1)
  71. addcol(colors.magenta, 'bottom')
  72. sleep(2)
  73. getTank()
  74. sleep(1)
  75. remcol(colors.lightBlue, 'bottom')
  76. remcol(colors.magenta, 'bottom')
  77. end
  78.  
  79. function xp()
  80. ba.flash("Liq. XP")
  81. continue = checkPayment(2)
  82. addcol(colors.cyan, 'bottom')
  83. sleep(1)
  84. addcol(colors.lime, 'bottom')
  85. sleep(2)
  86. getTank()
  87. sleep(1)
  88. remcol(colors.cyan, 'bottom')
  89. remcol(colors.lime, 'bottom')
  90. end
  91.  
  92.  
  93. fillTable()
  94. ba.heading("Free liquid!")
  95. ba.label(5,3, "Insert empty openblock tank.")
  96. ba.label(5,5,"Choose liquid. Get full tank!")
  97.  
  98. while true do
  99. getClick()
  100. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement