Added PnP Dire Rat.
Added PnP Dire Rat.
This commit is contained in:
27
nwn_dark_sun/xplevel.nss
Normal file
27
nwn_dark_sun/xplevel.nss
Normal file
@@ -0,0 +1,27 @@
|
||||
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);
|
||||
}
|
Reference in New Issue
Block a user