Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #[AdvancedRanks][v2.0]
- # by Enter121
- # for NextCraft
- on load:
- send "&f[&5Advanced&aRanks&f][v.2.0]&6 LADOWANIE " to console
- send "&f[&5Advanced&aRanks&f]&5Advanced&aRanks&f by &5&lEnter121 for &2Next&7Craft" to console
- on unload:
- send "&f[&5Advanced&aRanks&f]&6 WYLACZANIE" to console
- every 720 minutes:
- clear {_loopplayer::*}
- set {_loopplayer::*} to all files in "plugins/AdvancedRanks/PLAYERS/"
- loop {_loopplayer::*}:
- set {_nickname} to single value "nickname" get of "plugins/AdvancedRanks/PLAYERS/%loop-value%"
- set {_dateofexpired} to single value "dateofexpired" get of "plugins/AdvancedRanks/PLAYERS/%loop-value%"
- set {_cday} to subtext of "%now%" between 0 and 2 parsed as number
- set {_cmonth} to subtext of "%now%" between 4 and 5 parsed as number
- set {_datefromnow} to "%{_cday}%.%{_cmonth}%"
- if {_datefromnow} is {_dateofexpired}:
- execute console command "/pex user %{_nickname}% group set default"
- send "&f[&5Advanced&aRanks&f] %{_nickname}% zostal zdegradowany do rangi default" to console
- send "&f[&5Advanced&aRanks&f] %{_nickname}% zostal/a zdegradowany/a do rangi domyslnej" to all players
- df "plugins/AdvancedRanks/PLAYERS/%{_nickname}%.yml"
- command /advrank <text> <text> <text> [<text>]:
- usage: &5&l/advrank <week/date/month> <gracz> <ranga> [<dzień.miesiąc>]
- trigger:
- if executor have permissions "advranks.promote" or "*" or "advranks.*":
- if arg 1 is "month":
- set {_ndate} to subtext of "%now%" between 0 and 5
- set "nickname" to "%argument 2%" in yaml file "plugins/AdvancedRanks/PLAYERS/%argument 2%.yml"
- set "rank" to "%argument 3%" in yaml file "plugins/AdvancedRanks/PLAYERS/%argument 2%.yml"
- set {_nday} to subtext of "%now%" between 0 and 2 parsed as number
- set {_nmonth} to subtext of "%now%" between 4 and 5 parsed as number
- set {_emonth} to {_nmonth}+1
- if {_nmonth} is "12":
- set {_emonth} to "1"
- set {_edate} to "%{_nday}%.%{_emonth}%"
- set "date" to "%{_nday}%.%{_nmonth}%" in yaml file "plugins/AdvancedRanks/PLAYERS/%argument 2%.yml"
- set "dateofexpired" to "%{_edate}%" in yaml file "plugins/AdvancedRanks/PLAYERS/%argument 2%.yml"
- send "%player%: mianowal %argument 2% na %argument 3% na 1 miesiac" to console
- send "&f[&5Advanced&aRanks&f] %argument 2% zostal/a mianowany/a na %argument 3% na 1 miesiąc" to all players
- execute console command "/pex user %argument 2% group set %argument 3%"
- exit
- if arg 1 is "date":
- set "nickname" to "%argument 2%" in yaml file "plugins/AdvancedRanks/PLAYERS/%argument 2%.yml"
- set "rank" to "%argument 3%" in yaml file "plugins/AdvancedRanks/PLAYERS/%argument 2%.yml"
- set {_nday} to subtext of "%now%" between 0 and 2 parsed as number
- set {_nmonth} to subtext of "%now%" between 4 and 5 parsed as number
- set "date" to "%{_nday}%.%{_nmonth}%" in yaml file "plugins/AdvancedRanks/PLAYERS/%argument 2%.yml"
- set "dateofexpired" to "%argument 4%" in yaml file "plugins/AdvancedRanks/PLAYERS/%argument 2%.yml"
- send "%player%: mianowal %argument 2% na %argument 3% do %argument 4%" to console
- send "&f[&5Advanced&aRanks&f] %argument 2% zostal/a mianowany/a na %argument 3% do %argument 4%" to all players
- execute console command "/pex user %argument 2% group set %argument 3%"
- exit
- if arg 1 is "week":
- set "nickname" to "%argument 2%" in yaml file "plugins/AdvancedRanks/PLAYERS/%argument 2%.yml"
- set "rank" to "%argument 3%" in yaml file "plugins/AdvancedRanks/PLAYERS/%argument 2%.yml"
- set {_nday} to subtext of "%now%" between 0 and 2 parsed as number
- set {_nmonth} to subtext of "%now%" between 4 and 5 parsed as number
- set {_eday} to "0"
- set {_emonth} to {_nmonth}
- set {_eday} to {_nday} +7
- if {_nmonth} is 1:
- set {_maxmonth} to 31
- if {_nmonth} is 2:
- set {_maxmonth} to 28
- if {_nmonth} is 3:
- set {_maxmonth} to 31
- if {_nmonth} is 4:
- set {_maxmonth} to 30
- if {_nmonth} is 5:
- set {_maxmonth} to 31
- if {_nmonth} is 6:
- set {_maxmonth} to 30
- if {_nmonth} is 7:
- set {_maxmonth} to 31
- if {_nmonth} is 8:
- set {_maxmonth} to 31
- if {_nmonth} is 9:
- set {_maxmonth} to 30
- if {_nmonth} is 10:
- set {_maxmonth} to 31
- if {_nmonth} is 11:
- set {_maxmonth} to 30
- if {_nmonth} is 12:
- set {_maxmonth} to 31
- if {_maxmonth} is less than {_eday}:
- set {_eday} to {_eday}-{_maxmonth}
- set {_emonth} to {_nmonth}+1
- set "date" to "%{_nday}%.%{_nmonth}%" in yaml file "plugins/AdvancedRanks/PLAYERS/%argument 2%.yml"
- set "dateofexpired" to "%{_eday}%.%{_emonth}%" in yaml file "plugins/AdvancedRanks/PLAYERS/%argument 2%.yml"
- send "%player%: mianowal %argument 2% na %argument 3% do %argument 4%" to console
- send "&f[&5Advanced&aRanks&f] %argument 2% zostal/a mianowany/a na %argument 3% na tydzień" to all players
- execute console command "/pex user %argument 2% group set %argument 3%"
- exit
- else:
- send "&f[&5Advanced&aRanks&f]&c Nie masz uprawnien" to player
- exit
- command /adv <text>:
- usage: &5&l/adv <reload/pomoc/info>
- trigger:
- if argument 1 is "pomoc":
- send "&a===========================================================" to executor
- send " &f[&5Advanced&aRanks&f]" to executor
- send "&a===========================================================" to executor
- send "&5/advrank month <gracz> <ranga> - ustawia rangę gracza na 1 miesiąc" to executor
- send "&5/advrank date <gracz> <ranga> <dzień.miesiąc> - ustawia rangę do daty określonej w komendzie" to executor
- send "&5/advrank week <gracz> <ranga> - ustawia rangę gracza na 1 tydzień" to executor
- send "&5/adv reload - przeładowuje AdvancedRanks" to executor
- send "&a===========================================================" to executor
- exit
- if argument 1 is "reload":
- if executor have permissions "advranks.reload" or "*" or "advranks.*":
- execute console command "/sk reload %script%"
- exit
- else:
- send "&f[&5Advanced&aRanks&f]&c Nie masz uprawnien" to player
- exit
- if argument 1 is "info":
- send "&f[&5Advanced&aRanks&f] stworzony przez Enter121 dla &f[&2Next&7Craft&f]" to executor
- exit
- on join:
- send "&f[&5Advanced&aRanks&f] v.2.0"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement