Math Identifiers
mIRC Code
+ 1 likes
Please Register to submit score.
| Average Score | 7.5 (of 2 scores) |
| Date Added | Feb 25, 2009 |
| Last Updated | Feb 25, 2009 |
| Tags | average formula math number opposite quad quadratic |
Introduction
$avrg: Find the average of a given set of numbers (seperated by a space)
Usage: $avrg(Numbers)
Example: $avrg(10 2 5 3)
-> Returns "5"
$qdrc: Quadratic Equation
Usage: $qdrc(a,b,c)
Example: $qdrc(1,4,1)
-> Returns: "-0.267949 -3.732051"
*Note: The .x1 and .x2 properties can be used as well, e.g. $qdrc(1,4,1).x1 returns "-0.267949"
$opst: Get the opposite of a number
Usage: $opst(Number)
Example: $opst(372)
-> Returns "-372"
mIRC Snippet:
Math Identifiers
Posted on Feb 26, 2009 3:28 am
Posted on Feb 26, 2009 3:28 am
very nice vSkyzv 8/10
mIRC Snippet:
Math Identifiers
Posted on Feb 26, 2009 9:23 am
Posted on Feb 26, 2009 9:23 am
Nice, I like the "$qdrc: Quadratic Equation". xD
mIRC Snippet:
Math Identifiers
Posted on Feb 26, 2009 11:58 am
Posted on Feb 26, 2009 11:58 am
Good use of scripting to do math problems, good work. 7/10
mIRC Snippet:
Math Identifiers
Posted on Feb 28, 2009 11:11 pm
Posted on Feb 28, 2009 11:11 pm
Thanks. Are there any more that you guys would like to suggest?
mIRC Snippet:
Math Identifiers
Posted on Mar 1, 2009 12:15 am
Posted on Mar 1, 2009 12:15 am
:D nice snippet. I should've thought of these D:
mIRC Snippet:
Math Identifiers
Posted on Oct 28, 2009 6:51 pm
Posted on Oct 28, 2009 6:51 pm
can any of you guys help me, i'm trying to turn this script into a remote for a Bot (added to a !calc)
this is what i have so far:
on *:text:!calc*:#: {
if ( $2 == $null) { /msg $chan Put a Equation after !calc please }
elseif ( $3 == $null ) { /msg $chan $2 = $calc( $2 ) }
elseif ( $2 == avrg ) { /msg $chan The Average of your numbers is $calc(($replace($2,$chr(32),+)) / $numtok($2,32)) }
elseif ( $2 == Opp ) { /msg $chan $calc($1 - $calc($2 * 2)),$abs($2)) }
elseif ( $2 == qdrc ) { var %dscrm = $calc(($3 * $3) - 4($2 * $4)), %x1 = $calc(($opst($2) + $sqrt(%dscrm)) / 2($1)), %x2 = $calc(($opst($3) - $sqrt(%dscrm)) / 2($2))
if (!$prop) { return %x1 %x2 }
elseif ($prop == x1) { return %x1 }
elseif ($prop == x2) { return %x2 }
} }
all help is SUPER appreciated
this is what i have so far:
on *:text:!calc*:#: {
if ( $2 == $null) { /msg $chan Put a Equation after !calc please }
elseif ( $3 == $null ) { /msg $chan $2 = $calc( $2 ) }
elseif ( $2 == avrg ) { /msg $chan The Average of your numbers is $calc(($replace($2,$chr(32),+)) / $numtok($2,32)) }
elseif ( $2 == Opp ) { /msg $chan $calc($1 - $calc($2 * 2)),$abs($2)) }
elseif ( $2 == qdrc ) { var %dscrm = $calc(($3 * $3) - 4($2 * $4)), %x1 = $calc(($opst($2) + $sqrt(%dscrm)) / 2($1)), %x2 = $calc(($opst($3) - $sqrt(%dscrm)) / 2($2))
if (!$prop) { return %x1 %x2 }
elseif ($prop == x1) { return %x1 }
elseif ($prop == x2) { return %x2 }
} }
all help is SUPER appreciated







