Completely made this out of boredom so please don't post hate msgs saying why don't I just use a calculator or your post will be deleted.
NOTICE: Does not work with variables.
- Code:
-
on *:INPUT:*: {
if (` == $1) {
if (calc == $2) { .timer 1 0.2 msg $chan 10 $+ $calc($$3-) }
}
}
To use:
Type: ` calc {functions here}
Then hit enter. It will msg the channel with the answer.
OPERATORS:
* = Multiplication
/ = Division
+ = Addition
- = Subtraction
() Operators also work.
Here are some examples of how it is used:
<~KiLLErMaN99> ` calc 2+2
<~KiLLErMaN99> 4
<~KiLLErMaN99> ` calc 8*8
<~KiLLErMaN99> 64
<~KiLLErMaN99> ` calc 8(6+2*4(5))^3/842
<~KiLLErMaN99> 8
BTW: The fact that all the answers were multiples of 4 was a coincidence. I totally didn't expect the last one to come out without a decimal ^^