EphemeralKap

Untitled

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