# Sejfy by ProXEQ # Wersja skryptu 1.1 # Wszystkie prawa zastrzeżone! # --------------------------------------------------------------------------------------------------------------------- # OPCJE (Tutaj mozesz edytowac to co za : czyli np. cos: xd, mozesz edytowac tylko xd, jesli zmienisz nazwe cos skrypt przestanie dzialac) # --------------------------------------------------------------------------------------------------------------------- options: # Nazwa sejfu SafeName: &9Magiczny Sejf # Nazwa lomu Crowbar: &9Lom do sejfu # Lore lomu CrowbarLore: &7Kliknij, i przejmnij sejf na wlasnosc! # Wiadomosc gdy gracz nie ma do tego uprawnien! NoPermission: &8» &cNie masz do tego uprawnien! # Wiadomosc gdy ktos otworzy sejf SafeOpenMessage: &8» &7Otworzyles sejf. # Wiadomosc gdy ktos zamknie sejf SafeCloseMessage: &8» &7Zapisano sejf! # Wiadomosc gdy ktos proboje otworzyc sejf ktory nie jest jego. NotOwned: &8» &cTen sejf nie jest twoj! # --------------------------------------------------------------------------------------------------------------------- # KOD SKRYPTU (Autor nie odpowiada za to ze przestanie on dzialac kiedy cos tu zmienisz :D) # --------------------------------------------------------------------------------------------------------------------- variables: {sejf.id} = 0 on first join: add 1 to {sejf.id} give 1 chest named "{@SafeName}" 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%": cancel event 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 "{@SafeOpenMessage}" delete {_id} stop else: send "{@NotOwned}" 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 "{@SafeCloseMessage}" loop 6*9 times: set {sejf::%{_id}%::%loop-number%} to slot "%loop-number - 1%" parsed as an integer of current inventory of player delete {_id} 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 if inventory name of player's current inventory contains "&lSejf ##": if event-item is chest: set {_l::*} to uncolored lore of event-item if {_l::1} contains "• Wlasciciel: ": cancel event 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 "{@SafeName}" 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 "{@NoPermission}" 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