command /calculate [] []:
trigger:
if arg-1 is "+":
set {_f} to arg-2
set {_s} to arg-3
set {_a} to {_f}+{_s}
send "&aThe answer is %shortcuter({_a})%" to player
if arg-1 is "-":
set {_f} to arg-2
set {_s} to arg-3
set {_a} to {_f}-{_s}
send "&aThe answer is %shortcuter({_a})%" to player
if arg-1 is "*":
set {_f} to arg-2
set {_s} to arg-3
set {_a} to {_f}*{_s}
send "&aThe answer is %shortcuter({_a})%" to player
if arg-1 is "/":
set {_f} to arg-2
set {_s} to arg-3
set {_a} to {_f}/{_s}
send "&aThe answer is %shortcuter({_a})%" to player
if arg-1 is not set:
send "&6Calcalator Help" to player
send "&a/calculate + adds the numbers together" to player
send "&a/calculate - subtracts the numbers" to player
send "&a/calculate * muliples it by the first and second number" to player
send "&a/calculate / divides the first number out of the second number" to player
if arg-1 is "help":
send "&6Calcalator Help" to player
send "&a/calculate + adds the numbers together" to player
send "&a/calculate - subtracts the numbers" to player
send "&a/calculate * muliples it by the first and second number" to player
send "&a/calculate / divides the first number out of the second number" to player
Function shortcuter(Number: Number) :: String:
Set {_shortcuter} to {_Number}
If {_shortcuter} is less than 1000:
Return "%{_shortcuter}%"
Else if {_shortcuter} is greater or equal to 1000:
Set {_short} to "%{_shortcuter}/1000%"
Set {_symbol} to "K"
If {_shortcuter} is greater or equal to 1000000:
Set {_short} to "%{_shortcuter}/1000000%"
Set {_symbol} to "M"
If {_shortcuter} is greater or equal to 1000000000:
Set {_short} to "%{_shortcuter}/1000000000%"
Set {_symbol} to "B"
Return "%{_short}%%{_symbol}%"