Nephyrin
03-20-2006, 12:46 AM
Seeing as I'm a nutjob, I always keep a ti-89 near my desk so I can calculate DPS and... a lot of other pointless things.
SO, I figured I needed an eazier way to access the math functions built into WoW! And here it is!
For math displaying as a fading green message of awesome:
/script SlashCmdList["MATHAGINATOR"] = function(msg) msg = "mathmacro =" .. msg; mathmacro = "Invalid Syntax"; RunScript(msg); UIErrorsFrame:AddMessage(mathmacro,0,1,.5,1,2); end; SLASH_MATHAGINATOR1 = "/math";
Or, if you just want the output to goto the chat area like a lamer:
/script SlashCmdList["MATHAGINATOR"] = function(msg) msg = "mathmacro =" .. msg; mathmacro = "Invalid Syntax"; RunScript(msg); ChatFrame1:AddMessage(mathmacro,0,1,.5); end; SLASH_MATHAGINATOR1 = "/math";
Now you can do things like:
/math 2 + 2
or
/math sqrt(27 + (19 / 2.7)) / 90^2 + abs(-1337)
If you've ever used a graphing calculator the syntax is nearly the same. Some basic functions:
sqrt(#) - Returns the squareroot of #
abs(#) - Returns the aboslute value of #
sin(#) - duh (All values in degrees!)
cos(#) - duh
math.pi = PI!
/math 22/7 - math.pi
WEE
Enjoy.
Yes I know it's 'macro of the WEEK' not MONTH, but, uhh.... /cast Vanish
SO, I figured I needed an eazier way to access the math functions built into WoW! And here it is!
For math displaying as a fading green message of awesome:
/script SlashCmdList["MATHAGINATOR"] = function(msg) msg = "mathmacro =" .. msg; mathmacro = "Invalid Syntax"; RunScript(msg); UIErrorsFrame:AddMessage(mathmacro,0,1,.5,1,2); end; SLASH_MATHAGINATOR1 = "/math";
Or, if you just want the output to goto the chat area like a lamer:
/script SlashCmdList["MATHAGINATOR"] = function(msg) msg = "mathmacro =" .. msg; mathmacro = "Invalid Syntax"; RunScript(msg); ChatFrame1:AddMessage(mathmacro,0,1,.5); end; SLASH_MATHAGINATOR1 = "/math";
Now you can do things like:
/math 2 + 2
or
/math sqrt(27 + (19 / 2.7)) / 90^2 + abs(-1337)
If you've ever used a graphing calculator the syntax is nearly the same. Some basic functions:
sqrt(#) - Returns the squareroot of #
abs(#) - Returns the aboslute value of #
sin(#) - duh (All values in degrees!)
cos(#) - duh
math.pi = PI!
/math 22/7 - math.pi
WEE
Enjoy.
Yes I know it's 'macro of the WEEK' not MONTH, but, uhh.... /cast Vanish