Advertisement
Guest User

Untitled

a guest
Aug 29th, 2016
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.93 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("Kuh")
  7. mon.setCursorPos(2,3)
  8. mon.write("Huhn")
  9. mon.setCursorPos(2,5)
  10. mon.write("Pferd")
  11.  
  12. mon.setCursorPos(20,2)
  13. mon.write("Spawner")
  14. mon.setCursorPos(20,4)
  15. mon.write("Grinder")
  16. mon.setCursorPos(20,6)
  17. mon.write("Notaus")
  18.  
  19.  
  20. while true do
  21. event,side,x,y = os.pullEvent("monitor_touch")
  22.  
  23. if x > 1 and x < 6 and y == 1 and rs.getBundledOutput("left",2^9) == false then
  24. rs.setBundledOutput("left",2^9,true)
  25. mon.setCursorPos(2,1)
  26. mon.clearLine()
  27. mon.blit("Kuh","000","555")
  28.  
  29. elseif x > 1 and x < 6 and y == 1 and rs.getBundledOutput("left",2^9) == true then
  30. rs.setBundledOutput("left",2^9,false)
  31. mon.setCursorPos(2,1)
  32. mon.clearLine()
  33. mon.blit("Kuh","000","eee")
  34.  
  35. elseif x > 1 and x < 7 and y == 3 and rs.getBundledOutput("left",2) == false then
  36. rs.setBundledOutput("left",2,true)
  37. mon.setCursorPos(2,3)
  38. mon.clearLine()
  39. mon.blit("Huhn","0000","5555")
  40.  
  41. elseif x > 1 and x < 7 and y == 3 and rs.getBundledOutput("left",2) == true then
  42. rs.setBundledOutput("left",2,false)
  43. mon.setCursorPos(2,3)
  44. mon.clearLine()
  45. mon.blit("Huhn","0000","eeee")
  46.  
  47. elseif x > 1 and x < 8 and y == 5 and rs.getBundledOutput("left",1) == false then
  48. rs.setBundledOutput("left",1,true)
  49. mon.setCursorPos(2,5)
  50. mon.clearLine()
  51. mon.blit("Pferd","00000","55555")
  52.  
  53. elseif x > 1 and x < 8 and y == 5 and rs.getBundledOutput("left",1) == true then
  54. rs.setBundledOutput("left",1,false)
  55. mon.setCursorPos(2,5)
  56. mon.clearLine()
  57. mon.blit("Pferd","00000","eeeee")
  58. end
  59. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement