Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Autorem skryptu jest: DawidQ (DawidGamesPL)
- # Zabraniam:
- # - Kasowania autora
- # - Podszywania się pod mnie
- # - Mój kanał na YouTube: https://www.youtube.com/channel/UC4E9LaiUBRNmtzlCsQIwo4Q
- options:
- l: &8[&e&lAuto Message&8]
- m: 1
- ilosc: 10
- on script load:
- if folder "plugins/Auto Message" doesn't exists:
- clear {czas}
- clear {iledodacdoilosc}
- send "&cBrak plikow {@l}" to console
- create folder "plugins/Auto Message"
- create folder "plugins/Auto Message/wiadomosci"
- create file "plugins/Auto Message/config.yml"
- set "AM.status" to "1" in yaml file "plugins/Auto Message/config.yml" # 1 = on 0 = off
- send "&aPomyslnie utworzono pliki {@l}" to console
- else:
- if folder "plugins/Auto Message/wiadomosci" doesn't exists:
- create folder "plugins/Auto Message"
- create folder "plugins/Auto Message/wiadomosci"
- create file "plugins/Auto Message/config.yml"
- send "&cLadowanie plikow {@l}" to console
- every {@m} minute:
- set {_status} to single value "AM.status" get of "plugins/Auto Message/config.yml"
- if {_status} is "1":
- set {_xxy} to {@ilosc}+{iledodacdoilosc}
- set {_wiadomosc} to content of file "plugins/Auto Message/wiadomosci/wiad(%a random integer between 1 and {_xxy}%).txt"
- replace all "(DATA)" with "%hour%:%minute%" in {_wiadomosc}
- set {_rplayerx} to "%random player out of all players%"
- replace all "(RPLAYER)" with {_rplayerx} in {_wiadomosc}
- give {_x} golden apple named "&eZostales wylosowany"
- broadcast colored {_wiadomosc}
- #broadcast "Minela 1 m"
- command /automessage [<text>] [<text>] [<integer>]:
- aliases: /am
- permission: moderator.*
- permission message: &cNie posiadasz permisji by uzyc tej komendy
- trigger:
- if arg 1 is not set:
- send ""
- send "&e&l=============&9Auto Message&e&l================"
- send "&a/automessage off &8- Wlacza Auto message"
- send "&a/automessage on &8- Wylacza Auto message"
- send "&a/automessage aktualizacja &8[sprawdz, pobierz&8] &8- Pobierasz badz sprawdzasz najnowsza wersje skryptu"
- send "&a/automessage info &8- Pokazuje informacje dotyczace Auto Message"
- send "&a/automessage usun &8[&ewiadomosci, pliki&8] &8- Usuwa wiadomosci lub pliki"
- send "&a/automessage dodaj [tresc] &8- Dodajesz nowa wiadomosc" #&8&l*****&e&lPAMIETAJ Kropki to spacja!
- send "&a/automessage edytuj [tresc] [ID Wiadomosci] &8- Edytjesz wiadomosc" #&8&l*****&e&lPAMIETAJ Kropki to spacja!
- send "&a/automessage lista &8- Pokazuje liste wiadomosci"
- send "&a/automessage autor &8- Pokazuje autora skryptu"
- send "&e&l=============&9Auto Message&e&l================"
- send ""
- stop
- else if arg 1 is "autor":
- send "&6&lAutorem skryptu jest &cD&aa&8w&6i&2d&e&lQ"
- else if arg 1 is "edytuj":
- if arg 2 is set:
- if arg 3 is set:
- if file "plugins/Auto Message/wiadomosci/wiad(%arg 3%).txt" exists:
- df "plugins/Auto Message/wiadomosci/wiad(%arg 3%).txt"
- set {_xxxxxw} to arg 2
- replace all "." with " " in {_xxxxxw}
- wf {_xxxxxw} to "plugins/Auto Message/wiadomosci/wiad(%arg 3%).txt"
- send "&aPomyslnie zedytowano wiadomosc o id %arg 3% &eJego tresc to &c%{_xxxxxw}%"
- else:
- send "&cWiadomosc ktora chcesz edytowac nie istnije!"
- else if arg 1 is "on" or "wlacz":
- set "AM.status" to "1" in yaml file "plugins/Auto Message/config.yml" # 1 = on 0 = off
- send "&aWlaczyles Auto Message"
- stop
- else if arg 1 is "off" or "wylacz":
- set "AM.status" to "0" in yaml file "plugins/Auto Message/config.yml" # 1 = on 0 = off
- send "&aWylaczyles Auto Message"
- stop
- else if arg 1 is "dodaj":
- if arg 2 is set:
- set {_yy} to {@ilosc} + 1
- add 1 to {iledodacdoilosc}
- wf "%arg 2%" to "plugins/Auto Message/wiadomosci/wiad(%{_yy}%).txt"
- send "&aDodano nowa wiadomosc o tresci &c%arg 2%"
- else if arg 1 is "usun":
- if arg 2 is "wiadomosci":
- if arg 3 is set:
- if file "plugins/Auto Message/wiadomosci/wiad(%arg 3%).txt" exists:
- df "plugins/Auto Message/wiadomosci/wiad(%arg 3%).txt"
- remove 1 from {iledodacdoilosc}
- send "&cUsunieto wiadomosc o id %arg 2%"
- else:
- send "&4&lNie ma takiej wiadomosci o tym ID"
- else:
- send "&cPoprawne uzycie to &a/automessage usun <id> &8- Usuwasz wiadomosc! &e&lID od 1 do {@ilosc}"
- else if arg 2 is "pliki":
- if folder "plugins/Auto Message" exists:
- send "&aPomyslnie usunieto pliki"
- execute console command "/sk disable automess"
- execute console command "/sk enable automess"
- df "plugins/Auto Message"
- wait 2 second
- send "&ePliki zostaly utworzone {@l}"
- execute console command "/sk reload automess"
- else:
- send "&cPliki nie istnija"
- else if arg 1 is "lista":
- send ""
- send "&5==================&9Lista wiadomosci&5================="
- set {_i} to integer
- set {_i} to 1
- loop {@ilosc}+{iledodacdoilosc} times:
- set {_xxxx} to content of file "plugins/Auto Message/wiadomosci/wiad(%{_i}%).txt"
- add {_xxxx} to {_listaMessage}
- set {_i} to {_i} + 1
- send "%loop-number%&8. %{_xxxx}%"
- send "&5==================&9Lista wiadomosci&5================="
- send ""
- stop
- else if arg 1 is "info":
- set {_status} to single value "AM.status" get of "plugins/Auto Message/config.yml"
- if {_status} is "1":
- set {_status} to colored "&2&lwlaczony"
- else:
- set {_status} to colored "&4&lwylaczony"
- send ""
- send "&e&l=============&9Auto Message&e&l================"
- send "&aStatus&8: %{_status}%"
- send "&aWiadomosci wyswietlane co &9%{czas}% &aminuty"
- send "&e&l=============&9Auto Message&e&l================"
- send ""
- stop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement