Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. local wlist = {['Lockry'] = true}
  2. local sleep = 10
  3. local side = 1
  4. local status
  5. local component = require('component')
  6. local computer = require('computer')
  7. local redstone = component.redstone
  8. local chat_box = component.chat_box
  9. local signal = computer.pullSignal
  10.  
  11. function computer.pullSignal(...)
  12. local e = {signal(...)}
  13. if status and status+sleep*72 <= os.time() then
  14. redstone.setOutput(side, 0)
  15. status = nil
  16. end
  17. if e[1] == 'chat_message' and wlist[e[3]] then
  18. if e[4] == 'startmob' then
  19. status = os.time()
  20. redstone.setOutput(side, 15)
  21. end
  22. end
  23. return table.unpack(e)
  24. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement