26 lines
818 B
Plaintext
26 lines
818 B
Plaintext
/*
|
|
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++;
|
|
}
|
|
}
|
|
}
|