options: # ################################### # # LEVELS # # ################################### # # author: MatiX119 # # version: 1.6.1 # # ZAKAZ EDYTOWANIA TYCH INFORMACJI!!! # # ################################### # # ###################################################################### # # Oficjalna strona skryptu: # # http://www.matix119.esy.es/skrypty/levels.html # # Ważne zasady użytkowania skryptu: # # http://www.matix119.esy.es/skrypty/zasady-uzytkowania-skryptow.html # # ###################################################################### # # ####################################################################################### # # USTAWIENIA # # # # # # Ustaw tryb ustawiania progu maksymalnego expa w zależności od poziomu u graczy: # # 1 (AUTOMATYCZNIE) = maksymalny exp będzie ustawiany przy użyciu działania # # matematycznego. # # 2 (RĘCZNIE) = maksymalny exp będzie ustawiany ręcznie indywidualnie dla każdego # # poziomu. Ustawienia te znajdziesz na samym dole kodu skryptu! # max-exp-mode: 2 # # # # # Maksymalny level, który można zdobyć. W zależności od powyższego ustawienia: # # - Jeśli MAX-EXP-MODE: 1, to możesz zrobić nieskończonego expa podając dużą liczbę # # levela. # # - Jeśli MAX-EXP-MODE: 2, to lepiej ograniczyć level, aby nie przesadzić (np 30, 50, # # 100). To ustawienie wiąże się z ustawieniem na samym dole skryptu! # max-lvl: 50 # # # # # Ustaw maksymalny exp startowy do zdobycia dla osoby z poziomem 1. # max-exp-start-lvl-1: 100 # # # # # [Jeśli MAX-EXP-MODE: 1] Ustaw działanie matematyczne, które będzie przydzielało # # maksymalny exp w zależności od poziomu. Graficznie, można to wyobrazić se i # # przedstawić na wykresie w postaci paraboli (X: max-exp, Y: poziom). # # OBJAŚNIENIA: # # - {_lvl} - zmienna z informacją o poziomie gracza. # # - {_expmax} - zmienna z informacją o maksymalnym expie gracza. # # - {_explvl1} - zmienna z informacją o max expie startowym dla poziomu 1. # # - "+" "-" "*" "/" - znaki do obliczeń matematycznych. # max-exp-math: {_explvl1}+({_lvl}-1)*100+({_lvl}-1)*100/100*50 # # # # # Ustaw funkcję przydzielania expa podczas zdobycia awansu na kolejny poziom. # # 1 = Reszta expa przechodzi na kolejny poziom. Dodatkowo zapewnione jest wsparcie, # # podczas gdy gracz wbije o 2 lub więcej poziomów. Zalecane ustawienie. # # 2 = Exp zostaje wyzerowany. Niezależnie od ilości zdobytego expa, poziom można # # zwiększyć tylko o 1. # large-exp-mode: 1 # # # # # Ustaw najważniejsze wiadomości wyświetlane na czacie. Staraj się nie ruszać zmiennych.# msg-no-perm: &4Nie masz dostępu do tej komendy. msg-offline: &4Ten gracz jest offline. msg-lvl-set: &aUstawiono level %{_p}% na: &e%{lvl.%{_p}%}% &6[&c%{exp.%{_p}%}%&9/&3%{exp.max.%{_p}%}%&6] msg-lvl-set-prev: &8Poprzedni level: &7%{_lvl.%{_p}%}% &8[&7%{_exp.%{_p}%}%&8/&7%{_exp.max.%{_p}%}%&8] msg-exp: &7[&8%{_prefix}%&7] %{_znak}%%{_ilosc}% &6[&c%{exp.%{_p}%}%&9/&3%{exp.max.%{_p}%}%&6] msg-lvl-up: &5&lGratulacje! Awansujesz na kolejny &6&l%{lvl.%{_p}%}% &5&lpoziom! msg-lvl-up-bc: &2%{_p}% awansował na &6&l%{lvl.%{_p}%}% &2poziom! # # # # # [Ustawienie odwołuje do opcji MSG-EXP] Ustaw formatowanie dla zmiennej {_znak}, która # # wyświetla znak "+" lub "-" w zależności czy exp został dodany lub zabrany u gracza. # # UWAGA: dla expa ujemnego nie ma konieczności wpisywania "-" bo jest już wyświetlany! # exp-give-plus: &2+ exp-give-minus: &4 # # # # # Ustaw czy ma być wyświetlana wyróżniająca wiadomość do wszystkich o tym, że gracz # # zdobył kolejny poziom. Wskaż poziomy, które mają być wyróżniane. "or" oznaczają LUB, # # ale w znaczeniu konfiguracji oddzielają tu liczby. # broadcast-lvlup: false distinction-levels: 15 or 30 or 40 or 50 # # # # # Ustaw, czy Minecraftowy pasek poziomu ma wskazywać poziom oraz exp ze skryptu? # # Ustawienie zalecane, jeśli na twoim serwerze nie funkcjonują zielone kulki expa. # # UWAGA: Jeśli włączysz to ustawienie, to wszyscy gracze utracą swój Minecraftowy level # # z tego paska! # use-levels-bar: false # # # # # [Jeśli USE-LEVELS-BAR: true] Ustaw, czy mają funkcjonować zabezpieczenia wyłączające # # dropienie kulek expa z mobów i butelek expa oraz czy ma być wyłączone używanie bloków # # opartych na expie - enchant i kowadło (nie dotyczy to trybu gry creative). # disable-xp-orb: true disable-enchant: true disable-anvil: true # # # # # Ustaw, czy chcesz używać formatowania czatu ze skryptu (umożliwiające wyświetlanie # # levela obok nicku)? Dodatkowo należy ustawić formatowania czatu poniżej. # use-Levels-chat: true # # # # # Ustaw format czatu, aby level był wyświetlany obok nicku ze zmiennej {lvl.%player%}. # # Ustaw dla każdej z rang formatowanie czatu, a także nadaj uprawnienie, które wykorzy- # # stasz w pluginie na uprawniena (np. PermissionsEx). UWAGA: proszę nadawać priorytet # # rangi definiując w kolejności rosnącej - do najwyższego stopnia (admin). Jeśli gracz # # posiada wiele rang, to ma przydzielany format czatu z rangi o wyższym priorytecie. # # * GRUPA 1 [Zwykli gracze, którzy nie potrzebują dodatkowych uprawnień] # chat-default: &8[&7%{lvl.%player%}%&8] &f<%player%> &f%{_message}% # * GRUPA 2 # chat-group-2: &8[&7%{lvl.%player%}%&8] &f<&b[VIP] &f%player%> &f%{_message}% permission-group-2: vip # * GRUPA 3 # chat-group-3: &8[&7%{lvl.%player%}%&8] &f<&6[SuperVIP] &f%player%> &f%{_message}% permission-group-3: supervip # * GRUPA 4 # chat-group-4: &8[&7%{lvl.%player%}%&8] &f<&9[Budowniczy] &f%player%> &f%{_message}% permission-group-4: budowniczy # * GRUPA 5 # chat-group-5: &8[&7%{lvl.%player%}%&8] &f<&c[KidMod] &f%player%> &f%{_message}% permission-group-5: kidmod # * GRUPA 6 # chat-group-6: &8[&7%{lvl.%player%}%&8] &f<&c[Moderator] &f%player%> &f%{_message}% permission-group-6: moderator # * GRUPA 7 # chat-group-7: &8[&7%{lvl.%player%}%&8] &f<&4[Admin] &f%player%> &f%{_message}% permission-group-7: administrator # * GRUPA 8 # chat-group-8: &8[&7%{lvl.%player%}%&8] &f<&7[Ranga] &f%player%> &f%{_message}% permission-group-8: uprawnienie # * GRUPA 9 # chat-group-9: &8[&7%{lvl.%player%}%&8] &f<&7[Ranga] &f%player%> &f%{_message}% permission-group-9: uprawnienie # * GRUPA 10 [Domyślnie OP (główni administratorzy), którzy posiadają już uprawnienia] # chat-op: &8[&7%{lvl.%player%}%&8] &4&lH@ &c%player% &e%{_message}% # # # # # # Ustaw, jakie rangi nie mogą używać kolorów. Podaj uprawienia ustawione już wyżej. # # Główni administratorzy (OP) obsługują pisanie kolorem i nie dotyczy ich ta opcja. # deny-use-colors-for-groups: "vip" or "uprawnienie" # * Czy domyśli gracze (bez rang) mogą używać kolorów? # deny-use-colors-for-default-players: true # * UWAGA: jeśli występuje bug, że kolory nadal działają w wykluczonych rangach, to # # ustaw tą opcję na "true" - wyłącza całkowite używania znaczka "&". # force-disable-colors: true # # # # # ####################################################################################### # # ############################# # # Zmienne, czat i # # zabezpieczenia # # ############################# # variables: {lvl.%player%} = 1 {exp.%player%} = 0 {exp.max.%player%} = 0 {double.exp} = false on chat: {@use-Levels-chat} is true cancel event set {_message} to coloured message if player is op: broadcast "{@chat-op}" else: if player has permission {@deny-use-colors-for-groups}: set {_message} to message if {@force-disable-colors} is true: replace all "&" with "" in {_message} if player has permission "{@permission-group-9}": broadcast "{@chat-group-9}" stop if player has permission "{@permission-group-8}": broadcast "{@chat-group-8}" stop if player has permission "{@permission-group-7}": broadcast "{@chat-group-7}" stop if player has permission "{@permission-group-6}": broadcast "{@chat-group-6}" stop if player has permission "{@permission-group-5}": broadcast "{@chat-group-5}" stop if player has permission "{@permission-group-4}": broadcast "{@chat-group-4}" stop if player has permission "{@permission-group-3}": broadcast "{@chat-group-3}" stop if player has permission "{@permission-group-2}": broadcast "{@chat-group-2}" stop if {@deny-use-colors-for-default-players} is true: set {_message} to message if {@force-disable-colors} is true: replace all "&" with "" in {_message} broadcast "{@chat-default}" every 1 second: loop all players: if {lvl.%loop-player%} > {@max-lvl}: set {lvl.%loop-player%} to {@max-lvl} set {lvl.%loop-player%} to {lvl.%loop-player%}-1 execute console command "/maxexpchange %loop-player%" set {exp.%loop-player%} to {exp.max.%loop-player%} set {lvl.%loop-player%} to {@max-lvl} on join: if {lvl.%player%} is 1: if {exp.%player%} is 0: execute console command "/maxexpchange %player%" on experience spawn: if {@use-levels-bar} is true: if {@disable-xp-orb} is true: cancel event on rightclick: if {@use-levels-bar} is true: if player's gamemode is not creative: if {@disable-enchant} is true: if "%id of clicked block%" is "116": cancel event if {@disable-anvil} is true: if "%id of clicked block%" is "145": cancel event every 9 tick: if {@use-levels-bar} is true: loop all players: wait 1 tick if {lvl.%loop-player%} is not {@max-lvl}: if loop-player's level is not {lvl.%loop-player%}: set the loop-player's level to {lvl.%loop-player%} if {lvl.%loop-player%} is {@max-lvl}: if loop-player's level is not {lvl.%loop-player%}-1: set the loop-player's level to {lvl.%loop-player%}-1 if loop-player's level progress is not {exp.%loop-player%}/{exp.max.%loop-player%}: set loop-player's level progress to {exp.%loop-player%}/{exp.max.%loop-player%} # ############################# # # Sprawdzanie aktualnego # # poziomu # # ############################# # command /poziom []: aliases: /exp, /stats, /statystyki, /lvl, /level, /lv executable by: console and player trigger: if arg 1 is set: if executor is player: if player has permission "admin": set {_p} to arg 1 parsed as player else: send "{@msg-no-perm}" stop if executor is console: set {_p} to arg 1 parsed as player if arg 1 is not set: if executor is player: set {_p} to player if executor is console: send "&f/poziom &c" stop if {_p} is offlineplayer: if {exp.%{_p}%} is not set: set {exp.%{_p}%} to 0 if {exp.max.%{_p}%} is not set: set {exp.max.%{_p}%} to {explvl1} if {lvl.%{_p}%} is not set: set {lvl.%{_p}%} to 1 send "&5&l====================================" send "&6Statystyki %{_p}%:" send " &2Poziom: &e%{lvl.%{_p}%}%" send " &2Punky doświadczenia: &c%{exp.%{_p}%}%&9/&3%{exp.max.%{_p}%}%&6" send "&5&l====================================" else: send "{@msg-offline}" # ############################# # # Aktywowanie podwójnego expa # # ############################# # command /double-exp: aliases: /doubleexp, /double permission: admin permission message: {@msg-no-perm} executable by: console and player trigger: if {double.exp} is false: set {double.exp} to true send "&7DoubleExp został &aaktywowany&7!" stop if {double.exp} is true: set {double.exp} to false send "&7DoubleExp został &czdezaktywowany&7!" # ############################# # # Zmienianie levela # # ############################# # command /level-set [] [] []: aliases: /lvl-set, /lv-set usage: /level-set permission: admin permission message: {@msg-no-perm} executable by: console and player trigger: if arg 1 is set: set {_p} to arg 1 parsed as player if {_p} is offlineplayer: if arg 2 is set: set {_i} to arg 2 parsed as number if {_i} is between 1 and {@max-lvl}: set {_lvl.%{_p}%} to {lvl.%{_p}%} set {_exp.%{_p}%} to {exp.%{_p}%} set {_exp.max.%{_p}%} to {exp.max.%{_p}%} set {lvl.%{_p}%} to {_i} if {lvl.%{_p}%} = {@max-lvl}: set {lvl.%{_p}%} to {lvl.%{_p}%}-1 execute console command "/maxexpchange %{_p}%" set {exp.%{_p}%} to {exp.max.%{_p}%} set {lvl.%{_p}%} to {@max-lvl} else: set {exp.%{_p}%} to 0 execute console command "/maxexpchange %{_p}%" send "{@msg-lvl-set}" set {_lvl.%{_p}%} to "%{_lvl.%{_p}%}%" parsed as text set {_exp.%{_p}%} to "%{_exp.%{_p}%}%" parsed as text replace "" with "1" in {_lvl.%{_p}%} replace "" with "0" in {_exp.%{_p}%} send "{@msg-lvl-set-prev}" else: send "&cPodany level musi być w zakresie od 1 do {@max-lvl}." else: send "&f/level-set &c" else: send "{@msg-offline}" else: send "&f/level-set &c &f" # ############################# # # Dawanie expa + główny # # system leveli # # ############################# # command /exp-give [] [] [] []: usage: /exp-give [-s] [-n] permission: admin permission message: {@msg-no-perm} executable by: console and player trigger: if arg 1 is set: set {_p} to arg 1 parsed as player if {_p} is offlineplayer: if arg 2 is set: if {exp.%{_p}%} is not set: set {exp.%{_p}%} to 0 if {exp.max.%{_p}%} is not set: set {exp.max.%{_p}%} to {explvl1} if {lvl.%{_p}%} is not set: set {lvl.%{_p}%} to 1 if {lvl.%{_p}%} >= {@max-lvl}: stop else: if {double.exp} is false: set {_x2} to 1 set {_prefix} to "Exp" if {double.exp} is true: if arg 3 or arg 4 is "-n": set {_x2} to 1 set {_prefix} to "Exp" else: set {_x2} to 2 set {_prefix} to "DoubleExp" if {exp.%{_p}%} < {exp.max.%{_p}%}: add arg 2*{_x2} to {exp.%{_p}%} set {_ilosc} to "%arg 2*{_x2}%" if arg 2 >= 0: set {_znak} to "{@exp-give-plus}" if arg 2 < 0: set {_znak} to "{@exp-give-minus}" if {exp.%{_p}%} < 0: set {exp.%{_p}%} to 0 if {exp.%{_p}%} >= {exp.max.%{_p}%}: if {@large-exp-mode} is 1: set {_iloscgl.%{_p}%} to {_ilosc}-{exp.max.%{_p}%}-{exp.%{_p}%} add 1 to {lvl.%{_p}%} execute console command "/maxexpchange %{_p}%" loop {@max-lvl} times: if {_iloscgl.%{_p}%} >= {exp.max.%{_p}%}: set {_iloscgl.%{_p}%} to {_iloscgl.%{_p}%}-{exp.max.%{_p}%} add 1 to {lvl.%{_p}%} execute console command "/maxexpchange %{_p}%" if {lvl.%{_p}%} >= {@max-lvl}: stop loop if {_iloscgl.%{_p}%} < {exp.max.%{_p}%}: set {exp.%{_p}%} to {_iloscgl.%{_p}%} stop loop if {@large-exp-mode} is 2: add 1 to {lvl.%{_p}%} execute console command "/maxexpchange %{_p}%" if {lvl.%{_p}%} >= {@max-lvl}: set {exp.%{_p}%} to {exp.max.%{_p}%} else: if {@large-exp-mode} is 2: set {exp.%{_p}%} to 0 send "{@msg-lvl-up}" to {_p} # strike lightning effect at the {_p} if {@broadcast-lvlup} is true: if {lvl.%{_p}%} is {@distinction-levels}: send "{@msg-lvl-up-bc}" to all players if {exp.%{_p}%} is -0: set {exp.%{_p}%} to 0 if arg 3 or arg 4 is "-s": stop else: send "{@msg-exp}" to {_p} else: if arg 3 or arg 4 is "-s": stop else: send "{@msg-exp}" to {_p} else: send "&f/exp-give &c &f[-s] [-n]" else: send "{@msg-offline}" else: send "&f/exp-give &c &f [-s] [-n]" # ############################# # # TEJ KOMENDY NIE WOLNO # # UŻYWAĆ RĘCZNIE!!! # # ############################# # command /maxexpchange []: executable by: console trigger: if {@max-exp-mode} is 1: if {lvl.%player-arg%} is 1: set {explvl1} to {@max-exp-start-lvl-1} set {exp.max.%player-arg%} to {explvl1} set {_explvl1} to "{@max-exp-start-lvl-1}" parsed as number set {_lvl} to "%{lvl.%player-arg%}%" parsed as number set {_expmax} to "%{exp.max.%player-arg%}%" parsed as number set {exp.max.%player-arg%} to {@max-exp-math} stop if {@max-exp-mode} is 2: # ########################################################################### # # # # [Jeśli MAX-EXP-MODE: 2] # # Tu znajdują się ręczne ustawienia maksymalnej ilośi expa do następnego # # levela. Ustawienia expa dla poziomu 1 znajdują się wyżej w ustawieniach. # # PRZYKŁAD: # # Na poziomie 1 do awansu potrzeba 100 expa. # # Na poziomie 2 do awansu potrzeba 250 expa. # # # # ########################################################################### # if {lvl.%player-arg%} is 1: set {explvl1} to {@max-exp-start-lvl-1} set {exp.max.%player-arg%} to {explvl1} if {lvl.%player-arg%} is 2: set {exp.max.%player-arg%} to 250 if {lvl.%player-arg%} is 3: set {exp.max.%player-arg%} to 400 if {lvl.%player-arg%} is 4: set {exp.max.%player-arg%} to 550 if {lvl.%player-arg%} is 5: set {exp.max.%player-arg%} to 700 if {lvl.%player-arg%} is 6: set {exp.max.%player-arg%} to 850 if {lvl.%player-arg%} is 7: set {exp.max.%player-arg%} to 1000 if {lvl.%player-arg%} is 8: set {exp.max.%player-arg%} to 1150 if {lvl.%player-arg%} is 9: set {exp.max.%player-arg%} to 1300 if {lvl.%player-arg%} is 10: set {exp.max.%player-arg%} to 1450 if {lvl.%player-arg%} is 11: set {exp.max.%player-arg%} to 1600 if {lvl.%player-arg%} is 12: set {exp.max.%player-arg%} to 1750 if {lvl.%player-arg%} is 13: set {exp.max.%player-arg%} to 1900 if {lvl.%player-arg%} is 14: set {exp.max.%player-arg%} to 2050 if {lvl.%player-arg%} is 15: set {exp.max.%player-arg%} to 2200 if {lvl.%player-arg%} is 16: set {exp.max.%player-arg%} to 2350 if {lvl.%player-arg%} is 17: set {exp.max.%player-arg%} to 2500 if {lvl.%player-arg%} is 18: set {exp.max.%player-arg%} to 2650 if {lvl.%player-arg%} is 19: set {exp.max.%player-arg%} to 2800 if {lvl.%player-arg%} is 20: set {exp.max.%player-arg%} to 2950 if {lvl.%player-arg%} is 21: set {exp.max.%player-arg%} to 3100 if {lvl.%player-arg%} is 22: set {exp.max.%player-arg%} to 3250 if {lvl.%player-arg%} is 23: set {exp.max.%player-arg%} to 3400 if {lvl.%player-arg%} is 24: set {exp.max.%player-arg%} to 3550 if {lvl.%player-arg%} is 25: set {exp.max.%player-arg%} to 3700 if {lvl.%player-arg%} is 26: set {exp.max.%player-arg%} to 3850 if {lvl.%player-arg%} is 27: set {exp.max.%player-arg%} to 4000 if {lvl.%player-arg%} is 28: set {exp.max.%player-arg%} to 4150 if {lvl.%player-arg%} is 29: set {exp.max.%player-arg%} to 4300 if {lvl.%player-arg%} is 30: set {exp.max.%player-arg%} to 4450 if {lvl.%player-arg%} is 31: set {exp.max.%player-arg%} to 4600 if {lvl.%player-arg%} is 32: set {exp.max.%player-arg%} to 4750 if {lvl.%player-arg%} is 33: set {exp.max.%player-arg%} to 4900 if {lvl.%player-arg%} is 34: set {exp.max.%player-arg%} to 5050 if {lvl.%player-arg%} is 35: set {exp.max.%player-arg%} to 5200 if {lvl.%player-arg%} is 36: set {exp.max.%player-arg%} to 5350 if {lvl.%player-arg%} is 37: set {exp.max.%player-arg%} to 5500 if {lvl.%player-arg%} is 38: set {exp.max.%player-arg%} to 5650 if {lvl.%player-arg%} is 39: set {exp.max.%player-arg%} to 5800 if {lvl.%player-arg%} is 40: set {exp.max.%player-arg%} to 5950 if {lvl.%player-arg%} is 41: set {exp.max.%player-arg%} to 6100 if {lvl.%player-arg%} is 42: set {exp.max.%player-arg%} to 6250 if {lvl.%player-arg%} is 43: set {exp.max.%player-arg%} to 6400 if {lvl.%player-arg%} is 44: set {exp.max.%player-arg%} to 6550 if {lvl.%player-arg%} is 45: set {exp.max.%player-arg%} to 6700 if {lvl.%player-arg%} is 46: set {exp.max.%player-arg%} to 6850 if {lvl.%player-arg%} is 47: set {exp.max.%player-arg%} to 7000 if {lvl.%player-arg%} is 48: set {exp.max.%player-arg%} to 7150 if {lvl.%player-arg%} is 49: set {exp.max.%player-arg%} to 7300 # ################################### # # W razie zmiany ustawienia maksymal- # # nego poziomu, to należy dodać lub # # usunąć powyższą część kodu jak # # według wzoru. # # ################################### #