Advertisement
Phemto

BoomDropRemote

Jun 2nd, 2023 (edited)
1,060
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --Wait for a redstone signal and then activate the drop protocol
  2. --start with lava is slot 1
  3. local channel = 45  --destination number
  4.  
  5. --initialize the modem
  6. modem = peripheral.wrap("left")
  7. modem.open(channel)
  8.  
  9. args = { ... }
  10.  
  11. turtle.turnRight()
  12. turtle.turnRight()          --should be facing toward the player now
  13.  
  14. while true do
  15.     os.pullEvent("redstone") -- wait for a "redstone" event
  16.     if rs.getInput("top") then -- check the input
  17.         --This is a call to start dropping.
  18.         modem.transmit(channel, 2,  "ON")
  19.         print("Sending Drop Signal")
  20.         modem.closeAll()
  21.     end
  22.     sleep(20)
  23.     turtle.select(1)
  24.     turtle.dig()
  25.     turtle.place()
  26. end
  27.  
  28.  
  29.        
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement