GetGoldPieceValue(object)
Determines the value of an item in gold pieces.
int GetGoldPieceValue( object oItem );
Parameters
oItem
The item to be appraised.
Description
Returns the gold piece value of oItem, and 0 if oItem is not a valid item.
Remarks
If oItem is unidentified at the time you call this function, the base item cost will be returned. If you always want the identified price, use the function in the code sample. (Note, that function should not be edited to get the UNidentified cost of the item, since unidentifying an item will most likely cause equipped items to get unequipped).
Version
1.61
Example
int GetIdentifiedGoldPieceValue(object oItem) { int bIdentified=GetIdentified(oItem); if (!bIdentified) SetIdentified(oItem, TRUE); int nGP=GetGoldPieceValue(oItem); if (!bIdentified) SetIdentified(oItem, FALSE); return nGP; }
See Also
functions: | GiveGoldToCreature |
categories: | Money Functions |
author: Tom Cassiotis, editor: Lilac Soul, additional contributor(s): Lilac Soul
Send comments on this topic.