37 lines
702 B
Plaintext
37 lines
702 B
Plaintext
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.3
|
|
|
|
For download info, please visit:
|
|
http://www.lilacsoul.revility.com */
|
|
|
|
//Put this on action taken in the conversation editor
|
|
void main()
|
|
{
|
|
|
|
object oPC = GetPCSpeaker();
|
|
|
|
RemoveXPFromParty(50000, oPC, FALSE);
|
|
|
|
}
|
|
|