Advertisement
Guest User

stage1

a guest
Aug 20th, 2014
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.45 KB | None | 0 0
  1. local mon = peripheral.wrap("top")
  2. local modem = peripheral.wrap("bottom")
  3. --[[
  4.  
  5. mon.clear()
  6. mon.setTextScale(1)
  7. mon.setTextColor(colors.white)
  8.  
  9. mon.setCursorPos(5,1)
  10. mon.write("Podales dobre haslo!")
  11.  
  12. mon.setCursorPos(2,3)
  13. mon.write("A teraz umiesc swoj klucz")
  14. mon.setCursorPos(5,4)
  15. mon.write("w ponizszej skrzyni!")
  16.  
  17. sleep(10)
  18.  
  19. mon.clear()
  20. local sec = 10
  21. while sec ~= -1 do
  22.   mon.clear()
  23.   mon.setCursorPos(2,3)
  24.   mon.write("Masz na to jeszcze "..sec.." sekund")
  25.   sec = sec - 1
  26.   sleep(2)
  27. end
  28.  
  29. modem.transmit(2142, 2143, "sprawdz")
  30.  
  31.  
  32. mon.clear()
  33. mon.setCursorPos(4,2)
  34. mon.write("Jesli nie zdazyles lub")
  35. mon.setCursorPos(9,3)
  36. mon.write("sie pomyliles")
  37. mon.setCursorPos(9,5)
  38. mon.write("to masz pecha")
  39. --sleep(5)
  40. --]]
  41. modem.open(2143)
  42.  
  43. while true do
  44. local breakOut = false
  45. mon.clear()
  46. mon.setCursorPos(1,2)
  47. mon.write("Trwa sprawdzanie klucza")
  48. sleep(1)
  49. mon.clear()
  50. mon.setCursorPos(1,2)
  51. mon.write("Trwa sprawdzanie klucza.")
  52. sleep(1)
  53. mon.clear()
  54. mon.setCursorPos(1,2)
  55. mon.write("Trwa sprawdzanie klucza..")
  56. sleep(1)
  57. mon.clear()
  58. mon.setCursorPos(1,2)
  59. mon.write("Trwa sprawdzanie klucza...")
  60. sleep(1)
  61. mon.clear()
  62.  
  63. local event, modemSide, senderChannel, replyChannel, message, senderDistance = os.PullEvent("modem_message")
  64.   --if message ~= nil then
  65.   --  breakOut = true
  66.   --end
  67. --  if string.len(message) >= 1 then
  68.   --  breakOut = true
  69.     --end
  70.  
  71. --  if breakOut then break end
  72. --print(message)
  73. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement