Advertisement
Guest User

startup

a guest
Apr 23rd, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.58 KB | None | 0 0
  1. rednet.open("left")
  2.  
  3. while true do
  4.   term.clear()
  5.   term.setCursorPos(1,1)
  6.   print("FL01 --> FL02 = 32")
  7.   print("FL01 --> FL03 = 51")
  8.   print("FL02 --> FL01 = -32")
  9.   print("FL02 --> FL03 = 19")
  10.   print("FL03 --> FL01 = -51")
  11.   print("FL03 --> FL02 = -19")
  12.   write("> ")
  13.   input = tonumber(read())
  14.   if input > 0 then
  15.     for i = 1, input do
  16.       rednet.send(37, "ping")
  17.       sleep(0.5)
  18.     end
  19.   elseif input < 0 then
  20.     input = input * -1
  21.     for i = 1, input do
  22.       rednet.send(38, "ping")
  23.       sleep(0.5)
  24.     end
  25.   else
  26.     print("has to be not 0")  
  27.   end
  28. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement