Advertisement
Guest User

Untitled

a guest
Apr 28th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.37 KB | None | 0 0
  1. command /mlag [<text>] [<text>]:
  2. trigger:
  3. if arg 1 isn't "sprawdz" or "otchlan" or "":
  4. if player doesn't have permission "mlag.admin":
  5. set {Infoz} to {Info}
  6. replace all "|tresc|" in {Infoz} with "mlag.admin"
  7. send "%{Tag}%%{Kolor}% Nie posiadasz uprawnien do tej komendy. %{Infoz}%"
  8. if arg 1 is "czysc":
  9. loop 54 times:
  10. set slot loop-number - 1 of block at {lag::otchlan::ustawiona} to air
  11. set {lag::licznik} to 0
  12. loop all entities:
  13. if loop-entity is a dropped item:
  14. set {_} to items within loop-entity
  15. set {_} to "%loop-entity%" parsed as an item
  16. set {lag::licznik} to {lag::licznik}+1
  17. set {lag::item::%{lag::licznik}%} to {_}
  18. delete loop-entity
  19. set {lag::otchlan::stan} to true
  20. set {Infoz} to {Info}
  21. replace all "|tresc|" in {Infoz} with "%player%"
  22. broadcast "%{Tag}%%{Kolor}% Zostalo wymuszone usuniecie itemow z ziemi przez administratora. %{Infoz}%"
  23. broadcast "%{Tag}%%{Kolor}% W otchlani pojawily się usunięte przedmioty. "
  24. loop {lag::licznik} times:
  25. add {lag::item::%loop-number%} to inventory of block at {lag::otchlan::ustawiona}
  26.  
  27. if arg 1 is "otchlan":
  28. open the inventory of the block at {lag::otchlan::ustawiona} to the player
  29. send "%{Tag}%%{Kolor}% Otworzyles otchlan."
  30.  
  31. if arg 1 is "ustaw":
  32. if arg 2 is "skrzynia":
  33. set {_x} to random integer between 0 and 10000
  34. set {_y} to 255
  35. set {_z} to random integer between 1 and 10000
  36. set {_c} to location at {_x}, {_y}, {_z}
  37. set block at {_c} to chest
  38. set block east {_c} to chest
  39. set {lag::otchlan::ustawiona} to location of {_c}
  40. send "%{Tag}%%{Kolor}% Skrzynia została postawiona na koordynatach: %{lag::otchlan::ustawiona}%"
  41.  
  42. if arg 1 is "sprawdz":
  43. send "%{Tag}%%{Kolor}% Do nastepnego usuwania itemow pozostało %{lag::czas}% sekund."
  44.  
  45. if arg 1 is "reset":
  46. set {Infoz} to {Info}
  47. replace all "|tresc|" in {Infoz} with "%{czas}% sekund"
  48. send "%{Tag}%%{Kolor}% Resetowano czas odliczania %{Infoz}%"
  49.  
  50. if arg 1 isn't set:
  51. send "%{Tag}% %{Kolor}%- &5Skrypt na otchlan by Michma1707" #Jedyny punkt licencji: Zabraniam zmieniania tego nagłówku ;<!#
  52. send "%{Kolor}%mlag sprawdz &6-%{kolor}% pokazuje czas do nastepnego usuwania itemów"
  53. send "%{Kolor}%otchlan &6-%{kolor}% otwiera otchlan"
  54. if player has permission "mlag.admin":
  55. send "&cKomendy administratora:"
  56. send "%{Kolor}%mlag ustaw skrzynia &c-%{kolor}% generuje skrzynie do ktorej trafiaja itemy z otchlani"
  57. send "%{Kolor}%mlag reset &c-%{kolor}% resetuje odliczanie do nastepnego auto odliczania"
  58. send "%{Kolor}%mlag czysc &c-%{kolor}% wymusza usuwania itemow"
  59.  
  60.  
  61. every 1 seconds:
  62. if {lag::czas} = 0:
  63. set {lag::czas} to {Czas} parsed as integer
  64. broadcast "%{Tag}%%{Kolor}% Za &c10 sekund%{kolor}% itemy lezace na ziemi zostana przeniesione do otchlani"
  65. wait 10 seconds
  66. loop 54 times:
  67. set slot loop-number - 1 of block at {lag::otchlan::ustawiona} to air
  68. set {lag::licznik} to 0
  69. loop all entities:
  70. if loop-entity is a dropped item:
  71. set {_} to items within loop-entity
  72. set {_} to "%loop-entity%" parsed as an item
  73. set {lag::licznik} to {lag::licznik}+1
  74. set {lag::item::%{lag::licznik}%} to {_}
  75. delete loop-entity
  76. set {lag::otchlan::stan} to true
  77. loop {lag::licznik} times:
  78. add {lag::item::%loop-number%} to inventory of block at {lag::otchlan::ustawiona}
  79. broadcast "%{Tag}%%{Kolor}% Do otchlani zostały przeniesione usunięte itemy."
  80. else:
  81. set {lag::czas} to {lag::czas}-1
  82. command /otchlan:
  83. trigger:
  84. open the inventory of the block at {lag::otchlan::ustawiona} to the player
  85. send "%{Tag}%%{Kolor}% Otworzyles otchlan."
  86. on load:
  87. if {lag::otchlan::ustawiona} isn't set:
  88. execute console command "/clearlag ustaw skrzynia"
  89. #YMl#
  90. if file "plugins/mOtchlan/config.yml" doesn't exists:
  91. create file "plugins/mOtchlan/config.yml"
  92. set "Tag" to "&8[&2m&5Otchlan&8]" in yaml file "plugins/mOtchlan/config.yml"
  93. set "Kolor" to "&7" in yaml file "plugins/mOtchlan/config.yml"
  94. set "Czas" to "120" in yaml file "plugins/mOtchlan/config.yml"
  95. set "Informacja" to "&8(&c|tresc|&8)" in yaml file "plugins/mOtchlan/config.yml"
  96. set {Tag} to single value "Tag" get of "plugins/mOtchlan/config.yml"
  97. set {Kolor} to single value "Kolor" get of "plugins/mOtchlan/config.yml"
  98. set {Czas} to single value "Czas" get of "plugins/mOtchlan/config.yml"
  99. set {Info} to single value "Informacja" get of "plugins/mOtchlan/config.yml"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement