zootsuitman

DragonFarm Turtle

Dec 18th, 2023
766
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.52 KB | None | 0 0
  1. local obsv = peripheral.find("remote_observer");
  2. local modem = peripheral.find("modem");
  3. local offset = {x = -1, y = 0, z = 6};
  4.  
  5. obsv.addPosition(offset);
  6. modem.open(43);
  7.  
  8. while true do
  9.   local e = {os.pullEvent()};
  10.  
  11.   if e[1] == "block_change" then
  12.     print("change");
  13.  
  14.     for i=1,5 do
  15.       turtle.forward();
  16.     end
  17.     turtle.dig();
  18.     for i=1,5 do
  19.       turtle.back();
  20.     end
  21.  
  22.     modem.transmit(15, 43, "reset");
  23.   elseif e[1] == "modem_message" and e[3] == 43 then
  24.     print("done");
  25.   end
  26. end
  27.  
Advertisement
Add Comment
Please, Sign In to add comment