knugi

Untitled

Jan 26th, 2016
1,217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.86 KB | None | 0 0
  1. aliases:
  2. blacklist = bedrock
  3. on join:
  4. if {drop.player::%player%} is not set:
  5. set {drop.player::%player%} to true
  6. loop {drop.edit::*}:
  7. set {drop.player::%player%::drop::%loop-index%} to loop-value
  8. set {drop.player::%player%::drop::49} to dirt named "&6%player%" with lore "&c* &7Itemy beda leciec na:||&a* &6Ziemie"
  9.  
  10. # Włączanie dropu na ziemie, i do eq , 49 (ziemia - ziemia, głowa gracza - eq)
  11.  
  12.  
  13. command /drop [<text>] [<text>] [<number>]:
  14. trigger:
  15. if sender is not player:
  16. send "&c* &7Ta komenda moze byc wykonana tylko przez gracza!"
  17. stop
  18. if arg 1 is not set:
  19. send "&c* &6Drop by &4##Knugi"
  20. send "&c* &a/drop gui &8- &7pokazuje twoj drop"
  21. send "&c* &a/drop info &8- &7pokazuje drop"
  22. if player has permission "kDrop.admin":
  23. send "&c* &cKomendy admina:"
  24. send "&c* &a/drop reload &8- &7reloaduje skrypt"
  25. send "&c* &a/drop reset &8- &7Restartuje zmienne. (graczy i serwerowe)"
  26. send "&c* &a/drop edit gui &8- &7edytujesz itemy w dropie"
  27. send "&c** &7Ponizsza komenda dziala tylko na item trzymany w rece! Potem ten item wkladasz do gui."
  28. send "&c** &7Jezeli chcesz ustawic pare itemkow z fortunka, po prostu wkladasz do gui w jeden slot kilka itemów np 5 coal."
  29. send "&c* &a/drop edit chance <dobule> &8- &7Ustawiasz szanse na item dla gracza"
  30. send "&c* &a/drop edit chancevip <double> &8- &7Ustwiasz szanse na item dla &6Vip'a"
  31. stop
  32. if arg 1 is "del":
  33. set {drop.player::%player%::drop::49} to dirt named "&6%player%" with lore "&c* &7Itemy beda leciec na:||&a* &6Ziemie"
  34. stop
  35. if arg 1 is "info":
  36. if {drop.edit.gui} is set:
  37. send "&c* &7Trwa edycja dropu, prosze sprobuj ponownie pozniej."
  38. stop
  39. open chest with 5 rows named "&6Drop serwera" to player
  40. wait 2 tick
  41. loop {drop.edit::*}:
  42. set player's current inventory's slot loop-index parsed as integer to loop-value
  43. stop
  44. if arg 1 is "gui":
  45. if {drop.edit.gui} is set:
  46. send "&c* &7Trwa edycja dropu, prosze sprobuj ponownie pozniej."
  47. stop
  48. open chest with 6 rows named "&6Drop &a%player%" to player
  49. wait 2 tick
  50. loop {drop.player::%player%::drop::*}:
  51. if loop-value is not air:
  52. set player's current inventory's slot loop-index parsed as integer to loop-value
  53. stop
  54. if player has permission "kDrop.admin":
  55. if arg 1 is "reload":
  56. execute player command "sk reload %script%"
  57. stop
  58. if arg 1 is "reset":
  59. clear {drop.edit::*}
  60. clear {ore.edit::*}
  61. loop {drop.player::*}:
  62. set {_temp} to {drop.player::%loop-index%::drop::49}
  63. clear {drop.player::%loop-index%::drop::*}
  64. set {drop.player::%loop-index%::drop::49} to {_temp}
  65. clear {_temp}
  66. send "&c* &7Zmienne wyczyszczone."
  67. stop
  68. if arg 1 is "edit":
  69. if arg 2 is "maxItem":
  70. if "%arg 3%" doesn't contain ".":
  71. set {drop.maxitem} to arg 3
  72. send "&c* &7Ustawiles maxymalna liczbe itemow z bloku na: &6%arg 3%"
  73. stop
  74. send "&c* &7Podaj liczbe calkowita."
  75. stop
  76. if arg 2 is "ore":
  77. if {drop.edit.ore} is set:
  78. send "&c* &7Trwa edycja przez &6%{drop.edit.ore}%"
  79. stop
  80. open chest with 5 rows named "&6Ore &7Edycja" to player
  81. wait 1 tick
  82. loop {ore.edit::*}:
  83. set player's current inventory's slot loop-index parsed as integer to loop-value
  84. stop
  85. if arg 2 is "gui":
  86. if {drop.edit.gui} is set:
  87. send "&c* &7Trwa edycja przez &6%{drop.edit.gui}%"
  88. stop
  89. open chest with 5 rows named "&6Drop &7Edycja" to player
  90. wait 1 tick
  91. loop {drop.edit::*}:
  92. set player's current inventory's slot loop-index parsed as integer to loop-value
  93. set {drop.edit.gui} to player
  94. stop
  95. if player's tool is air:
  96. send "&c* &7Nie masz nic w reku."
  97. stop
  98. set {_1} to "%uncoloured 1st line of player's tool's lore%"
  99. loop length of {_1} times:
  100. if subtext of {_1} between characters loop-number and loop-number is "%nl%":
  101. set {_2} to subtext of {_1} between characters loop-number+1 and length of {_1}
  102. set {_1} to subtext of {_1} between characters 1 and loop-number-1
  103. exit loop
  104. if {_1} is not "<none>":
  105. replace all "Gracz: " in {_1} with ""
  106. replace all "%%" in {_1} with ""
  107. set {_1} to {_1} parsed as number
  108. if {_2} is not "<none>":
  109. replace all "Vip: " in {_2} with ""
  110. replace all "%%" in {_2} with ""
  111. set {_2} to {_2} parsed as number
  112. if arg 2 is "chance":
  113. if arg 3 is not set:
  114. send "&c* &7Podaj szanse na item dla Gracza"
  115. stop
  116. if arg 3 is smaller than 0.01:
  117. send "&c* &7Szansa na item nie moze byc mniejsza niz 0.01"
  118. stop
  119. if {_2} is not "<none>":
  120. if arg 3 is larger than {_2}:
  121. send "&c* &7Szansa dla gracza nie moze byc wieksza niz dla &6Vip'a"
  122. stop
  123. set 1st line of player's tool's lore to "&aGracz: &6%arg 3%%%"
  124. send "&c* &7Ustawiles &6%arg 3%%% &7szans na wydropienie &6%player's tool% &7dla Gracza"
  125. stop
  126. if arg 2 is "chanceVip":
  127. if {_1} is "<none>":
  128. send "&c* &7Nie masz ustawionych szans na item dla Gracza"
  129. stop
  130. if arg 3 is not set:
  131. send "&c* &7Podaj szanse na item dla &6Vip'a"
  132. stop
  133. if arg 3 is smaller than 0.01:
  134. send "&c* &7Szansa na item nie moze byc mniejsza niz 0.01"
  135. stop
  136. if arg 3 is smaller than {_1}:
  137. send "&c* &7Szansa dla &6Vip'a &7nie moze byc mniejsza niz dla Gracza"
  138. stop
  139. set 2nd line of player's tool's lore to "&aVip: &6%arg 3%%%"
  140. send "&c* &7Ustawiles &6%arg 3%%% &7szans na wydropienie &6%player's tool% &7dla &6Vip'a"
  141. stop
  142. send "&c &7Nieznany argument"
  143. stop
  144. on quit:
  145. if {drop.edit.gui} is player:
  146. clear {drop.edit.gui}
  147. if {drop.edit.ore} is player:
  148. clear {drop.edit.ore}
  149. on inventory close:
  150. if "%inventory name of player's current inventory%" is "&6Drop &7Edycja":
  151. set {_i} to 0
  152. loop 45 times:
  153. clear {_error}
  154. set {_item} to player's current inventory's slot {_i}
  155. set {drop.edit::%{_i}%} to air
  156. set {_item} to {_item} parsed as item
  157. if {_item} is not air:
  158. if {_item} is blacklist:
  159. send "&c* &7Nie mozesz dodac &6%{_item}% &7bo znajduje sie na czarnej liscie."
  160. exit section
  161. set {_1} to "%uncoloured 1st line of {_item}'s lore%"
  162. if "%{_1}%" doesn't contain "%nl%" and "Gracz" and "Vip":
  163. send "&c* &6%{_item}% &7nie jest poprawnie skonfigurowany"
  164. give {_item} to player
  165. set {_error} to true
  166. exit section
  167. if {_error} is not set:
  168. if "%{_1}%" contains "%nl%":
  169. replace all "%nl%Status: Wlaczony" in {_1} with ""
  170. loop length of {_1} times:
  171. if subtext of {_1} between characters loop-number-2 and loop-number-2 is "%nl%":
  172. set {_2} to subtext of {_1} between characters (loop-number-2)+1 and length of {_1}
  173. set {_1} to subtext of {_1} between characters 1 and (loop-number-2)-1
  174. exit loop
  175. if {_1} is not "<none>":
  176. replace all "Gracz: " in {_1} with ""
  177. replace all "%%" in {_1} with ""
  178. set {_1} to {_1} parsed as number
  179. if {_2} is not "<none>":
  180. replace all "Vip: " in {_2} with ""
  181. replace all "%%" in {_2} with ""
  182. set {_2} to {_2} parsed as number
  183. set {drop.edit::%{_i}%} to {_item}
  184. set {drop.edit::%{_i}%::chance} to {_1}
  185. set {drop.edit::%{_i}%::chanceVip} to {_2}
  186. set {drop.edit::%{_i}%::name} to name of player's current inventory's slot {_i}
  187. set 3rd line of player's current inventory's slot {_i}'s lore to "&cStatus: &aWlaczony"
  188. add 1 to {_i}
  189. clear {drop.edit.gui}
  190. loop {drop.edit::*}:
  191. loop {drop.player::*}:
  192. set {drop.player::%loop-index-2%::drop::%loop-index-1%} to loop-value-1
  193. broadcast "&c* Zaktualizowano drop. Ustawienia zostaly zrestartowane."
  194. stop
  195. if "%inventory name of player's current inventory%" is "&6Ore &7Edycja":
  196. clear {drop.edit.ore}
  197. set {_i} to 0
  198. loop 45 times:
  199. set {_item} to player's current inventory's slot {_i}
  200. set {_item} to {_item} parsed as item
  201. if {_item} is any ore:
  202. send "To jest block %{_item}%"
  203. set {ore.edit::%{_i}%} to {_item}
  204. add 1 to {_i}
  205. clear {drop.edit.ore}
  206. stop
  207. if "%inventory name of player's current inventory%" is "&6Drop &a%player%":
  208. set {_i} to 0
  209. loop 45 times:
  210. set {drop.player::%player%::drop::%{_i}%} to player's current inventory's slot {_i}
  211. add 1 to {_i}
  212. set {drop.player::%player%::drop::49} to player's current inventory's slot 49
  213. stop
  214. on inventory click:
  215. if "%inventory name of player's current inventory%" is "&6Drop serwera":
  216. cancel event
  217. if "%inventory name of player's current inventory%" is "&6Drop &a%player%":
  218. cancel event
  219. if player's current inventory's slot slot is not air:
  220. if lore of player's current inventory's slot slot contains "Eq":
  221. set player's current inventory's slot slot to dirt named "&6%player%" with lore "&c* &7Itemy beda leciec na:||&a* &6Ziemie"
  222. stop
  223. if lore of player's current inventory's slot slot contains "ziemie":
  224. set player's current inventory's slot slot to player's skull named "&6%player%" with lore "&c* &7Itemy beda leciec do:||&a* &6Eq"
  225. stop
  226. if lore of player's current inventory's slot slot contains "wlaczony":
  227. set 3rd line of player's current inventory's slot slot's lore to "&cStatus: &4Wylaczony"
  228. stop
  229. if lore of player's current inventory's slot slot contains "wylaczony":
  230. set 3rd line of player's current inventory's slot slot's lore to "&cStatus: &aWlaczony"
  231. stop
  232. on break:
  233. if event-block is stone:
  234. if player's tool is any pickaxe:
  235. loop {drop.edit::*}:
  236. if loop-value is not air:
  237. if lore of {drop.player::%player%::drop::%loop-index%} contains "wlaczony":
  238. if player has permission "kDrop.vip":
  239. chance of {drop.edit::%loop-index%::chanceVip}%:
  240. set {_item} to "%loop-value%"
  241. if player's tool is enchanted with fortune:
  242. if "%loop-value%" contains "1" or "2" or "3" or "4" or "5" or "6" or "7" or "8" or "9":
  243. set {_item} to "%{_item}%"
  244. set {_i} to first 2 characters of "%{_item}%"
  245. replace all {_i} in {_item} with ""
  246. replace all " " in {_i} with ""
  247. set {_i} to {_i} parsed as integer
  248. loop 100 times:
  249. loop {_i} times:
  250. chance of 100/{_i}%:
  251. set {_int} to loop-number-2
  252. exit loop
  253. if {_int} is set:
  254. exit loop
  255. set {_item} to "%{_int}% %{_item}%"
  256. set {_item} to {_item} parsed as item
  257. if {drop.edit::%loop-index%::name} is not set:
  258. if {drop.player::%player%::drop::49} is player head:
  259. if player has enough space for {_item}:
  260. give {_item} to player
  261. else:
  262. drop {_item} above event-block
  263. else:
  264. drop {_item} above event-block
  265. else if {drop.edit::%loop-index%::name} is set:
  266. set {_item} to {_item} named {drop.edit::%loop-index%::name}
  267. if {drop.player::%player%::drop::49} is player head:
  268. if player has enough space for {_item}:
  269. give {_item} to player
  270. else:
  271. drop {_item} above event-block
  272. else:
  273. drop {_item} above event-block
  274. else if player doesn't have permission "kDrop.vip":
  275. chance of {drop.edit::%loop-index%::chance}%:
  276. set {_item} to "%loop-value%"
  277. if player's tool is enchanted with fortune:
  278. if "%loop-value%" contains "1" or "2" or "3" or "4" or "5" or "6" or "7" or "8" or "9":
  279. set {_item} to "%{_item}%"
  280. set {_i} to first 2 characters of "%{_item}%"
  281. replace all {_i} in {_item} with ""
  282. replace all " " in {_i} with ""
  283. set {_i} to {_i} parsed as integer
  284. loop 100 times:
  285. loop {_i} times:
  286. chance of 100/{_i}%:
  287. set {_int} to loop-number-2
  288. exit loop
  289. if {_int} is set:
  290. exit loop
  291. set {_item} to "%{_int}% %{_item}%"
  292. set {_item} to {_item} parsed as item
  293. if {drop.edit::%loop-index%::name} is not set:
  294. if {drop.player::%player%::drop::49} is player head:
  295. if player has enough space for {_item}:
  296. give {_item} to player
  297. else:
  298. drop {_item} above event-block
  299. else:
  300. drop {_item} above event-block
  301. else if {drop.edit::%loop-index%::name} is set:
  302. set {_item} to {_item} named {drop.edit::%loop-index%::name}
  303. if {drop.player::%player%::drop::49} is player head:
  304. if player has enough space for {_item}:
  305. give {_item} to player
  306. else:
  307. drop {_item} above event-block
  308. else:
  309. drop {_item} above event-block
  310. loop {ore.edit::*}:
  311. if event-block is loop-value:
  312. cancel event
  313. set event-block to air
  314. send "&c* &7Ten block jest zablokowany przez drop. &a/drop"
  315. #---------------- This is end a script ;) Coryphit
Advertisement
Add Comment
Please, Sign In to add comment