PDA

View Full Version : How do you read the Player Flags and Game Flags from querying a server?



taterSALAD
March 16th, 2010, 01:05 AM
[player_flags] => 1573916676,1090
[game_flags] => 8235

I get these, and they change from gametype to gametype, and I'd like to know how to parse/read them.
Does anybody know how to?

Halo CE and Halo PC servers.

Vicky
March 16th, 2010, 08:00 AM
Check out the source from a Querytool: http://nikon.bungie.org/news.html?item=7667 (the release the package link).

taterSALAD
March 17th, 2010, 06:17 AM
Thanks for that! I checked the source out, but I didn't find anything in it that parsed the data received. It gets the variable, but doesn't do anything with it.

taterSALAD
March 20th, 2010, 12:55 AM
Does anybody know how to do it?

Vicky
March 22nd, 2010, 06:27 PM
The data is parsed to the si struct in the ParseInfo function, that data is printed by the PrintBody function. I wouldn't bother that much how the data is parsed, that's a bunch of pointer operations...

What are you programming in btw?

taterSALAD
March 24th, 2010, 06:59 AM
PHP. I'm pulling the data from the server, and spitting out the relevant data.

Vicky
March 24th, 2010, 08:38 AM
Can't be that hard, i've seen sites do that already.

taterSALAD
March 24th, 2010, 04:49 PM
I'm pulling the data, and I get it, but I do not know how to parse the two variables I mentioned in the first post.

I get Players, Map name, etc, but I don't know the meaning of game_flags or player_flags

Vicky
March 24th, 2010, 07:43 PM
Ah yes... that's pretty specific and i have no idea, perhaps Korn can help you out.. if he wants to share that info when available... What more would you need anyway from all the data you're getting already?

taterSALAD
March 25th, 2010, 04:19 PM
Here's the page I got so far.

http://www.combatexpertsclan.com/index.php?option=com_jumi&fileid=16&Itemid=70

What I'm trying to get it more information, such as flag captures to win, etc..

Vicky
March 25th, 2010, 07:28 PM
Nice job.

taterSALAD
March 26th, 2010, 08:01 PM
I'm surprised that nobody else has replied to this. Does anybody even know how to do this? Lol

I'd really appreciate the help, and will receive a thanks Easter Egg in HTML XD

Limited
March 26th, 2010, 08:45 PM
The gameflags are definitely in memory. Perhaps you are looking at the wrong address?

Vicky
March 27th, 2010, 08:05 AM
Maybe nobody ever looked into the queried player/game-flag data, stuff like vehicle respawn time should be there of course. Maybe PM Korn to get his attention... or try to find out yourself..

taterSALAD
March 27th, 2010, 03:52 PM
The gameflags are definitely in memory. Perhaps you are looking at the wrong address?


I'm not memory hacking here, I'm simply querying the server. Let me show you the results.




GameQuery Data:
Array
(
[host_string] => 8.6.76.127:2302
[server_info] => Array
(
[hostname] => ! =CE= [CombatExpertsClan.com] Extinction || (^_^) ||
[gamever] => 01.00.09.0620
[hostport] =>
[maxplayers] => 16
[password] => 0
[mapname] => extinction
[dedicated] => 1
[gamemode] => openplaying
[game_classic] => 0
[numplayers] => 12
[gametype] => Slayer
[teamplay] => 1
[gamevariant] => POQbum_Slayer
[fraglimit] => 75
[player_flags] => 1499840516,1090
[game_flags] => 26
)

[player_info] => Array
(
[0] => Array
(
[player_] => FRDM~Yakob
[score_] => 0
[ping_] =>
[team_] => 0
)

[1] => Array
(
[player_] => halojb1
[score_] => 0
[ping_] =>
[team_] => 0
)

[2] => Array
(
[player_] => Senator
[score_] => 2
[ping_] =>
[team_] => 0
)

[3] => Array
(
[player_] => Droid
[score_] => 0
[ping_] =>
[team_] => 1
)

[4] => Array
(
[player_] => WileECoyote
[score_] => 8
[ping_] =>
[team_] => 0
)

[5] => Array
(
[player_] => Prototype
[score_] => 14
[ping_] =>
[team_] => 1
)

[6] => Array
(
[player_] => rush
[score_] => 5
[ping_] =>
[team_] => 0
)

[7] => Array
(
[player_] => DrkOne
[score_] => 0
[ping_] =>
[team_] => 1
)

[8] => Array
(
[player_] => [Mod] King
[score_] => 7
[ping_] =>
[team_] => 1
)

[9] => Array
(
[player_] => Viper
[score_] => 0
[ping_] =>
[team_] => 1
)

[10] => Array
(
[player_] => =SCC=Badboy
[score_] => 0
[ping_] =>
[team_] => 0
)

[11] => Array
(
[player_] => Chobo101
[score_] => 5
[ping_] =>
[team_] => 1
)

)

[team_info] => Array
(
)

)



I am trying to figure out what

[player_flags] => 1499840516,1090
[game_flags] => 26 means, and how to parse it.

Vicky
March 27th, 2010, 10:28 PM
Ask the Korn! If he don't know nobody does :)

taterSALAD
March 29th, 2010, 08:00 PM
I've done exactly that, but he doesn't really know. He did mention that it was documented at one time, or so he thought. I'm beginning to feel like this is going to be a fruitless effort.

Vicky
March 30th, 2010, 07:49 PM
I figured you would have done a search already... i just searched for 'halo gameflags' and got this:
http://cpansearch.perl.org/src/LINK/Net-Halo-Status-0.02/lib/Net/Halo/Status.pm

There's a part for game and player flags, with the appropriate shifting and ANDing of the data... hope that helps.

taterSALAD
March 31st, 2010, 07:12 AM
I spent forever searching for it, and you find it in a matter of seconds? ... Epic fail on my part. I really appreciate it! Now, to seek help elsewhere as I'm unfamiliar with Python scriping...

Vicky
March 31st, 2010, 07:45 AM
If you can write in php/C i think you should be able to make sense of it...

taterSALAD
March 31st, 2010, 04:31 PM
The syntax is very similar, yes, however I don't quite understand what it's doing. I'm not an expert by PHP, by a long shot, I'm actually only an "intermediate beginner" so I don't understand some of the more complex stuff, yet.

Limited
March 31st, 2010, 10:36 PM
I'm not memory hacking here, I'm simply querying the server. Let me show you the results.
:shake:

I suggest you take an interest into the code called sub decode_player_flags

taterSALAD
April 2nd, 2010, 07:18 PM
:shake:

I suggest you take an interest into the code called sub decode_player_flags

.. I saw that, did you not read the posts in between those?


The syntax is very similar, yes, however I don't quite understand what it's doing. I'm not an expert by PHP, by a long shot, I'm actually only an "intermediate beginner" so I don't understand some of the more complex stuff, yet.

Not trying to dis-respect by any means.

Vicky
April 2nd, 2010, 09:11 PM
<< and >> is a bitshift operation, >>2 e.g. is shift right 2 bits, and & is a logical AND operation, & if >ou underst& th@ >ou'll b on ur w4>...

taterSALAD
April 3rd, 2010, 08:31 PM
Thank you. I've gotten close but can't think of a decent method to implement. I really appreciate the help Vicky!