PWE_PRC8/_module/nss/bank_makeaccount.nss
Jaysyn904 ee1dc35889 Initial Commit
Initial Commit
2025-04-03 10:29:41 -04:00

19 lines
716 B
Plaintext

void main()
{
object oPC = GetPCSpeaker();
SetCampaignInt("bankdb", "bank_account", 1, oPC);
object oVault = GetObjectByTag("pl_vaultstorage");
object oBox = GetItemPossessedBy(oVault, "az_strongbox");
int iBoxNum = GetCampaignInt("bankdb", "bank_account", oPC);
CopyObject(oBox, GetLocation(oVault), oVault, "az_strongbox_" + GetPCPublicCDKey(oPC) + "_" + IntToString(iBoxNum));
oBox = GetItemPossessedBy(oVault, "az_strongbox_" + GetPCPublicCDKey(oPC) + "_" + IntToString(iBoxNum));
StoreCampaignObject("bankdb", "bank_box_" + IntToString(iBoxNum), oBox, oPC);
DestroyObject(oBox);
TakeGoldFromCreature(1150, oPC);
CreateItemOnObject("az_bankbook", oPC);
SetCampaignInt("bankdb", "bankgp", 1000, oPC);
return;
}