/buy_inventory.json Secret
Created
November 17, 2014 00:47
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"title": "Buy Inventory", | |
"description": "This packet is sent by the client to the server requesting an item be added to their inventory. In response, the server can either deny the client the item because it doesn't exist, the client doesn't have enough coins, the client is not a member and the item they requested was for members only, or the item requested is patched.\n\nThe requested item's id will always be the second-to-last section of the packet, and the item's cost will be the last. In the following example(s), the item's id is 413, and costs 0 coins.\n\nIf the client meets all the requirements to purchase the item, the server will send back the 'buy inventory' packet, this time it has the item's cost, and still contains the item's id. The item's id is sent back to the client to let them know which item they have successfully purchased, so they can look up information (i.e name, sprite file) of the item via crumbs. The item's cost is sent back so the client will know how many coins to deduct from the interface.", | |
"type": "request", | |
"handler": "i", | |
"name": "ai", | |
"parameters": [ | |
"internal_room_id", | |
"item_id" | |
] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"title": "Buy Inventory", | |
"description": "This packet is sent by the client to the server requesting an item be added to their inventory. In response, the server can either deny the client the item because it doesn't exist, the client doesn't have enough coins, the client is not a member and the item they requested was for members only, or the item requested is patched.\n\nThe requested item's id will always be the second-to-last section of the packet, and the item's cost will be the last. In the following example(s), the item's id is 413, and costs 0 coins.\n\nIf the client meets all the requirements to purchase the item, the server will send back the 'buy inventory' packet, this time it has the item's cost, and still contains the item's id. The item's id is sent back to the client to let them know which item they have successfully purchased, so they can look up information (i.e name, sprite file) of the item via crumbs. The item's cost is sent back so the client will know how many coins to deduct from the interface.", | |
"type": "response", | |
"handler": "i", | |
"name": "ai", | |
"parameters": [ | |
"internal_room_id", | |
"item_id", | |
"cost" | |
], | |
"variables": { | |
"cost": { | |
"type": "integer", | |
"sample": "200", | |
"description": "The amount of coins deducted from penguin." | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"variables": { | |
"internal_room_id": { | |
"type": "integer", | |
"description": "SmartFoxServer uses internal room IDs. However, these cannot be relied on (as they are suggested/generated by the main libraries), which is why Club Penguin usually uses the External Room ID instead." | |
}, | |
"item_id": { | |
"type": "integer", | |
"description": "All item ids can be found in paper_items.json" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment