silentpiranha

MasterSec by Direwolf20

Sep 29th, 2013
286
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.44 KB | None | 0 0
  1.    
  2.  
  3.     local sec = {}
  4.     local reply
  5.     rednet.open("left")
  6.      
  7.     function fillSec()
  8.        sec["direwolf20"] = 3
  9.        sec["Soaryn"] = 3
  10.        sec["Rorax"] = 2
  11.        sec["cpw11"] = 2
  12.     end
  13.      
  14.      
  15.     fillSec()
  16.     while true do
  17.       local id, msg, dist = rednet.receive()
  18.       if sec[msg] == nil then
  19.          reply = 1
  20.       else
  21.          reply = sec[msg]
  22.       end
  23.       rednet.send(id, reply)
  24.     end
Advertisement
Add Comment
Please, Sign In to add comment