Advertisement
Dream_007

Eventparkur

May 26th, 2019
261
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.61 KB | None | 0 0
  1. -- by Dream007
  2. local component = require("component")
  3. local computer=require("computer")
  4. local event = require("event")
  5. local term = require("term")
  6. local shell = require("shell")
  7. local fs = require("filesystem")
  8. local unicode=require("unicode")
  9. local serial = require("serialization")
  10. local radar = require("component").radar
  11. local cb = require("component").chat_box
  12. local rs = require("component").redstone
  13. if not component.isAvailable("opencb") then
  14.     print("Подключите командный блок: opencb")
  15.     os.sleep(3)
  16.     os.exit()
  17. end
  18. if not fs.exists("/lib/sky.lua") then
  19.     shell.execute("wget https://www.dropbox.com/s/8ak2iakw4r4y7td/sky.lua?dl=1 /lib/sky.lua")
  20. end
  21. local sky = require("sky")
  22. local g = component.gpu
  23. event.shouldInterrupt = function () return false end
  24. --local getRead = rs.getInput(1)
  25. local d = 1
  26.  
  27. function first()
  28.     print('Ожидание игрока...')
  29.     vremya = sky.time()
  30.     print('Запущенна в ' ..vremya)
  31.     rRead()
  32.     near = radar.getPlayers(4)
  33.     i = 1
  34.     nick = near[i].name
  35.     price = 450
  36.     count = 1
  37.     id = ('1260:7')
  38.     cb.setName('§6G§7')
  39.  --   cb.say('§8[§2/warp stenka§8]: §eТретье место:§5 ' ..nick)
  40.   --  cb.say('§8[§2/warp stenka§8]: §eОн получает награду: §4Панель 8-го лвл')
  41.     sky.com("give " .. nick .. " " .. id .. " " .. count)
  42.     timex = sky.time()
  43.     print('Приз выдан в ' ..timex)
  44.     d = d - 1
  45. end
  46.  
  47. function rRead()
  48.  while d > 0 do
  49.  getRead = rs.getInput(1)
  50.  if getRead >= 1 then
  51.  break
  52.  end
  53. end
  54. end
  55.  
  56. while d > 0 do
  57. first()
  58. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement