Advertisement
Guest User

5

a guest
Mar 29th, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.64 KB | None | 0 0
  1. --=======================
  2. --| Лабиринт v1.0       |
  3. --|Spawn Chest          |
  4. --|By Kwant             |
  5. --|McSkill Galaxy Craft |
  6. --=======================
  7. --/////////\\\\\\\\\
  8. local component = require("component")
  9. local os = require("os")
  10. local sides = require("sides")
  11. local computer = require("computer")
  12. local event = require("event")
  13. local term = require("term")
  14.  
  15. local c = component.chat_box
  16. local g = component.gpu
  17. local d = component.debug
  18.  
  19. local BOT_NAME = ("§8[§9Galaxy§8] §3Организатор§f: ") --имя бота
  20. local COLOR1 = "§b"  --основной цвет
  21. local WORDS = {"начинаем!", "приступаем!", "готовимся!", "погнали!"}  --массив слов для старта
  22. local TIMER = 5 --КД по таймеру
  23. local TIMER1 = 10 -- КД по теймеру
  24. local COLOR_CMD = 0xffff00  --Цвет шрифта(Жёлтый)
  25.  
  26. local cordx={-242,-240,-238,-236,-234}
  27. local cordy={2,2,2,2,2}
  28. local cordz={-73,-73,-73,-73,-73}
  29. local chest={1,2,3,4,5}
  30. local che=5
  31.  
  32. function prov(i)
  33. if component.debug.getWorld().getBlockId(cordx[i],cordy[i],cordz[i])==35 then
  34. che=che-1
  35. chest[i]=-1
  36. if che==4 then
  37. c.say("Залышилось 4 сундука")
  38. end
  39. if che==3 then
  40. c.say("Залышилось 3 сундука")
  41. end
  42. if che==2 then
  43. c.say("Залышилось 2 сундука")
  44. end
  45. if che==1 then
  46. c.say("Залышився 1 сундук")
  47. end
  48. if che==0 then
  49. c.say("Сундукив нема!")
  50. end
  51. os.sleep(3)
  52. end
  53. end
  54.  
  55. while true do
  56. for i=0,5 do
  57. flag=1
  58. for j=0,5 do
  59. if i==chest[j] then
  60. flag =0
  61. end
  62. end
  63. if flag==0 then
  64. prov(i)
  65. end
  66. end
  67. if che ==0 then
  68. c.say("Закритие програмки")
  69. break
  70. end
  71. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement