I made a pretty cool calculator script. It works fine too.
- Code:
-
on *:INPUT:*: {
if (` == $1) && (calc == $2) { .timer 1 0.2 msg $chan 10 $+ $calc($$3-) }
}
Now if you want to use this you have to type it in like this:
` calc #?#Red= RequiredYellow= What you choose#= Pick a number of your choice
?= The variable you will use for your calculation(*,/,+,-).
I know that seemed pretty hard to explain but I'll show you some examples here:
<%KiLLErMaN99> ` calc 3^9 / 3^9
<%KiLLErMaN99> 1
<%KiLLErMaN99> ` calc 3^9
<%KiLLErMaN99> 19683
<%KiLLErMaN99> ` calc 3 * 3
<%KiLLErMaN99> 9
NOTICE: You cannot not use variables. The outcome will always be 0
<%KiLLErMaN99> ` calc (3x^3+5x^2) * (2x^2+5)
<%KiLLErMaN99> 0
But say you take the variables out it will wokr with advanced stuff:
<%KiLLErMaN99> ` calc (4^8+321^2) * (4^2*74)
<%KiLLErMaN99> 199595168