StoreCampaignDBObject
From NWN Lexicon
Contents
StoreCampaignDBObject(object, string, object)
Store a campaign object on a player in the default database for this module.
void StoreCampaignDBObject( object oPC, string sVarname, object value );
Parameters
oPC
Player this variable is attached to.
sVarname
Name of the variable to store.
value
The object to store to the database.
Description
Store a campaign object on a player in the default database for this module.
NOTE: This does not store a reference, it stores the entire actual object, including all of its inventory. Storing many objects can be highly resource intensive! It should NOT be used like GetLocalObject .
Remarks
This is a wrapper for GetCampaignDBName as the first parameter.
Requirements
#include " x0_i0_campaign "
Version
???
Example
// Check if we have armor on and if so store it to the database. #include "x0_i0_campaign" void main() { // Get what armor the calling object is currently wearing. object oArmor = GetItemInSlot(INVENTORY_SLOT_CHEST, OBJECT_SELF); // Validate we found some armor. if(TRUE == GetIsObjectValid(oArmor)) { StoreCampaignDBObject(OBJECT_SELF, "CURRENT_ARMOR", oArmor); } }
See Also
functions: |
author: Baragg, editor: Mistress