Advertisement
Guest User

startup.lua

a guest
Jun 26th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.76 KB | None | 0 0
  1. rednet.open("right")
  2.  
  3. local function wakeUp()
  4. while true do
  5.  
  6.     local ID,MESS,COD = rednet.receive()
  7.    
  8.     if ID == 63 and MESS == "SignInTurds" then
  9.    
  10.         local Auth = COD * 13
  11.         rednet.send(63,"pickMe",Auth)
  12.         while true do
  13.             local ID,MESS,CAD = rednet.receive(3)
  14.             if ID == nil then
  15.                 print("timeout... retrying")
  16.             elseif ID == 63 and MESS == "Authorized" and CAD == COD then
  17.                 swag()
  18.             end
  19.         end
  20.     end
  21. os.sleep(0)
  22. end
  23. end
  24. local function turtleMode()
  25.  
  26.  
  27. end
  28. local function brainCancer()
  29.  
  30.  
  31.  
  32. end
  33. local function swag()
  34.     print("Authorized and ready")
  35.     if turtle then
  36.         turtleMode()
  37.     else
  38.         brainCancer()
  39.     end
  40. end
  41. wakeUp()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement