WoR_PRC8/_module/nss/kpb_deposit1mil.nss
Jaysyn904 b5e28e52f4 Initial commit
Initial commit [1.18]
2025-04-03 11:49:34 -04:00

29 lines
899 B
Plaintext

////////////////////////////////////////////
// Kittrell's Persistent Banking System //
// Designed by: Brian J. Kittrell //
// //
// This script does the following: //
// //
// kpb_deposit1mil - This script allows //
// players to deposit 1000000 of their //
// gold that they are carrying. //
////////////////////////////////////////////
void main()
{
object oPC = GetPCSpeaker();
int nDeposit = 1000000;
int nBalance = GetCampaignInt("kpb_bank", "KPB_BANK_BALANCE", oPC);
int nAmount = (nDeposit + nBalance);
int nGold = GetGold(oPC);
if (nGold >= 1000000)
{
TakeGoldFromCreature(nDeposit, oPC, TRUE);
SetCampaignInt("kpb_bank", "KPB_BANK_BALANCE", nAmount, oPC);
}
else
{
SpeakString("Sorry, you do not have enough gold to deposit.", TALKVOLUME_TALK);
}
}