Advertisement
Fulgar

Mining Turtle's command

Apr 2nd, 2015
492
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local t = turtle
  2. local c = true
  3. rednet.open("right")
  4.  
  5. while true do
  6.   id,message = rednet.receive()
  7.   if id == 12 then
  8.     if message == "su" then
  9.       t.digUp()
  10.       t.up()
  11.     elseif message == "giu" then
  12.       t.digDown()
  13.       t.down()
  14.     elseif message == "w" then
  15.       t.dig()
  16.       t.forward()
  17.     elseif message == "s" then
  18.       t.back()
  19.     elseif message == "a" then
  20.       t.turnLeft()
  21.     elseif message == "d" then
  22.       t.turnRight()
  23.     end
  24.   end
  25. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement