UW2_PRC8/_module/nss/30relevelscript.nss
Jaysyn904 5197ad9a4d Initial upload
Initial upload
2023-09-25 20:24:01 -04:00

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));
}