Geesio

Mob Control Screen v1

Jun 6th, 2015
303
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.88 KB | None | 0 0
  1. os.loadAPI("button")
  2. m = peripheral.wrap("back")
  3. m.clear()
  4.  
  5. function fillTable()
  6. button.setTable("Blazes", blaze, 2,28,7,9, false)
  7. button.setTable("Spiders", spider, 2,28,11,13, false)
  8. button.setTable("Skeletons", skeleton, 2,28,15,17, false)
  9. button.setTable("Test", test, 2,28,19,21, false)
  10. button.setTable("Mfr", mfr, 2,28,23,25, false)
  11. button.screen()
  12. end
  13.  
  14. function getClick()
  15. event,side,x,y = os.pullEvent("monitor_touch")
  16. button.checkxy(x,y)
  17. end
  18.  
  19. function blaze()
  20. button.toggleButton("Blazes")
  21. current = rs.getBundledOutput("top")
  22. bool1 = not bool1
  23. if bool1 then
  24. rs.setBundledOutput("top",current+colors.orange)
  25. else
  26. rs.setBundledOutput("top",current-colors.orange)
  27. end
  28. end
  29.  
  30. function spider()
  31. button.toggleButton("Spiders")
  32. current = rs.getBundledOutput("top")
  33. bool1 = not bool1
  34. if bool1 then
  35. rs.setBundledOutput("top",current+colors.magenta)
  36. else
  37. rs.setBundledOutput("top",current-colors.magenta)
  38. end
  39. end
  40.  
  41. function skeleton()
  42. button.toggleButton("Skeletons")
  43. current = rs.getBundledOutput("top")
  44. bool1 = not bool1
  45. if bool1 then
  46. rs.setBundledOutput("top",current+colors.white)
  47. else
  48. rs.setBundledOutput("top",current-colors.white)
  49. end
  50. end
  51.  
  52. function test()
  53. button.toggleButton("Test")
  54. current = rs.getBundledOutput("top")
  55. bool1 = not bool1
  56. if bool1 then
  57. rs.setBundledOutput("top",current+colors.yellow)
  58. else
  59. rs.setBundledOutput("top",current-colors.yellow)
  60. end
  61. end
  62.  
  63. function mfr()
  64. button.toggleButton("Mfr")
  65. current = rs.getBundledOutput("top")
  66. bool1 = not bool1
  67. if bool1 then
  68. rs.setBundledOutput("top",current+colors.lime)
  69. else
  70. rs.setBundledOutput("top",current-colors.lime)
  71. end
  72. end
  73.  
  74. fillTable()
  75. button.heading("Mob Control Screen")
  76.  
  77. while true do
  78. getClick()
  79. end
Advertisement
Add Comment
Please, Sign In to add comment