Valhalla Legends Archive

Programming => General Programming => Visual Basic Programming => Topic started by: peoman on August 25, 2006, 06:52 PM

Title: [VB.NET] Writing a CD-Key Changer
Post by: peoman on August 25, 2006, 06:52 PM
I want to write a cd-key changer for Diablo II, Starcraft, Warcraft III.
I don't know where to start. I am very noob. :-[

I already know that the CD-Key is encoded inside the mpq files.

Warcraft III -> war3.mpq     (Owner + CD-Key)
                     war3x.mpq   (Exp CD-Key)
Diablo II      -> d2sfx.mpq    (Owner + CD-Key)
                     d2char.mpq  (Exp CD-Key)
Starcraft     -> StarDat.mpq (Owner + CD-Key)

Does strom.dll have the functions for decoding end encoding the CD-Key?
If yes, how can i import them in VB.NET?
Can anyone help me ? :'(
Maybe there is a *.ocx file that i can add as referance and save me from all that work.
I already have mpqcontrol.ocx and i can mange mpq files (extract & add files...).
Title: Re: [VB.NET] Writing a CD-Key Changer
Post by: l)ragon on August 25, 2006, 08:11 PM
Should have posted this in the .Net forum.

I believe there was a d2 re-encoder posted on the forum somewhere try searching it.
Title: Re: [VB.NET] Writing a CD-Key Changer
Post by: MyndFyre on August 26, 2006, 03:00 AM
Quote from: l)ragon on August 25, 2006, 08:11 PM
Should have posted this in the .Net forum.
Not necessarily.

Importing functions in VB.NET has two patterns: you can still use the Declare syntax from VB6, or you can use the .NET pattern:


<DllImport("storm.dll")> _
Public Shared Function DoSomething(ByVal num As Integer) As Integer
Title: Re: [VB.NET] Writing a CD-Key Changer
Post by: peoman on August 26, 2006, 05:52 AM
Quote from: l)ragon on August 25, 2006, 08:11 PM
Should have posted this in the .Net forum.

Quote
Rules:

1) No flaming and/or blatant stupidity.
2) If you post anything that is related to another language in this forum, I am going to recommend that you be banned.  See the Visual Basic?  That means Visual Basic only.
3) If you post anything that is VB or VB .NET specific, prepend your topic's subject with [VB], [VB .NET] respectively.
4) If you call it Visual Basics or abbreviate it as "vB", I will have you killed.

I think i have posted in the correct forum.
Title: Re: [VB.NET] Writing a CD-Key Changer
Post by: Joe[x86] on August 27, 2006, 01:12 AM
This is dealing with general Visual Basic stuff, nothing specific to the .NET platform so I think it goes here.
Title: Re: [VB.NET] Writing a CD-Key Changer
Post by: peoman on August 27, 2006, 09:29 AM
After a little search in google, i found that storm.dll doesn't decode or encode the cd-key. Only controls the mpq files.
I also found that for Diablo II
d2sfx.mpq\data\global\sfx\cursor\curindx.wav     (   User Name   )
d2sfx.mpq\data\global\sfx\cursor\wavindx.wav    (  Regular key  )
d2char.mpq\data\global\chars\am\cof\amblxbow.cof ( Expansion key )

Does anyone knows how the f@$% can i decode and encode the CD-Key in these files????