zootsuitman

DragonFarm Controller

Dec 18th, 2023
944
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.52 KB | None | 0 0
  1. local modem = peripheral.find("modem");
  2. local active = true;
  3.  
  4. modem.open(15);
  5. redstone.setOutput("back", false);
  6. redstone.setOutput("left", false);
  7.  
  8. while true do
  9.   active = redstone.getInput("top");
  10.   if active then
  11.     redstone.setOutput("back", true);
  12.     redstone.setOutput("left", true);
  13.     sleep(3)
  14.     redstone.setOutput("left", false);
  15.  
  16.     local e = {os.pullEvent("modem_message")};
  17.     if e[3] == 15 then
  18.       print("gotem");
  19.       modem.transmit(43, 0, "done");
  20.     end
  21.   else
  22.     sleep(1)
  23.   end
  24. end
Advertisement
Add Comment
Please, Sign In to add comment