Advertisement
Mackan90096

Untitled

May 17th, 2015
347
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. --[[
  2. Copyright 2015 Max Thor <thormax5@gmail.com>
  3.  
  4. Licensed under the Apache License, Version 2.0 (the "License");
  5. you may not use this file except in compliance with the License.
  6. You may obtain a copy of the License at
  7.  
  8. http://www.apache.org/licenses/LICENSE-2.0
  9.  
  10. Unless required by applicable law or agreed to in writing, software
  11. distributed under the License is distributed on an "AS IS" BASIS,
  12. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. See the License for the specific language governing permissions and
  14. limitations under the License.
  15. --]]
  16.  
  17. for k, v in pairs(rs.getSides()) do
  18. if peripheral.getType(v) == "modem" then
  19. rednet.open(v)
  20. end
  21. end
  22.  
  23. while true do
  24. _, p1, p2, p3 = os.pullEvent("rednet_message")
  25. if p1 == 269 then
  26. turtle.select(tonumber(p2))
  27. if turtle.place() then
  28. rednet.send(269, "Success!")
  29. else
  30. rednet.send(269, "Error")
  31. end
  32. end
  33. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement