Guest User

Mobfalle

a guest
Feb 19th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.09 KB | None | 0 0
  1. mon = peripheral.wrap("front")
  2. mon.clear()
  3. mon.setTextScale(1.5)
  4.  
  5. mon.setCursorPos(2,1)
  6. mon.write("Enderman")
  7. mon.setCursorPos(2,3)
  8. mon.write("Blaze")
  9. mon.setCursorPos(2,5)
  10. mon.write("Androit")
  11.  
  12. mon.setCursorPos(20,2)
  13. mon.write("Spawner =")
  14. mon.setCursorPos(20,4)
  15. mon.write("Grinder =")
  16.  
  17.  
  18. while true do
  19. event,side,x,y = os.pullEvent("monitor_touch")
  20.  
  21. if x > 1 and x < 11 and y == 1 then
  22. rs.setOutput("left",true)
  23. mon.setCursorPos(2,1)
  24. mon.clearLine()
  25. mon.blit("Enderman","00000000","dddddddd")
  26. sleep(2)
  27. rs.setOutput("left",false)
  28. mon.setCursorPos(2,1)
  29. mon.clearLine()
  30. mon.blit("Enderman","00000000","eeeeeeee")
  31.  
  32. elseif x > 1 and x < 7 and y == 3 then
  33. rs.setOutput("right",true)
  34. mon.setCursorPos(2,3)
  35. mon.clearLine()
  36. mon.blit("Blaze","00000","ddddd")
  37. sleep(2)
  38. rs.setOutput("right",false)
  39. mon.setCursorPos(2,3)
  40. mon.clearLine()
  41. mon.blit("Blaze","00000","eeeee")
  42.  
  43. elseif x > 1 and x < 11 and y == 5 then
  44. rs.setOutput("back",true)
  45. mon.setCursorPos(2,5)
  46. mon.clearLine()
  47. mon.blit("Androit","0000000","ddddddd")
  48. sleep(2)
  49. rs.setOutput("back",false)
  50. mon.setCursorPos(2,5)
  51. mon.clearLine()
  52. mon.blit("Androit","0000000","eeeeeee")
  53.  
  54. elseif x > 19 and x < 33 and y == 2 and rs.getOutput("top") == false then
  55. rs.setOutput("top",true)
  56. mon.setCursorPos(20,2)
  57. mon.clearLine()
  58. mon.blit("Spawner = OFF","0000000000000","ddddddddddddd")
  59.  
  60. elseif x > 19 and x < 33 and y == 2 and rs.getOutput("top") == true then
  61. rs.setOutput("top",false)
  62. mon.setCursorPos(20,2)
  63. mon.clearLine()
  64. mon.blit("Spawner = ON","000000000000","eeeeeeeeeeee")
  65.  
  66. elseif x > 19 and x < 33 and y == 4 and rs.getOutput("bottom") == false then
  67. rs.setOutput("bottom",true)
  68. mon.setCursorPos(20,4)
  69. mon.clearLine()
  70. mon.blit("Grinder = OFF","0000000000000","ddddddddddddd")
  71.  
  72. elseif x > 19 and x < 33 and y == 4 and rs.getOutput("bottom") == true then
  73. rs.setOutput("bottom",false)
  74. mon.setCursorPos(20,4)
  75. mon.clearLine()
  76. mon.blit("Grinder = ON","000000000000","eeeeeeeeeeee")
  77. end
  78. end
Add Comment
Please, Sign In to add comment