Guest User

startup

a guest
Oct 13th, 2016
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.48 KB | None | 0 0
  1. rednet.open("left")
  2. t = turtle
  3.  
  4. funtion listen()
  5.   senderID, message, protocol = rednet.receive()
  6.  
  7.   write("Received: " .. message .. "\n")
  8.  
  9.   if message == "forward" then
  10.     t.forward()
  11.   elseif message == "back" then
  12.     t.back()
  13.   elseif message == "left" then
  14.     t.turnLeft()
  15.   elseif message == "right" then
  16.     t.turnRight()
  17.   elseif message == "up" then
  18.     t.goUp()
  19.   elseif message == "down" then
  20.     t.goDown()
  21.   end
  22. end
  23.  
  24. while(true) do
  25.   listen()
  26. end
Advertisement
Add Comment
Please, Sign In to add comment