44 lines
871 B
Plaintext
Raw Permalink Normal View History

void RemoveXPFromParty(int nXP, object oPC, int bAllParty=TRUE)
{
if (!bAllParty)
{
nXP=(GetXP(oPC)-nXP)>=0 ? GetXP(oPC)-nXP : 0;
SetXP(oPC, nXP);
}
else
{
object oMember=GetFirstFactionMember(oPC, TRUE);
while (GetIsObjectValid(oMember))
{
nXP=(GetXP(oMember)-nXP)>=0 ? GetXP(oMember)-nXP : 0;
SetXP(oMember, nXP);
oMember=GetNextFactionMember(oPC, TRUE);
}
}
}
/* Script generated by
Lilac Soul's NWN Script Generator, v. 1.5
For download info, please visit:
http://www.lilacsoul.revility.com */
//Put this on action taken in the conversation editor
void main()
{
object oPC = GetPCSpeaker();
effect eVisual = EffectVisualEffect(VFX_IMP_RESTORATION_GREATER);
ApplyEffectToObject(DURATION_TYPE_INSTANT, eVisual, oPC);
SetDeity(oPC, "");
RemoveXPFromParty(100*GetHitDice(oPC), oPC, FALSE);
}