Guest User

Untitled

a guest
Aug 19th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.87 KB | None | 0 0
  1. id = 1200
  2. modem = "right"
  3. coords = {0, 0, 0, 0}
  4. while true do
  5.   ev, p1, p2 = os.pullEvent()
  6.   if ev == "rednet_message" then
  7.     if tonumber(p1) == id then
  8.       if p2 == "forward" then
  9.         turtle.forward()
  10.       elseif p2 == "back" then
  11.         turtle.back()
  12.       elseif p2 == "turnRight" then
  13.         turtle.turnRight()
  14.       elseif p2 == "turnLeft" then
  15.         turtle.turnLeft()
  16.       elseif p2 == "place" then
  17.         turtle.place()
  18.       elseif p2 == "placeUp" then
  19.         turtle.placeUp()
  20.       elseif p2 == "placeDown" then
  21.         turtle.placeDown()
  22.       elseif p2 == "dig" then
  23.         turtle.dig()
  24.       elseif p2 == "digDown" then
  25.         turtle.digDown()
  26.       elseif p2 == "digUp" then
  27.         turtle.digUp()
  28.       elseif p2 == "up" then
  29.         turtle.up()
  30.       elseif p2 == "down" then
  31.         turtle.down()
  32.       end
  33.     end
  34.   end
  35. end
Add Comment
Please, Sign In to add comment