NWNDS/nwnds_module/xplevel.nss
Jaysyn904 de24f81734 Added NWN Dark Sun module contents
Added NWN Dark Sun module contents.
2021-07-12 21:24:46 -04:00

28 lines
550 B
Plaintext

void XPLevel(int SetLevel)
{
object oSpeaker;
effect eLevel;
int Level, XP, xxx;
XP=0;
for (xxx=1; xxx<SetLevel; xxx++)
{
XP+=xxx*1000;
}
oSpeaker=GetPCSpeaker();
Level=GetXP(oSpeaker);
if (Level>=XP)
{
eLevel=EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY,FALSE);
}
else if (Level<XP)
{
eLevel=EffectVisualEffect(VFX_IMP_RESTORATION_GREATER,FALSE);
}
ApplyEffectToObject(DURATION_TYPE_INSTANT, eLevel, oSpeaker, 0.5);
SetXP(oSpeaker, XP);
}