options: tag: &8[&3SejfCraft&8] tag_raw: &9SejfCraft 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: {sejfcraft::%player%::password} = "" {sejfcraft::%player%::stats::opened} = 0 {sejfcraft::%player%::stats::failed} = 0 {sejfcraft::%player%::stats::passChange} = 0 command /sejfcraft [] [] []: aliases: sejf, sc trigger: if player has permission "sejfcraft.help" or "sejfcraft.*": if arg 1 is not set: send "&2&m----------------------------------------------------" send "&b SejfCraft" send "&7- &e/sejfcraft open [haslo] &7- Otwiera sejf" send "&7- &e/sejfcraft setpass &7- Ustawia haslo do sejfu" send "&7- &e/sejfcraft delpass &7- Usuwa haslo do sejfu" send "&7- &e/sejfcraft stats [gracz] &7- Statystyki" if player has permission "sejfcraft.reload" or "sejfcraft.*": send "&7- &e/sejfcraft reload &7- Przeladowanie skryptu" send "&b by boleknowak" send "&2&m----------------------------------------------------" else: send "{@tag} {@message_noperms}" if player has permission "sejfcraft.open" or "sejfcraft.*": if arg 1 is "open": if {sejfcraft::%player%::password} isn't "": if arg 2 is "%{sejfcraft::%player%::password}%": send "{@tag} {@message_open}" add 1 to {sejfcraft::%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 {sejfcraft::%{_slot}%::%{_p}%} add 1 to {_slot} set {sejfcraft::open::%player%} to true else: send "{@tag} {@message_password_incorrect}" add 1 to {sejfcraft::%player%::stats::failed} else: send "{@tag} {@message_open}" set {_p} to player add 1 to {sejfcraft::%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 {sejfcraft::%{_slot}%::%{_p}%} add 1 to {_slot} set {sejfcraft::open::%player%} to true else: send "{@tag} {@message_noperms}" if player has permission "sejfcraft.setpass" or "sejfcraft.*": if arg 1 is "setpass": if {sejfcraft::%player%::password} is "": send "{@tag} {@message_password_saved}" set {sejfcraft::%player%::password} to arg 2 add 1 to {sejfcraft::%player%::stats::passChange} else: if arg 2 is "%{sejfcraft::%player%::password}%": if arg 3 is set: set {sejfcraft::%player%::password} to arg 3 send "{@tag} {@message_password_saved}" add 1 to {sejfcraft::%player%::stats::passChange} else: send "{@tag} {@message_password_new}" else: send "{@tag} {@message_password_incorrect}" else: send "{@tag} {@message_noperms}" if player has permission "sejfcraft.delpass" or "sejfcraft.*": if arg 1 is "delpass": if arg 2 is "%{sejfcraft::%player%::password}%": set {sejfcraft::%player%::password} to "" send "{@tag} {@message_password_deleted}" else: send "{@tag} {@message_password_incorrect}" else: send "{@tag} {@message_noperms}" if player has permission "sejfcraft.stats" or "sejfcraft.*": if arg 1 is "stats": if arg 2 is set: set {_opened} to "%{sejfcraft::%arg-2%::stats::opened}%" set {_failed} to "%{sejfcraft::%arg-2%::stats::failed}%" set {_passChange} to "%{sejfcraft::%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 "&e- &aNieudane proby: &7%{_failed}%" send "&e- &aZmiany hasla: &7%{_passChange}%" send "&2&m----------------------------------------------------" else: set {_opened} to "%{sejfcraft::%player%::stats::opened}%" set {_failed} to "%{sejfcraft::%player%::stats::failed}%" set {_passChange} to "%{sejfcraft::%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%{sejfcraft::%player%::stats::opened}%" send "&e- &aNieudane proby: &7%{sejfcraft::%player%::stats::failed}%" send "&e- &aZmiany hasla: &7%{sejfcraft::%player%::stats::passChange}%" send "&2&m----------------------------------------------------" else: send "{@tag} {@message_noperms}" if player has permission "sejfcraft.reload" or "sejfcraft.*": if arg 1 is "reload": 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 {sejfcraft::open::%player%} set {_slot} to 0 loop 54 times: set {sejfcraft::%{_slot}%::%player%} to slot {_slot} of player's current inventory add 1 to {_slot} send "{@tag} {@message_saved}"