Advertisement
Guest User

startup.lua

a guest
Dec 10th, 2019
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.39 KB | None | 0 0
  1. mob = peripheral.wrap("back")
  2.  
  3. mob.disableAI()
  4.  
  5. local ftable = {
  6.     mob.walk,
  7.     mob.look,
  8.     mob.shoot
  9. }
  10.  
  11. rednet.open("right")
  12. while true do
  13.    
  14.     id,msg = rednet.receive()
  15.    
  16.     if id == 67 then
  17.         local cmd = textutils.unserialise(msg)    
  18.         ftable[cmd[1]](cmd[2],cmd[3],cmd[4])
  19.         if cmd[1] == 3 and mob.getDocs()
  20.         print(msg)
  21.     end    
  22. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement