If you're playing an online game you're getting packets from the server which must provide you with the server's IP. You can try capturing those packets if you want.
Is this about D3?
And to make the game playable offline you'd need a server emulator. http://en.wikipedia.org/wiki/Server_emulator
Since D3 does everything that can possibly be done server side, it's probably going to take a good amount of time for someone to write one of these for the game.