#Skrypt by wiktoor123 # wersja 1.0 on load: set {_test} to skutil yaml value "script.automsg.autor" from file "/plugins/Skript/scripts/WikScript/automsg.yml" if {_test} is not "wiktoor123": set skutil yaml value "script.automsg.autor" from file "/plugins/Skript/scripts/WikScript/automsg.yml" to "wiktoor123" set skutil yaml value "script.automsg.status" from file "/plugins/Skript/scripts/WikScript/automsg.yml" to "on" set skutil yaml value "script.automsg.prefix" from file "/plugins/Skript/scripts/WikScript/automsg.yml" to "&8[&eAutoMSG&8]&r" set skutil yaml value "script.automsg.czekaj" from file "/plugins/Skript/scripts/WikScript/automsg.yml" to 1 set skutil yaml value "script.automsg.msg.przyklad" from file "/plugins/Skript/scripts/WikScript/automsg.yml" to "Przykładowa autowiadomość! Aby ja zedytować wejdź w &e/plugins/Skript/scripts/WikScript/automsg.yml" set {automsg.send} to skutil yaml value "script.automsg.status" from file "/plugins/Skript/scripts/WikScript/automsg.yml" set {automsg.wait} to 0 set {_error} to false delete {wikscript.automsg.error} if skutil yaml value "script.automsg.status" from file "/plugins/Skript/scripts/WikScript/automsg.yml" is not "on" or "off": set {_error} to true if skutil yaml value "script.automsg.czekaj" from file "/plugins/Skript/scripts/WikScript/automsg.yml" is not number: set {_error} to true if {_error} is true: set {wikscript.automsg.error} to true send "&7» &cSkrypt &bAutomsg &cjest &4źle&c skonfigurowany!" to all players command /automsg []: trigger: if arg 1 is "info": send "&7» &aInformacje o autorze &bAutomsg" send "&7» &aNick: &ewiktoor123" send "&7» &aPortfolio: &eskript.wiktoor123.pl" if {wikscript.automsg.error} is true: send "&7» &cSkrypt &bAutomsg &cjest &4źle&c skonfigurowany!" stop else if player is op: if arg 1 is "off": set skutil yaml value "script.automsg.status" from file "/plugins/Skript/scripts/WikScript/automsg.yml" to "off" send "&7» &9Automsg &ezostały &cwyłączone&e!" if arg 1 is "on": set skutil yaml value "script.automsg.status" from file "/plugins/Skript/scripts/WikScript/automsg.yml" to "on" send "&7» &9Automsg &ezostały &awyłączone&e!" else: send "&7» &cPoprawne użycie: &7/automsg info&l|&7on&l|&7off" else: send "&7» &cNie masz do tego permisji!" every 1 minute: if skutil yaml value "script.automsg.status" from file "/plugins/Skript/scripts/WikScript/automsg.yml" is "on": if skutil yaml value "script.automsg.czekaj" from file "/plugins/Skript/scripts/WikScript/automsg.yml" is bigger than {automsg.wait}: add 1 to {automsg.wait} else: set {_test::*} to skutil yaml nodes with keys "script.automsg.msg" from file "/plugins/Skript/scripts/WikScript/automsg.yml" loop {_test::*}: add 1 to {_ilosc} set {_x} to random element out of {_test::*} set {_wiad} to skutil yaml value "script.automsg.msg.%{_x}%" from file "/plugins/Skript/scripts/WikScript/automsg.yml" set {_prefix} to skutil yaml value "script.automsg.prefix" from file "/plugins/Skript/scripts/WikScript/automsg.yml" replace all "" in {_wiad} with "%nl%%{_prefix}%" replace all "" in {_wiad} with "%online player count%" send "%{_prefix}% %{_wiad}%" to all players set {automsg.wait} to 0