# Sejfy by ProXEQ # Wersja skryptu 1.0 # Wszystkie prawa zastrzeżone! options: name: &9Magiczny Sejf crowbar: &9Lom do sejfu crowbarlore: &7Kliknij, i przejmnij sejf na wlasnosc! variables: {sejf.id} = 0 on first join: add 1 to {sejf.id} give 1 chest named "{@name}" with lore "&8• &7Wlasciciel: &3%player%" and "&8• &7ID: &3%{sejf.id}%" to player's inventory stop on rightclick: if player's tool is chest: #if lore of player's tool contains "&8• &7Wlasciciel: &3%player%": set {_l::*} to uncolored lore of player's tool set {_id} to "%{_l::2}%" replace all "• ID: " with "" in {_id} if {_l::1} is "• Wlasciciel: %player%": open chest with 6 rows named "&lSejf ##%{_id}%" to player loop 6*9 times: set slot "%loop-number - 1%" parsed as an integer of current inventory of player to {sejf::%{_id}%::%loop-number%} send "&7Otworzyles sejf %{_id}%" else: send "&8» &cTen sejf nie nalezy do ciebie!" stop if player's tool is glowing stick named "{@crowbar}" with lore "{@crowbarlore}": open chest with 1 rows named "&lLom..." to player set slot 0 and 1 and 2 and 3 and 5 and 6 and 7 and 8 of player's current inventory to red stained glass pane named " " set slot 4 of player's current inventory to air stop on inventory close: if inventory name of player's current inventory contains "&lSejf ##": delete {sejf::%{_id}%::*} set {_id} to "%inventory name of player's current inventory%" replace all "&lSejf ##" with "" in {_id} send "&7Zapisano sejf %{_id}%" loop 6*9 times: set {sejf::%{_id}%::%loop-number%} to slot "%loop-number - 1%" parsed as an integer of current inventory of player stop on inventory click: if inventory name of player's current inventory is "&lLom...": set {_l::*} to uncolored lore of event-item if event-slot is 0 or 1 or 2 or 3 or 5 or 6 or 7 or 8: cancel event if event-slot is 4: set {_x} to cursor slot of player set the 1st line of {_x}'s lore to "&8• &7Wlasciciel: &3%player%" give 1 of {_x} to player set cursor slot of player to air close player's inventory remove 1 of glowing stick named "{@crowbar}" with lore "{@crowbarlore}" from player's inventory if {_l::1} contains "• Wlasciciel: ": set cursor slot of player to event-item set event-slot to air on inventory close: if inventory name of player's current inventory is "&lLom...": if slot 4 of player's current inventory is not empty: set {_x} to slot 4 of player's current inventory give 1 of {_x} to player command /asejf [] [] []: description: Komenda odpowiadajaca za Sejfy trigger: if arg 1 is not set: if sender has permission "sejf.help": send "&8&m--------------------------------------" send " &8• &7/asejf give &eDaje sejf graczowi" send " &8• &7/asejf givekey &eDaje klucze graczowi" send " &8• &7/asejf clear &eCzysci dany sejf" send "&8&m--------------------------------------" stop send "&8» &cNie masz do tego uprawnien!" stop if arg 1 is "give": if sender has permission "sejf.give": if (arg 2 parsed as offlineplayer) is not set: send "&4&l! &cPoprawne uzycie: &7/asejf give " stop add 1 to {sejf.id} give 1 chest named "{@name}" with lore "&8• &7Wlasciciel: &3%(arg 2 parsed as offlineplayer)%" and "&8• &7ID: &3%{sejf.id}%" to (arg 2 parsed as offlineplayer)'s inventory stop send "&8» &cNie masz do tego uprawnien!" stop if arg 1 is "givekey": if sender has permission "sejf.givekey": if (arg 2 parsed as offlineplayer) or arg 3 is not set: send "&4&l! &cPoprawne uzycie: &7/asejf givekey " stop set {_il} to arg 3 give {_il} of glowing stick named "{@crowbar}" with lore "{@crowbarlore}" to (arg 2 parsed as offlineplayer)'s inventory stop send "&8» &cNie masz do tego uprawnien!" stop if arg 1 is "clear": if sender has permission "sejf.clear": if arg 2 is not set: send "&4&l! &cPoprawne uzycie: &7/asejf clear " stop set {_id} to arg 2 if {sejf::%{_id}%::*} is not set: send "&8» &cNie ma tekiego sejfu, lub jest pusty!" stop clear {sejf::%{_id}%::*} send "&8» &7Wyczyszczono sejf &c&l##%{_id}%" stop send "&8» &cNie masz do tego uprawnien!" stop