Advertisement
hohserg

stone_inserter.lua

Dec 27th, 2019
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.47 KB | None | 0 0
  1. local sides = {
  2.   down = 0,
  3.   forward = 3
  4. }
  5.  
  6. local function primary(name)
  7.     return component.proxy(component.list(name)())
  8. end
  9.  
  10. local robot=primary("robot")
  11. local inv=primary("inventory_controller")
  12. local modem=primary("modem")
  13.  
  14. modem.open(111)
  15.  
  16. do
  17.     local start=false
  18.     while not start do
  19.         local eventName = computer.pullSignal()
  20.         start = eventName=="modem_message"
  21.     end
  22. end
  23.  
  24. while true do
  25.     robot.suck(sides.down,64)
  26.     inv.dropIntoSlot(sides.forward,1,64)
  27. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement