(3 Kb)
Updated: 08-29-12 07:13 PM
Mists of Pandaria (5.0.4)
Updated:08-29-12 07:13 PM
Created:08-29-12 07:13 PM
EVAL (A chat based calculator)
Version: 1.0
by: Zanthra [More]
This provides a simple chat window calculator.

This program responds to requests in Party, Raid, and Guid chat messages starting with a # symbol. It evaluates them as a math function and provides the result. It is very simple to use:

To [Amberton]: #8*8
[Amberton] whispers: 8*8 = 64

To [Amberton]: #1-(1-.01)^30
[Amberton] whispers: 1-(1-.01)^30 = 0.26029962661172

It also allows other players to request calculations.

Note that this addon does produce a lambda function from the text, but also uses setfenv() to limit the functions that can be used to those related to math (sin, cos, sqrt, log, factorial, etc...), and the word "function" anywhere in the equation will fail (to prevent someone writing you into an infinite loop). If you don't trust these protections don't install the addon. If you find a vulnerability in this, please contact me at so i can fix it.
Optional Files (0)

There have been no comments posted to this file.
Be the first to add one.

Category Jump: