Advertisement
EphemeralKap

Untitled

Apr 26th, 2014
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.35 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("Fuel", fuel, 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, 'back')
  34. sleep(4)
  35. addcol(colors.pink, 'back')
  36. sleep(2)
  37. remcol(colors.white, 'back')
  38. remcol(colors.pink, 'back')
  39. end
  40.  
  41. function lava()
  42. ba.flash("Lava")
  43.  
  44. addcol(colors.yellow, 'back')
  45. sleep(1)
  46. addcol(colors.orange, 'back')
  47. sleep(2)
  48. getTank()
  49. sleep(1)
  50. remcol(colors.yellow, 'back')
  51. remcol(colors.orange, 'back')
  52. end
  53.  
  54. function water()
  55. ba.flash("Water")
  56. end
  57.  
  58.  
  59. fillTable()
  60. ba.heading("Free liquid!")
  61.  
  62. while true do
  63. getClick()
  64. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement