Valhalla Legends Archive

Programming => General Programming => Visual Basic Programming => Topic started by: Fr0z3N on February 27, 2006, 05:23 PM

Title: [VB6] Screen hooks to display text on a screen (Diablo II)
Post by: Fr0z3N on February 27, 2006, 05:23 PM
Not much to say, I wanna print text on my diablo window (IE. winamp song, ping, fps or w/e). All tips are appreciated as I know nothing so far.
Title: Re: [VB6] Screen hooks to display text on a screen (Diablo II)
Post by: Warrior on February 27, 2006, 05:29 PM
Find the function D2 calls to display text when you type something, it should call an even more generic function, backstep into that then find out the address. Hook into the Render loop to remove flicker or find an address which changes on refresh to patch.
Title: Re: [VB6] Screen hooks to display text on a screen (Diablo II)
Post by: topaz on February 27, 2006, 05:32 PM
You can use DirectDraw.
Title: Re: [VB6] Screen hooks to display text on a screen (Diablo II)
Post by: l)ragon on February 27, 2006, 05:58 PM
Quote from: Fr0z3N on February 27, 2006, 05:23 PM
Not much to say, I wanna print text on my diablo window (IE. winamp song, ping, fps or w/e). All tips are appreciated as I know nothing so far.
You can turn on the FPS printing on in D2 via a command line "/command".
Title: Re: [VB6] Screen hooks to display text on a screen (Diablo II)
Post by: Fr0z3N on February 27, 2006, 06:02 PM
Quote from: Warrior on February 27, 2006, 05:29 PM
Find the function D2 calls to display text when you type something, it should call an even more generic function, backstep into that then find out the address. Hook into the Render loop to remove flicker or find an address which changes on refresh to patch.

Now put that in perspective when reading

Quote from: Fr0z3N on February 27, 2006, 05:23 PM
All tips are appreciated as I know nothing so far.



Quote from: l)ragon on February 27, 2006, 05:58 PM
Quote from: Fr0z3N on February 27, 2006, 05:23 PM
Not much to say, I wanna print text on my diablo window (IE. winamp song, ping, fps or w/e). All tips are appreciated as I know nothing so far.
You can turn on the FPS printing on in D2 via a command line "/command".

That was an example....
Title: Re: [VB6] Screen hooks to display text on a screen (Diablo II)
Post by: UserLoser on February 27, 2006, 07:38 PM
Quote from: l)ragon on February 27, 2006, 05:58 PM
Quote from: Fr0z3N on February 27, 2006, 05:23 PM
Not much to say, I wanna print text on my diablo window (IE. winamp song, ping, fps or w/e). All tips are appreciated as I know nothing so far.
You can turn on the FPS printing on in D2 via a command line "/command".

Or type "fps" in-game.
Title: Re: [VB6] Screen hooks to display text on a screen (Diablo II)
Post by: Fr0z3N on February 27, 2006, 09:28 PM
Quote from: UserLoser on February 27, 2006, 07:38 PM
Quote from: l)ragon on February 27, 2006, 05:58 PM
Quote from: Fr0z3N on February 27, 2006, 05:23 PM
Not much to say, I wanna print text on my diablo window (IE. winamp song, ping, fps or w/e). All tips are appreciated as I know nothing so far.
You can turn on the FPS printing on in D2 via a command line "/command".

Or type "fps" in-game.

That was an example I don't actually want to do that wow... Do you have any input for what I do want to do? (Print text on the d2 window LIKE the /fps commands)
Title: Re: [VB6] Screen hooks to display text on a screen (Diablo II)
Post by: Warrior on February 27, 2006, 09:45 PM
Hey, I told you how to do it. I've told you in other threads what you need to do as well, if you choose not to listen that's not my fault.
Title: Re: [VB6] Screen hooks to display text on a screen (Diablo II)
Post by: Fr0z3N on February 27, 2006, 10:16 PM
I am choosing to listen, I am simply asking for it in more "noob" friendly terms.

If you could talk with me over aim or msn that'd be great.
Title: Re: [VB6] Screen hooks to display text on a screen (Diablo II)
Post by: topaz on February 28, 2006, 05:22 PM
http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/ddraw7/directdraw7/ddover_5ak7.asp

DirectDraw!
Title: Re: [VB6] Screen hooks to display text on a screen (Diablo II)
Post by: Fr0z3N on February 28, 2006, 06:09 PM
Quote from: Topaz on February 28, 2006, 05:22 PM
http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/ddraw7/directdraw7/ddover_5ak7.asp

DirectDraw!

Just looked at it, followed the Tutorial 1 and I have no idea what to do.
Title: Re: [VB6] Screen hooks to display text on a screen (Diablo II)
Post by: Warrior on February 28, 2006, 06:33 PM
You're going to have to put some effort into this, google some tutorials understand game hacking, etc..

Title: Re: [VB6] Screen hooks to display text on a screen (Diablo II)
Post by: Fr0z3N on March 18, 2006, 12:25 PM
Just to update if anyone wants to do this, I had to inject a dll which I wrote in c++


typedef void (_stdcall *pPrint)(wchar_t* Text, char Color);

void PrintMessage(char *Message, char Color)
{
pPrint Print = (pPrint)0x6FAC6780; //function for adding message to chat
wchar_t Buffer[0x130];  //buffer (0x130 was maximum from what i read somewhere)
        //convert to WideChar (2 bytes per each character)
MultiByteToWideChar(0, 1, Message, 100, Buffer, 100);
Print (Buffer, Color);    //and print
}


Used:


PrintMessage("Inject Successful",1);