This is one of my first scripts. It takes the temperature you right, and it notices the person telling them the conversions amount. This is my first experiment with $calc.
So, if someone types !temp f 50, it will return the person:
50 degrees Celsius into Fahrenheit is: 122 degrees
If they type !temp it will give instructions. It goes the same for !temp c, except opposite.
on *:TEXT:!temp:#: {
notice $nick !temp converts temperatures. !temp [c/f] <number of degrees>.
notice $nick c/f is the degree you want to convert, and the number is the original amount.
}
on *:TEXT:!temp c *:#: {
notice $nick $3 degrees Fahrenheit into Celsius is: $calc(1.8 * $3 + 32) degrees
}
on *:TEXT:!temp f *:#: {
notice $nick $3 degrees Celsius into Fahrenheit is: $calc(5/9 * $3 - 32) degrees
}
;========= Temp Convert ==================
on :TEXT:!temp:#: {
notice $nick !temp converts temperatures. !temp [c/f] .
notice $nick c/f is the degree you want to convert, and the number is the original amount.
}
on :TEXT:!temp f :#: {
msg # $nick $3 degrees Fahrenheit equals Celsius: $calc((($3 - 32)5) /9) degrees
}
on :TEXT:!temp c :#: {
msg # $nick $3 degrees Celsius equals Fahrenheit: $calc(((9 * $3)/5) + 32) degrees
}
;=========================================