4月22日
GameDesire (Manual Part 3)
4.11.
room_info_players
205RRRR2104091
room_info_players(gameId, roomId, short=0,access=’’)
That function is used to look for players playing at given room
|
gameId
|
That parameters describe game that we are interested in
|
|
roomId
|
Room number
|
|
short
|
Data returned by that function can be either in short of
long form
|
|
access
|
If set we use access field from
room configuration – when admins check is not checked only requests
with valid access code will get extra data about admins in the room
|
Function return list of players at the tables. Each player
has state flag – 0 means player does not play, 1 –he.she play at one table, 2
he/she plays at two or more tables.
|
That function returns eg, for query room_info_players(game27,0,0)
room_info_players =
{
ret
= 1
count
= 1
tbl
=
{
0
=
{
name
= wwylon1972
state
= 0
}
}
}
And for for query: action=
room_info_players(game27,0,1)
room_info_players =
{
ret
= 1
count
= 1
tbl
= 0 wwylon1972
}
|
4.12.
player_results
player_results(player,gameId,ranking=0,ladder=0,short=0)
That function is used to look for player results. If game
has ranking and ladder – you can retrieve ranking change for given player(user).
|
player
|
Login of player
|
|
gameId
|
That parameters describe game that we are interested in
|
|
ranking
|
Set tit to 1 to get ranking change
|
|
ladder
|
Set tit to 1 to get ladder change
|
|
short
|
Short format of returned ranking/ladder date
|
|
That function returns eg, for query room_info_players(game27,0,0)
player_results =
{
ret
= 1
tbl
=
{
RF
=
{
desc
= Rating
val = 0
}
games_completed
=
{
desc
= Games Completed
val = 0
}
games_abandoned
=
{
desc
= Games Abandoned
val = 0
}
wins
=
{
desc
= Wins
val = 0
}
loses
=
{
desc
= Loses
val = 0
}
streak
=
{
desc
= Streak
val = 0
}
max_break
=
{
desc
= Max Break
val = 0
}
}
ranking_count
= 9
ranking
= 5034|5049|4987|4974|4961|4948|4948|4961|4948
ladder_count
= 9
ladder
= 3|3|3|3|3|3|3|2|3
|
4.13.
player_archive
player_archive(player,gameId, start=0,count=100)
That function is used to look for games played by player
|
player
|
Login of player
|
|
gameId
|
That parameters describe game that we are interested in
|
|
start
|
Start from that position
|
|
count
|
Get so much fields
|
|
That function returns eg, for player_archive(Object,game27,0,3)
player_archive =
{
ret
= 1
count
= 3
tbl
=
{
0
=
{
date_end
= 2004-01-24 22:29:37
game_time
= 14
login
= Object;samuel
winner
= 0;1
rating
= 0;0
ladder
= 0;0
rated_game
= 0
end_mode
= resign
max_break
= 0;0
old_rating
= 0;0
old_ladder
= 0;0
}
1
=
{
date_end
= 2004-01-24 22:26:47
game_time
= 71
login
= Object;bromba
winner
= 0;1
rating
= 0;0
ladder
= 0;0
rated_game
= 0
end_mode
= resign
max_break
= 0;1
old_rating
= 0;0
old_ladder
= 0;0
}
2
=
{
date_end
= 2004-01-09 11:55:22
game_time
= 124
login
= Besti;Object
winner
= 1;0
rating
= 0;0
ladder
= 0;0
rated_game
= 0
end_mode
= disconnect
max_break
= 0;0
old_rating
= 0;0
old_ladder
= 0;0
}
}
}
|
4.14.
player_opponents
player_opponents(player,game,sort='',start=0,count=10,opponent='')
That function is used to look for player opponents.
|
player
|
Login of player
|
|
gameId
|
That parameters describe game that we are interested in
|
|
sort
|
How should we sort results
|
|
start
|
Start from that position
|
|
count
|
Get so much fields
|
|
opponent
|
Name of the opponent that we look for
|
W – means wins
L -
means loses
D -
means draws
|
That function returns eg, for player_opponents(Object,game22,,0,10)
player_opponents =
{
ret
= 1
count
= 3
start
= 0
tbl
=
{
0
=
{
login2
= bromba
w
= 5
l
= 1
d
= 0
}
1
=
{
login2
= nexti
w
= 1
l
= 0
d
= 0
}
2
=
{
login2
= samuel
w
= 6
l
= 24
d
= 0
}
}
}
|
4.15. private_room
Deprecated – not available