28 lines
732 B
Plaintext
28 lines
732 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();
|
||
|
|
||
|
//Note this is set for single player, for testing purposes.
|
||
|
//Set to FALSE for multiplayer!
|
||
|
string PCcd = GetPCPublicCDKey(oPC, TRUE);
|
||
|
|
||
|
if(GetCampaignInt("STOREDXP", PCcd, GetModule()) > 0)
|
||
|
{
|
||
|
int nXP = GetCampaignInt("STOREDXP", PCcd, GetModule());
|
||
|
|
||
|
GiveXPToCreature(oPC, nXP);
|
||
|
|
||
|
//Let's set the variable to 0 so the player cannot retrieve XP again!
|
||
|
SetCampaignInt("STOREDXP", PCcd, 0, GetModule());
|
||
|
}
|
||
|
|
||
|
else
|
||
|
{
|
||
|
FloatingTextStringOnCreature("You have no XP stored!", oPC);
|
||
|
}
|
||
|
}
|