#Ogólnie to sprawa wygląda w taki sposób że potrzebuję skrypt. #Działać on ma mniej więcej w taki sposób że turtle helmet z odpowiednią nazwą to jakby maska i jeśli się wchodzi z nią do odpowiedniego regionu jakby dead zone #i  jak się wejdzie to pojawi się actionbar z wytrzymałością maski ile procent zostało i jakby na 2 sekundy to 1% maski. #Dodatkowo po wejściu do tego regionu bez maski otrzymuje się efekt wither po prostu by zabiło gracza po czasie. I jak się posiada tą maskę i się jakby skończy że jest 0% to nie niszczy się ale otrzymujesz ten efekt withera. #Ten action bar to fajnie jakby wyglądał: #| | | | | | | | | |  - Pozostały procent maski #- każda kreska to 10% i jak maska ma tylko 40% to tylko 4 kreski są zielone a reszta czerwona od lewej zielone options: nameOfDeadZone: dead_zone #Nazwa regionu do dead zone. helmet: turtle helmet nameHelmet: &6Magia prefixLore: &6Pozostalo: &a suffixLore: &7%% czasWitheraPoWyjsciu: 5 #w sekundach czasWitheraBezHelmetu: 60 #w sekundach witherPoZmianieMaski: true #lub false czasWitheraPoZmianieMaski: 3 #w sekundach function getIntegerFromHelmet(i: item) :: integer: set {_l} to "%uncoloured lore of {_i}%" replace all uncoloured "{@prefixLore}" and uncoloured "{@suffixLore}" with "" in {_l} set {_l} to {_l} parsed as integer if {_l} is not integer: return -100 return {_l} function getActionBarDeadZone(i: integer) :: string: if {_i} is -100: return "&c| | | | | | | | | | - Brak maski" set {_zielone} to rounded down ({_i}/10) set {_ret} to "&a" loop 10 times: if (loop-number)-1 is {_zielone}: set {_ret} to "%{_ret}%&c" set {_ret} to "%{_ret}% |" set {_ret} to "%{_ret}% &7- &3%{_i}%%%" return {_ret} function playerHasHelmet(p: player) :: boolean: if {_p}'s helmet is {@helmet}: if name of {_p}'s helmet is "{@nameHelmet}": if getIntegerFromHelmet({_p}'s helmet) is -100: return true if getIntegerFromHelmet({_p}'s helmet) is smaller than or equal to 0: return false return true return false #on armor change: #paper only # if "%region at location of player%" contains "{@nameOfDeadZone}": # if playerHasHelmet(player): # #Zalozyl maske w regionie, kasujemy withera # set {_w} to "wither" parsed as potion effect type # remove {_w} from potion effects of player # if {@witherPoZmianieMaski} is true: # apply {_w} to player for {@czasWitheraPoZmianieMaski} seconds on region enter: if "%region%" contains "{@nameOfDeadZone}": if playerHasHelmet(player): if "%lore of player's helmet%" is "": set lore of player's helmet to "{@prefixLore}100{@suffixLore}" send action bar getActionBarDeadZone(getIntegerFromHelmet(player's helmet)) to player stop send action bar getActionBarDeadZone(getIntegerFromHelmet(player's helmet)) to player #effekt withera na x sekund apply wither to player for {@czasWitheraBezHelmetu} seconds on region leave: #ustaw wither na x sekund jeżeli nie ma maski lub ma 0% if player has wither: set {_w} to "wither" parsed as potion effect type remove {_w} from potion effects of player apply {_w} to player for {@czasWitheraPoWyjsciu} seconds every 2 seconds: loop all players: if "%region at location of loop-player%" contains "{@nameOfDeadZone}": if playerHasHelmet(loop-player): set {_w} to "wither" parsed as potion effect type #broadcast "%active potion effects of loop-player%" if "%active potion effects of loop-player%" contains "wither": set {_x::*} to active potion effects of loop-player loop {_x::*}: if "%loop-value-2%" contains "wither": set {_loop} to "%loop-value-2%" set {_x} to (first index of "second" in {_loop}) - 3 #+ 9? set {_timeSpan} to subtext of {_loop} between index {_x} and {_x} + 9 if subtext of {_timeSpan} between index 0 and 1 is " ": set {_timeSpan} to subtext of {_timeSpan} between index 2 and length of {_timeSpan} set {_timeSpan} to {_timeSpan} parsed as time span if {_timeSpan} is smaller than or equal to {@czasWitheraPoZmianieMaski} seconds: set {_nieDodawaj} to true else: set {_nieDodawaj} to false remove {_w} from potion effects of loop-player if {@witherPoZmianieMaski} is true: if {_nieDodawaj} is false: apply {_w} to loop-player for {@czasWitheraPoZmianieMaski} seconds set {_new} to getIntegerFromHelmet(loop-player's helmet) - 1 set lore of loop-player's helmet to "{@prefixLore}%{_new}%{@suffixLore}" send action bar getActionBarDeadZone(getIntegerFromHelmet(loop-player's helmet)) to loop-player exit 2 sections set {_w} to "wither" parsed as potion effect type remove {_w} from potion effects of loop-player if getIntegerFromHelmet(loop-player's helmet) is -101: set lore of loop-player's helmet to "{@prefixLore}100{@suffixLore}" if {@witherPoZmianieMaski} is true: apply {_w} to loop-player for {@czasWitheraPoZmianieMaski} seconds exit 2 sections apply {_w} to loop-player for {@czasWitheraBezHelmetu} seconds send action bar getActionBarDeadZone(getIntegerFromHelmet(loop-player's helmet)) to loop-player command /giveMaska []: trigger: if sender has permission "maska.give": if arg 1 is not set: if sender is not console: give {@helmet} named "{@nameHelmet}" to player stop give {@helmet} named "{@nameHelmet}" to arg