Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #[Function List]────────────
- #nn, nnconsole
- #[Command List]────────────
- #/notation <hybrid/scientific/standard>
- options:
- c: &6[・]
- nnp: &7[-&eSetting&7-]
- variables:
- {nt::0} = ""
- {nt::1} = "K"
- {nt::2} = "M"
- {nt::3} = "B"
- {nt::4} = "T"
- {nt::5} = "Qa"
- {nt::6} = "Qi"
- {nt::7} = "Sx"
- {nt::8} = "Sp"
- {nt::9} = "Oc"
- {nt::10} = "No"
- {nt::11} = "Dc"
- {%player%.notation} = 3
- {min} = 10000
- command /notation [<text>]:
- trigger:
- if arg is "standard":
- set {%player%.notation} to 1
- message "{@nnp} &7数の表記を &aStandard &7に変更しました。"
- if arg is "scientific":
- set {%player%.notation} to 2
- message "{@nnp} &7数の表記を &aScientific &7に変更しました。"
- if arg is "hybrid":
- set {%player%.notation} to 3
- message "{@nnp} &7数の表記を &aHybrid &7に変更しました。"
- if arg is not set:
- message "{@nnp} &c使用可能表記: hybrid/standard/scientific"
- function nn(n: number, player: player) :: string:
- if {%{_player}%.notation} is 2:
- if {_n} >= {min}:
- set {_e} to floor(log({_n}))
- set {_c} to "%{_n}/(10^{_e})%e%{_e}%"
- if {%{_player}%.notation} is 1:
- if {_n} >= {min}:
- set {_el} to floor(log({_n})/3)
- set {_c} to "%{_n}/(1000^{_el})%%{nt::%{_el}%}%"
- if {%{_player}%.notation} is 3:
- if {_n} >= {min}:
- set {_e} to floor(log({_n}))
- set {_el} to floor(log({_n})/3)
- if {_el} < 12:
- set {_c} to "%{_n}/(1000^{_el})%%{nt::%{_el}%}%"
- if {_el} >= 12:
- set {_c} to "%{_n}/(10^{_e})%e%{_e}%"
- if {_n} < {min}:
- set {_c} to "%{_n}%"
- return {_c}
- function nnconsole(n: number, p: number) :: string:
- if {_p} is 2:
- if {_n} >= {min}:
- set {_e} to floor(log({_n}))
- set {_c} to "%{_n}/(10^{_e})%e%{_e}%"
- if {_p} is 1:
- if {_n} >= {min}:
- set {_el} to floor(log({_n})/3)
- set {_c} to "%{_n}/(1000^{_el})%%{nt::%{_el}%}%"
- if {_p} is 3:
- if {_n} >= {min}:
- set {_e} to floor(log({_n}))
- set {_el} to floor(log({_n})/3)
- if {_el} < 12:
- set {_c} to "%{_n}/(1000^{_el})%%{nt::%{_el}%}%"
- if {_el} >= 12:
- set {_c} to "%{_n}/(10^{_e})%e%{_e}%"
- if {_n} < {min}:
- set {_c} to "%{_n}%"
- return {_c}
- command /setmin <number>:
- permission: skript.admin
- trigger:
- set {min} to arg
Advertisement
Add Comment
Please, Sign In to add comment