• Welcome to Valhalla Legends Archive.
 

Adding Game Creation Support

Started by Nodens, September 18, 2003, 01:23 PM

Previous topic - Next topic

Nodens

This is my current sub for creating a game:

Public Sub CreateGame()
   gameinfo = "44,14,6,2,2,1,57d83ff4,4,," & UserName & "The Lost Temple"
   With pBuffer
       .InsertDWORD &H0
       .InsertDWORD &H0
       .InsertWORD &H2
       .InsertWORD &H1
       .InsertDWORD &H1
       .InsertDWORD &H0
       .InsertNTString gamename
       .InsertNTString password
       .InsertNTString gameinfo
       .sendPacket WS, &H1C
   End With
End Sub

It only does Melee right now, and I'm very unsuccessfully trying to get it to do Ladder as well. Can someone help me figure out what all the other variables are for, I'd really appriciate it.

Nodens

Ok, here's a question. When I created in melee, 2 mins was the time limit and I could give dc's, wins, or losses to any account I used within that game. In ladder tho, it makes the game..2 accounts join it, but after the one set to win always goes to the void and the other is fine. Any explanation on that since I can't packet log ladder games over and over without a friend or something to join it?

iago

#2
AFAIK, ladder games require a loser and a winner.. I would assume somebody has to lose a game before anybody else can win it.
This'll make an interesting test for broken AV:
QuoteX5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*


Nodens

Then what would I need to do to get one of them to win? Perhaps there's a way I could skip the whole win/lose bit and just dc the loser?

Adron

Quote from: Nodens on September 19, 2003, 12:02 AM
Then what would I need to do to get one of them to win? Perhaps there's a way I could skip the whole win/lose bit and just dc the loser?

I'd recommend packet logging it. I've dealt with this a year or two ago and have it documented somewhere on a hard drive that I have now retired to sitting in a box. I know I could get the answers to your question in very little time just grabbing a packet log to winning/losing a ladder game though. You only need a single log of a win and a single log of a loss, although it would be preferable if you had both logs from the same game. And since I could do that, I'm sure you could too. You're not stupid, are you?

UserLoser

Quote from: Nodens on September 19, 2003, 12:02 AM
Then what would I need to do to get one of them to win? Perhaps there's a way I could skip the whole win/lose bit and just dc the loser?

Stay in the game for 2 minutes or longer, then send SID_GAMERESULT (0x2c) which includes the users in the game, the results for each user in the game, and various information about the game.