Valhalla Legends Forums Archive | Battle.net Bot Development | Identifying which game a CDKey is for based on CDKey possible?

AuthorMessageTime
LockesRabb
Is it possible to identify which game a CDKey is for based on the CDKey?
February 19, 2007, 4:01 AM
BreW
CDKey length. OFCOURSE, this doesn't apply for D2DV/W2BN and expansion keys. It's either 13, 16, or 26. dun dun dun
February 19, 2007, 4:05 AM
HdxBmx27
You can also decode the cdkey and guestmate based on the product key.
~Hdx
February 19, 2007, 4:31 AM
LockesRabb
How would that be done? The reason why I ask is because rather than have users put in D2DV, SEXP, etc, I'd like for users to be able to just put in a CDKey, and have the bot automatically determine which product it is for...
February 19, 2007, 4:34 AM
BreW
@hdx, you mean product value*?  haha, that's a good idea acually. I never played around with product values besides that of starcraft.... so... You would have to do some research on your own, Kyro. Try decoding D2DV, D2XP, W2BN, WAR3, and W3XP keys, then compare the product value of them (should be the first two digits). You can use the BNCSUtil function "kd_quick()", or use your own D2-based cdkey decoder. Even though Diablo 2 and Warcraft 3 keys look very different lengths when encoded, they still decode using the DecodeD2 function, and come out in a similar decoded cdkey form. (product value, public value, private value.) As for the cdkey sorter itself, I know that Fleet-'s bots all use that. For example, you wouldn't have to set what client you need, it would determine what client to load based on cdkey length. Then again, it doesn't support Diablo 2, because it assumes warcraft 2 instead, and it doesn't support ANY expansion keys. So it'd be better off to do what his new chatbot (a&o) does, where the user would throw in a bunch of keys and display whatever ones based on what client is selected.
February 19, 2007, 4:53 AM
HdxBmx27
Public Key/Value The terms are interchangeable.
And No, WC3 cdkeys are not decoded by the DecodeD2() function, wc2! cdkeys are because they use the same encoding/decoding method (essentially they are the same types of keys, jsut a few changes)
Just get a list of cdkeys and go through them deocding them.
I've never done much research into it, but each product should have a difrent product key.
Actually I think SC has 2 products... Oh well.
If you guys find anything out, post it, might be your 1st real contribution to this community! <3
~Hdx
February 19, 2007, 4:57 AM
l2k-Shadow
I spend some time on this a while back, the results made according to the key's product value:

[code]
bool determinegame(long prodval, char* game)
{
switch (prodval)
{
case 0x01:
{
sprintf(game, "STAR");
return true;
}
case 0x02:
{
sprintf(game, "STAR");
return true;
}
case 0x04:
{
sprintf(game, "W2BN");
return true;
}
case 0x06:
{
sprintf(game, "D2DV");
return true;
}
case 0x0A:
{
sprintf(game, "D2XP");
return true;
}
case 0x0E:
{
sprintf(game, "WAR3");
return true;
}
case 0x12:
{
sprintf(game, "W3XP");
return true;
}
default:
return false;
}
}
[/code]
February 19, 2007, 5:10 AM
LockesRabb
[quote author=l2k-Shadow link=topic=16352.msg165184#msg165184 date=1171861802]
I spend some time on this a while back, the results made according to the key's product value:

[code]
bool determinegame(long prodval, char* game)
{
switch (prodval)
{
case 0x01:
{
sprintf(game, "STAR");
return true;
}
case 0x02:
{
sprintf(game, "STAR");
return true;
}
case 0x04:
{
sprintf(game, "W2BN");
return true;
}
case 0x06:
{
sprintf(game, "D2DV");
return true;
}
case 0x0A:
{
sprintf(game, "D2XP");
return true;
}
case 0x0E:
{
sprintf(game, "WAR3");
return true;
}
case 0x12:
{
sprintf(game, "W3XP");
return true;
}
default:
return false;
}
}
[/code]
[/quote]

Translation to VB:

[code]Public Function DetermineGame(ProdVal As Long) As String
    Select Case ProdVal
        Case &H1
            DetermineGame = "STAR"
        Case &H2
            DetermineGame = "STAR"
        Case &H4
            DetermineGame = "W2BN"
        Case &H6
            DetermineGame = "D2DV"
        Case &HA
            DetermineGame = "D2XP"
        Case &HE
            DetermineGame = "WAR3"
        Case &H12
            DetermineGame = "W3XP"
        Else
            DetermineGame = ""
    End Select
End Function[/code]

Question:

[quote author=l2k-Shadow link=topic=16352.msg165184#msg165184 date=1171861802]
I spend some time on this a while back, the results made according to the key's product value:

[code]
case 0x01:
{
sprintf(game, "STAR");
return true;
}
case 0x02:
{
sprintf(game, "STAR");
return true;
}[/code][/quote]

Shouldn't 0x02 be SEXP?

[Edit]

Spoke to l2-Shadow via AIM. His answer: "No, it's STAR because Starcraft has two product values. That and plus Broodwar does not use cdkeys". My apologies, Shadow, for asking a very stupid question about SEXP.
February 19, 2007, 5:18 AM
HdxBmx27
There is no such thing as a SEXP cdkey.
Also, Prod 0x02 is also JSTR IIRC.
Also EWWWW MY EYES, THEY BURN!
:P Just had to comment on the code.
~Hdx
February 19, 2007, 5:22 AM
l2k-Shadow
[quote author=Hdx link=topic=16352.msg165187#msg165187 date=1171862555]
There is no such thing as a SEXP cdkey.
Also, Prod 0x02 is also JSTR IIRC.
Also EWWWW MY EYES, THEY BURN!
:P Just had to comment on the code.
~Hdx
[/quote]

seeing as JSTR uses the same keys as STAR, your recall incorrectly.
February 19, 2007, 6:06 AM
Barabajagal
All JSTR keys work for STAR, but not all STAR keys work for JSTR. There is some difference, and it may be that 0x01 or 0x02.
February 19, 2007, 6:16 AM
MyStiCaL
[quote author=[RealityRipple] link=topic=16352.msg165189#msg165189 date=1171865809]
All JSTR keys work for STAR, but not all STAR keys work for JSTR. There is some difference, and it may be that 0x01 or 0x02.
[/quote]

I've never had a problem using any STAR key with JSTR, i even have JSTR installed..
February 19, 2007, 8:14 AM
Barabajagal
I'm pretty sure if you search this forum, you'll find some topics on it.

[quote author=Ringo link=topic=13318.msg145334#msg145334 date=1139535178]
Is this a temp thing? (or just me?)
Product 2 SC CDkeys got disabled from JSTR today.
This morning work, tonight not work -.-
I kinda hope same happens to SC, even tho i have mb's of product 2 keys :)
[/quote]

The post was removed, but you can see a quote of it here.
February 19, 2007, 8:35 AM

Search