Code:
typedef void ( __cdecl * tLua_Dostring )( char * pszString, char * pszString2, void * pState );
Lua_Dostring = ...;
#define DOLUA(x)Lua_Dostring( x , x , GetLuaState())
DOLUA( "AccountLoginUI:Show();" );
If its like this, it should work. Make sure, the string is escaped right. What is that "/run" doing? Isn't that a command to just run Lua-scripts? If yes, you wont need it here.
DOLUA( "if not UnitBuff(\"Player\",\"Swift Red Wind Rider\") then CastSpellByName(\"Swift Red Wind Rider\"); end" ); should work.
Alternatively, do the if () by hand. Execute UnitBuff(), get the return value from the stack, if not, execute CSBN().