Ledger Nano X - The secure hardware wallet
SHARE
TWEET

startup

a guest Apr 3rd, 2020 181 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --#load the touchpoint API
  2. os.loadAPI("touchpoint")
  3. os.sleep(1)
  4.  
  5. --# wrap the modem to the computer
  6. local wlan = peripheral.wrap("bottom")
  7.  
  8. --# initialize the button instance set on the monitor
  9. local t = touchpoint.new("right")
  10.  
  11. --# Add a new button
  12. t:add("WWCS - Click To Enable/Disable", nil, 5, 1, 45, 1, colors.gray, colors.gray)
  13. t:add("Shulker", nil, 5, 3, 17, 3, colors.red, colors.green)
  14. t:add("Wither", nil, 19, 3, 31, 3, colors.red, colors.green)
  15. t:add("Feral Ghoul", nil, 33, 3, 45, 3, colors.red, colors.green)
  16. t:add("Evoker", nil, 5, 5, 17, 5, colors.red, colors.green)  
  17. t:add("Z Pigman", nil, 19, 5, 31, 5, colors.red, colors.green)
  18. t:add("Ghast", nil, 33, 5, 45, 5, colors.red, colors.green)
  19. t:add("Skeleton", nil, 5, 7, 17, 7, colors.red, colors.green)  
  20. t:add("Z Miner", nil, 19, 7, 31, 7, colors.red, colors.green)
  21. t:add("Witch", nil, 33, 7, 45, 7, colors.red, colors.green)
  22. t:add("Blizz", nil, 5, 9, 17, 9, colors.red, colors.green)  
  23. t:add("Slime", nil, 19, 9, 31, 9, colors.red, colors.green)
  24. t:add("Cyberdemon", nil, 33, 9, 45, 9, colors.red, colors.green)
  25. t:add("Spider", nil, 5, 11, 17, 11, colors.red, colors.green)  
  26. t:add("Enderman", nil, 19, 11, 31, 11, colors.red, colors.green)
  27.  
  28.  
  29.  
  30.  
  31.  
  32. --t:add("You will be teleported upon picking a kit", nil, 3, 17, 47, 18, colors.black, colors.black)
  33. --# draw the buttons
  34. t:draw()
  35.  
  36. while true do
  37.   --# handleEvents will convert monitor_touch events to button_click if it was on a button
  38.   local event, p1 = t:handleEvents(os.pullEvent())
  39.   if event == "button_click" then
  40.         if p1 == "Shulker" then
  41.         t:toggleButton(p1)
  42.         if t.buttonList.Shulker.active then
  43.                wlan.transmit(1,10,"WWCSON")
  44.             else
  45.            
  46.                wlan.transmit(1,10,"WWCSOFF")
  47.        end
  48.         elseif p1 == "Wither" then
  49.          wlan.transmit(2,10,"WWCSON")
  50.          t:toggleButton(p1)
  51.         elseif p1 == "Feral Ghoul" then
  52.          wlan.transmit(3,10,"WWCSON")
  53.          t:toggleButton(p1)
  54.         elseif p1 == "Evoker" then
  55.          wlan.transmit(4,10,"WWCSON")
  56.          t:toggleButton(p1)
  57.         elseif p1 == "Z Pigman" then
  58.          wlan.transmit(5,10,"WWCSON")
  59.          t:toggleButton(p1)
  60.         elseif p1 == "Ghast" then
  61.          wlan.transmit(6,10,"WWCSON")
  62.          t:toggleButton(p1)
  63.         elseif p1 == "Skeleton" then
  64.          wlan.transmit(7,10,"WWCSON")
  65.          t:toggleButton(p1)
  66.         elseif p1 == "Z Miner" then
  67.          wlan.transmit(8,10,"WWCSON")
  68.          t:toggleButton(p1)
  69.         elseif p1 == "Witch" then
  70.          wlan.transmit(9,10,"WWCSON")
  71.          t:toggleButton(p1)
  72.         elseif p1 == "Blizz" then
  73.          wlan.transmit(10,10,"WWCSON")
  74.          t:toggleButton(p1)
  75.         elseif p1 == "Slime" then
  76.          wlan.transmit(11,10,"WWCSON")
  77.          t:toggleButton(p1)
  78.         elseif p1 == "Cyberdemon" then
  79.          wlan.transmit(12,10,"WWCSON")
  80.          t:toggleButton(p1)
  81.         elseif p1 == "Spider" then
  82.          wlan.transmit(13,10,"WWCSON")
  83.          t:toggleButton(p1)
  84.         elseif p1 == "Enderman" then
  85.          wlan.transmit(14,10,"WWCSON")
  86.          t:toggleButton(p1)
  87.         end
  88.   end
  89. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top