Valhalla Legends Forums Archive | Battle.net Bot Development | Yes finally!! (0x50)

AuthorMessageTime
SubLiminaL_WolF
ok i get it finally
[code]
on connect
packetbuf.insert((int)0);
               packetbuf.insert("68XI", 4); //platform
               packetbuf.insert("PXES", 4); //product
               packetbuf.insert((int)0xc7); //version byte
               packetbuf.insert((int)0);
               packetbuf.insert((int)0);
               packetbuf.insert((int)0);
               packetbuf.insert((int)0);
               packetbuf.insert((int)0);
               packetbuf.insert("USA"); //country abbreviation
               packetbuf.insert("United States"); //country name
packetnuf.sendpacket(s, 0x50);
[/code]
i think thats right then
[code]
while connected if 0x50 i dunno what to put inside the packet when it is sent do i put the 0x51 info and send 0x51?
[/code]
tell me if im wrong anywhere in here
May 8, 2003, 3:26 AM
SubLiminaL_WolF
ok now i get a checkversion() failed! i think i dunno whgat it is cuz i have the new hash
[code]
tick = GetTickCount();
   send(s, "\x1", 1, 0);
   packetbuf.insert((int)0);
   packetbuf.insert("68XI", 4); //platform
   packetbuf.insert("PXES", 4); //product
   packetbuf.insert((int)0xc7); //version byte
   packetbuf.insert((int)0);
   packetbuf.insert((int)0);
   packetbuf.insert((int)0);
   packetbuf.insert((int)0);
   packetbuf.insert((int)0);
   packetbuf.insert("USA"); //country abbreviation
   packetbuf.insert("United States"); //country name
   packetbuf.sendpacket(s, 0x50);



then if connected


case 0x50:
               //Mpq name & hash command
               strcpy(mpqname, buffer + 12);
               strcpy(hashcmd, buffer + 25);
               if(!CheckRevision("star\\starcraft.exe", "star\\storm.dll", "star\\battle.snp", hashcmd, &version, &checksum, exeinfo, mpqname)){
                  AppendText(IDC_CHATWND, WHITE, "%s", timestamp);
                  AppendText(IDC_CHATWND, RED, "CheckRevision() failed!\n");
                  Disconnect();
                  return;
               }
               AppendText(IDC_CHATWND, WHITE, "%s", timestamp);
               AppendText(IDC_CHATWND, WHITE, "Checking version & Cdkey...\n");
               break;
            case 0x51:
               //Version check result
               if(buffer[4] != 0x00){
                  AppendText(IDC_CHATWND, WHITE, "%s", timestamp);
                  AppendText(IDC_CHATWND, RED, "Version & Cdkey check failed!\n");
                  Disconnect();
                  return;
               }
               /*packetbuf.sendpacket(s, 0x14);
               packetbuf.sendpacket(s, 0x2d);
               packetbuf.insert((int)0x1b);
               packetbuf.insert((int)0);
               packetbuf.insert("bnserver.ini");
               packetbuf.sendpacket(s, 0x33);*/
               packetbuf.sendpacket(s, 0x25);
               packetbuf.sendpacket(s, 0x3a);
               break;
[/code]
i get the check revision() fail what do you think it is?
May 8, 2003, 3:54 AM
tA-Kane
Breakpoint CheckRevision() and follow it until it returns false, silly.
May 8, 2003, 8:32 AM
SubLiminaL_WolF
how would i breakpoint it i can follow it with visually with appendtext(blach blah "Test1...\n");
May 8, 2003, 9:14 AM
SubLiminaL_WolF
nvm
i think there is something wrong with
[code]
//Mpq name & hash command
strcpy(mpqname, buffer + 12);
strcpy(hashcmd, buffer + 25);
[/code]
May 8, 2003, 4:22 PM
Camel
make sure all of the vars you are passing to checkrevision() are correct (breakpoint it)
if they are, try using fully qualified paths for the files
it's also a good idea to add code to check if the files exist before even attempting to call checkrevision
May 9, 2003, 12:13 AM
Kp
[quote author=Camel link=board=17;threadid=1253;start=0#msg9484 date=1052439204]
make sure all of the vars you are passing to checkrevision() are correct (breakpoint it)
if they are, try using fully qualified paths for the files
it's also a good idea to add code to check if the files exist before even attempting to call checkrevision
[/quote]It'd be an even better idea to use a version which returns a result code. :) For example, zero = success, one = bad MPQ name, two = bad hash command, three = missing file, etc.
May 9, 2003, 4:35 AM
tA-Kane
[quote author=Camel link=board=17;threadid=1253;start=0#msg9536 date=1052460302]There is no "magick pixie dust". There is, however, IBM. ;)[/quote]
May 9, 2003, 6:10 AM
St0rm.iD
lol
May 11, 2003, 3:01 AM

Search