Advertisement
Guest User

Untitled

a guest
Jan 15th, 2013
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.87 KB | None | 0 0
  1. -- turtle code to recive for wireless turtle
  2. print("Being controled..")
  3.  
  4. rednet.open("right")
  5.  
  6. while true do
  7.    senderID, message = rednet.receive()
  8.    
  9.    if message == "Forward" then
  10.           turtle.forward()
  11.    elseif message == "Back" then
  12.           turtle.back()
  13.    elseif message == "turnLeft" then
  14.           turtle.turnLeft()
  15.    elseif message == "turnRight" then
  16.           turtle.turnRight()
  17.    elseif message == "up" then
  18.           turtle.up()
  19.    elseif message == "down" then
  20.           turtle.down()
  21.    elseif message == "dig up" then
  22.           turtle.digUp()
  23.    elseif message == "Dig forward" then
  24.           turtle.dig()
  25.    elseif message == "dig down" then
  26.           turtle.digDown()
  27.    elseif message == "place" then
  28.           turtle.place()
  29.    elseif tonumber(message) then
  30.           turtle.select( tonumber(1) )
  31.    end
  32. end
  33.  
  34. rednet.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement