Advertisement
Guest User

startup

a guest
Jun 26th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.74 KB | None | 0 0
  1. rednet.open("right")
  2.  
  3. 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.         for i = 1,2 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. function turtleMode()
  25.  
  26.  
  27. end
  28. function brainCancer()
  29.  
  30.  
  31.  
  32. end
  33. 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