i need to know if there is a way to send text to the local warcraftiii client and have it be displayed in game. can i just dummy up a packet that looks like a whisper and send it out with winpcap? or is there an easier way? thanks.
I'm assuming you mean during a game. You follow these steps:
1) press enter
2) typr your message
3) press enter
Hope this helps!
-_-
no, i meant from MY PROGRAM. nice one though. made me laugh when i read it.
There is an easy way to send keystrokes to a different program. In VB it's SendKey or something. Try googling sending keystrokes to other processes from visual basic or something.
seriously guys this is NOT what i'm asking. i need to make warcraftiii think it's receiving text, not me actually sending text.
i'm very aware of sendkeys...from my old vb days. i don't use vb anymore, c# is where it's at.
My guess would be that you'll need to hook into and manually call whatever function War3 uses for processing incoming text. Better get out the disassembler!
Quote from: Laff on October 05, 2004, 11:01 AM
i need to know if there is a way to send text to the local warcraftiii client and have it be displayed in game. can i just dummy up a packet that looks like a whisper and send it out with winpcap? or is there an easier way? thanks.
Find out what packet/format/ect and I'll find a way to send it for you
If you want to send it to yourself, that's difficult. You're going to have to call the actual game's function that processes recieved messages. To do that, you'll need to execute code in the game's context. Have fun :)
Quote from: iago on October 05, 2004, 04:13 PM
If you want to send it to yourself, that's difficult. You're going to have to call the actual game's function that processes recieved messages. To do that, you'll need to execute code in the game's context. Have fun :)
That's what i was planning on trying to do :) But i don't feel like getting on war3, joining a ladder game, then finding out what packet it is, ect. otherwise i'll be re-addicted to war3 :)
i'm just trying to spoof a packet right...and see if wc3 gets it...we'll see.
Quote from: Laff on October 05, 2004, 06:00 PM
i'm just trying to spoof a packet right...and see if wc3 gets it...we'll see.
Methinks it would be easier to just use WC3's draw-text function.
Quote from: iago on October 05, 2004, 04:13 PM
If you want to send it to yourself, that's difficult. You're going to have to call the actual game's function that processes recieved messages. To do that, you'll need to execute code in the game's context. Have fun :)
I thought I just said that! I feel like $t0rm here.
Quote from: MyndFyre on October 05, 2004, 06:46 PMQuote from: Laff on October 05, 2004, 06:00 PMi'm just trying to spoof a packet right...and see if wc3 gets it...we'll see.
Methinks it would be easier to just use WC3's draw-text function.
Assuming they didn't get stupid and forget
everything they learned from Starcraft, they're likely storing text messages in some structure for whenever it needs to be redrawn. If you don't want to have your text wiped at the next update, I'd suggest getting the message stored into that structure. Either run code in w3 like Zakath said or use WriteProcessMemory to poke the message and supporting bookkeeping directly into the right structure.
yeh i got no idea how to do that ;)
check and see what happens when you send a message and then duplicate it?
big fat nothing. the tcp/ip interface matches as well so it discards the packet is my guess. if anyone can help get straight writing the war3's directx window working, i'd love it.
good luck with that, though I rember some guy I know was doing something like that. I will talk to him next time he is online and see if I can get him to post some info on it.
Quote from: Laff on October 13, 2004, 06:10 PM
big fat nothing. the tcp/ip interface matches as well so it discards the packet is my guess. if anyone can help get straight writing the war3's directx window working, i'd love it.
Back in the Warcraft III beta, I just passed a faked info chat event directly to the handler for Battle.net chat events (in order to display a string). Somewhat of an ugly hack I suppose, but it worked. You might be able to do something similar, still.
how exactly did you do this? exactly what i'm looking for ;)
Quote from: Laff on October 14, 2004, 12:07 AM
how exactly did you do this? exactly what i'm looking for ;)
I built a chat event packet and called the handler function with the appropriate parameters.
To do that, you'll probably have to find out what the address of the chat event handler is, and what parameters it takes. As I recall, you also need to get the class instance for Warcraft III's singleton BattleNet class and grab a critical section while calling the handler.
Of course, my information is several years old, dating back to the early beta. Things might work differently now.
i may be 8 months from having my hardware engineering and software engineering degrees (both bachelors) but i have no idea how to go about doing that.
Quote from: Laff on October 14, 2004, 03:50 AM
i may be 8 months from having my hardware engineering and software engineering degrees (both bachelors) but i have no idea how to go about doing that.
It doesn't count if you get your degrees from those non-accreditted universities that send you spam e-mail.
oregon institute of technology thx.
reverse engineering, laff...you've gotta take it apart