Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /czas [<text>]:
- trigger:
- if arg 1 is not set:
- send "&cPodaj liczbe."
- stop
- set {_poczatek} to arg 1
- set {_poczatek} to {_poczatek} parsed as integer
- if {_poczatek} is integer:
- if {_poczatek} is smaller than 60:
- send "&c%{_poczatek}% sekund."
- stop
- if {_poczatek} is larger than 59:
- set {_w} to "%{_poczatek} / 60%"
- loop length of {_w} times:
- if subtext of {_w} from characters loop-number to loop-number is ".":
- set {_ll} to loop-number - 1
- exit loop
- set {_w} to first {_ll} characters of {_w}
- set {_w} to {_w} parsed as integer
- set {_s} to "%60 * {_w}%"
- set {_s} to {_s} parsed as integer
- set {_s} to "%{_poczatek} - {_s}%"
- set {_s} to {_s} parsed as integer
- set {_wk} to ""
- if {_w} is 1:
- set {_wk} to "a"
- if {_w} is 2 or 3 or 4:
- set {_wk} to "y"
- if {_s} is 0:
- set {_ss} to ""
- if {_s} is larger than 0:
- set {_sk} to ""
- if {_s} is 1:
- set {_sk} to "a"
- if {_s} is 2 or 3 or 4:
- set {_sk} to "y"
- set {_ss} to ", %{_s}% sekund%{_sk}%"
- set {_koniec} to "%{_w}% minut%{_wk}%%{_ss}%"
- send "&6%{_poczatek}% &7sekund to &c%{_koniec}%"
- stop
- send "&cPoczatkowa liczba musi byc liczba calkowita!"
Advertisement
Add Comment
Please, Sign In to add comment