Valhalla Legends Archive

Programming => General Programming => Visual Basic Programming => Topic started by: phvckmeh on March 31, 2004, 10:08 PM

Title: Sending Simple Ingame Packets.
Post by: phvckmeh on March 31, 2004, 10:08 PM
alright im making sorta a stand-alone mod for DIABLO2
basicly what it will do is send that packet that displays the time over your head. ive already got that worked out, and i know what packet i need to send, but i need to know how to accutally send the packet ingame diablo 2

ive tried d2hackit but i really need to do this in VB

basicly what happens is ever 1 seconds, a timer goes off and i want it to send the packet (which i know already) to the server, this way i have a constant "clock" overhead

thx guys 8)
Title: Re:Sending Simple Ingame Packets.
Post by: Eli_1 on April 01, 2004, 01:30 PM
You need to use code injection, I'll try to find the article on it I found a couple weeks ago and post it here if I can.
Title: Re:Sending Simple Ingame Packets.
Post by: Noodlez on April 01, 2004, 10:18 PM
You can use Adron's winsock hook OCX. I used to use it, it worked wonders.
Title: Re:Sending Simple Ingame Packets.
Post by: phvckmeh on April 01, 2004, 10:41 PM
where can i find it? search returned nothing
Title: Re:Sending Simple Ingame Packets.
Post by: Adron on April 02, 2004, 09:48 AM
Hmm... Well, I'm not sure where that is at. Where did you get it Noodlez?
Title: Re:Sending Simple Ingame Packets.
Post by: Noodlez on April 02, 2004, 01:45 PM
Quote from: Adron on April 02, 2004, 09:48 AM
Hmm... Well, I'm not sure where that is at. Where did you get it Noodlez?
I'm pretty sure you gave me a link to it. One time Grok sent it to me, but it was missing a DLL and didn't work properly.
Title: Re:Sending Simple Ingame Packets.
Post by: Adron on April 02, 2004, 10:33 PM
Ah. Well, try grabbing WSHook.dll (http://home.adron.org/WSHook.dll), Winsockhook.ocx (http://home.adron.org/Winsockhook.ocx) and WinsockhookSamples.zip (http://home.adron.org/WinsockhookSamples.zip).
Title: Re:Sending Simple Ingame Packets.
Post by: Adron on April 02, 2004, 10:34 PM
Quote from: Noodlez on April 02, 2004, 01:45 PM
Quote from: Adron on April 02, 2004, 09:48 AM
Hmm... Well, I'm not sure where that is at. Where did you get it Noodlez?
I'm pretty sure you gave me a link to it. One time Grok sent it to me, but it was missing a DLL and didn't work properly.

What's the date for your files?
Title: Re:Sending Simple Ingame Packets.
Post by: Paul on April 03, 2004, 12:21 AM
This may help you also: http://www.blizzhackers.com/phpBB2/viewtopic.php?t=121077 and http://www.blizzhackers.com/phpBB2/viewtopic.php?t=134010
Title: Re:Sending Simple Ingame Packets.
Post by: phvckmeh on April 05, 2004, 01:05 AM
example?
Title: Re:Sending Simple Ingame Packets.
Post by: Noodlez on April 07, 2004, 12:21 AM
Quote from: Adron on April 02, 2004, 10:33 PM
Ah. Well, try grabbing WSHook.dll (http://home.adron.org/WSHook.dll), Winsockhook.ocx (http://home.adron.org/Winsockhook.ocx) and WinsockhookSamples.zip (http://home.adron.org/WinsockhookSamples.zip).

Those are the exact files you sent me.
Title: Re:Sending Simple Ingame Packets.
Post by: phvckmeh on April 13, 2004, 02:09 PM
thx now how would i use em??
Title: Re:Sending Simple Ingame Packets.
Post by: Adron on April 13, 2004, 03:50 PM
It should be possible to unpack them all, regsvr32 the ocx, edit the sample sources to match your configuration and then hit Run.
Title: Re:Sending Simple Ingame Packets.
Post by: Tuberload on April 13, 2004, 03:56 PM
Quote
thx now how would i use em??
Quote from: Adron on April 13, 2004, 03:50 PM
It should be possible to unpack them all, regsvr32 the ocx, edit the sample sources to match your configuration and then hit Run.

<headvysarcasm>Whoa, to much to fast...can't...absorb...information. ;D</heavysarcasm>
Title: Re:Sending Simple Ingame Packets.
Post by: Eli_1 on April 13, 2004, 04:24 PM
Quote from: Tuberload on April 13, 2004, 03:56 PM
Quote
thx now how would i use em??
Quote from: Adron on April 13, 2004, 03:50 PM
It should be possible to unpack them all, regsvr32 the ocx, edit the sample sources to match your configuration and then hit Run.

Whoa, to much to fast...can't...absorb...information. ;D
Translation:

1.) Unzip the source in "WinsockHookExamples.zip
2.) Start -> Run -> regsvr32 somepath\WinsockHook.OCX
3.) View source that comes with "WinsockHookSamples.zip"
4.) Edit it to fit your needs.
5.) Run it.
Title: Re:Sending Simple Ingame Packets.
Post by: Adron on April 13, 2004, 04:50 PM
Something like that. There are two samples. One should run without modification - it just connects some winsocks to each other, then hooks into the data stream using the ocx.  The other might need some modification - it hooks a battle.net game, then parses the 0f messages and produces bot-like output in a window. You may have to change the window caption to hook.
Title: Re:Sending Simple Ingame Packets.
Post by: Tuberload on April 13, 2004, 05:28 PM
Quote from: Eli_1 on April 13, 2004, 04:24 PM
Quote from: Tuberload on April 13, 2004, 03:56 PM
Quote
thx now how would i use em??
Quote from: Adron on April 13, 2004, 03:50 PM
It should be possible to unpack them all, regsvr32 the ocx, edit the sample sources to match your configuration and then hit Run.

Whoa, to much to fast...can't...absorb...information. ;D
Translation:

1.) Unzip the source in "WinsockHookExamples.zip
2.) Start -> Run -> regsvr32 somepath\WinsockHook.OCX
3.) View source that comes with "WinsockHookSamples.zip"
4.) Edit it to fit your needs.
5.) Run it.

Thank you for the translation. Here is a translation of my post: I was being sarcastic. :P
Title: Re:Sending Simple Ingame Packets.
Post by: phvckmeh on April 13, 2004, 07:33 PM
alright what happens is i start d2, and run the example and click "hook" then d2 terminated with "we have a big problem here guys" (fron d2loader)

what i want to do is sent a certain packet, while im IN GAME like running around with a character...
Title: Re:Sending Simple Ingame Packets.
Post by: Dyndrilliac on April 13, 2004, 10:18 PM
If your using d2loader shouldn't you be able to just inject your own code into the game to load upon the game initializing? Or am I thinking of another d2 alteration...
Title: Re:Sending Simple Ingame Packets.
Post by: phvckmeh on April 15, 2004, 04:43 PM
i just need to send a certain *different* packet every couple seconds
Title: Re:Sending Simple Ingame Packets.
Post by: Adron on April 15, 2004, 05:12 PM
So, does it work without d2loader? And what does the problem message mean?
Title: Re:Sending Simple Ingame Packets.
Post by: Soul Taker on April 15, 2004, 07:54 PM
It seems really buggy to me =/  if I click unhook or close the demo, it crashes the game.  Sometimes the game will just vanish randomly and my monitor won't switch refresh rates when I was testing it too.
Title: Re:Sending Simple Ingame Packets.
Post by: Noodlez on April 16, 2004, 12:24 AM
It worked perfectly when I used it, I can't remember it ever crashing anything... I did load it into d2 while d2hackit was loaded.
Title: Re:Sending Simple Ingame Packets.
Post by: Adron on April 16, 2004, 05:49 AM
At some time, clicking unhook was unsafe and could randomly crash. I thought I'd somewhat fixed that though.
Title: Re:Sending Simple Ingame Packets.
Post by: Spht on April 16, 2004, 01:41 PM
Haven't used it on a long time, but I recall Starcraft crashing if I unhook while the game was connected to Battle.net.

And for Warcraft III, it'd only detect messages being sent, and not those which are received. I could hook/unhook fine though.
Title: Re:Sending Simple Ingame Packets.
Post by: Adron on April 16, 2004, 03:05 PM
Since it just hooks into a few particular API functions, not working for all games is to be expected. Sounds like it'd need to hook some more functions to get Warcraft III receiving...
Title: Re:Sending Simple Ingame Packets.
Post by: Dyndrilliac on April 17, 2004, 10:47 AM
WinInject PacketBuilder (http://files.hackcentral.2ya.com/w096b.zip)

Note: Uses Winsock2, and is a beta.
Title: Re:Sending Simple Ingame Packets.
Post by: Noodlez on April 19, 2004, 12:09 AM
What doesn't use winsock2?
Title: Re:Sending Simple Ingame Packets.
Post by: Dyndrilliac on April 19, 2004, 03:45 AM
Quote from: Noodlez on April 19, 2004, 12:09 AM
What doesn't use winsock2?

Old shitty Windows 95 Designed Programs, which winInject used to be at one point.
Title: Re: Sending Simple Ingame Packets.
Post by: baksoto on June 15, 2005, 02:01 AM
hi all, where can I download this winInject . can please give me the URL
Title: Re: Sending Simple Ingame Packets.
Post by: QwertyMonster on June 15, 2005, 09:38 AM
Please dont bring up dead topics, read the dates.
Title: Re: Sending Simple Ingame Packets.
Post by: Dyndrilliac on June 15, 2005, 04:19 PM
http://www.gamehackers.net/~filedump/Misc/w096b_530.zip
Title: Re: Sending Simple Ingame Packets.
Post by: hismajesty on June 20, 2005, 01:07 PM
Quote from: [Unknown] on June 15, 2005, 09:38 AM
Please dont bring up dead topics, read the dates.

It was a valid question, I see no problem with bringing up old posts if the post is somewhat useful.