60. Notify app to activate AI large model
#
General state - Game
Tips
The SDK ensures that states are sent from the game to the app serially.
After a state notification, SudMGP ensures that states are sent from the game to the app serially and caches the latest data value based on the state value for the app to proactively obtain it at anytime.
ISudFSMMG void onGameStateChange(ISudFSMStateHandle handle, String state, String dataJson);
0. Testing
- state
mg_common_hello_fsm
- data
{
"msg": "Hello FSM from MG!"
}
- Description
This state is used for testing.
1. Public screen messages (modified)
- Earliest version: V1.1.30.xx
- state
mg_common_public_message
- data
{
"type":0,
"msg":[
{
"phrase":1,
"text":{
"default":"Player",
"en-US":"Player"
}
},
{
"phrase":2,
"user":{
"name":"User A",
"uid":"0001",
"color":"#00FF00"
}
},
{
"phrase":1,
"text":{
"default":"Defeated the player",
"en-US":"Defeated the player"
}
},
{
"phrase":2,
"user":{
"name":"User B",
"uid":"0002",
"color":"#FF0000"
}
}
]
}
- Description
Indicates that messages are sent to the public screen. Valid values:
type
0: notification
1: reminder
2: post-game analysis
3: others
msg
Parameters in <!-- --> are escape characters.
<!--name: user nickname|uid: user ID|color: recommended color-->
name/uid/color are optional fields. When these parameters are null, the code is as follows:
<!--name:|uid:|color:-->
The SDK caches only the latest data.
- json
Parameter | Type | Required | Default | Remarks |
---|---|---|---|---|
type | int | Yes | Phrase type. | |
msg | json[Phrase, Phrase] | Yes | Phrase json array. |
- Phrase
Parameter | Type | Required | Default | Remarks |
---|---|---|---|---|
phrase | int | Yes | Phrase type. | |
text | json | Yes when phrase is 1 | This parameter is required when phrase is 1. | |
user | json | Yes when phrase is 2 | This parameter is required when phrase is 2. |
- Parameter description when phrase is 1
Parameter | Type | Required | Default | Remarks |
---|---|---|---|---|
text | json | Yes | Phrase type. | |
text.default | string | Yes | default. The default type is text. | |
text.zh-CN | string | No | zh-CN, text | |
text.en-US | string | No | en-US, text | |
text.XXXX | string | No | XXXX, text | |
text.XXXX | string | No | XXXX rule: language code(lowercase letters)-country/region code(uppercase letters) |
- Parameter description when phrase is 2
Parameter | Type | Required | Default | Remarks |
---|---|---|---|---|
user | json | Yes | This parameter is required when phrase is 2. | |
name | string | Yes | This parameter is required when phrase is 2. | |
uid | string | Yes | This parameter is required when phrase is 2. | |
color | string | Yes | This parameter is required when phrase is 2. |
2. Keyword
- state
mg_common_key_word_to_hit
- data
{
"wordType": "text", // This parameter is required. Valid values: text: fuzzy match; number: exact match (required). By default, the parameter is set to text for DrawGuess and Word Guess, and number for Number Bomb.
"word": "Keyword", // A single keyword, compatible with earlier versions.
"realWord": "关键词", // A single keyword
"wordList": ["Keyword 1", "Keyword 2", …], // This parameter is required and indicates the list of keywords. Multiple keywords can be entered.
"wordLanguage ": "zh-CN", // This parameter is required and indicates the keyword language. The default value is zh-CN.
}
- Description
Indicates the keyword state.
3. Post-game
- Earliest version: V1.1.30.xx
- state
mg_common_game_settle
- data
Parameter | Type | Required | Default | Remarks |
---|---|---|---|---|
gameMode | int | Yes | 1 | Game mode. The default value is 1. |
gameRoundId | string | Yes | ID of this round of game. | |
results | PlayerResult json array | Yes | Game results of players. |
- PlayerResult = {}
Parameter | Type | Required | Default | Remarks |
---|---|---|---|---|
uid | string | Yes | User ID. | |
rank | int | Yes | Player ranking, starting from 1. | |
award | int | Yes | Award. | |
score | int | Yes | Points. | |
isEscaped | int | No | Indicates whether the player has escaped. Valid values: 1: escaped; 0: not escaped. | |
killerId | string | No | ID of the player who killed other players. | |
isManaged | int | Yes | Whether to complete the game by hosting | |
extras | string | No | Extended information |
- data
{
"gameMode": 1, // Game mode.
"gameRoundId": "123", // ID of this round of game.
"results": [
{
"uid": "uid", // User ID.
"rank": 1, // Player ranking, starting from 1.
"award": 100, // Award.
"score": 100, // Points.
"isEscaped": 1, // Whether the player has escaped.
"killerId": "ID of the player who killed other players." , // ID of the player who killed himself/herself.
"isAI": 0, // Whether is a AI player
"isManaged": 0, // Whether to complete the game by hosting
"extras": "" // Extended information
}
]
}
- Description
Indicates the post-game state.
4. Tapping the Join button
- state
mg_common_self_click_join_btn
- data
Parameter | Type | Required | Default | Remarks |
---|---|---|---|---|
seatIndex | int | No | -1 | Seat number of the user in the game. This parameter is of the int type, and the value ranges from 0 to the total number of seats. |
{
"seatIndex": 0 // Seat number of the user in the game. This parameter is of the int type, and the value ranges from 0 to the total number of seats. When seatIndex is -1, players take an empty seat at random. If the value of seatIndex is greater than the total number of seats, players fail to take a seat.
}
- Description
Indicates that a user taps the Join button or taps the avatar to join a game.
5. Tapping the Cancel Join button
- state
mg_common_self_click_cancel_join_btn
data
{ }
Description
Indicates that a user taps the Cancel Join button.
6. Tapping the Ready button
- state
mg_common_self_click_ready_btn
- data
{
}
- Description
Indicates that a user taps the Ready button.
7. Tapping the Cancel Ready button
- state
mg_common_self_click_cancel_ready_btn
- data
{
}
- Description
Indicates that a user taps the Cancel Ready button.
8. Tapping the Start button
- state
mg_common_self_click_start_btn
- data
{
}
- Description
Indicates that a user (captain) taps the Start button.
9. Tapping the Share button
- state
mg_common_self_click_share_btn
- data
{
}
- Description
Indicates that a user taps the Share button.
10. Gaming
- state
mg_common_game_state
- data
{
"gameState": 0 // The state of the game. Valid values: 0: idle state. The game is not started; 1: loading state. All players are ready. The captain taps the Start button and the game scenes are loading; 2: playing state. The game is ongoing.
}
- Description
Indicates the game state.
11. Tapping the Close button on the post-game screen (added on December 27, 2021)
- state
mg_common_self_click_game_settle_close_btn
- data
{
}
- Description
Indicates that a user taps the Close button on the post-game screen.
12. Tapping the Play Again button on the post-game screen (added on December 27, 2021)
- state
mg_common_self_click_game_settle_again_btn
- data
{
}
- Description
Indicates that a user taps the Play Again button on the post-game page.
13. Reporting the sound list in a game (added on December 30, 2021)
- state
mg_common_game_sound_list
- data
{
"list": [
{
"name": "click", // Sound resource name.
"url": "https://www.xxxx/click.mp3", // URL of a sound resource.
"type": "mp3" // Sound resource type.
}
]
}
- Description
Indicates that a game reports the list of all sound resources in the game.
14. Notifying the app layer of playing sound (added on December 30, 2021)
- state
mg_common_game_sound
- data
{
"isPlay": true, // Indicates whether to play sound. Valid values: true: sound is played; false: sound is not played.
"name": "click",// The name of the sound file to be played without a suffix.
"type": "mp3", // Sound resource type.
"times": 1, // Number of play times. Note: When times is 0, sound is played in a circular manner.
"url": "https://www.xxxx.xx/xxx.mp3" // URL of a sound resource.
}
- Description
Indicates that the game notifies the app layer of playing sound.
15. Notifying the app layer of playing background music (added on January 7, 2022)
- state
mg_common_game_bg_music_state
- data
{
"state": true // State of the background music. Valid values: true: background music is turned on; false: background music is turned off.
}
- Description
Indicates that the game notifies the app layer of playing background music.
16. Notifying the app layer of playing sound effect (added on January 7, 2022)
- state
mg_common_game_sound_state
- data
{
"state": true // State of the sound effect. Valid values: true: sound effect is turned on; false: sound effect is turned off.
}
- Description
Indicates that the game notifies the app layer of playing sound effect.
17. ASR (enabling/disabling voice recognition, added in SudMGP V1.1.45.xx)
- state
mg_common_game_asr
- data
{
"isOpen": true
}
- Description
Indicates whether voice recognition is enabled.
18. Microphone (added on March 4, 2022)
- state
mg_common_self_microphone
- data
{
"isOn": true, // Indicates whether a user turns on or off the microphone. Valid values: true: the microphone is turned on, and the app enables RTC stream push; false: the microphone is turned off, and the app disables RTC stream push.
"state": 1, // 1: day 2: night 3:not in game
}
- Description
Indicates that the game notifies the app of the microphone state.
19. Headphone (receiver and speaker) (added on March 4, 2022)
- state
mg_common_self_headphone
- data
{
"isOn": true, // Headphone state (receiver and speaker). Valid values: true: the headset is turned on, and the app enables RTC stream push; false: the headset is turned off, and the app disables RTC stream push.
"state": 1, // 1: day 2: night 3:not in game
}
- Description
Indicates that the game notifies the app of the headset state (receiver and speaker).
20. app_common_self_x response error code(added on May 10, 2022)
- state
mg_common_app_common_self_x_resp
- data
{
"state": "app_common_self_playing", // Field required, refer to: https://docs.sud.tech/zh-CN/app/Client/APPFST/CommonState.html
"resultCode": 0, // Field required,refer to: https://docs.sud.tech/zh-CN/app/Server/ErrorCode.html
"isIn": true, // When state=app_common_self_in, the field is required
"isReady": true, // When state=app_common_self_ready, the field is required
"isPlaying": true, // When state=app_common_self_playing, the field is required
"reportGameInfoExtras": "", // When state=app_common_self_playing, the field is required
"curCaptainUID": "", // When state=app_common_self_captain, the field is required
"kickedUID": "" //When state=app_common_self_kick, the field is required
}
- Description
App Common state operation error result callback state (Note: only the resultCode != 0 is called back)
21. Whether the game notifies the app layer of the success of adding the robot players (added on May 17, 2022)
- state
mg_common_game_add_ai_players
- data
{
"resultCode": 0, // Return code 0: successful, non-0: unsuccessful
"userIds": ["123", ...] // Successfully added to the playerid list
}
- Description
Whether the game notifies the app layer to add the accompanying robot successfully
22. The game notifies the app layer to add the current network connection status (added on June 21, 2022)
- state
mg_common_game_network_state
- data
{
"state": 1, // 0:closed, 1: connected
}
- Description
The game notifies the app layer to add the current network connection status
23. Game notification app to get score
- state
mg_common_game_get_score
- data
{
}
- Description
Game notification app to get score
24. score brought in by game notification app
- state
mg_common_game_set_score
- data
{
"lastRoundScore": 0, // self current points
"incrementalScore": 10, // Recharge score
"totalScore": 10 // Total score after recharging
}
- Description
score brought in by game notification app
25. create order in game
- state
mg_common_game_create_order
- data
{
"cmd": "", // triggered actions, such as rewards, purchases, etc
"fromUid": "", // from uid
"toUid": "", // target uid
"value": 123, // value
"payload": "{}", // extended data json string, special optional
}
- cmd 事件数据参数对应表
1.Texas Poker Pro, Games ID=1557194155570024449
cmd | value | cmd (payload) | description |
---|---|---|---|
add_score | add score |
2.TeenPati Pro, Games ID=1557194487352053761
cmd | value | cmd (payload) | description |
---|---|---|---|
add_score | add score |
3.Space wolf kill, Games ID=1559736844916183041
cmd | value | cmd (payload) | description |
---|---|---|---|
reward | 1 //0.5 ticket 2 //1 ticket 3 //1.5 ticket 4 //2 ticket 5 //2.5 ticket 6 //3 ticket 7 //3.5 ticket 8 //4 ticket 9 //4.5 ticket 10 //5 ticket |
reward |
4.were wolf, Games ID=1472142747708284929
cmd | value | cmd (payload) | description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
use_role | {"role_id": 1 | 2 | 3 | 4 | 5 | 6 } | 抢角色 |
role_id (1: wolf, 2: farmer, 3: prophet, 4: witch, 5: hunter, 6: guard)
5.baseball
cmd | value | cmd (payload) | description |
---|---|---|---|
buy_baseball | Number of Baseballs to Purchase | Example: {"is_add":0, "is_app_create": 1}. Explanation of is_add: Whether to increase the distance, 0 means no increase, 1 means increase; Explanation of is_app_create: Whether the order is created by the APP through API, 0 means no, 1 means yes | Click N baseballs each time, value represents the number of baseballs to purchase |
buy_combo_baseball | Number of baseballs purchased | Example: {"is_add":0, "is_app_create": 1}. is_add description: whether to increase distance 0 for no, 1 for yes; is_app_create description: whether the order is created via API by the APP 0 for no, 1 for yes | Hit combo baseball, each hit counts as one baseball, value represents the number of baseballs purchased |
6.whoisspy
cmd | value | cmd (payload) | description |
---|---|---|---|
buy_props | Example: {"index":0} Index description: Emoji sequence number 0: Egg, 1: Flower | value represents the amount of money needed for purchase |
7.ludo
cmd | value | cmd (payload) | description |
---|---|---|---|
reroll_the_dice | Example: {"seq":1} seq description: sequence number | value represents the amount of money required for purchase | |
specify_dice_roll | Specific price | {"point":6, "seq": 1, "useProp": 0} | Specific dice roll points, default to random; designate player to receive 1 remote control dice card, can specify dice roll once, can be brought in, useProp 0: do not use prop card, 1: use prop card |
8.gobangpro
cmd | value | cmd (payload) | description |
---|---|---|---|
retract | Example: {} | value represents the amount of money spent on undoing a move |
9.UMO
cmd | value | cmd (payload) | description |
---|---|---|---|
auto_umo | Example: {} | Automatically shout "UMO", can be purchased at any time during the game |
10.Mine Sweeper
cmd | value | cmd (payload) | description |
---|---|---|---|
change_hand | Specific price | Example: {} | Change hand cards, can be done up to once at the start of each round |
11.Chuck-A-Luck
cmd | value | cmd (payload) | description |
---|---|---|---|
add_score | Bet amount | Example: {"betChip": 500} | Bring-in points |
12.Big Eater
cmd | value | cmd (payload) | description |
---|---|---|---|
add_score | Bet amount | Example: {"betChip": 500} | Bring-in points |
13.777/Slots
cmd | value | cmd (payload) | description |
---|---|---|---|
add_score | Wager amount | Example: {"betChip": 500} | Carry-in points |
14.MAGIC TAROT
cmd | value | cmd (payload) | description |
---|---|---|---|
add_score | Carry-in points |
15.TEEN PATTI
cmd | value | cmd (payload) | description |
---|---|---|---|
add_score | Carry-in points |
16.SUPER WHEEL
cmd | value | cmd (payload) | description |
---|---|---|---|
add_score | Carry-in points |
17.Crazy Racing
cmd | value | cmd (payload) | description |
---|---|---|---|
add_score | Bet amount | Example: {"betChip": [20, 20, 0]} | Bet amounts for each of the 3 vehicles |
18.jumpjump
cmd | value | cmd (payload) | description |
---|---|---|---|
hit | Guaranteed hit price | Single guaranteed hit, value represents the current price | |
addHeart | Price to add heart | Single heart addition, value represents the current price | |
item_event_use_hit | Price to initiate event | Use once for guaranteed hit in item event mode | |
item_event_use_add_heart | Price to initiate event | Use once to add heart in item event mode |
19.monopoly
cmd | value | cmd (payload) | description |
---|---|---|---|
chess_skins_1 | Price to use this skin | {"rounds":5}//Number of rounds lasted, default is 5 | Use chess piece skin #1, special effect is a 10% rent bonus |
chess_skins_2 | Price to use this skin | {"rounds":5}//Number of rounds, default is 5 | Use chess piece skin #2, special effect is a 10% rent reduction |
chess_skins_3 | Price to use this skin | {"rounds":2}//Number of rounds it lasts, default is 2 | Use chess piece skin #3, special effect is to forcibly occupy land |
paid_events_1 | The price to trigger this event | {"rounds":5}//Number of rounds to last, default is 5 | All the lands of the specified player are seized, and no rent is collected |
paid_events_2 | The price to initiate this event | {"rounds":5} // Number of rounds to last, default is 5 | All land rents for the specified player are increased by 50% |
paid_events_3 | Price to trigger this event | {\"rounds\":5} // Number of rounds lasted, default is 5 | All land rents for the specified player are reduced by 50% |
paid_events_4 | Price to initiate event | {"rounds": 3} // Duration in rounds, default is 3 | All land rents doubled |
paid_events_5 | Price to trigger this event | {"rounds":3} // Number of rounds it lasts, default is 3 | No rent collected from all lands |
paid_events_6 | Price to initiate event | Send a designated player to jail | |
paid_events_7 | Price to initiate event | Release a designated player from jail | |
paid_events_8 | Price to initiate event | Designated player stays at current square next turn | |
paid_events_9 | Price to initiate event | Destroy a random building on a designated player's land | |
paid_events_10 | Price to initiate event | Randomly upgrade a level 1 building on a designated player's upgradable land | |
paid_events_11 | Price to initiate event | Double cash for everyone | |
paid_events_12 | Price to initiate event | Halve cash for everyone | |
paid_events_13 | Price to initiate event | Equally distribute cash among everyone | |
paid_events_14 | Price to initiate event | Designated player receives 1M cash | |
paid_events_15 | Price to initiate event | Designated player pays 1M cash | |
paid_events_16 | Price to initiate event | Small amount of cash (10K) appears on random tile, stackable, collectible upon landing | |
paid_events_17 | Price to initiate event | Small fine (10K) appears on random tile, stackable, payable upon landing | |
paid_events_18 | Price to trigger this event | Designated player obtains 1 rent-free card, which can exempt 1 rent payment, stackable, and can be carried over | |
paid_events_19 | The price to trigger this event | Specified player obtains 1 reroll card, can reroll the dice once, stackable, can be carried over | |
paid_events_20 | Price to initiate event | Designated player receives 1 Remote Dice Card, usable once to specify dice roll, stackable, carry-over allowed |
20.Snakes and Ladders
cmd | value | cmd (payload) | description |
---|---|---|---|
Shield | Price Used | Activate Shield | |
reroll | Price Used | Initiate Re-roll |
21.Link-Link (or Lianliankan)
cmd | value | cmd (payload) | description |
---|---|---|---|
refresh | price to use | grants user 1 refresh item | |
prompt | price to use | grants user 1 hint item | |
cloud | price to use | grants user 1 cloud item | |
lock | price to use | grants user 1 lock item | |
use_cloud | Price of Use | Release an effect of one cloud to the user | |
use_wind | Price of Use | Releases a wind effect on the user once, which can counteract one cloud effect | |
use_lock | price to use | unleashes a chain effect on user once | |
use_unlock | price to use | releases an unlock effect on user once, counteracting 1 lock effect | |
use_rocket | price to use | unleashes a rocket effect on user once | |
item_event_use_refresh | Trigger this event for price | In item event mode, release a refresh item to the user once | |
item_event_use_prompt | price to initiate event | releases a prompt item to user once in item event mode | |
item_event_use_cloud | price to initiate event | releases a cloud item to user once in item event mode | |
item_event_use_lock | price to initiate event | releases a lock item to user once in item event mode |
22.baloot
cmd | value | cmd (payload) | description |
---|---|---|---|
buy_props | Money Spent | Example: {\"index\":0} Explanation of index: 0 represents flowers, 1 represents a water bucket | value represents consumption |
23.Spot the Difference
cmd | value | cmd (payload) | description |
---|---|---|---|
helf_to_find_spot | money consumed | value represents money consumed, function is magnifying glass | |
block_others | money consumed | value represents money consumed, function is spray | |
stop_block | money consumed | value represents money consumed, function is to remove spray |
24.block master
cmd | value | cmd (payload) | description |
---|---|---|---|
clear_line | Money Spent | value represents the money spent, its function is to subtract from the current line's own value | |
add_line | money consumed | value represents money consumed, function is to add lines to opponent | |
decelerate | money consumed | value represents money consumed, function is to slow down oneself | |
accelerate | money consumed | value represents money consumed, function is to speed up opponent |
- description
create order
26. Game notification app player role (only valid for werewolf killing)
- state
mg_common_player_role_id
- data
{
"playersRoleId": [{"uid": "id", "roleId": 1 }, {"uid": "id", "roleId": 1}], // roleId (1: wolf, 2: farmer, 3: prophet, 4: witch, 5: hunter, 6: guard)
}
- description
notification app player role
27. The game notifies app players that they are thrown poop (only valid for you to draw, I guess)
- state
mg_common_self_click_poop
- data
{
}
- description
The game notifies app players that they are thrown poop
28. The game notifies app players that they are liked (only valid for you to draw and guess)
- state
mg_common_self_click_good
- data
{
}
- description
The game notifies app players that they are liked
29. Game Notification App Game FPS (Only effective for bumper, Dominoes, and knifeMasters)
- state
mg_common_game_fps
- data
{
"fps": 60
}
- description
Game Notification App Game FPS
30. Game Notification App Game Pop-up
- state
mg_common_alert
- data
{
"state": "show" // show: display, close: close
}
- description
Game Notification App Game Pop-up
31. Game Notification App: Most Annoying Teammate (Supports only pickpark)
- state
mg_common_worst_teammate
- data
{
"uid": "123" // Most Annoying Teammate uid
}
- description
Game Notification App: Most Annoying Teammate
32. Game Notification App: Game Ended Due to Player Quitting(Supports only pickpark)
- state
mg_common_game_over_tip
- data
{
"uids": ["123", "345"] // escape players uid
}
- description
Game Notification App: Game Ended Due to Player Quitting
33. Game Notification App: Player Color(Supports pickpark and ludo)
- state
mg_common_game_player_color
- data
{
"players": [
{ "uid": "123", "color": 1 },
{ "uid": "123", "color": 2 },
{ "uid": "123", "color": 3 }
]
}
// Color: 1 represents pink, 2 represents purple, 3 represents green, 4 represents blue, 5 represents yellow, 6 represents orange, 7 represents red
- description
Game Notification App: Player Color
34. Game Notification App: Player Avatar Coordinates (ludo, knife, umo, dominos, teenpatti, texasholdem, drawAndGuess)
- state
mg_common_game_player_icon_position
- data
{
"uid": "123", // uid
"position": { "x": 0, "y": 0, "width": 0, "height": 0 } // Player Avatar Position and width an height
}
- description
Game Notification App: Player Avatar Coordinates
35. Game Notification App: click exit game button (Only supports Teen Patti Pro and Texas Hold'em Pro)
- state
mg_common_self_click_exit_game_btn
- data
{}
- description
Game Notification App: Quit Game
36. Game Notification App: Enable Buy-in Points (Only supports Teen Patti Pro and Texas Hold'em Pro)
- state
mg_common_game_is_app_chip
- data
{
"isAppChip": 1 // 0: Disabled, 1: Enabled
}
- description
Game Notification App: Enable Buy-in Points
37. Game Notification App: Current Game Settings Information (Only supports Texas Hold'em Pro and Teen Patti Pro)
- state
mg_common_game_rule
- data
{
"gameMode": {
// Please refer to the explanations for the fields below.
}
}
- Texas Hold'em settings
{
"smallBlind": 1, // Small Blind
"ante": 0, // Ante
"isStraddle": 0, // 0: Disabled, 1: Free, 2: Forced
"sBuyIn": 100, // Buy-in value / Minimum buy-in configuration
"bBuyIn": 200, // Maximum buy-in, unlimited (0)
"isAutoStart": 2, // Auto-start enabled (2)
"tableDuration": 0.5, // Table duration configuration (in hours)
"thinkTime": 2 // Thinking time (in seconds)
}
- teenpatti settings
{
"ante": 10, // Ante (base bet)
"darkCard": 2, // Rounds with dark cards
"isAutoStart": 2, // Auto-start enabled (2)
"potLimit": 1000, // Maximum buy-in
"round": 10, // Maximum rounds
"singleLimit": 32, // Single bet limit
"tableDuration": 0.5, // Table duration configuration (in hours)
"thinkTime": 15 // Thinking time (in seconds)
}
American 8-ball
{ "mode_ex": 1, // 1, 2 represent 1V1 mode, 2V2 mode respectively }
Carrom
{ "mode_ex": 1, // 1, 2, 3 represent Carrom, Freestyle, and 2v2 modes respectively }
Block Master
{ "mode_ex": 1, // 1, 2, 3 represent 1v1, free-for-all, and 2v2 team free-for-all modes respectively }
Jackaroo
{ "mode_ex": 1, // 1 and 2 denote Base and Complex modes, respectively }
description
Game Notification App: Current Game Settings Information
38. Game Notification App: Game Mode Settings (Only supports Texas Hold'em Pro and Teen Patti Pro)
- state
mg_common_game_settings
- data
{}
- description
Game Notification App: Game Mode Settings
39. Game Notification App: Insufficient Coins (Only supports Probability Games)
- state
mg_common_game_money_not_enough
- data
{}
- description
Game Notification App: Insufficient Coins
40. Game Notification App: Send Custom UI Configuration Table (supports Ludo, fir)
- state
mg_common_game_ui_custom_config
- data
{}
- description
Game Notification App: Send Custom UI Configuration Table
41. Set clickable areas provided by the app for the game (crazyracing)
Coordinate system origin: Top-left corner, measured in pixels.
- state
mg_common_set_click_rect
- data
{
"list":
[
{
"x": 0, // The x-coordinate of the game area
"y": 0, // The y-coordinate of the game area
"width": 0, // The width of the game area
"height": 0, // The height of the game area
}
]
}
- description
Set clickable areas provided by the app for the game
42. Notify the app to provide data for the corresponding list of UIDs' players (crazyracing).
- state
mg_common_users_info
- data
{
"uids": ["uid1", "uid2"...]
}
- description
Notify the app to provide data for the corresponding list of UIDs' players
43. Notify the app that the game's preliminary preparations are complete.(crazyracing)
- state
mg_common_game_prepare_finish
- data
{
}
- description
Notify the app that the game's preliminary preparations are complete.
44. Notify the app that the game's main interface has been displayed.(crazyracing)
- state
mg_common_show_game_scene
- data
{
}
- description
Notify the app that the game's main interface has been displayed.
45. Notify the app that the game's main interface has been hidden.(crazyracing)
- state
mg_common_hide_game_scene
- data
{
}
- description
Notify the app that the game's main interface has been hidden.
46. Notify the app that the game's coin button has been clicked.(crazyracing)
- state
mg_common_self_click_gold_btn
{
}
- description
Notify the app that the game's coin button has been clicked.
47. Notify app reaches the destination (ludo)
- state
mg_common_game_piece_arrive_end
{
"uid": "", // 玩家id
"pieceIndex": 0, // 棋子编号 0 ~ 3
}
- description
Notify app reaches the destination
48. Notify App the player is auto Managed
- state
mg_common_game_player_managed_state
{
"uid": "", // uid
"managed": 0, // 0: not managed 1:auto managed
}
- description
Notify App the player is auto Managed
49. Notify App the baochi (whoisspy)
- state
mg_common_game_send_burst_word
{
"text": "", // baochi
}
- description
Notify App the baochi
50. Notify real-time player rankings to the app (only supported for Monstercrush)
- state
mg_common_game_player_ranks
{
"ranks": [
{"uid": "userid", "rank": 1},
{"uid": "userid", "rank": 2}
]
}
- description
Notify real-time player rankings to the app
51. Notify real-time updates of single and double tiles to the app (only supported for Okey101)
- state
mg_common_game_player_pair_singular
{
"pairs": [
{"uid": "userid", "pair": 1}, // pair: 1 双,0 单
{"uid": "userid", "pair": 0}
]
}
- description
Notify real-time updates of single and double tiles to the app
52. Notify requests to the app to obtain the player's property cards (only supported for Monopoly)
- state
mg_common_game_player_monopoly_cards
{
}
- description
Notify requests to the app to obtain the player's property cards
53. Notify real-time player scores to the app (only supported for Monstercrush)
- state
mg_common_game_player_scores
{
"scores": [
{"uid": "userid", "score": 10},
{"uid": "userid", "score": 20}
]
}
- description
Notify real-time player scores to the app
54. Notify the app to destory the game (supported only for certain probability-based games)
- state
mg_common_destroy_game_scene
{
}
- description
Notify the app to destory the game
55. Notify the app of the ball's status (only supported for billiards)
- state
mg_common_game_billiards_hit_state
{
"uid": "user id", // user id
"state": 0,
}
- description
state description: 0: The cue ball misses or the first shot does not hit the target ball. 2-7: Combination shot or consecutive shot. 8: The cue ball goes into a pocket. 9: Insufficient number of cushions hit. 10: The black eight ball is pocketed during the break shot. 11: The black eight ball is pocketed prematurely. 12: No valid ball is pocketed. 13: There is a valid ball pocketed. 14: Timeout
Notify the app of the ball's status
56. Notify the app to obtain the player's inventory of specific point value item cards (only supported for Ludo).
- state
mg_common_game_player_props_cards
{
}
- description
Notify the app to obtain the player's inventory of specific point value item cards
57. The game sends universal game data to the app
mg_common_game_info_x
{
"eventName": "", // Event name (Note: Refer to specific games as follows)
"data": "{JSON string}" // Specific data, which is a JSON string. (Note: The specific game reference is as follows)
}
- monstercrush
- Rise in ranking, drop in ranking
"event_name": key is monstercrush_ranking_up_and_down
"data": The data is represented as a JSON string containing specific fields; among them, uid represents the ID of the relevant player, ranking signifies the specific change in ranking position, where rangking (presumably a typo for ranking) greater than 0 indicates a rise and less than 0 signifies a drop, and rank denotes the current ranking.
{ "eventName": "monstercrush_ranking_up_and_down", "data": "{\"uid\": \"user id\",\"ranking\": 0, \"rank\": 0}" }
Double rainbow screen clearance "event_name" key is monstercrush_clear_game_board "data" The field contains specific data in the form of a JSON string, where "uid" represents the ID of the relevant player.
{ "eventName": "monstercrush_clear_game_board", "data": "{\"uid\": \"user id\"}" }
ludo
- Gameplay setting information
"event_name" key is ludo_setting_info
"data" The fields represent specific data in the form of a JSON string, where "model" indicates "classic" or "fast", "chess_num" represents the number of chess pieces, and "item" determines whether props are enabled.
{ "eventName": "ludo_setting_info", "data": "{\"model\": 1, \"chess_num\": 4, \"item\":1}", // Note (model: 1 for classic, 0 for fast; chess_num: 2 for two chess pieces, 4 for four chess pieces; item: 0 for no props, 1 for props) }
- werewolf
- day night state
"event_name" key is werewolf_day_night_state
"data" The field contains specific data represented as a JSON string; where isDay indicates whether it's daytime or nighttime, with 1 representing daytime and 2 representing nighttime.
{ "eventName": "werewolf_day_night_state", "data": "{\"isDay\": 1}", // Note (isDay: 1 for daytime, 2 for nighttime) }
- 扫雷
grid information "event_name" key is minesweeper_grid_info "data" The field contains specific data represented as a JSON string, including: coordinate which represents the row and column of the grid on the entire chessboard, position which corresponds to the grid's coordinates on the screen, width and height which indicate the dimensions of the grid, and value which represents the content of the grid where -1 signifies a mine, and any non-negative value corresponds to the respective number.
{ "eventName": "minesweeper_grid_info", "data": "{\"coordinate\":{\"row\":10,\"col\":10},\"position\":{\"x\":100,\"y\":100},\"width\":100,\"height\":100,\"value\":-1}", }
Description
Notify the app to obtain specific game data
58. Notify the app clicked the help button
- state
mg_common_click_help_btn
- data
{
}
- Description
Notify the app clicked the help button
58. Notify the app of the player's avatar URL, and the app will determine whether an update is necessary.
- state
mg_common_game_avatar
- data
{
"avatars": [
{
"uid": "user id",
"avatar": "user avatar url"
},
{
"uid": "user id",
"avatar": "user avatar url"
}
]
}
- Description
Notify the app of the player's avatar URL, and the app will determine whether an update is necessary.
59. Notify app of player's avatar URL, app determines if update is needed
- state
mg_common_game_avatar
- data
{
"avatars": [
{
uid: 'user id',
avatar: 'user avatar'
}, {
uid: 'user id',
avatar: 'user avatar'
}
...
]
}
- Description
Notify app of player's avatar URL, app determines if update is needed
60. Notify app to activate AI large model
- state
mg_common_ai_model_message
- data
{
}
- Description
Notify app to activate AI large model
61. notify app ai message
- state
mg_common_ai_message
- data
{
"uid": "user id", // user id
"content": "", // ai message
}
- Notify app to activate AI large model
notify app ai message
62. Notify app of selected role ID message
- state
mg_common_game_select_role
- data
{
"uid": "user id", // user id
"role_id": 1, // (1: Werewolf, 2: Villager, 3: Seer, 4: Witch, 5: Hunter, 6: Guardian)
}
- Description
Notify app of selected role ID message
63. Notify app to retrieve VIP status of corresponding player
- state
mg_common_game_player_vip
- data
{
"uid": "user id", // user id
}
- Description
Notify app to retrieve VIP status of corresponding player
64. Notify app AI model message
- state
mg_common_ai_large_scale_model_msg
- data
{
"sendUser": IAIMessageUserInfo, // Sender information
"messageType": 1, // 1: Everyone, 2: Specified person, 3: System message
"receiveUserInfos": IAIMessageUserInfo[], // When message_type=2, an array of receiver information
"content": "", // message content
"audioData": "", // Audio data, base64 encoded
}
// Player information type
IAIMessageUserInfo: {
"playerId"": "", // user id
"nickName": "" // nickname
}
- Description
Notify app AI model message
65. Notify app of player's own data information
- state
mg_common_game_player_self_info
- data
{
"uid": "", // uid
"name": "", // user name
"avatar": "" // avatar url
}
- Description
Notify app of player's own data information
66. Notify app of current game round number
- state
mg_common_game_rounds
- data
{
"round": 0, // current round number
"maxRound": 10 // maximum round number
}
- Description
Notify app of current game round number
67. Notify app of player's health points
- state
mg_common_game_player_hp
- data
{
"uid": "", // user id
"hp": 10, // health points
"maxHP": 100 // maximum health points
}
- Description
Notify app of player's health points