AOC_PRC8/_module/nss/take5000.nss
Jaysyn904 5e558169a0 Initial Commit
Initial Commit
2025-04-03 11:24:16 -04:00

37 lines
701 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.6
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(5000, oPC, FALSE);
}