Ruben 的个人资料CruzAzul100 ™ MSN Messen...照片日志列表更多 工具 帮助

日志


4月22日

GameDesire (Manual Part 2)

4.6.           room_info

 

room_info(gameId,filter,fields,sort=’’)

 

Basic function to retrieve info about rooms for given game at the server

 

gameId

That parameters describe game that we are interested in

filter

That field will be used to limit searches to one kind of rooms.

Eg. we can fetch only rooms with admin. 

You can use following params: priv, admin, name of languages(eg. English), type of player, vip.

These options can be joined with |.! signs.

| - logical or eg. admin|priv will fetch data for private or rooms with admins.

! – logical not eg.!admin will fetch data for private or rooms with admins,

. – logical and eg admin.vip will return all games that are for vip and has admins.

 

Examples

 

Vip – vip rooms

!vip – remaining(not vip rooms)

 

private – private rooms

!private – not private (public) rooms

 

You can also add additional terms eg.

!private.vip – not private rooms for vip

!private.!vip – not private rooms for not vip (other players)

!private.!vip.admin – not private rooms for not vip with admin

!private.!vip.!admin – not private rooms for not vip without admin

 

You can go even further if you use |

Eg.

!private.vip.admin|private – not private rooms for vip with admin + all private rooms.

 

fields

That parameters describe games that we want to get. In that way we can optimize query. Available queries:

*

We should get all fields for rooms

All

We should get all fields for rooms

Id

Internal id for room

Name

Name of the room

Status

Status of the room – currently we have two flags that can appear here: admin and priv

Players

number of players at room

Max

max. number of players (there are cases that there is more than max number of players at room (reconnection of disconnected players)

 

 

Sort

Returned table can be sorted by different parameters (remember that only by one of returned parameters. Eg: When we sort game by players|name we will get data sorted first by number of players and then by name. If before sort field there is ! – we reverse sort. Eg.  !players|name will first sort descending by number of players and than by game name.

 

 

 

 

That function returns eg, for query room_info(game27,admin,*):

room_info =
        {
                ret = 1
                count = 4
                tbl =
                {
                        0 =
                        {
                                id = 0
                                name = Best Friends
                                status = admin
                                players = 2
                                max = 100
                        }
                        1 =
                        {
                                id = 1
                                name = Pool Party
                                status = admin
                                players = 0
                                max = 100
                        }
                        2 =
                        {
                                id = 2
                                name = The Deep End
                                status = admin
                                players = 0
                                max = 100
                        }
                        3 =
                        {
                                id = 3
                                name = Dust In The Wind
                                status = admin
                                players = 0
                                max = 100
                        }
                }
        }

 

 

4.7.           ranking

Ranking(gameId,secondary='',count=10,start=0,sortBy='')

 

That function retrieves info about ranking for one game

 

gameId

That parameters describe game that we are interested in

secondary

That parameter is used by some games:

·         In single word games it is used to select language,

·         In solitaires – to select variant,

·         In pinballs – to select mode

·         In jungle hunter – to select room

count

How many record do we want to retrieve

start

From that position we want to start

sortBy

Rankings for most games (except solitaires,pinballs and jungle hunter) can be sorted by different param. You can select here used param. Eg. if for snooker you will use RF – rankings will be sorted descending by ranking, if you use !RF – rankings will be sorted ascending by ranking.

 

That function returns both data and description for it.

 

 

That function returns eg, for query ranking(game4,0):

         ranking =
        {
                ret = 1
                desc =
                {
                        rating =
                        {
                                0 = R
                                1 = Rating
                        }
                        games_completed =
                        {
                                0 = GC
                                1 = Games Completed
                        }
                        games_abandoned =
                        {
                                0 = GA
                                1 = Games Abandoned
                        }
                        wins =
                        {
                                0 = W
                                1 = Wins
                        }
                        loses =
                        {
                                0 = L
                                1 = Loses
                        }
                }
                count = 3
                ranking =
                {
                        0 =
                        {
                                playerId = 372
                                login = Object
                                rating = 4991
                                games_completed = 6
                                games_abandoned = 1
                                wins = 0
                                loses = 6
                        }
                        1 =
                        {
                                playerId = 375
                                login = bromba
                                rating = 4984
                                games_completed = 1
                                games_abandoned = 1
                                wins = 0
                                loses = 1
                        }
                        2 =
                        {
                                playerId = 373
                                login = samuel
                                rating = 4935
                                games_completed = 6
                                games_abandoned = 4
                                wins = 5
                                loses = 1
                        }
                }
        }

 

 

4.8.           ranking_find

RankingFind(gameId,name,sortBy='')

 

That function is used to look for player at ranking page.

 

gameId

That parameters describe game that we are interested in

name

Name(login) of searched user.

sortBy

Rankings for most games (except solitaires,pinballs and jungle hunter) can be sorted by different param. You can select here used param. Eg. if for snooker you will use RF – rankings will be sorted descending by ranking, if you use !RF – rankings will be sorted ascending by ranking.

 

 

That function returns eg, for query action= ranking_find(game4,bromba)

 

        ranking_find =
        {
                ret = 1
                pos = 2
        }

 

 

 

4.9.           ladder

Deprecated – not available 

 

4.10.     ladder_find

 

Deprecated – not available


评论 (1)

请稍候...
很抱歉,您输入的评论太长。请缩短您的评论。
您没有输入任何内容,请重试。
很抱歉,我们当前无法添加您的评论。请稍后重试。
若要添加评论,需要您的家长授予您相应权限。请求权限
您的家长禁用了评论功能。
很抱歉,我们当前无法删除您的评论。请稍后重试。
您已超过了一天之内允许提供的评论数上限。请在 24 小时后重试。
因为我们的系统表明您可能在向其他用户提供垃圾评论,您的帐户已禁用了评论功能。如果您认为我们错误地禁用了您的帐户,请联系 Windows Live 支持部门
完成下面的安全检查,您提供评论的过程才能完成。
您在安全检查中键入的字符必须与图片或音频中的字符一致。

若要添加评论,请使用您的 Windows Live ID 登录(如果您使用过 Hotmail、Messenger 或 Xbox LIVE,您就拥有 Windows Live ID)。登录


还没有 Windows Live ID 吗?请注册

ok

gracias, me sirvo mucho.

http://www.web-mix.ws/
18 小时以前

引用通告

此日志的引用通告 URL 是:
http://ruben-cruzazulboy-10.spaces.live.com/blog/cns!11FD48D3822FF3B0!668.trak
引用此项的网络日志