Rune_PRC8/_module/nss/xptranslocrune.nss
Jaysyn904 d1c309ae63 Initial commit
Initial commit
2024-09-13 09:10:39 -04:00

38 lines
771 B
Plaintext

/* Script generated by
Lilac Soul's NWN Script Generator, v. 2.3
For download info, please visit:
http://nwvault.ign.com/View.php?view=Other.Detail&id=4683&id=625 */
//Put this on action taken in the conversation editor
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);
}
}
}
void main()
{
object oPC = GetPCSpeaker();
CreateItemOnObject("translocrune", oPC);
RemoveXPFromParty(25, oPC, FALSE);
}