Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Status

DerMarten Sep 2nd, 2013 38 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. shell.run("clear")
  2. rednet.open("right")
  3. local run = true
  4. print("Webinterface Computer")
  5. function get()
  6. http.request("http://cpt.bplaced.net/status/?cmdtype=get")
  7.  local requesting = true
  8.  while requesting do
  9.    local event, url, sourceText = os.pullEvent()
  10.    if event == "http_success" then
  11.      local respondedText = sourceText.readAll()
  12.      --print(respondedText)
  13.      requesting = false
  14.          return respondedText
  15.    elseif event == "http_failure" then
  16.      print("Server didn't respond.")
  17.      requesting = false
  18.    end
  19.  end
  20. end
  21. while run do
  22.         local cmd = get()
  23.         if cmd == "none" then
  24.        
  25.         else
  26.                 rednet.send(3,cmd)
  27.                 http.get("http://cpt.bplaced.net/status/?cmdtype=finish")
  28.         end
  29.         os.sleep(0.0001)
  30. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top