Guest User

Untitled

a guest
Oct 22nd, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.51 KB | None | 0 0
  1. --Setup--
  2. rednet.open("top")
  3.  
  4. --Acceptable Turtles
  5. turtle1 = 62
  6. turtle2 = 58
  7. turtle3 = 59
  8. turtle4 = 60
  9.  
  10. --Functions
  11. function getInput()
  12.  x,comp,input = os.pullEvent("rednet_message")
  13.  if comp==turtle1 or comp==turtle2 or comp==turtle3 or comp==turtle4 then
  14.   input = tonumber(input)
  15.   return input
  16.   end
  17.  return false
  18.  end
  19.  
  20. function sendItem(input)
  21.  rs.setBundledOutput("right",input)
  22.  sleep(1)
  23.  rs.setBundledOutput("right",0)
  24. end
  25.  
  26. --Main--
  27. while true do
  28. sendItem(getInput())
  29. os.reboot()
  30. end
Add Comment
Please, Sign In to add comment