expr - a simple calculator that supports LUA expressions

/x - evaluates an expression and prints output to the chat window
Screenshot of the addon in-game with the default chat frame.

Screenshot of the addon in-game with the default chat frame.

Description

expr

A simple calculator that takes a Lua expression as an argument and prints the result as a system message in your chat window.

Usage: /x <expression>

Examples:

Input: /x 50 * 35

Output: 50 * 35 = 1750

Input: /x 30 / 20

Output: 30 / 20 = 1.5

Input: /x sqrt(144)

Output: sqrt(144) = 12

Compatibility

Uses very basic Lua only, and only one function from the WoW API. There is no reason this should not be compatible with every version of the game, but it has only been tested in Warlords of Draenor through The War Within, as well as Classic (1.13+)

Feel free to post any bugs, suggestion or problems in the comments below.

The expr - a simple calculator that supports LUA expressions Team

profile avatar
  • 2
    Projects
  • 16.6K
    Downloads

More from echozrocks

  • mountoff project image

    mountoff

    • 14.0K
    • Addons

    /mountoff - Mount the same mount as your current target

    • 14.0K
    • November 10, 2024
    • Addons
    • +2
  • mountoff project image

    mountoff

    • 14.0K
    • Addons

    /mountoff - Mount the same mount as your current target

    • 14.0K
    • November 10, 2024
    • Addons
    • +2