Advertisement
Guest User

Untitled

a guest
May 24th, 2018
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 42.95 KB | None | 0 0
  1. options:
  2. # ################################### #
  3. # LEVELS #
  4. # ################################### #
  5. author: MatiX119
  6. version: 1.13.3
  7. # ZAKAZ EDYTOWANIA TYCH INFORMACJI!!! #
  8. # ################################### #
  9.  
  10.  
  11. # ###################################################################### #
  12. # Oficjalna strona skryptu: #
  13. # http://www.matix119.esy.es/skrypty/levels.html #
  14. # Ważne zasady użytkowania skryptu: #
  15. # http://www.matix119.esy.es/skrypty/zasady-uzytkowania-skryptow.html #
  16. # ###################################################################### #
  17.  
  18.  
  19. # ####################################################################################### #
  20. # JAK DAWAĆ EXPA ZA WYKONANIE OKREŚLONEJ CZYNNOŚCI ? #
  21. # Umieść w swoim oddzielnym skrypcie linijkę, która będzie wywoływać komendę: #
  22. # execute console command "/exp-give <gracz> <ilość> [-s] [-n] [-c]" #
  23. # UWAGA: do tego celu musisz mieć opanowaną podstawową znajomość Skripta! #
  24. # #
  25. # ####################################################################################### #
  26.  
  27.  
  28. # ####################################################################################### #
  29. # USTAWIENIA #
  30. # #
  31. # Ustaw tryb ustawiania progu maksymalnego expa w zależności od poziomu u graczy: #
  32. # 1 (AUTOMATYCZNIE) = maks. exp będzie ustawiany za pomocą działania matematycznego. #
  33. # 2 (RĘCZNIE) = maksymalny exp będzie ustawiany ręcznie indywidualnie dla każdego #
  34. # poziomu. Ustawienia te znajdziesz na samym dole kodu skryptu! #
  35. max-exp-mode: 2
  36. # #
  37. # Maksymalny level, który można zdobyć. W zależności od powyższego ustawienia: #
  38. # - Jeśli MAX-EXP-MODE: 1, to możesz zrobić "nieskończony" level podając np 1000. #
  39. # - Jeśli MAX-EXP-MODE: 2, to lepiej ograniczyć level, aby nie przesadzić (np 30, 50, #
  40. # 100). To ustawienie wiąże się z ustawieniem na samym dole skryptu! UWAGA: zmniej- #
  41. # szenie max levela skutkuje cofnięciem leveli u graczy, którzy zdobyli większy. #
  42. max-lvl: 99
  43. # #
  44. # [Jeśli MAX-EXP-MODE: 1] Skonstruuj własne działanie matematyczne, które będzie #
  45. # przydzielało maksymalny exp w zależności od poziomu. OBJAŚNIENIA: #
  46. # - {_lvl} - zmienna z informacją o poziomie gracza. #
  47. # - {_maxexp} - zmienna z informacją o bieżącym maksymalnym expie gracza. #
  48. # - "+" "-" "*" "/" "(" ")" - operatory do działania matematycznego. #
  49. max-exp-math: 100+({_lvl}-1)*150
  50. # #
  51. # [Jeśli MAX-EXP-MODE: 1] Czy maksymalny exp z powyższego działania ma być zaokrąglany? #
  52. # Zalecane w przypadku, jeśli działanie matematyczne będzie ustawiać maksymalny exp #
  53. # z liczbami po przecinku (typu 2530.66). #
  54. max-exp-math-rounding: false
  55. # #
  56. # Ustaw funkcję przydzielania expa podczas zdobycia awansu na kolejny poziom: #
  57. # 1 = Reszta expa przechodzi na kolejny poziom. Dodatkowo zapewnione jest wsparcie, #
  58. # podczas gdy gracz wbije o 2 lub więcej poziomów. Zalecane ustawienie. #
  59. # 2 = Exp zostaje wyzerowany. Niezależnie od ilości zdobytego expa, poziom można #
  60. # zwiększyć tylko o 1. #
  61. large-exp-mode: 1
  62. # #
  63. # Ustaw najważniejsze wiadomości wyświetlane na czacie. Staraj się nie ruszać #
  64. # zmiennych. Resztę wiadomości można ustawić niżej w kodzie skryptu. #
  65. msg-no-perm: Unknown command. Type /help for help.
  66. msg-not-found: Unknown command. Type /help for help.
  67. msg-lvl-set: &6&lLvl %{_p}% &aUstawiono na: &7%{lv::%{_p}%}% &6[&c%{xp::%{_p}%}%&9/&3%{mxp::%{_p}%}%
  68. msg-lvl-set-prev: &6&lLvl %{_p}% &8Poprzednio: &7%{_lv::%{_p}%}% &8[&7%{_xp::%{_p}%}%&8/&7%{_mxp::%{_p}%}%
  69. msg-exp: &6&l%{_exp}% %{_znak}%%{_ilosc}% &c%{xp::%{_p}%}%&7/&6%{mxp::%{_p}%}%
  70. msg-exp-other: &6&l%{_exp}% %{_p}% %{_znak}%%{_ilosc}% &7[&a%{xp::%{_p}%}%&9/&c%{mxp::%{_p}%}%&7] &2Poziom: &e%{lv::%{_p}%}%
  71. msg-lvl-up: &7Gratulacje! Awansujesz na &6%{lv::%{_p}%}% &7poziom!
  72. msg-lvl-change: &7Twój poziom został zmieniony na: &6%{lv::%{_p}%}%
  73. msg-lvl-up-bc: &6%{_p}% &7awansował na &6%{lv::%{_p}%}% &7poziom!
  74. msg-doubleexp-warn-on: &7Funkcja &6%{_exp}% &7teraz jest &aaktywna&e.
  75. msg-doubleexp-warn-off: &7Funkcja &6%{_exp}% &7teraz jest &cnieaktywna&e.
  76. msg-doubleexp-on: &6%{_exp}% &7został &6aktywowany&7!
  77. msg-doubleexp-off: &6%{_exp}% &7został &czdezaktywowany&7!
  78. # #
  79. # [Ustawienie odwołuje do opcji MSG-EXP i MSG-EXP-OTHER] Ustaw formatowanie znaków "+" #
  80. # i "-" dla zmiennej {_znak} w zależności czy exp został dodany lub zabrany u gracza. #
  81. # UWAGA: dla expa ujemnego nie ma konieczności wpisywania "-" bo jest już wyświetlany! #
  82. exp-give-plus: &2+
  83. exp-give-minus: &4
  84. # #
  85. # [Ustawienie odwołuje do opcji MSG-EXP] Ustaw nazwy prefiksów trybu mnożnika expa dla #
  86. # zmiennej {_exp}. #
  87. prefix-exp: EXP
  88. prefix-doubleexp: 2xEXP
  89. prefix-tripleexp: 3xEXP
  90. # #
  91. # Czy administracja po wejściu na serwer ma być informowana o włączonym DoubleExpie? #
  92. doubleexp-warn: true
  93. # #
  94. # Czy wszyscy gracze mają być informowani o aktywowanym lub dezaktywowanym DoubleExpie? #
  95. doubleexp-bc: false
  96. # #
  97. # Ustaw, czy TripleExp ma być aktywowany u gracza, jeśli gracz posiada indywidualnego #
  98. # DoubleExpa oraz DoubleExp globalny jest włączony. #
  99. allow-tripleexp: false
  100. # #
  101. # Czy ma być wyświetlana wiadomość do wszystkich graczy, jeśli gracz osiągnął wyróż- #
  102. # niony poziom? Wskaż, które poziomy mają być wyróżniane. Zamiast przecinka użyj "or". #
  103. broadcast-lvlup: false
  104. distinction-levels: 10 or 20 or 30 or 40 or 50 or 60 or 70 or 80 or 90 or 99
  105. # #
  106. # Czy po zdobyciu kolejnego poziomu ma być użyty efekt (nieszkodliwego) pioruna? #
  107. lvlup-lighting-effect: true
  108. # #
  109. # Ustaw ograniczenie dla komendy /exp-give dotyczące maksymalnej liczby expa. #
  110. max-exp-give-limit: 1000000
  111. # #
  112. # Ustaw maksymalny ujemny exp wpisując liczbę mniejszą niż 0 (np. -100). Wartość 0 #
  113. # (domyślnie) wyłącza tą funkcjonalność. Ta funkcja może nieco zwiększyć trudność #
  114. # zdobywania expa, jeśli decydujesz się na zabieranie expa za np. przegranie walki. #
  115. max-negative-exp: 0
  116. # #
  117. # Ustaw, czy DoubleExp ma podwajać także expa ujemnego. Jeśli tak, to może zwiększyć #
  118. # trudność zdobywania expa, choć jest równowaga, jeśli gracz zdobywa też dodatni exp. #
  119. doubleexp-negative-exp: false
  120. # #
  121. # Ustaw, czy exp ma być zaokrąglany podczas przydzielania dla gracza. #
  122. exp-rounding: false
  123. # #
  124. # Czy Minecraftowy pasek poziomu ma wskazywać poziom oraz exp ze skryptu? Zalecane #
  125. # ustawienie, jeśli na twoim serwerze nie funkcjonują zielone kulki expa. UWAGA: włą- #
  126. # czenie ustawienia spowoduje utratę Minecraftowego levela u wszystkich graczy! #
  127. use-levels-bar: true
  128. # #
  129. # [Jeśli USE-LEVELS-BAR: true] Czy dropienie zielonych kulek expa ma być wyłączone? Czy #
  130. # używanie enchantu i kowadła ma być zablokowane? Nie dotyczy to trybu gry creative. #
  131. disable-xp-orb: true
  132. disable-enchant: true
  133. disable-anvil: true
  134. # #
  135. # Czy formatowanie nicków na TAB liście ma być używane? Ustaw także formatowanie. #
  136. # UWAGA: W starszych wersjach MC występuje ograniczenie znaków do 16! #
  137. tab-list-nick-enabled: false
  138. tab-list-nick-format: &8[&7%{lv::%player-arg%}%&8] &r
  139. # #
  140. # Czy formatowanie nicku nad głową graczy ma być używane? Ustaw także formatowanie. #
  141. # UWAGA: domyślnie ta funkcja jest zablokowana, ponieważ wymaga dodatku WildSkript, a #
  142. # następnie odblokowania wyłączonych linijek w kodzie w wyznaczonym miejscu! #
  143. # UWAGA: W starszych wersjach MC występuje ograniczenie znaków do 16! #
  144. head-nick-enabled: false
  145. head-nick-format: &8[&7%{lv::%player-arg%}%&8] &r
  146. # #
  147. # Ustaw, czy level ma być wyświetlany nad głową graczy, ale w linijce pod nazwą gracza. #
  148. # UWAGA: ta funkcja wykorzystuje funkcję scoreboard z Minecrafta, więc level może nie #
  149. # być od razu wyświetlany. W celu prawidłowego działania nicki graczy muszą być odświe- #
  150. # żane dzięki funkcji dostępnej z pod opcji HEAD-NICK-ENABLED (niezależnie od wartości #
  151. # TRUE lub FALSE), która wymaga WildSkript. Ustaw także skrót, który będzie oznaczał #
  152. # poziom - kolory nieobsługiwane! UWAGA: jeśli zmieniasz nazwę tego skrótu, to przełącz #
  153. # opcję na FALSE (restart) i ponownie na TRUE (restart) w celu zastosowania zmian! #
  154. # UWAGA: ta funkcja może stwarzać spam w konsoli w zależności od ilości graczy!!! #
  155. head-level-enabled: false
  156. head-level-suffix: Lvl
  157. # #
  158. # Ustaw co ile sekund nicki nad głową gracza i na TAB liście mają być odświeżane. #
  159. nick-refresh: 1
  160. # #
  161. # Ustaw, czy chcesz używać formatowania czatu ze skryptu (umożliwiające wyświetlanie #
  162. # levela obok nicku)? Dodatkowo należy ustawić formatowania czatu poniżej. #
  163. use-Levels-chat: true
  164. # #
  165. # Ustaw format czatu, aby level był wyświetlany obok nicku ze zmiennej {lvl::%player%}. #
  166. # Ustaw dla każdej z rang formatowanie czatu, a także nadaj uprawnienie, które wykorzy- #
  167. # stasz w pluginie na uprawniena (np. PermissionsEx). UWAGA: proszę nadawać priorytet #
  168. # rangi definiując w kolejności rosnącej - do najwyższego stopnia (admin). Jeśli gracz #
  169. # posiada wiele rang, to ma przydzielany format czatu z rangi o wyższym priorytecie. #
  170. # * GRUPA 1 [Zwykli gracze, którzy nie potrzebują dodatkowych uprawnień] #
  171. chat-default: &8[&cLVL.&c%{lv::%player%}%&8] &c* &8[&eGRACZ&8] &c* &f%player% &c» &7%{_message}%
  172. # * GRUPA 2 #
  173. chat-group-2: &8[&cLVL.&c%{lv::%player%}%&8] &c* &8[&6VIP&8] &c* &f%player% &c» &7%{_message}%
  174. permission-group-2: vip
  175. # * GRUPA 3 #
  176. chat-group-3: &8[&cLVL.&c%{lv::%player%}%&8] &c* &8[&9HELPER&8] &c* &f%player% &c» &7%{_message}%
  177. permission-group-3: helper
  178. # * GRUPA 4 #
  179. chat-group-4: &8[&cLVL.&c%{lv::%player%}%&8] &c* &8[&bMODERATOR&8] &c* &f%player% &c» &7%{_message}%
  180. permission-group-4: moderator
  181. # * GRUPA 5 #
  182. chat-group-5: &8[&cLVL.&c%{lv::%player%}%&8] &c* &8[&3BUDOWNICZY&8] &c* &f%player% &c» &7%{_message}%
  183. permission-group-5: budowniczy
  184. # * GRUPA 6 #
  185. chat-group-6: &8[&cLVL.&c%{lv::%player%}%&8] &c* &8[&cADMIN&8] &c* &f%player% &c» &7%{_message}%
  186. permission-group-6: admin
  187. # * GRUPA 7 [Domyślnie OP (główni administratorzy), którzy posiadają już uprawnienia] #
  188. chat-op: &8[&cLVL.&c%{lv::%player%}%&8] &c* &8[&4WLASCICIEL&8] &c* &f%player% &c» &7%{_message}%
  189. # #
  190. # Ustaw, jakie rangi mogą używać kolorów. Podaj uprawienia ustawione już wyżej. Główni #
  191. # administratorzy (OP) obsługują pisanie kolorem i nie dotyczy ich ta opcja. #
  192. allow-use-colors-for-groups: "headadmin"
  193. # * Czy domyślni gracze (bez uprawnień) mogą używać kolorów? #
  194. allow-use-colors-for-default-players: false
  195. # * UWAGA: jeśli występuje bug, że kolory nadal działają w wykluczonych rangach, to #
  196. # ustaw tą opcję na "true" - wyłącza całkowite używanie znaczka "&". #
  197. force-disable-colors: false
  198. # #
  199. # ####################################################################################### #
  200.  
  201.  
  202. # ############################# #
  203. # Zmienne, czat, zabezpieczenia #
  204. # i inne funkcje #
  205. # ############################# #
  206.  
  207.  
  208. # *** RESETOWANIE POSTĘPÓW GRACZY ***
  209. # Odblokuj poniższą część kodu, aby zresetować WSZYSTKIE postępy graczy, zrestartuj skrypt,
  210. # a następnie zablokuj ten kod i ponownie zrestartuj skrypt. Rekomendowany restart serwera.
  211.  
  212. #on load:
  213. # delete {lv::*}
  214. # delete {xp::*}
  215. # delete {mxp::*}
  216. # wait 3 second
  217. # execute console command "restart"
  218.  
  219.  
  220. # ################################################################################## #
  221. # OBJAŚNIENIA ZMIENNYCH #
  222. # {lv::%player%} - poziom {xp::%player%} - exp {mxp::%player%} - max exp #
  223. # ################################################################################## #
  224.  
  225. variables:
  226. {doubleexp} = false
  227.  
  228. on chat:
  229. {@use-Levels-chat} is true
  230. cancel event
  231. {lv::%player%} is set
  232. if player is op:
  233. set {_message} to coloured message
  234. broadcast "{@chat-op}"
  235. else:
  236. set {_message} to uncoloured message
  237. if player has permission {@allow-use-colors-for-groups}:
  238. set {_message} to coloured message
  239. if {@force-disable-colors} is true:
  240. replace all "&" with "" in {_message}
  241. if player has permission "{@permission-group-6}":
  242. broadcast "{@chat-group-6}"
  243. stop
  244. if player has permission "{@permission-group-5}":
  245. broadcast "{@chat-group-5}"
  246. stop
  247. if player has permission "{@permission-group-4}":
  248. broadcast "{@chat-group-4}"
  249. stop
  250. if player has permission "{@permission-group-3}":
  251. broadcast "{@chat-group-3}"
  252. stop
  253. if player has permission "{@permission-group-2}":
  254. broadcast "{@chat-group-2}"
  255. stop
  256. if {@allow-use-colors-for-default-players} is true:
  257. set {_message} to coloured message
  258. if {@force-disable-colors} is true:
  259. replace all "&" with "" in {_message}
  260. broadcast "{@chat-default}"
  261.  
  262. every 10 tick:
  263. loop all players:
  264. {@use-levels-bar} is true
  265. {lv::%loop-player%} is set
  266. if loop-player's level progress is not {xp::%loop-player%}/{mxp::%loop-player%}:
  267. if {xp::%loop-player%} <= 0:
  268. set loop-player's level progress to 0
  269. else:
  270. set loop-player's level progress to {xp::%loop-player%}/{mxp::%loop-player%}
  271. if loop-player's level is not {lv::%loop-player%}:
  272. set the loop-player's level to {lv::%loop-player%}
  273.  
  274. every 3 second:
  275. loop all players:
  276. if {lv::%loop-player%} is not set:
  277. set {xp::%loop-player%} to 0
  278. set {lv::%loop-player%} to 1
  279. execute console command "/maxexpchange %loop-player%"
  280. if {lv::%loop-player%} > {@max-lvl}:
  281. set {lv::%loop-player%} to {@max-lvl}-1
  282. execute console command "/maxexpchange %loop-player%"
  283. set {xp::%loop-player%} to {mxp::%loop-player%}
  284. set {lv::%loop-player%} to {@max-lvl}
  285. else if {lv::%loop-player%} is not {@max-lvl}:
  286. if {xp::%loop-player%} = {mxp::%loop-player%}:
  287. set {xp::%loop-player%} to 0
  288. execute console command "/maxexpchange %loop-player%"
  289. if {dxppl.%loop-player%} < now:
  290. delete {dxppl.%loop-player%}
  291.  
  292. on join:
  293. if {lv::%player%} is not set:
  294. set {xp::%player%} to 0
  295. set {lv::%player%} to 1
  296. execute console command "/maxexpchange %player%"
  297. if {@head-level-enabled} is true:
  298. execute console command "/scoreboard players set %player% Levels %{lv::%player%}%"
  299. if {@doubleexp-warn} is true:
  300. player has permission "admin"
  301. wait 1 second
  302. {doubleexp} is true
  303. set {_exp} to "{@prefix-doubleexp}"
  304. send "{@msg-doubleexp-warn-on}" to player
  305.  
  306. on experience spawn:
  307. if {@use-levels-bar} is true:
  308. if {@disable-xp-orb} is true:
  309. cancel event
  310.  
  311. on rightclick:
  312. {@use-levels-bar} is true
  313. player's gamemode is not creative
  314. if {@disable-enchant} is true:
  315. if "%id of clicked block%" is "116":
  316. cancel event
  317. if {@disable-anvil} is true:
  318. if "%id of clicked block%" is "145":
  319. cancel event
  320.  
  321. on skript start:
  322. send "[Skript] Skrypt Levels v{@version} zostal uruchomiony!" to console
  323.  
  324. on skript stop:
  325. send "[Skript] Skrypt Levels v{@version} zostal wylaczony!" to console
  326.  
  327.  
  328. # ############################# #
  329. # Level nad głową gracza i #
  330. # na TAB liście #
  331. # ############################# #
  332.  
  333. every {@nick-refresh} second:
  334. loop all players:
  335. execute console command "/levels-set-nick %loop-player%"
  336.  
  337. command /levels-set-nick [<player>]:
  338. executable by: console
  339. trigger:
  340. if {@tab-list-nick-enabled} is true:
  341. set player-arg's tablist name to "{@tab-list-nick-format}%player-arg%"
  342. if {@tab-list-nick-enabled} is false:
  343. set player-arg's tablist name to "%player-arg%"
  344. # Odblokuj ten fragment kodu usuwając "#", jeśli używasz dodatku WildSkript #
  345. # if {@head-nick-enabled} is true:
  346. # set player-arg's tag to "{@head-nick-format}"
  347. # if {@head-nick-enabled} is false:
  348. # set player-arg's tag to ""
  349.  
  350. on load:
  351. if {@head-level-enabled} is true:
  352. execute console command "/gamerule sendCommandFeedback false"
  353. execute console command "/scoreboard objectives add Levels dummy {@head-level-suffix}"
  354. execute console command "/scoreboard objectives setdisplay belowName Levels"
  355. loop all players:
  356. execute console command "/scoreboard players set %loop-player% Levels %{lv::%loop-player%}%"
  357. if {@head-level-enabled} is false:
  358. execute console command "/scoreboard objectives remove Levels"
  359.  
  360.  
  361. # ############################# #
  362. # Spis komend + #
  363. # dodatkowe komendy #
  364. # ############################# #
  365.  
  366. command /levels [<text>] [<text>]:
  367. permission: admin
  368. permission message: {@msg-no-perm}
  369. executable by: console and player
  370. trigger:
  371. if arg 1 is not set:
  372. send "&5&l&m===================&r&5&l[&2&lLevels&5&l]&5&l&m==================="
  373. send "&c/poziom [gracz] &9- &3Wyświetla aktualny poziom i postęp expa."
  374. send "&c/double-exp [sprawdź] &9- &3Aktywuje/dezaktywuje mnożnik expa x2."
  375. send "&c/double-exp-player <gracz> <on|off|czas w minutach|sprawdź> &9- &3Aktywuje DoubleExpa indywidualnie u gracza."
  376. send "&c/level-set <gracz> <poziom> [-s] &9- &3Zmienia aktualny poziom gracza. Wpisanie &l-s &3wyłącza informację u docelowego gracza."
  377. send "&c/exp-give <gracz> <ilość> [-s] [-n] [-c] &9- &3Dodaje expa u gracza. Wpisanie &l-s &3wyłącza informację na czacie, &l-n &3ignoruje DoubleExpa, &l-c &3wymusza wyświetlenie informacji dla konsoli."
  378. send "&c/levels info &9- &3Informacje o skrypcie."
  379. send "&c/levels reload &9- &3Restartuje system leveli ""Levels""."
  380. send "&5&l&m============================================="
  381. else:
  382. if arg 1 is "reload" or "restart" or "r":
  383. set {_t1} to now
  384. execute console command "/skript reload %script%"
  385. set {_t2} to now
  386. set {_t} to "%difference between {_t1} and {_t2}%" parsed as text
  387. replace " seconds" with "s" in {_t}
  388. send "&5[&2Levels&5] &7Zrestartowano skrypt (&oczas: %{_t}%&7). Sprawdź konsolę czy nie ma błędów."
  389. if arg 1 is "info" or "informacje":
  390. send "&5&l&m===================&r&5&l[&2&lLevels&5&l]&5&l&m==================="
  391. send "&5» &2Skrypt napisany przez: &3{@author}"
  392. send "&5» &2Wersja: &3{@version}"
  393. send "&5» &2Informacje: &3www.matix119.esy.es/skrypty/levels.html"
  394. send "&aDziękuję za używanie najlepszego systemu leveli ""Levels""! :)"
  395. send "&5&l&m============================================="
  396. if arg 1 is not "reload" or "restart" or "r" or "info" or "informacje":
  397. if executor is console:
  398. execute console command "/levels"
  399. if executor is player:
  400. execute player command "/levels"
  401.  
  402.  
  403. # ############################# #
  404. # Sprawdzanie aktualnego #
  405. # poziomu #
  406. # ############################# #
  407.  
  408. command /poziom [<text>]:
  409. aliases: /exp, /stats, /staty, /statystyki, /lvl, /level, /lv
  410. executable by: console and player
  411. trigger:
  412. if arg 1 is set:
  413. if executor is player:
  414. if player has permission "admin":
  415. set {_p} to arg 1 parsed as offlineplayer
  416. else:
  417. send "{@msg-no-perm}"
  418. stop
  419. if executor is console:
  420. set {_p} to arg 1 parsed as offlineplayer
  421. if arg 1 is not set:
  422. if executor is player:
  423. set {_p} to player
  424. if executor is console:
  425. send "&f/poziom &c<gracz>"
  426. stop
  427. if {lv::%{_p}%} is set:
  428. # Tutaj sformatuj wygląd wyświetlania statystyk #
  429. send "&7&l&m============================="
  430. send " &6Statystyki "
  431. send " &7Poziom: &6%{lv::%{_p}%}%"
  432. send " &7Exp: &c%{xp::%{_p}%}%&7/&6%{mxp::%{_p}%}%"
  433. send "&7&l&m============================="
  434. if {dxppl.%{_p}%} < now:
  435. delete {dxppl.%{_p}%}
  436. else:
  437. send "{@msg-not-found}"
  438.  
  439.  
  440. # ############################# #
  441. # Aktywowanie podwójnego expa #
  442. # ############################# #
  443.  
  444. command /double-exp [<text>]:
  445. aliases: /doubleexp, /double
  446. permission: admin
  447. permission message: {@msg-no-perm}
  448. executable by: console and player
  449. trigger:
  450. set {_exp} to "{@prefix-doubleexp}"
  451. if arg 1 is not set:
  452. if {doubleexp} is false:
  453. set {doubleexp} to true
  454. if {@doubleexp-bc} is false:
  455. send "{@msg-doubleexp-on}"
  456. else:
  457. broadcast "{@msg-doubleexp-on}"
  458. stop
  459. else:
  460. set {doubleexp} to false
  461. if {@doubleexp-bc} is false:
  462. send "{@msg-doubleexp-off}"
  463. else:
  464. broadcast "{@msg-doubleexp-off}"
  465. else:
  466. if arg 1 is "sprawdz" or "sprawdź" or "check":
  467. if {doubleexp} is false:
  468. send "{@msg-doubleexp-warn-off}"
  469. else:
  470. send "{@msg-doubleexp-warn-on}"
  471. else:
  472. send "&f/double-exp &c[sprawdź]"
  473.  
  474.  
  475. # ############################# #
  476. # Indywidualny stały lub #
  477. # czasowy DoubleExp #
  478. # ############################# #
  479.  
  480. command /double-exp-player [<text>] [<text>]:
  481. aliases: /dxppl, /double-exp-player, /doubleexp-player
  482. permission: admin
  483. permission message: {@msg-no-perm}
  484. executable by: console and player
  485. trigger:
  486. if arg 1 is not set:
  487. send "&f/double-exp-player &c<gracz> &f<on|off|czas w minutach|sprawdź>"
  488. stop
  489. set {_p} to arg 1 parsed as offlineplayer
  490. if {lv::%{_p}%} is not set:
  491. send "{@msg-not-found}"
  492. stop
  493. if {dxppl.%{_p}%} < now:
  494. delete {dxppl.%{_p}%}
  495. if arg 2 is not set:
  496. send "&f/double-exp-player <gracz> &c<on|off|czas w minutach|sprawdź>"
  497. stop
  498. if arg 2 is "on" or "true" or "enable":
  499. set {dxppl.%{_p}%} to -1
  500. executor is player
  501. send "&aAktywowano indywidualnego DoubleExpa dla %{_p}% na stałe."
  502. if arg 2 is "off" or "false" or "disable":
  503. if {dxppl.%{_p}%} is set:
  504. delete {dxppl.%{_p}%}
  505. send "&aZdezaktywowano indywidualnego DoubleExpa dla %{_p}%."
  506. else:
  507. send "&c%{_p}% nie używa indywidualnego DoubleExpa."
  508. if arg 2 is "sprawdz" or "sprawdź" or "check":
  509. if {dxppl.%{_p}%} is not set:
  510. send "&e%{_p}% nie używa indywidualnego DoubleExpa."
  511. else:
  512. if {dxppl.%{_p}%} is -1:
  513. send "&e%{_p}% ma aktywowanego DoubleExpa na stałe."
  514. if {dxppl.%{_p}%} is not -1:
  515. send "&e%{_p}% ma aktywowanego DoubleExpa do %{dxppl.%{_p}%}%."
  516. if arg 2 is not "on" or "true" or "enable" or "off" or "false" or "disable" or "sprawdz" or "sprawdź" or "check":
  517. set {_arg2} to arg 2 parsed as integer
  518. if {_arg2} is integer:
  519. if {_arg2} is not between 1 and 525600:
  520. send "&cPodany czas w minutach musi być w zakresie od 1 do 525600"
  521. stop
  522. if {dxppl.%{_p}%} is not set:
  523. set {dxppl.%{_p}%} to now
  524. if {dxppl.%{_p}%} is -1:
  525. set {dxppl.%{_p}%} to now
  526. set {_time} to "%{_arg2}% minutes" parsed as timespan
  527. add {_time} to {dxppl.%{_p}%}
  528. send "&aAktywowano indywidualnego DoubleExpa dla %{_p}% do %{dxppl.%{_p}%}%."
  529. else:
  530. send "&f/double-exp-player <gracz> &c<on|off|czas w minutach|sprawdź>"
  531.  
  532.  
  533.  
  534. # ############################# #
  535. # Zmienianie levela #
  536. # ############################# #
  537.  
  538. command /level-set [<text>] [<text>] [<text>]:
  539. aliases: /lvl-set, /lv-set
  540. usage: /level-set <gracz> <poziom> [-s]
  541. permission: admin
  542. permission message: {@msg-no-perm}
  543. executable by: console and player
  544. trigger:
  545. if arg 1 is not set:
  546. send "&f/level-set &c<gracz> &f<poziom> [-s]"
  547. stop
  548. set {_p} to arg 1 parsed as offlineplayer
  549. if {lv::%{_p}%} is not set:
  550. send "{@msg-not-found}"
  551. stop
  552. if arg 2 is not set:
  553. send "&f/level-set <gracz> &c<poziom> &f[-s]"
  554. stop
  555. set {_i} to arg 2 parsed as integer
  556. if {_i} is not between 1 and {@max-lvl}:
  557. send "&cPodany level musi być w zakresie od 1 do {@max-lvl}."
  558. stop
  559. if {dxppl.%{_p}%} < now:
  560. delete {dxppl.%{_p}%}
  561. set {_lv::%{_p}%} to "%{lv::%{_p}%}%" parsed as text
  562. set {_xp::%{_p}%} to {xp::%{_p}%}
  563. set {_mxp::%{_p}%} to {mxp::%{_p}%}
  564. set {lv::%{_p}%} to {_i}
  565. if {lv::%{_p}%} = {@max-lvl}:
  566. set {lv::%{_p}%} to {lv::%{_p}%}-1
  567. execute console command "/maxexpchange %{_p}%"
  568. set {xp::%{_p}%} to {mxp::%{_p}%}
  569. set {lv::%{_p}%} to {@max-lvl}
  570. else:
  571. execute console command "/maxexpchange %{_p}%"
  572. set {xp::%{_p}%} to 0
  573. send "{@msg-lvl-set}"
  574. if {_lv::%{_p}%} is not "<none>":
  575. send "{@msg-lvl-set-prev}"
  576. if {@head-level-enabled} is true:
  577. execute console command "/scoreboard players set %{_p}% Levels %{lv::%{_p}%}%"
  578. if arg 3 is "-s":
  579. stop
  580. if executor is player:
  581. if player is not {_p}:
  582. send "{@msg-lvl-change}" to {_p}
  583. if executor is console:
  584. send "{@msg-lvl-change}" to {_p}
  585.  
  586.  
  587. # ############################# #
  588. # Dawanie expa + główny #
  589. # system leveli #
  590. # ############################# #
  591.  
  592. command /exp-give [<text>] [<number>] [<text>] [<text>] [<text>]:
  593. usage: /exp-give <gracz> <ilość> [-s] [-n] [-c]
  594. permission: admin
  595. permission message: {@msg-no-perm}
  596. executable by: console and player
  597. trigger:
  598. if arg 1 is not set:
  599. send "&f/exp-give &c<gracz> &f<ilość> [-s] [-n] [-c]"
  600. stop
  601. set {_p} to arg 1 parsed as offlineplayer
  602. if {lv::%{_p}%} is not set:
  603. send "{@msg-not-found}"
  604. stop
  605. if arg 2 is not set:
  606. send "&f/exp-give <gracz> &c<ilość> &f[-s] [-n] [-c]"
  607. stop
  608. if arg 2 > {@max-exp-give-limit}:
  609. send "&cPodana ilość expa jest zbyt duża."
  610. stop
  611. if arg 2 < -{@max-exp-give-limit}:
  612. send "&cPodana ilość expa jest zbyt duża."
  613. stop
  614. if {dxppl.%{_p}%} < now:
  615. delete {dxppl.%{_p}%}
  616. {lv::%{_p}%} < {@max-lvl}
  617. set {_arg2} to arg 2
  618. if {@exp-rounding} is true:
  619. set {_arg2} to round {_arg2}
  620. if {doubleexp} is false:
  621. if arg 3 or arg 4 or arg 5 is "-n":
  622. set {_x2} to 1
  623. set {_exp} to "{@prefix-exp}"
  624. else:
  625. set {_x2} to 1
  626. set {_exp} to "{@prefix-exp}"
  627. if {dxppl.%{_p}%} is set:
  628. set {_x2} to 2
  629. set {_exp} to "{@prefix-doubleexp}"
  630. if {doubleexp} is true:
  631. if arg 3 or arg 4 or arg 5 is "-n":
  632. set {_x2} to 1
  633. set {_exp} to "{@prefix-exp}"
  634. else:
  635. set {_x2} to 2
  636. set {_exp} to "{@prefix-doubleexp}"
  637. if {@allow-tripleexp} is true:
  638. if {dxppl.%{_p}%} is set:
  639. set {_x2} to 3
  640. set {_exp} to "{@prefix-tripleexp}"
  641. if {_arg2} < 0:
  642. if {@doubleexp-negative-exp} is false:
  643. set {_x2} to 1
  644. set {_exp} to "{@prefix-exp}"
  645. set {_prexp::%{_p}%} to {xp::%{_p}%}
  646. if {xp::%{_p}%} < {mxp::%{_p}%}:
  647. add {_arg2}*{_x2} to {xp::%{_p}%}
  648. set {_ilosc} to "%{_arg2}*{_x2}%"
  649. if {_arg2} > 0:
  650. set {_znak} to "{@exp-give-plus}"
  651. if {_arg2} <= 0:
  652. set {_znak} to "{@exp-give-minus}"
  653. if {xp::%{_p}%} < 0:
  654. if {@max-negative-exp} <= 0:
  655. if {xp::%{_p}%} < {@max-negative-exp}:
  656. if {_prexp::%{_p}%} < {@max-negative-exp}:
  657. set {xp::%{_p}%} to {_prexp::%{_p}%}
  658. else:
  659. set {xp::%{_p}%} to {@max-negative-exp}
  660. if {xp::%{_p}%} >= {mxp::%{_p}%}:
  661. if {@large-exp-mode} is 1:
  662. set {_iloscgl.%{_p}%} to {_ilosc}-{mxp::%{_p}%}-{xp::%{_p}%}
  663. add 1 to {lv::%{_p}%}
  664. execute console command "/maxexpchange %{_p}%"
  665. loop {@max-lvl} times:
  666. if {_iloscgl.%{_p}%} >= {mxp::%{_p}%}:
  667. set {_iloscgl.%{_p}%} to {_iloscgl.%{_p}%}-{mxp::%{_p}%}
  668. add 1 to {lv::%{_p}%}
  669. execute console command "/maxexpchange %{_p}%"
  670. if {lv::%{_p}%} >= {@max-lvl}:
  671. stop loop
  672. if {_iloscgl.%{_p}%} < {mxp::%{_p}%}:
  673. set {xp::%{_p}%} to {_iloscgl.%{_p}%}
  674. stop loop
  675. if {@large-exp-mode} is 2:
  676. add 1 to {lv::%{_p}%}
  677. execute console command "/maxexpchange %{_p}%"
  678. if {lv::%{_p}%} >= {@max-lvl}:
  679. set {xp::%{_p}%} to {mxp::%{_p}%}
  680. set {lv::%{_p}%} to {@max-lvl}
  681. else:
  682. if {@large-exp-mode} is 2:
  683. set {xp::%{_p}%} to 0
  684. send "{@msg-lvl-up}" to {_p}
  685. if {@lvlup-lighting-effect} is true:
  686. strike lightning effect at {_p}
  687. if {@head-level-enabled} is true:
  688. execute console command "/scoreboard players set %{_p}% Levels %{lv::%{_p}%}%"
  689. if {@broadcast-lvlup} is true:
  690. if {lv::%{_p}%} is {@distinction-levels}:
  691. loop all players:
  692. if {_p} is not loop-player:
  693. send "{@msg-lvl-up-bc}" to loop-player
  694. if {xp::%{_p}%} is -0:
  695. set {xp::%{_p}%} to 0
  696. if executor is player:
  697. if player is not {_p}:
  698. send "{@msg-exp-other}"
  699. if arg 3 or arg 4 or arg 5 is "-c":
  700. if executor is console:
  701. send "{@msg-exp-other}"
  702. if arg 3 or arg 4 or arg 5 is "-s":
  703. stop
  704. else:
  705. send "{@msg-exp}" to {_p}
  706.  
  707. # ############################# #
  708. # TEJ KOMENDY NIE WOLNO #
  709. # UŻYWAĆ RĘCZNIE!!! #
  710. # ############################# #
  711.  
  712. command /maxexpchange [<text>]:
  713. executable by: console
  714. trigger:
  715. set {_p} to arg 1 parsed as offlineplayer
  716. {lv::%{_p}%} is set
  717. if {@max-exp-mode} is 1:
  718. set {_lvl} to "%{lv::%{_p}%}%" parsed as integer
  719. set {_maxexp} to "%{mxp::%{_p}%}%" parsed as number
  720. set {mxp::%{_p}%} to {@max-exp-math}
  721. if {@max-exp-math-rounding} is true:
  722. set {mxp::%{_p}%} to round {@max-exp-math}
  723. stop
  724. if {@max-exp-mode} is 2:
  725. # ########################################################################### #
  726. # #
  727. # [Jeśli MAX-EXP-MODE: 2] Tu znajdują się ręczne ustawienia maksymalnego #
  728. # expa do następnego levela. Oto przykład: #
  729. # Na poziomie 1 do awansu potrzeba 100 expa. #
  730. # Na poziomie 2 do awansu potrzeba 250 expa. #
  731. # Na poziomie 49 do awansu potrzeba 7300 expa. #
  732. # Na poziomie 50 jeśli jest maksymalny [ exp: 7300 / max-exp: 7300 ]. #
  733. # #
  734. # ########################################################################### #
  735. if {lv::%{_p}%} = 1:
  736. set {mxp::%{_p}%} to 30
  737. if {lv::%{_p}%} = 2:
  738. set {mxp::%{_p}%} to 50
  739. if {lv::%{_p}%} = 3:
  740. set {mxp::%{_p}%} to 80
  741. if {lv::%{_p}%} = 4:
  742. set {mxp::%{_p}%} to 100
  743. if {lv::%{_p}%} = 5:
  744. set {mxp::%{_p}%} to 120
  745. if {lv::%{_p}%} = 6:
  746. set {mxp::%{_p}%} to 150
  747. if {lv::%{_p}%} = 7:
  748. set {mxp::%{_p}%} to 180
  749. if {lv::%{_p}%} = 8:
  750. set {mxp::%{_p}%} to 250
  751. if {lv::%{_p}%} = 9:
  752. set {mxp::%{_p}%} to 300
  753. if {lv::%{_p}%} = 10:
  754. set {mxp::%{_p}%} to 400
  755. if {lv::%{_p}%} = 11:
  756. set {mxp::%{_p}%} to 600
  757. if {lv::%{_p}%} = 12:
  758. set {mxp::%{_p}%} to 750
  759. if {lv::%{_p}%} = 13:
  760. set {mxp::%{_p}%} to 800
  761. if {lv::%{_p}%} = 14:
  762. set {mxp::%{_p}%} to 900
  763. if {lv::%{_p}%} = 15:
  764. set {mxp::%{_p}%} to 1100
  765. if {lv::%{_p}%} = 16:
  766. set {mxp::%{_p}%} to 1200
  767. if {lv::%{_p}%} = 17:
  768. set {mxp::%{_p}%} to 1350
  769. if {lv::%{_p}%} = 18:
  770. set {mxp::%{_p}%} to 1400
  771. if {lv::%{_p}%} = 19:
  772. set {mxp::%{_p}%} to 1600
  773. if {lv::%{_p}%} = 20:
  774. set {mxp::%{_p}%} to 1700
  775. if {lv::%{_p}%} = 21:
  776. set {mxp::%{_p}%} to 2000
  777. if {lv::%{_p}%} = 22:
  778. set {mxp::%{_p}%} to 2400
  779. if {lv::%{_p}%} = 23:
  780. set {mxp::%{_p}%} to 2700
  781. if {lv::%{_p}%} = 24:
  782. set {mxp::%{_p}%} to 3100
  783. if {lv::%{_p}%} = 25:
  784. set {mxp::%{_p}%} to 3350
  785. if {lv::%{_p}%} = 26:
  786. set {mxp::%{_p}%} to 3600
  787. if {lv::%{_p}%} = 27:
  788. set {mxp::%{_p}%} to 4000
  789. if {lv::%{_p}%} = 28:
  790. set {mxp::%{_p}%} to 4200
  791. if {lv::%{_p}%} = 29:
  792. set {mxp::%{_p}%} to 4500
  793. if {lv::%{_p}%} = 30:
  794. set {mxp::%{_p}%} to 4800
  795. if {lv::%{_p}%} = 31:
  796. set {mxp::%{_p}%} to 5000
  797. if {lv::%{_p}%} = 32:
  798. set {mxp::%{_p}%} to 5500
  799. if {lv::%{_p}%} = 33:
  800. set {mxp::%{_p}%} to 6200
  801. if {lv::%{_p}%} = 34:
  802. set {mxp::%{_p}%} to 6500
  803. if {lv::%{_p}%} = 35:
  804. set {mxp::%{_p}%} to 6800
  805. if {lv::%{_p}%} = 36:
  806. set {mxp::%{_p}%} to 7500
  807. if {lv::%{_p}%} = 37:
  808. set {mxp::%{_p}%} to 7900
  809. if {lv::%{_p}%} = 38:
  810. set {mxp::%{_p}%} to 8400
  811. if {lv::%{_p}%} = 39:
  812. set {mxp::%{_p}%} to 9000
  813. if {lv::%{_p}%} = 40:
  814. set {mxp::%{_p}%} to 9700
  815. if {lv::%{_p}%} = 41:
  816. set {mxp::%{_p}%} to 12000
  817. if {lv::%{_p}%} = 42:
  818. set {mxp::%{_p}%} to 14000
  819. if {lv::%{_p}%} = 43:
  820. set {mxp::%{_p}%} to 16000
  821. if {lv::%{_p}%} = 44:
  822. set {mxp::%{_p}%} to 17500
  823. if {lv::%{_p}%} = 45:
  824. set {mxp::%{_p}%} to 18000
  825. if {lv::%{_p}%} = 46:
  826. set {mxp::%{_p}%} to 20000
  827. if {lv::%{_p}%} = 47:
  828. set {mxp::%{_p}%} to 24000
  829. if {lv::%{_p}%} = 48:
  830. set {mxp::%{_p}%} to 27000
  831. if {lv::%{_p}%} = 49:
  832. set {mxp::%{_p}%} to 28000
  833. if {lv::%{_p}%} >= 50:
  834. set {mxp::%{_p}%} to 30000
  835. # ###################################### #
  836. # W razie zmiany ustawienia maksymalnego #
  837. # poziomu, to należy dodać lub usunąć #
  838. # powyższą część kodu według wzoru. #
  839. # UWAGA: ostatnia linijka musi mieć #
  840. # znak >= dla niezawodności! #
  841. # ###################################### #
  842.  
  843. on death:
  844. if victim is a zombie:
  845. if name of victim is "Slaby Zombie LVL.1":
  846. execute console command "/exp-give %attacker% 1"
  847. if name of victim is "Slaby Zombie LVL.3":
  848. execute console command "/exp-give %attacker% 3"
  849. if name of victim is "Dziwny Zombie LVL.5":
  850. execute console command "/exp-give %attacker% 4"
  851. if name of victim is "Brzydki Zombie LVL.8":
  852. execute console command "/exp-give %attacker% 5"
  853. if name of victim is "Silny Zombie LVL.12":
  854. execute console command "/exp-give %attacker% 7"
  855. if victim is a skeleton:
  856. if name of victim is "Slaby Lucznik LVL.17":
  857. execute console command "/exp-give %attacker% 12"
  858. if name of victim is "Niegrozny Lucznik LVL.23":
  859. execute console command "/exp-give %attacker% 15"
  860. if name of victim is "Szalony Lucznik LVL.28":
  861. execute console command "/exp-give %attacker% 22"
  862. if victim is a zombie pigman:
  863. if name of victim is "Zly Mutant LVL.23":
  864. execute console command "/exp-give %attacker% 48"
  865. if name of victim is "Wsciekly Mutant LVL.26":
  866. execute console command "/exp-give %attacker% 62"
  867. if name of victim is "Nieopanowany Mutant LVL.28":
  868. execute console command "/exp-give %attacker% 70"
  869. if victim is a creeper:
  870. if name of victim is "Dziwny Ork LVL.33":
  871. execute console command "/exp-give %attacker% 122"
  872. if name of victim is "Elitarny Ork LVL.35":
  873. execute console command "/exp-give %attacker% 156"
  874. if name of victim is "Glupi Ork LVL.39":
  875. execute console command "/exp-give %attacker% 175"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement