I want to make a small tool that analyzes text from console in online game and I'm stuck at reading a string from a function and sending it to another program. I managed to find function that takes string as argument and calls function responsible for showing it in game and it looks something like this:
void Game::processTextMessage(Otc::MessageMode mode, const std::string& text)
{
g_lua.callGlobalField("g_game", "onTextMessage", mode, text);
}
Also, using Cheat Engine and x96dgb i found address of this function:
String I need to capture is "Czerw pozostawia po sobie: 3 robaki". I tried .dll injection but I don't know how to hook to that function. Also I found something similar to what I want to do: https://github.com/ur0/DotATranslator/blob/master/Injectee/dllmain.cpp but I don't know what to change to make it work. What steps should I take?