35 lines
699 B
Plaintext
35 lines
699 B
Plaintext
//Put this on action taken in the conversation editor
|
|
void RemoveXPFromParty(int nXP, object oPC, int bAllParty=FALSE)
|
|
{
|
|
|
|
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);
|
|
}
|
|
}
|
|
}
|
|
#include "nw_i0_tool"
|
|
void main()
|
|
{
|
|
|
|
object oPC = GetPCSpeaker();
|
|
|
|
RemoveXPFromParty(434900, oPC, FALSE);
|
|
|
|
AssignCommand(oPC, TakeGoldFromCreature(50000, oPC, TRUE));
|
|
|
|
DelayCommand(5.0, RewardPartyXP(435100, oPC, FALSE));
|
|
|
|
}
|