SetItemPropertyUsesPerDayRemaining( object, itemproperty, int )

From NWN Lexicon
Jump to: navigation, search
Nwnee logo.jpg Note: This article documents Neverwinter Nights: Enhanced Edition new content or changes/updates/fixes to 1.69 functions. These are all listed under the category and patches pages.
Sets the number of uses per day remaining of the given item and item property.
void SetItemPropertyUsesPerDayRemaining(
    object oItem,
    itemproperty ip,
    int nUsesPerDay
);

Parameters

oItem
The item to update.
ip
The item property to update for uses remaining.
nUsesPerDay
The uses remaining to set.

Description

Sets the number of uses per day remaining of the given item and item property. Will do nothing if the given item and item property is not uses/day. Will constrain nUsesPerDay to the maximum allowed as the cost table defines.

Remarks

This is useful to replenish an items usable charges if the NPC has used it in battle and you want "fresh" loot for the player to pick up.

Otherwise it would be to help cheat uses of an item for NPCs or PCs.

Version

This function was added in 1.80.8193.14 of NWN:EE.

Example

Information icon.png This article is in need of examples. You can help the NWN Lexicon by showing how to use this code effectively.


See Also

functions: GetItemPropertyUsesPerDayRemaining() ActionUseItemOnObject() ActionUseItemAtLocation()



 author: Shadguy