Advertisement
MagmaLP

Mobfarm-Auto-Switch

Dec 28th, 2020 (edited)
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. os.loadAPI("col")
  2. col.setBackground(colors.black)
  3. rednet.open("bottom")
  4. col.clear()
  5.  
  6.  
  7.  
  8.  
  9. function alloff()
  10.     col.msg(02," &8+-------------+")        
  11.     col.msg(03," &8|&7Zombie-Pigmen&8|    &cAUS")
  12.     col.msg(04," &8+-------------+")
  13.  
  14.     col.msg(05," &8+-------------+")
  15.     col.msg(06," &8|   &7Zombie    &8|    &cAUS")
  16.     col.msg(07," &8+-------------+")
  17.  
  18.     col.msg(08," &8+-------------+")
  19.     col.msg(09," &8|   &7Spider    &8|    &cAUS")
  20.     col.msg(10," &8+-------------+")
  21.  
  22.     col.msg(11," &8+-------------+")
  23.     col.msg(12," &8|    &7free     &8|    &cAUS")
  24.     col.msg(13," &8+-------------+")
  25.  
  26.     col.msg(14," &8+-------------+")
  27.     col.msg(15," &8|     &7Cow     &8|    &cAUS")
  28.     col.msg(16," &8+-------------+")
  29. end
  30.  
  31.  
  32.  
  33.  
  34. function pigmenAN()
  35.     col.msg(03," &8|&7Zombie-Pigmen&8|         ")
  36.     sleep(0.1)
  37.     col.msg(03," &8|&fZombie-Pigmen&8|    &aAN ")
  38. end
  39.  
  40. function zombieAN()
  41.     col.msg(06," &8|   &7Zombie    &8|         ")
  42.     sleep(0.1)
  43.     col.msg(06," &8|   &fZombie    &8|    &aAN ")
  44. end
  45.  
  46. function spiderAN()
  47.     col.msg(09," &8|   &7Spider    &8|         ")
  48.     sleep(0.1)
  49.     col.msg(09," &8|   &fSpider    &8|    &aAN ")
  50. end
  51.  
  52. function freeAN()
  53.     col.msg(12," &8|    &7free     &8|         ")
  54.     sleep(0.1)
  55.     col.msg(12," &8|    &ffree     &8|    &aAN ")
  56. end
  57.  
  58. function cowAN()
  59.     col.msg(15," &8|     &7Cow     &8|         ")
  60.     sleep(0.1)
  61.     col.msg(15," &8|     &fCow     &8|    &aAN ")
  62. end
  63.  
  64.  
  65.  
  66.  
  67. function pigmenAUS()
  68.     col.msg(03," &8|&fZombie-Pigmen&8|         ")
  69.     sleep(0.1)
  70.     col.msg(03," &8|&7Zombie-Pigmen&8|    &cAUS")
  71. end
  72.  
  73. function zombieAUS()
  74.     col.msg(06," &8|   &7Zombie    &8|         ")
  75.     sleep(0.1)
  76.     col.msg(06," &8|   &7Zombie    &8|    &cAUS")
  77. end
  78.  
  79. function spiderAUS()
  80.     col.msg(09," &8|   &7Spider    &8|         ")
  81.     sleep(0.1)
  82.     col.msg(09," &8|   &7Spider    &8|    &cAUS")
  83. end
  84.  
  85. function freeAUS()
  86.     col.msg(12," &8|    &7free     &8|         ")
  87.     sleep(0.1)
  88.     col.msg(12," &8|    &7free     &8|    &cAUS")
  89. end
  90.  
  91. function cowAUS()
  92.     col.msg(15," &8|     &7Cow     &8|         ")
  93.     sleep(0.1)
  94.     col.msg(15," &8|     &7Cow     &8|    &cAUS")
  95. end
  96.  
  97.  
  98.  
  99.  
  100. --Programm
  101. v = 0
  102. alloff()
  103. while true do
  104.     local event, side, X, Y = os.pullEvent("monitor_touch")
  105.  
  106.     if v == 0 and X >= 2 and X <= 16 and Y == 03 and side == "top" then
  107.         pigmenAN()
  108.         y = 1
  109.         v = 1
  110.         rednet.send(5881,y)
  111.         sleep(0.5)
  112.     end
  113.         if v == 1 and X >= 20 and X <= 24 and Y == 03 and side == "top" then
  114.             pigmenAUS()
  115.             v = 0
  116.             sleep(0.5)
  117.         end
  118.  
  119.  
  120.  
  121.  
  122.  
  123.     if v == 0 and X >= 2 and X <= 16 and Y == 06 and side == "top" then
  124.         zombieAN()
  125.         y = 2
  126.         v = 2
  127.         rednet.send(5881,y)
  128.         sleep(0.5)
  129.     end
  130.         if v == 2 and X >= 20 and X <= 24 and Y == 06 and side == "top" then
  131.             zombieAUS()
  132.             v = 0
  133.             sleep(0.5)
  134.         end
  135.  
  136.  
  137.  
  138.  
  139.  
  140.     if v == 0 and X >= 2 and X <= 16 and Y == 09 and side == "top" then
  141.         spiderAN()
  142.         y = 3
  143.         v = 3
  144.         rednet.send(5881,y)
  145.         sleep(0.5)
  146.     end
  147.         if v == 3 and X >= 20 and X <= 24 and Y == 09 and side == "top" then
  148.             spiderAUS()
  149.             v = 0
  150.             sleep(0.5)
  151.         end
  152.  
  153.  
  154.  
  155.  
  156.  
  157.     if v == 0 and X >= 2 and X <= 16 and Y == 12 and side == "top" then
  158.         freeAN()
  159.         y = 4
  160.         v = 4
  161.         rednet.send(5881,y)  
  162.         sleep(0.5)
  163.     end
  164.         if v == 4 and X >= 20 and X <= 24 and Y == 12 and side == "top" then
  165.             freeAUS()
  166.             v = 0
  167.             sleep(0.5)
  168.         end
  169.  
  170.  
  171.  
  172.  
  173.  
  174.     if v == 0 and X >= 2 and X <= 16 and Y == 15 and side == "top" then
  175.         cowAN()
  176.         y = 5
  177.         v = 5
  178.         rednet.send(5881,y)
  179.         sleep(0.5)
  180.     end
  181.         if v == 5 and X >= 20 and X <= 24 and Y == 15 and side == "top" then
  182.             freeAUS()
  183.             v = 0
  184.             sleep(0.5)
  185.         end
  186.  
  187.  
  188. sleep(1)
  189. end  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement