Initial Commit
Initial Commit [v1.32PRC8]
This commit is contained in:
25
_module/nss/oo_persist.nss
Normal file
25
_module/nss/oo_persist.nss
Normal file
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
Created by Omnifarious
|
||||
Basically all of this is reverse engineered for my purposes.
|
||||
I owe lots of credit to the Item Storage Device by Rusty Dios.
|
||||
https://neverwintervault.org/project/nwn1/prefab/item/item-storage-device
|
||||
*/
|
||||
|
||||
//This works to transfer items between charachters on the same CD key & Login Name.
|
||||
void main()
|
||||
{
|
||||
object oPC = GetLastOpenedBy();
|
||||
string sUnique = (GetPCPublicCDKey(oPC) + GetPCPlayerName(oPC));
|
||||
|
||||
int i = 0;
|
||||
int NumItems = GetCampaignInt("DATA"+sUnique, sUnique, OBJECT_SELF);
|
||||
if(NumItems > 0)
|
||||
{
|
||||
while(i < NumItems)
|
||||
{
|
||||
string sResRef = GetCampaignString("DATA"+sUnique, sUnique+IntToString(i), OBJECT_SELF);
|
||||
CreateItemOnObject(sResRef, OBJECT_SELF, GetCampaignInt("DATA"+sUnique, sResRef+IntToString(i), OBJECT_SELF));
|
||||
i++;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user