variables: {mlogin::%player%::login} = true {kickwrongpass} = false command /mloginadminreloadconsole: executable by: console trigger: set {prefix} to single value "prefix" get of "plugins/MLogin/config.yml" set {ml.msg1} to single value "loginac" get of "plugins/MLogin/config.yml" set {ml.msg2} to single value "registerac" get of "plugins/MLogin/config.yml" set {ml.msg3} to single value "errorregister" get of "plugins/MLogin/config.yml" set {ml.msg4} to single value "errorlogin" get of "plugins/MLogin/config.yml" set {ml.msg5} to single value "errorperm" get of "plugins/MLogin/config.yml" set {ml.msg6} to single value "errorpass" get of "plugins/MLogin/config.yml" set {ml.msg7} to single value "login" get of "plugins/MLogin/config.yml" set {ml.msg8} to single value "register" get of "plugins/MLogin/config.yml" set {ml.msg9} to single value "help" get of "plugins/MLogin/config.yml" set {ml.msg10} to single value "reguse" get of "plugins/MLogin/config.yml" set {ml.msg11} to single value "loguse" get of "plugins/MLogin/config.yml" set {ml.msg12} to single value "reload" get of "plugins/MLogin/config.yml" set {ml.msg13} to single value "passwrong" get of "plugins/MLogin/config.yml" set {ml.msg14} to single value "regpass" get of "plugins/MLogin/config.yml" set {ml.msg15} to single value "errorlogin2" get of "plugins/MLogin/config.yml" set {ml.msg16} to single value "unregister" get of "plugins/MLogin/config.yml" set {ml.msg17} to single value "errorplayer" get of "plugins/MLogin/config.yml" set {ml.msg18} to single value "errorreload" get of "plugins/MLogin/config.yml" set {ml.msg19} to single value "errorregister2" get of "plugins/MLogin/config.yml" set {ml.msg20} to single value "errorregister3" get of "plugins/MLogin/config.yml" set {ml.msg21} to single value "unregisteruse" get of "plugins/MLogin/config.yml" set {ml.msg22} to single value "changepassuseadmin" get of "plugins/MLogin/config.yml" set {ml.msg23} to single value "changepass" get of "plugins/MLogin/config.yml" set {ml.msg24} to single value "changepassuse" get of "plugins/MLogin/config.yml" set {ml.msf25} to single value "registrationoff" get of "plugins/MLogin/config.yml" set {ml.msg26} to single value "join" get of "plugins/MLogin/config.yml" set {ml.msg27} to single value "leave" get of "plugins/MLogin/config.yml" set {ml.msg28} to single value "spawnset" get of "plugins/MLogin/config.yml" set {ml.msg29} to single value "spawnuse" get of "plugins/MLogin/config.yml" set {kickwrongpass} to single value "kickwrongpass" get of "plugins/MLogin/config.yml" set {msgjoinleft} to single value "msgjoinleft" get of "plugins/MLogin/config.yml" set {motdon} to single value "motd" get of "plugins/MLogin/config.yml" set {servername} to single value "servername" get of "plugins/MLogin/config.yml" set {quitteleport} to single value "quitteleport" get of "plugins/MLogin/config.yml" on script load: send "&6&lUruchamianie skryptu MLogin" to console wait 2 second if folder "plugins/MLogin" doesn't exists: create folder "plugins/MLogin" if folder "plugins/MLogin/accounts" doesn't exists: create folder "plugins/MLogin/accounts" if file "plugins/MLogin/MOTD.yml" doesn't exists: create file "plugins/MLogin/MOTD.yml" add "&6&m***************&c {servername} &6&m***************" to yaml list "MOTD" from file "plugins/MLogin/MOTD.yml" add "&a>>&e Witaj &6{player}&e na serwerze!" to yaml list "MOTD" from file "plugins/MLogin/MOTD.yml" add "&a>>&e Jest to Twoje&c {joins}&e wejscie na serwer." to yaml list "MOTD" from file "plugins/MLogin/MOTD.yml" add "&a>>&e Wszystkie potrzebne komendy znajdziesz pod &c/pomoc&e." to yaml list "MOTD" from file "plugins/MLogin/MOTD.yml" add "&a>>&e Milej gry, zyczy administracja serwera." to yaml list "MOTD" from file "plugins/MLogin/MOTD.yml" add "&6&m*********************************************" to yaml list "MOTD" from file "plugins/MLogin/MOTD.yml" if file "plugins/MLogin/config.yml" doesn't exists: create file "plugins/MLogin/config.yml" wait 1 tick set "prefix" to "&f[&9MLogin&f]" in yaml file "plugins/MLogin/config.yml" set "loginac" to "&3Prosze sie zalogowac - &c/zaloguj &3." in yaml file "plugins/MLogin/config.yml" set "registerac" to "&3Prosze sie zarejestrowac - &c/zarejestruj &3." in yaml file "plugins/MLogin/config.yml" set "errorregister" to "&3Jestes juz zarejestrowany." in yaml file "plugins/MLogin/config.yml" set "errorlogin" to "&3Jestes juz zalogowany." in yaml file "plugins/MLogin/config.yml" set "errorperm" to "&3Nie masz permisji do tego." in yaml file "plugins/MLogin/config.yml" set "errorpass" to "&3Wpisales zle haslo." in yaml file "plugins/MLogin/config.yml" set "login" to "&3Haslo poprawne." in yaml file "plugins/MLogin/config.yml" set "register" to "&3Rejestracja zakonczona pomyslnie." in yaml file "plugins/MLogin/config.yml" set "help" to "&3------------ &cMLogin &3------------" in yaml file "plugins/MLogin/config.yml" set "reguse" to "&3Poprawne uzycie to &c/zarejestruj &3." in yaml file "plugins/MLogin/config.yml" set "loguse" to "&3Poprawne uzycie to &c/zaloguj &3." in yaml file "plugins/MLogin/config.yml" set "reload" to "&3Przeladowano poprawnie." in yaml file "plugins/MLogin/config.yml" set "passwrong" to "&3Zle haslo." in yaml file "plugins/MLogin/config.yml" set "regpass" to "&3Hasla musza byc takie same." in yaml file "plugins/MLogin/config.yml" set "errorlogin2" to "&3Musisz sie zalogowac, aby to moc zrobic." in yaml file "plugins/MLogin/config.yml" set "unregister" to "&3Odrejestrowano." in yaml file "plugins/MLogin/config.yml" set "errorplayer" to "&3Nie znaleziono takiego gracza." in yaml file "plugins/MLogin/config.yml" set "errorreload" to "&3Poprawne uzycie to &c/mlogin reload&3." in yaml file "plugins/MLogin/config.yml" set "errorregister2" to "&3Ten gracz jest juz zarejestrowany." in yaml file "plugins/MLogin/config.yml" set "errorregister3" to "&3Poprawne uzycie to&c /mlogin zarejestruj &3." in yaml file "plugins/MLogin/config.yml" set "unregisteruse" to "&3Poprawne uzycie to&c /mlogin odrejestruj &3." in yaml file "plugins/MLogin/config.yml" set "changepassuseadmin" to "&3Poprawne uzycie to&c /mlogin zmienhaslo &3." in yaml file "plugins/MLogin/config.yml" set "changepass" to "&3Haslo zostalo zmienione." in yaml file "plugins/MLogin/config.yml" set "changepassuse" to "&3Poprawne uzycie to &c/zmienhaslo &3." in yaml file "plugins/MLogin/config.yml" set "registrationoff" to "&3Rejestracja na serwerze jest aktualnie wylaczona." in yaml file "plugins/MLogin/config.yml" set "join" to "&a{player} &3dolaczyl/a na serwer." in yaml file "plugins/MLogin/config.yml" set "leave" to "&c{player} &3wyszedl/a z serwera." in yaml file "plugins/MLogin/config.yml" set "spawnset" to "&3Spawn poczatkowy zostal ustawiony." in yaml file "plugins/MLogin/config.yml" set "spawnuse" to "&3Poprawne uzycie to&c /mlogin setspawn" in yaml file "plugins/MLogin/config.yml" set "-----------------------------------------------------------------" to "*" in yaml file "plugins/MLogin/config.yml" set "kickwrongpass" to "false" in yaml file "plugins/MLogin/config.yml" set "## Czy ma wyrzucac gracza, gdy wpisze zle haslo" to "" in yaml file "plugins/MLogin/config.yml" set "motd" to "true" in yaml file "plugins/MLogin/config.yml" set "## Czy ma byc widoczne motd" to "" in yaml file "plugins/MLogin/config.yml" set "msgjoinleft" to "true" in yaml file "plugins/MLogin/config.yml" set "## Czy wiadomosc o dolaczeniu gracza na serwer ma sie pokazywac" to "" in yaml file "plugins/MLogin/config.yml" set "servername" to "ServerName" in yaml file "plugins/MLogin/config.yml" set "quitteleport" to "true" in yaml file "plugins/MLogin/config.yml" set "## Czy ma teleportowac gracza na spawna podczas logowania" to "" in yaml file "plugins/MLogin/config.yml" set {mlogin::%console%::login} to false execute console command "mloginadminreloadconsole" send "%{ml.msg9}%" to console send "&cSkrypt zaladowany." to console send "&cAutor:&a MatiQs" to console send "%{ml.msg9}%" to console command /mlogin [] [] []: executable by: console, players trigger: if player has permissions "mlogin.admin": if arg 1 is "reload": if arg 2 is set: if arg 3 is set: send "%{prefix}% %{ml.msg18}%" if arg 1 is "reload": if arg 2 is set: if arg 3 is not set: send "%{prefix}% %{ml.msg18}%" if arg 1 is "reload": if arg 2 is not set: if arg 3 is not set: execute console command "mloginadminreloadconsole" send "%{prefix}% %{ml.msg12}%" stop else: send "%{prefix}% %{ml.msg5}%" stop if player has permissions "mlogin.admin": if arg 1 is "zarejestruj": if arg 2 is set: if arg 3 is set: if file "plugins/MLogin/accounts/%arg 2%.yml" doesn't exists: create file "plugins/MLogin/accounts/%arg 2%.yml" set "Nick" to "%arg 2%" in yaml file "plugins/MLogin/accounts/%arg 2%.yml" set "Zarejestrowany/a" to "%day%.%month%.%year%" in yaml file "plugins/MLogin/accounts/%arg 2%.yml" set "Haslo" to "%arg 3%" in yaml file "plugins/MLogin/accounts/%arg 2%.yml" send "%{prefix}% %{ml.msg8}%" stop else: send "%{prefix}% %{ml.msg19}%" if arg 1 is "zarejestruj": if arg 2 is not set: if arg 3 is not set: send "%{prefix}% %{ml.msg20}%" if arg 1 is "zarejestruj": if arg 2 is set: if arg 3 is not set: send "%{prefix}% %{ml.msg20}%" else: send "%{prefix}% %{ml.msg5}%" stop if player has permissions "mlogin.admin": if arg 1 is "odrejestruj": if arg 2 is set: if arg 3 is not set: if file "plugins/MLogin/accounts/%arg 2%.yml" doesn't exists: send "%{prefix}% %{ml.msg17}%" stop else: delete file "plugins/Mlogin/accounts/%arg 2%.yml" send "%{prefix}% %{ml.msg16}%" stop if arg 1 is "odrejestruj": if arg 2 is not set: if arg 3 is not set: send "%{prefix}% %{ml.msg21}%" stop else: send "%{prefix}% %{ml.msg5}%" stop if player has permissions "mlogin.admin": if arg 1 is "zmienhaslo": if arg 2 is set: if arg 3 is set: if file "plugins/MLogin/accounts/%arg 2%.yml" doesn't exists: send "%{prefix}% %{ml.msg17}%" stop else: set "Haslo" to "%arg 3%" in yaml file "plugins/MLogin/accounts/%arg 2%.yml" send "%{prefix}% %{ml.msg23}%" stop if arg 1 is "zmienhaslo": if arg 2 is not set: if arg 3 is not set: send "%{prefix}% %{ml.msg22}%" if arg 1 is "zmienhaslo": if arg 2 is set: if arg 3 is not set: send "%{prefix}% %{ml.msg22}%" stop else: send "%{prefix}% %{ml.msg5}%" stop if player has permissions "mlogin.admin": if arg 1 is not set: if arg 2 is not set: if arg 3 is not set: send "%{ml.msg9}%" send "" send "&c/mlogin zarejestruj - &3rejestrowanie uzytkownika" send "&c/mlogin odrejestruj - &3wyrejestrowanie uzytkownika" send "&c/mlogin zmienhaslo - &3zmiana hasla uzytkownika" send "&c/mlogin reload -&3 przeladowuje config.yml" send "&c/mlogin setspawn - &3ustawianie spawnu poczatkowego" send "" send "%{ml.msg9}%" stop else: send "%{prefix}% %{ml.msg5}%" stop if player has permissions "mlogin.adin": if arg 1 is "setspawn": if arg 2 is not set: set {mlogin::spawn} to location of player send "%{prefix}% %{ml.msg28}%" if arg 2 is set: send "%{prefix}% %{ml.msg29}%" stop else: send "%{prefix}% %{ml.msg5}%" command /zarejestruj [] []: trigger: if arg 1 is set: if arg 2 is not set: send "%{prefix}% %{ml.msg10}%" stop if arg 1 is not set: if arg 2 is not set: send "%{prefix}% %{ml.msg10}%" stop if arg 1 is set: if arg 2 is arg 1: if file "plugins/MLogin/accounts/%player%.yml" doesn't exists: create file "plugins/MLogin/accounts/%player%.yml" set "Nick" to "%player%" in yaml "plugins/MLogin/accounts/%player%.yml" set "Zarejestrowany/a" to "%day%.%month%.%year%" in yaml file "plugins/MLogin/accounts/%player%.yml" set "Haslo" to "%arg 2%" in yaml file "plugins/MLogin/accounts/%player%.yml" set {mlogin::%player%::login} to false send "%{prefix}% %{ml.msg8}%" stop else: send "%{prefix}% %{ml.msg3}%" stop else: send "%{prefix}% %{ml.msg14}%" stop command /odrejestruj: trigger: if file "plugins/MLogin/accounts/%player%.yml" doesn't exists: send "%{prefix}% %{ml.msg2}%" stop else: clear {mlogin::%player%::join} delete file "plugins/MLogin/accounts/%player%.yml" set {mlogin::%player%::login} to true send "%{prefix}% %{ml.msg16}%" stop command /zmienhaslo [] []: trigger: set {mlogin::%player%::pass} to single value "Haslo" get of "plugins/MLogin/accounts/%player%.yml" if arg 1 is "%{mlogin::%player%::pass}%": if arg 2 is set: set "Haslo" to "%arg 2%" in yaml file "plugins/MLogin/accounts/%player%.yml" send "%{prefix}% %{ml.msg23}%" stop if arg 1 is not set: if arg 2 is not set: send "%{prefix}% %{ml.msg24}%" stop if arg 1 is set: if arg 2 is not set: send "%{prefix}% %{ml.msg24}%" stop command /zaloguj []: trigger: if file "plugins/MLogin/accounts/%player%.yml" doesn't exists: send "%{prefix}% %{ml.msg2}%" stop else: set {mlogin::%player%::password} to single value "Haslo" get of "plugins/MLogin/accounts/%player%.yml" if arg 1 is "%{mlogin::%player%::password}%": if {mlogin::%player%::login} is false: send "%{prefix}% %{ml.msg4}%" stop else: set {mlogin::%player%::login} to false send "%{prefix}% %{ml.msg7}%" teleport player to {mlogin::%player%::location} clear {mlogin::%player%::location} clear {mlogin::%player%::password} stop else: if {kickwrongpass} is "false": send "%{prefix}% %{ml.msg6}%" stop if {kickwrongpass} is "true": kick player due to "%{prefix}% %{ml.msg6}%" if arg 1 is not set: send "%{prefix}% %{ml.msg11}%" stop on login: if {quitteleport} is "true": teleport player to {mlogin::spawn} replace all "{player}" with "%player%" in {ml.msg26} if {msgjoinleft} is "true": set join message to "%{ml.msg26}%" if {msgjoinleft} is "false": stop set {mlogin::%player%::login} to true wait 2 second if file "plugins/MLogin/accounts/%player%.yml" doesn't exists: if {mlogin::%player%::login} is true: send "%{prefix}% %{ml.msg2}%" wait 10 second if {mlogin::%player%::login} is true: send "%{prefix}% %{ml.msg2}%" wait 20 second if {mlogin::%player%::login} is true: kick player due to "&cCzas logowania minal." set {mlogin::%player%::login} to true stop else: if {mlogin::%player%::login} is true: send "%{prefix}% %{ml.msg1}%" wait 10 second if {mlogin::%player%::login} is true: send "%{prefix}% %{ml.msg1}%" wait 20 second if {mlogin::%player%::login} is true: kick player due to "&cCzas logowania minal." set {mlogin::%player%::login} to true stop on command: if player is not console: command is not "zaloguj" or "zarejestruj": if {mlogin::%player%::login} is true: cancel event send "%{prefix}% %{ml.msg15}%" stop on chat: if {mlogin::%player%::login} is true: cancel event send "%{prefix}% %{ml.msf15}%" on break: if {mlogin::%player%::login} is true: cancel event send "%{prefix}% %{ml.msf15}%" on place: if {mlogin::%player%::login} is true: cancel event send "%{prefix}% %{ml.msf15}%" on damage: if {mlogin::%victim%::login} is true: cancel event on damage: if {mlogin::%attacker%:login} is true: cancel event on jump: if {mlogin::%player%::login} is true: cancel event on any movement: if {mlogin::%player%::login} is true: cancel event on login: add 1 to {mlogin::%player%::join} if {motdon} is "true": set {MOTD::*} to yaml list "MOTD" from file "plugins/MLogin/MOTD.yml" loop {MOTD::*}: replace all "{server}" with "%{servername}%" in {MOTD::*} replace all "{joins}" with "%{mlogin::%player%::join}%" in {MOTD::*} replace all "{player}" with "%player%" in {MOTD::*} send "%loop-value%" to player if {motdon} is "false": stop on quit: if {quitteleport} is "true": set {mlogin::%player%::location} to location of player stop if {quitteleport} is "false": stop