Advertisement
Guest User

Modified MobControl

a guest
Jun 28th, 2013
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. os.loadAPI("button")
  2. os.loadAPI("output")
  3. m = peripheral.wrap("top")
  4. m.clear()
  5. output.alloff()
  6.  
  7. function fillTable()
  8.    button.setTable("ON", on, 22,32,3,5, false)
  9.    button.setTable("OFF", off, 38,48,3,5, false)
  10.    button.setTable("Wither Skeletons", wither, 2,22,7,9, false)
  11.    button.setTable("Endermen", enderman, 2,22,11,13, false)
  12.    button.setTable("Angry Zombies", zombie, 2,22,15,17, false)
  13.    button.setTable("Slimes", slime, 2,22,19,21, false)
  14.    button.setTable("Spiders", spider, 2,22,23,25, false)
  15.    button.setTable("Witches", witch, 25,45,7,9, false)
  16.    button.setTable("Blazes", blaze, 25,45,11,13, false)
  17.    button.setTable("Ghasts", ghast, 25,45,15,17, false)
  18.    button.setTable("Zombie Pigmen", pigman, 25,45,19,21, false)
  19.    button.setTable("Cows", cow, 25,45,23,25, false)
  20.    button.setTable("Chickens", chicken, 48,68,7,9, false)
  21.    button.setTable("Sheeps", sheep, 48,68,11,13, false)
  22.    button.setTable("Creepers", creeper, 48,68,15,17, false)
  23.    button.setTable("Magma Cubes", magma, 48,68,19,21, false)
  24.    button.screen()
  25. end
  26.  
  27. function getClick()
  28.    event,side,x,y = os.pullEvent("monitor_touch")
  29.    button.checkxy(x,y)
  30. end
  31.  
  32. function on()
  33.    button.flash("ON")
  34.    button.ButtonOn("Wither Skeletons")
  35.    button.ButtonOn("Endermen")
  36.    button.ButtonOn("Angry Zombies")
  37.    button.ButtonOn("Slimes")
  38.    button.ButtonOn("Spiders")
  39.    button.ButtonOn("Witches")
  40.    button.ButtonOn("Blazes")
  41.    button.ButtonOn("Ghasts")
  42.    button.ButtonOn("Zombie Pigmen")
  43.    button.ButtonOn("Cows")
  44.    button.ButtonOn("Chickens")
  45.    button.ButtonOn("Sheeps")
  46.    button.ButtonOn("Creepers")
  47.    button.ButtonOn("Magma Cubes")
  48.    output.setside("back")
  49.    output.set("white", true)
  50.    output.set("orange", true)
  51.    output.set("magenta", true)
  52.    output.set("lightBlue", true)
  53.    output.set("yellow", true)
  54.    output.set("lime", true)
  55.    output.set("pink", true)
  56.    output.set("gray", true)
  57.    output.set("lightGray", true)
  58.    output.set("cyan", true)
  59.    output.set("purple", true)
  60.    output.set("blue", true)
  61.    output.set("brown", true)
  62.    output.set("green", true)
  63. end
  64.  
  65. function off()
  66.    button.flash("OFF")
  67.    button.ButtonOff("Wither Skeletons")
  68.    button.ButtonOff("Endermen")
  69.    button.ButtonOff("Angry Zombies")
  70.    button.ButtonOff("Slimes")
  71.    button.ButtonOff("Spiders")
  72.    button.ButtonOff("Witches")
  73.    button.ButtonOff("Blazes")
  74.    button.ButtonOff("Ghasts")
  75.    button.ButtonOff("Zombie Pigmen")
  76.    button.ButtonOff("Cows")
  77.    button.ButtonOff("Chickens")
  78.    button.ButtonOff("Sheeps")
  79.    button.ButtonOff("Creepers")
  80.    button.ButtonOff("Magma Cubes")
  81.    output.setside("back")
  82.    output.set("white", false)
  83.    output.set("orange", false)
  84.    output.set("magenta", false)
  85.    output.set("lightBlue", false)
  86.    output.set("yellow", false)
  87.    output.set("lime", false)
  88.    output.set("pink", false)
  89.    output.set("gray", false)
  90.    output.set("lightGray", false)
  91.    output.set("cyan", false)
  92.    output.set("purple", false)
  93.    output.set("blue", false)
  94.    output.set("brown", false)
  95.    output.set("green", false)
  96. end
  97.  
  98. function wither()
  99.    button.toggleButton("Wither Skeletons")
  100.    output.setside("back")
  101.    output.toggle("white")
  102.    print("Wither")
  103. end
  104.  
  105. function enderman()
  106.    button.toggleButton("Endermen")
  107.    output.setside("back")
  108.    output.toggle("orange")
  109.    print("Endermen")
  110. end
  111.  
  112. function zombie()
  113.    button.toggleButton("Angry Zombies")
  114.    output.setside("back")
  115.    output.toggle("magenta")
  116.    print("Angry Zombies")
  117. end
  118.  
  119. function slime()
  120.    button.toggleButton("Slimes")
  121.    output.setside("back")
  122.    output.toggle("lightBlue")
  123.    print("Slimes")
  124. end
  125.  
  126. function spider()
  127.    button.toggleButton("Spiders")
  128.    output.setside("back")
  129.    output.toggle("yellow")
  130.    print("Spiders")
  131. end
  132.  
  133. function witch()
  134.    button.toggleButton("Witches")
  135.    output.setside("back")
  136.    output.toggle("lime")
  137.    print("Witches")
  138. end
  139.  
  140. function blaze()
  141.    button.toggleButton("Blazes")
  142.    output.setside("back")
  143.    output.toggle("pink")
  144.    print("Blazes")
  145. end
  146.  
  147. function ghast()
  148.    button.toggleButton("Ghasts")
  149.    output.setside("back")
  150.    output.toggle("gray")
  151.    print("Ghasts")
  152. end
  153.  
  154. function pigman()
  155.    button.toggleButton("Zombie Pigmen")
  156.    output.setside("back")
  157.    output.toggle("lightGray")
  158.    print("Zombie Pigmen")
  159. end
  160.  
  161. function cow()
  162.    button.toggleButton("Cows")
  163.    output.setside("back")
  164.    output.toggle("cyan")
  165.    print("Cows")
  166. end
  167.  
  168. function chicken()
  169.    button.toggleButton("Chickens")
  170.    output.setside("back")
  171.    output.toggle("purple")
  172.    print("Chickens")
  173. end
  174.  
  175. function sheep()
  176.    button.toggleButton("Sheeps")
  177.    output.setside("back")
  178.    output.toggle("blue")
  179.    print("Sheeps")
  180. end
  181.  
  182. function creeper()
  183.    button.toggleButton("Creepers")
  184.    output.setside("back")
  185.    output.toggle("brown")
  186.    print("Creepers")
  187. end
  188.  
  189. function magma()
  190.    button.toggleButton("Magma Cubes")
  191.    output.setside("back")
  192.    output.toggle("green")
  193.    print("Magma Cubes")
  194. end
  195.  
  196. fillTable()
  197. button.heading("Soul Shards Control Screen")
  198.  
  199. while true do
  200.    getClick()
  201. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement