SHARE
TWEET

Palevo

informator Sep 25th, 2017 (edited) 194 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local component = require("component")
  2. local computer = require("computer")
  3. -----Ники в вайте не пишет в чат-----
  4. local whitelist = {['Kartograf'] = true,['Alex'] = true}
  5. local term = require("term")
  6. local t = require("table")
  7. local event = require("event")
  8. local gpu = component.gpu
  9. local r = component.radar
  10. local chat = component.chat_box
  11. local players = {}
  12. chat.setName("§2Система_'Палево-2000'§7")
  13.  
  14. function palevo()
  15.   local scan = r.getPlayers()
  16.   for i = 1, #scan do
  17.    if not whitelist[scan[i].name] then
  18.     t.insert(players, scan[i].name)
  19.    end
  20.   end
  21.   local info = t.concat(players,",")
  22.   chat.say("§9В радиусе 40 блоков спалился: §4" ..info)
  23.   print("Спалился:")
  24.   print(info)
  25.   players = {}
  26. end
  27.  
  28. while true do
  29.   local _, _, name, message = event.pull("chat_message")
  30.   if message == "-палево" or message == "-гады" then
  31.     if name == "Kartograf" or name == "Alex" then
  32.       palevo()
  33.     else
  34.       chat.say("§4Мусорам не отвечаю")
  35.     end
  36.   elseif message == "-выкл" or message == "-off" then
  37.        if name == "Kartograf" or name == "Alex" then
  38.          os.exit()
  39.        end
  40.   end
  41. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top