Shawn-Smith/mIRC-Scripts — Issue #4: Bugs in AliasTemperatureConversion.mrc
Author: ineedalifetoday
Created: 2011-10-25 06:43:50+00:00
State: open

alias Temp {
/*
This script is used to convert tempature between two scales.
Usage: /Temp SCALE TEMPERATURE
Example: /Temp F 94.5
Supported scales:
- F (Fahrenheit)
- C (Celsius)
*/

if ($2 isnum) {
if (F == $1) {
echo -a 07 $+ $2 in Fahrenheit is:
echo -a 07 $+ $calc(($2 - 32) * 5/9) in Celsius.
}
elseif (C == $1) {
echo -a 07 $+ $2 in Celsius is:
echo -a 07 $+ $calc($2 * (9/5) + 32) in Fahrenheit.
}
else {
echo -a Syntax: /Temp [FC] [Number]
echo -a Example: /Temp F 60
}
}
else {
echo -a Syntax: /Temp [FC] [Number]
echo -a Example: /Temp F 60
}
}