Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: Death-Merchant on September 12, 2003, 05:25 PM

Title: Accounts
Post by: Death-Merchant on September 12, 2003, 05:25 PM
How do you make a bot make accounts on connect?
Title: Re:Accounts
Post by: Camel on September 12, 2003, 05:29 PM
0x2A (http://camel.ik0ns.com:86/wiki/index.php/BNCS_0x2A) (SID_CREATEACCOUNT) or 0x3D (http://camel.ik0ns.com:86/wiki/index.php/BNCS_0x3D) (SID_CREATEACCOUNT2)

[edit] Also note that when creating an account, the password should only be hashed once.
Title: Re:Accounts
Post by: hismajesty on September 12, 2003, 06:11 PM
http://forum.valhallalegends.com/phpbbs/index.php?board=17;action=display;threadid=2316
Title: Re:Accounts
Post by: Zakath on September 12, 2003, 09:48 PM
This is a bit old, but it should still work:

void Connection::ProcPacket29( BYTE *data, int size ) {
   DWORD Result = *(LPDWORD)(data + 4);

   if ( !Result ) {
      ErrorMessage( "Login failed, attempting to create account..." );
   
      DWORD Hash[6];
      HashData(Hash, cfg.Password, strlen(cfg.Password));
   
      Insert( Hash[0] );
      Insert( Hash[1] );
      Insert( Hash[2] );
      Insert( Hash[3] );
      Insert( Hash[4] );
      Insert( cfg.AccountName );
      SendPacket(0x3D);
      return;
   }
   LogonMessage( "Login Accepted!" );
}