UW2_PRC8/_module/nss/transferxpgold.nss
Jaysyn904 5197ad9a4d Initial upload
Initial upload
2023-09-25 20:24:01 -04:00

24 lines
650 B
Plaintext

//Created by Guile 5/5/08 (This XP Bank script sets an intergal on the module
//which allows PCs to store xp/gold on the module and retrieve with other
//characters (as long as they don't change cd keys!)
void main()
{
object oPC;
oPC = GetPCSpeaker();
if(GetCampaignInt("STORED_XP", GetPCPublicCDKey(oPC), GetModule()) > 0)
{
int nXP = GetCampaignInt("STORED_XP", GetPCPublicCDKey(oPC), GetModule());
GiveXPToCreature(oPC, nXP);
//Let's set the variable to 0 so the player cannot retrieve XP again!
SetCampaignInt("STORED_XP", GetPCPublicCDKey(oPC), 0, GetModule());
}
else
{
FloatingTextStringOnCreature("You have no XP stored!", oPC);
}
}