familychicken

Untitled

Jan 31st, 2022 (edited)
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.64 KB | None | 0 0
  1. options:
  2. c: &6[・]
  3. nnp: &7[-&eSetting&7-]
  4.  
  5. variables:
  6. {nt::0} = ""
  7. {nt::1} = "K"
  8. {nt::2} = "M"
  9. {nt::3} = "B"
  10. {nt::4} = "T"
  11. {nt::5} = "Qa"
  12. {nt::6} = "Qi"
  13. {nt::7} = "Sx"
  14. {nt::8} = "Sp"
  15. {nt::9} = "Oc"
  16. {nt::10} = "No"
  17. {nt::11} = "Dc"
  18. {%player%.notation} = 3
  19. {min} = 1000
  20.  
  21. command /notation [<text>]:
  22. trigger:
  23. if arg is "standard":
  24. set {%player%.notation} to 1
  25. message "{@nnp} &7数の表記を &astandard &7に変更しました。"
  26. if arg is "scientific":
  27. set {%player%.notation} to 2
  28. message "{@nnp} &7数の表記を &ascientific &7に変更しました。"
  29. if arg is "hybrid":
  30. set {%player%.notation} to 3
  31. message "{@nnp} &7数の表記を &ahybrid &7に変更しました。"
  32. if arg is not set:
  33. message "{@nnp} &c使用可能表記: hybrid/standard/scientific"
  34.  
  35.  
  36.  
  37. function nn(n: number, player: player) :: string:
  38. if {%{_player}%.notation} is 2:
  39. if {_n} >= {min}:
  40. set {_e} to floor(log({_n}))
  41. set {_c} to "%{_n}/(10^{_e})%e%{_e}%"
  42. if {%{_player}%.notation} is 1:
  43. if {_n} >= {min}:
  44. set {_el} to floor(log({_n})/3)
  45. set {_c} to "%{_n}/(1000^{_el})%%{nt::%{_el}%}%"
  46. if {%{_player}%.notation} is 3:
  47. if {_n} >= {min}:
  48. set {_e} to floor(log({_n}))
  49. set {_el} to floor(log({_n})/3)
  50. if {_el} < 12:
  51. set {_c} to "%{_n}/(1000^{_el})%%{nt::%{_el}%}%"
  52. if {_el} >= 12:
  53. set {_c} to "%{_n}/(10^{_e})%e%{_e}%"
  54. if {_n} < {min}:
  55. set {_c} to "%{_n}%"
  56. return {_c}
  57.  
  58. function nnconsole(n: number, p: number) :: string:
  59. if {_p} is 2:
  60. if {_n} >= {min}:
  61. set {_e} to floor(log({_n}))
  62. set {_c} to "%{_n}/(10^{_e})%e%{_e}%"
  63. if {_p} is 1:
  64. if {_n} >= {min}:
  65. set {_el} to floor(log({_n})/3)
  66. set {_c} to "%{_n}/(1000^{_el})%%{nt::%{_el}%}%"
  67. if {_p} is 3:
  68. if {_n} >= {min}:
  69. set {_e} to floor(log({_n}))
  70. set {_el} to floor(log({_n})/3)
  71. if {_el} < 12:
  72. set {_c} to "%{_n}/(1000^{_el})%%{nt::%{_el}%}%"
  73. if {_el} >= 12:
  74. set {_c} to "%{_n}/(10^{_e})%e%{_e}%"
  75. if {_n} < {min}:
  76. set {_c} to "%{_n}%"
  77. return {_c}
  78.  
  79.  
  80. command /setmin <number>:
  81. trigger:
  82. set {min} to arg
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
Advertisement
Add Comment
Please, Sign In to add comment