29 lines
999 B
Plaintext
29 lines
999 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 = GetLastClosedBy();
|
|
string sUnique = (GetPCPublicCDKey(oPC) + GetPCPlayerName(oPC));
|
|
|
|
DestroyCampaignDatabase("DATA"+sUnique);
|
|
|
|
int i = 0;
|
|
object oLoop = GetFirstItemInInventory();
|
|
while(oLoop != OBJECT_INVALID)
|
|
{
|
|
SetCampaignString("DATA"+sUnique, sUnique+IntToString(i), GetResRef(oLoop), OBJECT_SELF);
|
|
SetCampaignInt("DATA"+sUnique, GetResRef(oLoop)+IntToString(i), GetNumStackedItems(oLoop), OBJECT_SELF);
|
|
i++;
|
|
DestroyObject(oLoop);
|
|
SendMessageToPC(oPC, GetName(oLoop) + " has been stored successfully");
|
|
oLoop = GetNextItemInInventory();
|
|
}
|
|
SetCampaignInt("DATA"+sUnique, sUnique, i, OBJECT_SELF);
|
|
}
|