scripting:reference:system_functions:playerinventoryandwealthfunctions
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
scripting:reference:system_functions:playerinventoryandwealthfunctions [2020/01/30 03:34] – [Related System Vals] mit | scripting:reference:system_functions:playerinventoryandwealthfunctions [2020/02/07 03:17] (current) – mit | ||
---|---|---|---|
Line 1: | Line 1: | ||
==== sysPlayerInventory ==== | ==== sysPlayerInventory ==== | ||
- | ^ Format | sysPlayerInventory ( [Item] )| | + | ^ Format | sysPlayerInventory ( Item )| |
- | ^ Description | Returns the number of an item the current player currently | + | ^ Description | Returns the number of an item the current player currently |
- | ^ Parameters | **[Item]** - Name or number of the item | | + | |
^ Returns | Amount carried | | ^ Returns | Amount carried | | ||
+ | ^ Notes | **Item** parameter can be the name or number of the item | | ||
// | // | ||
< | < | ||
Line 19: | Line 19: | ||
==== sysAddToInventory ==== | ==== sysAddToInventory ==== | ||
- | ^ Format | sysAddToInventory ( [Item], [Amount] )| | + | ^ Format | sysAddToInventory ( Item, Amount )| |
^ Description | Attempts to add an item to the current player' | ^ Description | Attempts to add an item to the current player' | ||
- | ^ Parameters | **[Item]** - Name or number of the item | | ||
- | ^ | **[Amount]** - Amount of the item to be added | | ||
^ Returns | **[Amount added]** - The actual amount of the item that was added | | ^ Returns | **[Amount added]** - The actual amount of the item that was added | | ||
- | ^ Notes | This is an alternate method to calling ***grantitem [PlayerName] [Amount] [Item]** but the sys function does not message the player unlike *grantitem. Also, this function adheres to the player' | + | ^ Notes | **Item** parameter can be the name or number of the item. This is an alternate method to calling ***grantitem [PlayerName] [Amount] [Item]** but the sys function does not message the player unlike *grantitem. Also, this function adheres to the player' |
// | // | ||
< | < | ||
Line 40: | Line 38: | ||
</ | </ | ||
==== sysGetInventoryItemIndex ==== | ==== sysGetInventoryItemIndex ==== | ||
- | ^ Format | sysGetInventoryItemIndex ( [index] )| | + | ^ Format | sysGetInventoryItemIndex ( index )| |
^ Description | Returns the item in the current player' | ^ Description | Returns the item in the current player' | ||
- | ^ Parameters | **[index]** - Inventory slot number | | ||
^ Returns | **[ItemNum]** - The item number in the specified inventory slot (or 0 if the slot is empty) | | ^ Returns | **[ItemNum]** - The item number in the specified inventory slot (or 0 if the slot is empty) | | ||
- | ^ Notes | Players currently have up to 64 inventory slots. | | + | ^ Notes | Parameter is the inventory slot number. |
// | // | ||
< | < | ||
Line 62: | Line 59: | ||
==== sysAddWealth ==== | ==== sysAddWealth ==== | ||
- | ^ Format | sysAddWealth ( [Amount | + | ^ Format | sysAddWealth ( Amount, [ACCOUNT_SOURCE] )| |
^ Description | Gives money to the player. This is an alternative to the ***grantcash [PLAYER] [AMOUNT]** command; money given to the player via grantcash always appears on their in-game accounts as 'Gifts from God', where the sysAddWealth gives you the extra option of specifying the [[scripting: | ^ Description | Gives money to the player. This is an alternative to the ***grantcash [PLAYER] [AMOUNT]** command; money given to the player via grantcash always appears on their in-game accounts as 'Gifts from God', where the sysAddWealth gives you the extra option of specifying the [[scripting: | ||
- | ^ Parameters | **[Amount]** - cash to be given in denari | | ||
- | ^ | **[Account Source]** | | ||
^ Returns | Amount added. Usually the same as you requested but there are some settings that can limit the amount of cash the player can have, and these restrictions are applied here. | | ^ Returns | Amount added. Usually the same as you requested but there are some settings that can limit the amount of cash the player can have, and these restrictions are applied here. | | ||
+ | ^ Notes | **[Amount]** is cash to be given in **denari** | | ||
// | // | ||
< | < | ||
Line 80: | Line 76: | ||
===== Related System Values ===== | ===== Related System Values ===== | ||
- | Much information regarding the player inventory is provided through [[scripting: | + | Some information regarding the player |
- | **$gPlayerCash**, | + | \\ |
+ | \\ | ||
+ | **$gPlayerCash**, | ||
scripting/reference/system_functions/playerinventoryandwealthfunctions.1580376899.txt.gz · Last modified: 2020/01/30 03:34 by mit