Discuss this page on this page's [[plyGetItemStat Talk Page|Talk Page]] === plyGetItemStat === See [[http://xelerus.de/index.php?s=functions&function=419|plyGetItemStat at Xelerus]] ^ Syntax | (plyGetItemStat player stat criteria) -> value | ^ Arguments | player: The player. (See [[Globals#DockScreens|gPlayer]]) | ^ | stat: An identifier naming the stat to obtain (see below). | ^ | criteria: An item criteria specifying the set of items for which to return the stat. | ^ Returns | value: The value of the stat. | ^ Category | [[player functions|player]] | ^ Description | Returns the value of an item stat. | === Stats === The following item stat identifiers are defined: * **itemsBoughtCount** : Returns the total number of items matching the criteria that the player has bought so far. * **itemsBoughtValue** : Returns the total value of matching items bought (in Commonwealth credits). * **itemsSoldCount** : Returns the total number of items matching the criteria that the player has sold so far. * **itemsSoldValue** : Returns the total value of matching items sold (in Commonwealth credits). === Example === (plyGetItemStat gplayer 'itemsSoldValue "* +Meds;") Returns the total value of all meds that the player has sold so far in the game. Return to [[:Functions]] list