Nessiesson

treeFarmTurtle

May 23rd, 2013
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.38 KB | None | 0 0
  1. local modem = peripheral.wrap("right") -- Wraps modem peripheral.
  2. modem.open(1) -- Opens and listens to channel 1 (modem).
  3.  
  4. while true do
  5.   local event, modemSide, senderChannel = os.pullEvent("modem_message") -- pulls event "modem_message"
  6.   if event == "modem_message" and senderChannel == 1 then -- If event is "modem_message" and channel 1 place block.
  7.     turtle.place()
  8.   end
  9. end
Advertisement
Add Comment
Please, Sign In to add comment