If all you want is a Lua equivalent of macro conditionals for your addon code, then there is tons of API for all that stuff:
http://wowprogramming.com/docs/api_categories
If you could be more specific, we could be more helpful.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff,
The Tao of Pooh