Advertisement
Guest User

mover

a guest
May 19th, 2013
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.88 KB | None | 0 0
  1. function post()
  2. http.post(
  3.                                 "http://phpdesigner.altervista.org/turtle/ricevitore.php",
  4.                                 "a="..""
  5.                 )
  6. end
  7.  
  8. while true do
  9. local source = http.get("http://phpdesigner.altervista.org/turtle/com.txt")
  10. local aSource = source.readAll()
  11. if aSource == "10" then
  12.     turtle.forward()
  13.  post()
  14. elseif aSource == "065535" then
  15.     turtle.turnRight()
  16.     post()
  17. elseif aSource == "00" then
  18.     turtle.turnLeft()
  19.     post()
  20. elseif aSource == "2" then
  21.     turtle.up()
  22.     post()
  23. elseif aSource == "3" then
  24.     turtle.down()
  25.     post()
  26. elseif aSource == "1" then
  27.     turtle.digUp()
  28.     post()
  29. elseif aSource == "4" then
  30.     turtle.digDown()
  31.     post()
  32. elseif aSource == "6" then
  33.   turtle.dig()
  34.   post()
  35. elseif aSource == "5" then
  36.   turtle.place()
  37.   post()
  38. elseif aSource == "11" then
  39.   turtle.back()
  40.   post()
  41. end
  42.     os.sleep(0.10)
  43. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement