Advertisement
MrDionesalvi

Elevator Eternal

Dec 10th, 2020
726
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.07 KB | None | 0 0
  1. -- Elevator Controller by dionesalvi @ Calafrica Group
  2. -- Product Key: AJGFGR543
  3.  
  4.  
  5. lato = "left"
  6.  
  7. term.clear()
  8. term.setCursorPos(1, 2)
  9. term.write("Benvenuto!")
  10. term.setCursorPos(1, 3)
  11. term.write("Seleziona un piano:")
  12.  
  13. term.setCursorPos(1, 6)
  14. term.setBackgroundColor(colors.pink)
  15. term.write(" * Primo Piano     ")
  16.  
  17. term.setCursorPos(1, 8)
  18. term.setBackgroundColor(colors.lime)
  19. term.write(" * Secondo Piano   ")
  20.  
  21. term.setCursorPos(1, 10)
  22. term.setBackgroundColor(colors.gray)
  23. term.setTextColor(colors.black)
  24. term.write(" * Terzo Piano     ")
  25. term.setTextColor(colors.white)
  26.  
  27.  
  28. while true do
  29.   _, button, x, y = os.pullEvent("mouse_click")
  30.   if (x >= 1 and x <= 17) then
  31.     if y == 6 then
  32.       rs.setBundledOutput(lato, colors.pink)
  33.       os.sleep(3)
  34.       rs.setBundledOutput(lato, 0)
  35.     elseif y == 8 then
  36.       rs.setBundledOutput(lato, colors.lime)
  37.       os.sleep(5)
  38.       rs.setBundledOutput(lato, 0)
  39.     elseif y == 10 then
  40.       rs.setBundledOutput(lato, colors.gray)
  41.       os.sleep(7)
  42.       rs.setBundledOutput(lato, 0)
  43.     end
  44.   end
  45. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement