Advertisement
Guest User

startup

a guest
Apr 3rd, 2020
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.40 KB | None | 0 0
  1. --#load the touchpoint API
  2. os.loadAPI("touchpoint")
  3. os.sleep(1)
  4.  
  5. --# Control Channel
  6. local woot_control_channel = 8
  7.  
  8. --# wrap the modem to the computer
  9. local wlan = peripheral.wrap("bottom")
  10.  
  11. --# initialize the button instance set on the monitor
  12. local t = touchpoint.new("right")
  13.  
  14. --# Add a new button
  15. t:add("WWCS - Click To Enable/Disable", nil, 5, 1, 45, 1, colors.black, colors.black)
  16. --t:add("Click to Enable/Disable", nil, 5, 2, 45, 2, colors.black, colors.black)
  17. t:add("Shulker", nil, 5, 3, 17, 3, colors.red, colors.lightBlue)
  18. t:add("Wither", nil, 19, 3, 31, 3, colors.red, colors.lightBlue)
  19. t:add("Feral Ghoul", nil, 33, 3, 45, 3, colors.red, colors.lightBlue)
  20. t:add("Evoker", nil, 5, 5, 17, 5, colors.red, colors.lightBlue)  
  21. t:add("Z Pigman", nil, 19, 5, 31, 5, colors.red, colors.lightBlue)
  22. t:add("Ghast", nil, 33, 5, 45, 5, colors.red, colors.lightBlue)
  23. t:add("Skeleton", nil, 5, 7, 17, 7, colors.red, colors.lightBlue)  
  24. t:add("Z Miner", nil, 19, 7, 31, 7, colors.red, colors.lightBlue)
  25. t:add("Witch", nil, 33, 7, 45, 7, colors.red, colors.lightBlue)
  26. t:add("Blizz", nil, 5, 9, 17, 9, colors.red, colors.lightBlue)  
  27. t:add("Slime", nil, 19, 9, 31, 9, colors.red, colors.lightBlue)
  28. t:add("Cyberdemon", nil, 33, 9, 45, 9, colors.red, colors.lightBlue)
  29. t:add("Spider", nil, 5, 11, 17, 11, colors.red, colors.lightBlue)  
  30. t:add("Enderman", nil, 19, 11, 31, 11, colors.red, colors.lightBlue)
  31.  
  32.  
  33.  
  34.  
  35.  
  36. --t:add("You will be teleported upon picking a kit", nil, 3, 17, 47, 18, colors.black, colors.black)
  37. --# draw the buttons
  38. t:draw()
  39.  
  40. while true do
  41.   --# handleEvents will convert monitor_touch events to button_click if it was on a button
  42.   local event, kit = t:handleEvents(os.pullEvent())
  43.   if event == "button_click" then
  44.         if kit == "Shulker" then
  45.           wlan.transmit(woot_control_channel,10,"Shulker_ON")
  46.           --# Gives the player the Thermal Expansion Starter Kit #--
  47.         elseif kit == "Thaumic Kit" then
  48.          os.shutdown()
  49.           --# Gives the player the Thaumcraft Starter Kit #--
  50.         elseif kit == "AE2 Kit" then
  51.           os.shutdown()
  52.           --# Gives the player the AE2 Starter Kit #--
  53.         elseif kit == "Botania Kit" then
  54.           os.shutdown()
  55.           --# Gives the player the Botania Starter Kit #--
  56.         elseif kit == "Miner Kit" then
  57.           os.shutdown()
  58.           --# Gives the player the Miner Start Kit #--
  59.         end
  60.   end
  61. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement