options: tag: &8[&3SejfRzuffik&8] tag_raw: &9SejfRzuffik message_noperms: &cNie masz do tego uprawnien! message_open: &eSejf zostal otworzony. message_saved: &aPrzedmioty zostaly zapisane. message_saving: &7Przedmioty sa wlasnie zapisywane. message_password_incorrect: &cHaslo nie jest poprawne. message_password_deleted: &aTwoje haslo zostalo usuniete. message_password_new: &cMusisz podac nowe haslo. message_password_saved: &aTwoje haslo zostalo zmienione na nowe. message_reloading: &7Skrypt zostanie przeladowany. message_reloaded: &aSkrypt zostal przeladowany. variables: {sejfRzuffik::%player%::password} = "" {sejfRzuffik::%player%::stats::opened} = 0 {sejfRzuffik::%player%::stats::failed} = 0 {sejfRzuffik::%player%::stats::passChange} = 0 command /sejf [] [] []: aliases: sejf, sc trigger: if player has permission "sejfRzuffik.help" or "sejfRzuffik.*": if arg 1 is not set: send "&2&m----------------------------------------------------" send "&b &c&lSejf" send "&7- &f/sejf otworz &7- Otwiera sejf" send "&7- &f/sejf statystyki [gracz] &7- Statystyki" if player has permission "sejfRzuffik.reload" or "sejfRzuffik.*": send "&c&l by &4&lRzuffik" send "&2&m----------------------------------------------------" else: send "{@tag} {@message_noperms}" if arg 1 is "otworz": if player has permission "sejfRzuffik.open" or "sejfRzuffik.*": if {sejfRzuffik::%player%::password} isn't "": if arg 2 is "%{sejfRzuffik::%player%::password}%": send "{@tag} {@message_open}" add 1 to {sejfRzuffik::%player%::stats::opened} set {_p} to player open chest with 6 rows named "{@tag_raw} &r- %player%" to {_p} set {_slot} to 0 loop 54 times: set slot {_slot} of {_p}'s current inventory to {sejfRzuffik::%{_slot}%::%{_p}%} add 1 to {_slot} set {sejfRzuffik::open::%player%} to true else: send "{@tag} {@message_password_incorrect}" add 1 to {sejfRzuffik::%player%::stats::failed} else: send "{@tag} {@message_open}" set {_p} to player add 1 to {sejfRzuffik::%player%::stats::opened} open chest with 6 rows named "{@tag_raw} &r- %player%" to {_p} set {_slot} to 0 loop 54 times: set slot {_slot} of {_p}'s current inventory to {sejfRzuffik::%{_slot}%::%{_p}%} add 1 to {_slot} set {sejfRzuffik::open::%player%} to true else: send "{@tag} {@message_noperms}" if arg 1 is "setpass": if player has permission "sejfRzuffik.setpass" or "sejfRzuffik.*": if {sejfRzuffik::%player%::password} is "": send "{@tag} {@message_password_saved}" set {sejfRzuffik::%player%::password} to arg 2 add 1 to {sejfRzuffik::%player%::stats::passChange} else: if arg 2 is "%{sejfRzuffik::%player%::password}%": if arg 3 is set: set {sejfRzuffik::%player%::password} to arg 3 send "{@tag} {@message_password_saved}" add 1 to {sejfRzuffik::%player%::stats::passChange} else: send "{@tag} {@message_password_new}" else: send "{@tag} {@message_password_incorrect}" else: send "{@tag} {@message_noperms}" if arg 1 is "delpass": if player has permission "sejfRzuffik.delpass" or "sejfRzuffik.*": if arg 2 is "%{sejfRzuffik::%player%::password}%": set {sejfRzuffik::%player%::password} to "" send "{@tag} {@message_password_deleted}" else: send "{@tag} {@message_password_incorrect}" else: send "{@tag} {@message_noperms}" if arg 1 is "statystyki": if player has permission "sejfAdmin.stats" or "sejfAdmin.*": if arg 2 is set: set {_opened} to "%{sejfRzuffik::%arg-2%::stats::opened}%" set {_failed} to "%{sejfRzuffik::%arg-2%::stats::failed}%" set {_passChange} to "%{sejfRzuffik::%arg-2%::stats::passChange}%" replace all "" with "0" in {_opened} replace all "" with "0" in {_failed} replace all "" with "0" in {_passChange} send "&2&m----------------------------------------------------" send " &eStatystyki: &9&l%arg-2%" send "&e- &aOtworzonych sejfow: &7%{_opened}%" send "&2&m----------------------------------------------------" else: set {_opened} to "%{sejfRzuffik::%player%::stats::opened}%" set {_failed} to "%{sejfRzuffik::%player%::stats::failed}%" set {_passChange} to "%{sejfRzuffik::%player%::stats::passChange}%" replace all "" with "0" in {_opened} replace all "" with "0" in {_failed} replace all "" with "0" in {_passChange} send "&2&m----------------------------------------------------" send " &eStatystyki: &9&l%player%" send "&e- &aOtworzonych sejfow: &7%{sejfRzuffik::%player%::stats::opened}%" send "&2&m----------------------------------------------------" else: send "{@tag} {@message_noperms}" if arg 1 is "reload": if player has permission "sejfRzuffik.reload" or "sejfRzuffik.*": send "{@tag} {@message_reloading}" execute console command "sk reload %script%" send "{@tag} {@message_reloaded}" else: send "{@tag} {@message_noperms}" on inventory close: if inventory name of player's current inventory is "{@tag_raw} &r- %player%": send "{@tag} {@message_saving}" delete {sejfRzuffik::open::%player%} set {_slot} to 0 loop 54 times: set {sejfRzuffik::%{_slot}%::%player%} to slot {_slot} of player's current inventory add 1 to {_slot} send "{@tag} {@message_saved}"