56 lines
1.1 KiB
Plaintext
56 lines
1.1 KiB
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. 2.1
|
|
|
|
For download info, please visit:
|
|
http://nwvault.ign.com/View.php?view=Other.Detail&id=4683&id=625 */
|
|
|
|
//Put this OnUsed
|
|
void main()
|
|
{
|
|
|
|
object oPC = GetLastUsedBy();
|
|
|
|
if (!GetIsPC(oPC)) return;
|
|
|
|
if (GetSubRace(oPC)=="reborn")
|
|
return;
|
|
|
|
object oTarget;
|
|
oTarget = oPC;
|
|
|
|
effect eEffect;
|
|
eEffect = EffectPetrify();
|
|
|
|
eEffect = SupernaturalEffect(eEffect);
|
|
|
|
ApplyEffectToObject(DURATION_TYPE_PERMANENT, eEffect, oTarget);
|
|
|
|
RemoveXPFromParty(10000, oPC, FALSE);
|
|
|
|
eEffect = EffectDeath();
|
|
|
|
DelayCommand(6.0, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oTarget, 60.0f));
|
|
|
|
}
|
|
|