Advertisement
kubasal

stoiska

Aug 28th, 2015
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.22 KB | None | 0 0
  1. # STOISKA
  2. # version: 1.1.
  3. # author: saletra
  4. #
  5. # PERMISSIONS:
  6. # - stoisko.usun
  7. # - stoisko.usun.other
  8. # - stoisko.dodaj
  9. # - stoisko.info
  10.  
  11. options:
  12. st-prefix: &f[&5STOISKO&f]
  13.  
  14. every 60 seconds:
  15. loop {stoisko::*}:
  16. set {_stoiskoCzas} to {stoisko.%loop-value%.date}
  17. set {_roznica2} to difference between {_stoiskoCzas} and now
  18. execute console command "/stoiskoczas %{_roznica2}% %loop-value%"
  19. if {_roznica2} is greater than 3 days:
  20. execute console command "/stoisko usun %loop-value%"
  21. send "{@st-prefix} &aUsunieto stoisko gracza &6%loop-value%" to all players
  22.  
  23. command /st:
  24. trigger:
  25. execute player command "/skript reload stoiska"
  26. execute console command "/skript reload stoiska"
  27.  
  28. command /onlyrg [<text>] [<text>] [<text>] [<text>] [<text>] [<text>] [<text>] [<text>] [<text>]:
  29. trigger:
  30. if arg 1 is "spawn":
  31. set {stoisko.%player%.region} to arg 6
  32.  
  33. command /stoisko [<text>] [<player>]:
  34. permission: stoisko.usun
  35. permission message: {@st-prefix} &aNie masz uprawnien do usuniecia stoiska
  36. trigger:
  37. if arg 1 is set:
  38. if arg 1 is "usun":
  39. if arg 2 is set:
  40. if player has permission "stoisko.usun.other":
  41. execute console command "/stoisko usun %arg 2%"
  42. send "{@st-prefix} &aUsunieto stoisko gracza &6%arg 2%"
  43. else if sender is console:
  44. set line 3 of block at {stoisko.%arg 2%.loc} to "&5&lWOLNE"
  45. set line 4 of block at {stoisko.%arg 2%.loc} to "kliknij aby zajac"
  46. execute console command "/rg removemember %{stoisko.%arg 2%.region}% %arg 2% -w %world%"
  47. loop {stoisko::*}:
  48. if arg 2 is loop-value:
  49. set {_loopIndex} to loop-index
  50. stop loop
  51. delete {stoisko::%{_loopIndex}%}
  52. delete {_loopIndex}
  53. delete {stoisko.%arg 2%.region}
  54. delete {stoisko.%arg 2%.loc}
  55. delete {stoisko.%arg 2%.date}
  56. send "{@st-prefix} &aUsunieto stoisko gracza &6%arg 2%"
  57. else:
  58. send "{@st-prefix} &cNie masz uprawnien do usuniecia czyjegos stoiska"
  59. else:
  60. if {stoisko.%player%.region} is set:
  61. execute console command "/stoisko usun %player%"
  62. send "{@st-prefix} &aTwoje stoisko zostalo usuniete"
  63. else if arg 1 is "info":
  64. if player has permission "stoisko.info":
  65. if {stoisko.%player%.date} is set:
  66. send "{@st-prefix} &7%{stoisko.%player%.date}% &f- data na twoim stoisku"
  67. else:
  68. send "{@st-prefix} &cNie masz swojego stoiska"
  69. else:
  70. send "{@st-prefix} &cNie masz uprawnien do uzycia tej komendy"
  71. else:
  72. send "{@st-prefix} &cUzycie: /stoisko usun [nick]"
  73. else:
  74. send "{@st-prefix} &fUzycie:"
  75. if player has permission "stoisko.usun.others":
  76. send "{@st-prefix} &7/stoisko usun [player] &f- usuwa twoje lub czyjes stoisko"
  77. else:
  78. send "{@st-prefix} &7/stoisko usun &f- usuwa twoje stoisko"
  79. send "{@st-prefix} &7/stoisko info &f- pokazuje informacje o twoim stoisku"
  80.  
  81. on rightclick on sign:
  82. world is "SkyBlock":
  83. line 1 is "&5&lSTOISKO":
  84. if player has permission "stoisko.dodaj":
  85. line 3 is "&5&lWOLNE":
  86. if {stoisko.%player%.region} is set:
  87. send "{@st-prefix} &cMasz juz jedno stoisko"
  88. else:
  89. set {_regions::*} to the regions at the clicked block
  90. execute player command "/onlyrg %{_regions::*}%"
  91. if {stoisko.%player%.region} is not "<null>":
  92. execute console command "/rg addmember %{stoisko.%player%.region}% %player% -w %world%"
  93. set {stoisko.%player%.loc} to location of clicked block
  94. add player to {stoisko::*}
  95. send "{@st-prefix} &aUtworzono nowe stoisko"
  96. send "{@st-prefix} &aGracz &6%player% &autworzyl nowe stoisko" to all players
  97. set line 3 to "%player%"
  98. set line 4 to "%now%"
  99. set {stoisko.%player%.date} to now
  100. else:
  101. send "{@st-prefix} &cZly region, region: %{stoisko.%player%.region}%"
  102. else:
  103. line 3 is "%player%":
  104. set line 4 to "%now%"
  105. set {stoisko.%player%.date} to now
  106. else:
  107. line 3 is not player:
  108. send "{@st-prefix} &cTo stoisko jest juz zajete"
  109. else:
  110. send "{@st-prefix} &cNie masz uprawnien do stworzenia nowego stoiska"
  111.  
  112. on break of sign:
  113. if world is "SkyBlock":
  114. line 1 is "&5&lSTOISKO":
  115. line 3 is "%player%":
  116. execute player command "/stoisko usun"
  117. cancel event
  118. else:
  119. line 3 is not "&5&lWOLNE":
  120. cancel event
  121. send "{@st-prefix} &cNie mozesz zniszczyc tej tabliczki, najpierw usun to stoisko"
  122. else:
  123. line 3 is "&5&lWOLNE":
  124. send "{@st-prefix} &aUsunales stanowisko dla stoiska"
  125.  
  126. on rightclick on sign:
  127. world is "SkyBlock":
  128. line 1 is "[stoisko]":
  129. set line 1 to "&5&lSTOISKO"
  130. set line 2 to "--------"
  131. set line 3 to "&5&lWOLNE"
  132. set line 4 to "kliknij aby zajac"
  133.  
  134. on break pine wood plank:
  135. if world is "SkyBlock":
  136. if block north event-block is sign:
  137. cancel event
  138. send "{@st-prefix} &cNajpierw zniszcz tabliczke na tym bloku"
  139. if block south event-block is sign:
  140. cancel event
  141. send "{@st-prefix} &cNajpierw zniszcz tabliczke na tym bloku"
  142. if block west event-block is sign:
  143. cancel event
  144. send "{@st-prefix} &cNajpierw zniszcz tabliczke na tym bloku"
  145. if block east event-block is sign:
  146. cancel event
  147. send "{@st-prefix} &cNajpierw zniszcz tabliczke na tym bloku"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement