#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= # ツﻬஐﻬ 🅵🆄🅽🅺🅲🅹🅴 ﻬஐﻬツ #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= function losuj(p: player): if {kliknietaskrzynia::%{_p}%} is set: set {_nazwa} to {kliknietaskrzynia::%{_p}%} delete {_listaitemow::*} set {_licznik} to 0 loop 27 times: if {skrzynia_%{_nazwa}%::%loop-value - 1%} is not air: set {_item} to {skrzynia_%{_nazwa}%::%loop-value - 1%} set {_szansa} to {skrzynia_%{_nazwa}%::%loop-value - 1%::szansa} loop {_szansa} times: add 1 to {_licznik} set {_listaitemow::%{_licznik}%} to {_item} set {_guilos} to chest inventory with 3 rows named "&bLosowanie..." set slot (integers between 0 and 26) of {_guilos} to orange stained glass pane named "&7" if size of {_listaitemow::*} is greater than 0: loop 4 times: wait 2 ticks set slot 13 of {_guilos} to random element out of {_listaitemow::*} play sound "entity.player.levelup" with pitch 1 to {_p} open {_guilos} to {_p} wait 8 ticks wait 2 ticks play sound "entity.player.levelup" with pitch 1 to {_p} set {_wylosowany.item} to random element out of {_listaitemow::*} set slot 13 of {_guilos} to {_wylosowany.item} open {_guilos} to {_p} wait 1 second if {kliknietaskrzynia::%{_p}%} is "epicka" or "legendarna" or "custombox": launch ball large coloured red, purple and white fading to light green and black at {_p}'s location with duration 1 delete lore of {_wylosowany.item} set {_item} to {_wylosowany.item} parsed as item give {_wylosowany.item} to {_p} send "&aWylosowałeś: %name of {_item}%" to {_p} play sound "entity.item.pickup" to {_p} else: send "&4Nic nie wylosowałeś" to {_p} delete {kliknietaskrzynia::%{_p}%} stop function unlock(p: player, t: text): set {_held_item} to held item of {_p} if {_held_item} is a tripwire hook: if name of {_held_item} contains {_t}: remove 1 of {_held_item} from {_p}'s inventory wait 1 tick losuj({_p}) else: noKey({_p}) else: noKey({_p}) function noKey(p: player): push {_p} backwards at speed 1.1 push {_p} upwards at speed 0.1 send title "&4Błąd!" with subtitle "&cNie masz klucza" to {_p} play sound "minecraft:entity.villager.no" to {_p} stop #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= # ツﻬஐﻬ 🅺🅾🅼🅴🅽🅳🆈 ﻬஐﻬツ #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= command /skrzynia [] [] [] []: permission: admin.perm trigger: #★彡 🄴🄳🅈🄲🄹🄰 彡★ if arg 1 is "edit": if arg 2 is set: set {_nazwa} to "&bEdytujesz: %{skrzynia_%arg 2%::nazwa}%" set {_skrzynia} to chest inventory with 3 rows named "%{_nazwa}%" loop 27 times: set {_item} to {skrzynia_%arg 2%::%loop-value - 1%} delete lore of {_item} set slot (loop-value - 1) of {_skrzynia} to {_item} open {_skrzynia} to player else: if {editMode::%player%} is not set: set {editMode::%player%} to true send "&bTryb edycji został &awłączony!" else: delete {editMode::%player%} send "&bTryb edycji został &cwyłączony!" #★彡 🅁🄴🅂🄴🅃 彡★ if arg 1 is "reset": if arg 2 is "zwykla" or "rzadka" or "bardzorzadka" or "epicka" or "legendarna" or "custombox": delete {skrzynia_%arg 2%} delete {skrzynia_%arg 2%::*} if target block is a orange shulker box or light gray shulker box or lime shulker box or purple shulker box or light blue shulker box or yellow shulker box or a chest: delete {skrzynia::%location of target block%} execute command "dh remove %arg 2%" by player send "&bZresetowałeś skrzynię: %arg 2%" #★彡 🅄🅂🅃🄰🅆🄸🄰🄽🄸🄴 彡★ if arg 1 is "ustaw": if arg 2 is "zwykla" or "rzadka" or "bardzorzadka" or "epicka" or "legendarna" or "custombox": if target block is a orange shulker box or light gray shulker box or lime shulker box or purple shulker box or light blue shulker box or yellow shulker box or a chest: set {skrzynia_%arg 2%} to location of target block send "&aUstawiłeś skrzynię: %arg 2% na kordach %location of target block%" set {skrzynia::%location of target block%} to arg-2 else: send "&cBlok musi być skrzynką lub shulker boxem" send target block to player #★彡 🄽🄰🅉🅆🄰 彡★ if arg 1 is "nazwa": if arg 2 is "zwykla" or "rzadka" or "bardzorzadka" or "epicka" or "legendarna" or "custombox": set {skrzynia_%arg 2%::nazwa} to arg 3 if target block is chest or orange shulker box or light gray shulker box or lime shulker box or purple shulker box or light blue shulker box or yellow shulker box: set {_x} to x location of target block set {_y} to y location of target block set {_z} to z location of target block execute command "dh create %arg 2%" by player execute command "dh move %arg 2% %{_x}% %{_y} + 1% %{_z}%" by player execute command "dh line set %arg 2% 1 1 %arg 3%" by player #★彡 🅂🅉🄰🄽🅂🄰 🄸🅃🄴🄼🄾🅆 彡★ if arg 1 is "szansa": if arg 2 is "zwykla" or "rzadka" or "bardzorzadka" or "epicka" or "legendarna" or "custombox": set {kliknietaskrzynia::%player%} to arg 2 if arg 3 is set: set {_arg3} to arg 3 parsed as integer set {skrzynia_%arg 2%::%{_arg3} - 1%::szansa} to arg 4 send "&bUstawiłeś slot %{_arg3} - 1% na szanse %arg 4% %% dla zmiennej %{skrzynia_%arg 2%::%{_arg3}%::szansa}%" else: delete {pierwszeGui::%player%} execute command "szansaedit %{kliknietaskrzynia::%player%}%" by player else if arg 2 is not set: execute command "szansaedit" by player if arg 1 is "kordy": send "%{skrzynia_%arg 2%}%" send "%{skrzynia::*}%" #★彡 🄼🄾🅅🄴 彡★ if arg-1 is "move": if arg 2 is "zwykla" or "rzadka" or "bardzorzadka" or "epicka" or "legendarna" or "custombox": if target block is a lime shulker box or light gray shulker box or light blue shulker box or purple shulker box or yellow shulker box or orange shulker box or a chest: set {_x} to x location of target block set {_y} to y location of target block set {_z} to z location of target block loop {skrzynia::*}: if loop-value is arg-2: delete {skrzynia::%loop-index%} set {skrzynia_%arg 2%} to location of target block execute command "dh move %arg 2% %{_x}% %{_y} + 1% %{_z}%" by player set {skrzynia::%location of target block%} to arg-2 send "&bPrzeniosłeś skrzynię: %arg-2%" else: send "&bNowa skrzynia musi być shulkerem lub skrzynią" #★彡 🄿🄾🄼🄾🄲 彡★ if arg 2 is not set: if arg 1 is "help" or "pomoc": send arg 1 to player send "&b/skrzynia edit typ-skrzyni &8- edytuje skrzynie" send "&b/skrzynia reset typ-skrzyni &8- resetuje itemy w skrzyni" send "&b/skrzynia ustaw typ-skrzyni &8- ustawia skrzynie" send "&b/skrzynia nazwa typ-skrzyni nazwa &8- ustawia nazwe skrzyni" send "&b/skrzynia kordy typ-skrzyni &8- pokazuje kordy skrzyni" send "&b&lINFO: Skrzynia musi być shulker boxem lub skrzynią" send "&b&lSHIFT + PPM: Edycja skrzyni" # ▂ ▄ ▅ ▆ ▇ █ ₭ⱠɄ₵ⱫɆ █ ▇ ▆ ▅ ▄ ▂ command /klucz [] [] []: permission: admin.perm trigger: if arg 2 is not set: send "&cUżycie: /klucz [ilość]" stop else: if arg 2 is "afk" or "zwykły" or "rzadki" or "epicki" or "legendarny" or "bonemc": set {_ilosc} to arg 3 if arg 3 is set else 1 set {_typ} to lowercase arg 2 # mapa typów set {_klucze::zwykły} to "&7Zwykły klucz" set {_klucze::rzadki} to "&aRzadki klucz" set {_klucze::afk} to "&bKlucz AFK" set {_klucze::epicki} to "&5Epicki klucz" set {_klucze::legendarny} to "&6Legendarny klucz" set {_klucze::bonemc} to "&eKlucz &6Bone&fMc" set {_nazwa} to {_klucze::%{_typ}%} send {_nazwa} to player if arg 1 is "all": set {_nazwa} to {_klucze::%{_typ}%} loop all players: loop {_ilosc} times: give 1 tripwire hook of unbreaking 10 named "%{_nazwa}%" to loop-player else: set {_nazwa} to {_klucze::%{_typ}%} set {_gracz} to arg 1 if {_gracz} is not online: send "&cGracz &e%arg 1% &cnie jest online." stop loop {_ilosc} times: give 1 tripwire hook of unbreaking 10 named "%{_nazwa}%" to {_gracz} else: send "&cWybierz prawidłowy klucz" # ꧁𓊈𒆜🆂🆉🅰🅽🆂🅰 🅼🅾🅳🅴𒆜𓊉꧂ command /szansaedit []: trigger: if arg 1 is not set: if {szansaedit::%player%} is set: delete {szansaedit::%player%} send "&bTryb edytowania szansy: &cWyłączony" else: set {szansaedit::%player%} to true set {pierwszeGui::%player%} to true send "&bTryb edytowania szansy: &aWłączony" else: set {otwartegui::%player%} to true set {_nazwa} to {skrzynia_%arg 1%::nazwa} set {szansaedit::%player%} to true set {_skrzynia} to chest inventory with 3 rows named "&bUstawiasz szanse dla: %{%{skrzynia_%arg 1%}%::nazwa}%" loop 27 times: set slot (loop-value - 1) of {_skrzynia} to {skrzynia_%arg 1%::%loop-value - 1%} open {_skrzynia} to player # ꧁•⊹٭ 🅳🆉🅸🅰ł🅰🅽🅸🅴 🅸🅽🆅🅴🅽🆃🅾🆁🆈 ٭⊹•꧂ on inventory close: if player has permission "admin.perm": # Obsługa zapisywania szans if name of event-inventory contains "szanse": if {szansaedit::%player%} is set: set {_nazwa} to {kliknietaskrzynia::%player%} set {_szanse} to 0 set {_realprocent} to 0 loop 27 times: set {_slot} to loop-number + 8 set {_s} to slot {_slot} of player's inventory if {_s} is not air: set {_amount} to amount of {_s} set {_realslot} to {_slot} - 9 set {skrzynia_%{_nazwa}%::%{_realslot}%::szansa} to {_amount} add {_amount} to {_szanse} if {skrzynia_%{_nazwa}%::%loop-value - 1%::szansa} is set: add {skrzynia_%{_nazwa}%::%loop-value - 1%::szansa} to {_realprocent} send "&bNiewykorzystane szanse: %100 - {_realprocent}%!" delete {szansaedit::%player%} delete {pierwszeGui::%player%} send "&bTryb edytowania szansy: &cWyłączony" clear player's inventory stop # Obsługa zapisywania przedmiotów if name of event-inventory contains "Skrzynia" or "Box": set {_nazwa} to uncoloured name of event-inventory set {_nazwa} to {_nazwa} in lowercase replace all "edytujesz: " in {_nazwa} with "" replace all "skrzynia" in {_nazwa} with "" replace all "box" in {_nazwa} with "" replace all "kły" in {_nazwa} with "kla" replace all "ki" in {_nazwa} with "ka" replace all "ki" in {_nazwa} with "ka" replace all "ny" in {_nazwa} with "na" replace all " " in {_nazwa} with "" replace all "ł" in {_nazwa} with "l" replace all "ustawiasz szanse dla: " in {_nazwa} with "" if {_nazwa} is "bonemc": replace all "bonemc" in {_nazwa} with "custombox" loop 27 times: set {_item} to slot loop-number - 1 of event-inventory if {_item} is air: delete {skrzynia_%{_nazwa}%::%loop-value - 1%::szansa} delete {skrzynia_%{_nazwa}%::%loop-value - 1%} delete {_item} else: set {skrzynia_%{_nazwa}%::%loop-value - 1%} to {_item} if {editMode::%player%} is set: send "&bZapisano zmiany w skrzyni." stop on inventory click: if event-inventory is not player's inventory: if name of event-inventory contains "Skrzynia" or "Box": if player doesn't have permission "admin.perm": cancel event if name of event-inventory contains "Losowanie...": cancel event command /delete: trigger: delete {pierwszeGui::%player%} on inventory open: if player has permission "admin.perm": if event-inventory is not player's inventory: if {szansaedit::%player%} is set: if {pierwszeGui::%player%} is not set: set {pierwszeGui::%player%} to true set {_nazwa} to {kliknietaskrzynia::%player%} set {_nazwa} to {_nazwa} in lowercase replace all "edytujesz: " in {_nazwa} with "" replace all "skrzynia" in {_nazwa} with "" replace all "box" in {_nazwa} with "" replace all "kły" in {_nazwa} with "kla" replace all "ki" in {_nazwa} with "ka" replace all "ki" in {_nazwa} with "ka" replace all "ny" in {_nazwa} with "na" replace all " " in {_nazwa} with "" replace all "ł" in {_nazwa} with "l" replace all "ustawiasz szanse dla: " in {_nazwa} with "" if {_nazwa} is "bonemc": replace all "bonemc" in {_nazwa} with "custombox" wait 1 tick # Użyj nazwy inventory, żeby zapisać oryginalną set {_oryginalna_nazwa} to {_nazwa} # Sprawdzamy, czy nazwa GUI już zawiera "Ustawiasz szanse dla:", aby nie dodawać jej wielokrotnie if {_oryginalna_nazwa} does not contain "Ustawiasz szanse dla:": set name of event-inventory to "&bUstawiasz szanse dla: %{_nazwa}%" wait 1 tick clear player's inventory loop 9 times: set slot loop-value - 1 of player's inventory to 64 lime wool wait 3 ticks stop # ꧁•⊹٭ 🅾🆃🆆🅸🅴🆁🅰🅽🅸🅴 🆂🅺🆁🆉🆈🅽🅴🅺 ٭⊹•꧂ on rightclick on chest or orange shulker box or light gray shulker box or lime shulker box or purple shulker box or light blue shulker box or yellow shulker box: if player is sneaking: if player has permission "admin.perm": if {editMode::%player%} is true: cancel event if {skrzynia::%location of event-block%} is set: execute command "skrzynia edit %{skrzynia::%location of event-block%}%" by player stop else: cancel event wait 2 ticks set {_skrzynia} to chest inventory with 3 rows named "%{skrzynia_%{skrzynia::%location of event-block%}%::nazwa}%" loop 27 times: set {_szansa} to {skrzynia_%{skrzynia::%location of event-block%}%::%loop-value - 1%::szansa} if {skrzynia_%{skrzynia::%location of event-block%}%::%loop-value - 1%::szansa} is not set: set {_lore} to 0 else: set {_lore} to {_szansa} set slot (loop-value - 1) of {_skrzynia} to {skrzynia_%{skrzynia::%location of event-block%}%::%loop-value - 1%} with lore "&7Szansa na ten item to: &b%{_lore}% %%" open {_skrzynia} to player stop else: cancel event set {_skrzynia} to chest inventory with 5 rows named "%{skrzynia_%{skrzynia::%location of event-block%}%::nazwa}%" set slot (integers between 0 and 44) of {_skrzynia} to orange stained glass pane named "&7" loop 7 times: set {_szansa} to {skrzynia_%{skrzynia::%location of event-block%}%::%loop-value - 1%::szansa} if {_szansa} is not set: set {_lore} to 0 else: set {_lore} to {_szansa} set slot (loop-value + 9) of {_skrzynia} to {skrzynia_%{skrzynia::%location of event-block%}%::%loop-value - 1%} with lore "&7Szansa na ten item to: &b%{_lore}% %%" loop 7 times: set {_szansa} to {skrzynia_%{skrzynia::%location of event-block%}%::%loop-value - 1%::szansa} if {_szansa} is not set: set {_lore} to 0 else: set {_lore} to {_szansa} set slot (loop-value + 18) of {_skrzynia} to {skrzynia_%{skrzynia::%location of event-block%}%::%loop-value + 6%} with lore "&7Szansa na ten item to: &b%{_lore}% %%" loop 7 times: set {_szansa} to {skrzynia_%{skrzynia::%location of event-block%}%::%loop-value - 1%::szansa} if {_szansa} is not set: set {_lore} to 0 else: set {_lore} to {_szansa} set slot (loop-value + 27) of {_skrzynia} to {skrzynia_%{skrzynia::%location of event-block%}%::%loop-value + 13%} with lore "&7Szansa na ten item to: &b%{_szansa}% %%" open {_skrzynia} to player else: set {_skrzynia} to {skrzynia::%location of event-block%} if {_skrzynia} is set: set {kliknietaskrzynia::%player%} to {_skrzynia} if {_p}'s tool is air: noKey(player) cancel event if {_skrzynia} contains "zwykla": unlock(player, "Zwy") cancel event if {_skrzynia} contains "rzad": if name of player's tool doesn't contain "bardzo"