Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local obsv = peripheral.find("remote_observer");
- local modem = peripheral.find("modem");
- local offset = {x = -1, y = 0, z = 6};
- obsv.addPosition(offset);
- modem.open(43);
- while true do
- local e = {os.pullEvent()};
- if e[1] == "block_change" then
- print("change");
- for i=1,5 do
- turtle.forward();
- end
- turtle.dig();
- for i=1,5 do
- turtle.back();
- end
- modem.transmit(15, 43, "reset");
- elseif e[1] == "modem_message" and e[3] == 43 then
- print("done");
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment