Guest User

mobControl

a guest
May 17th, 2013
429
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.76 KB | None | 0 0
  1. os.loadAPI("button")
  2. m = peripheral.wrap("top")
  3. rednet.open("left")
  4. m.clear()
  5.  
  6. function fillTable()
  7.    button.setTable("Sheep",sheer,10,25,3,6)
  8.    button.setTable("Place Mobs",place,10,25,8,11)
  9.    button.setTable("Remove Mobs",remove,10,25,13,16)
  10.    button.screen()
  11. end
  12.  
  13. function getClick()
  14.    event,side,x,y = os.pullEvent("monitor_touch")
  15.    button.checkxy(x,y)
  16. end
  17.  
  18. function place()
  19.    button.toggleButton("Place Mobs")
  20.    shell.run("sendmsg","place")
  21.    button.toggleButton("Place Mobs")
  22. end
  23.  
  24. function remove()
  25.    button.toggleButton("Remove Mobs")
  26.    shell.run("sendmsg","remove2")
  27.    button.toggleButton("Remove Mobs")
  28. end
  29.  
  30. function sheer()
  31.    button.flash("Sheep")
  32.    shell.run("sheepmsg")
  33. end
  34.  
  35. fillTable()
  36. while true do getClick() end
Advertisement
Add Comment
Please, Sign In to add comment