Advertisement
Guest User

os

a guest
Feb 18th, 2018
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.90 KB | None | 0 0
  1. function gets()
  2.   while true do
  3.  
  4.   local resa = http.get("http://paitorocxon.bplaced.net/cc").readAll()
  5.   local checked = http.get("http://paitorocxon.bplaced.net/ccengine.php?check=1").readAll()
  6.     write("'"..resa.."'")
  7.   local fil = fs.open("tmp", "w")
  8.  
  9.  
  10.   fil.write(resa)
  11.   fil.close()
  12.   local ret = fs.open("tmp", "r")
  13.  
  14.   if resa == "back" then
  15.     turtle.back(1)
  16.     elseif resa == "dig" then
  17.     turtle.dig()
  18.     elseif resa == "fore" then
  19.     turtle.forward(1)
  20.     elseif resa == "left" then
  21.       turtle.turnLeft(1)
  22.       elseif resa == "right" then
  23.       turtle.turnRight(1)
  24.       elseif resa == "up" then
  25.       turtle.up(1)
  26.       elseif resa == "down" then
  27.       turtle.down(1)
  28.     elseif resa == "digdown" then
  29.     turtle.digDown()      
  30.     elseif resa == "digup" then
  31.     turtle.digUp()
  32.     elseif resa == "exit" then
  33.     break
  34.   end
  35.  
  36.   os.sleep(0.5)
  37.   end
  38. end
  39. gets()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement