46 lines
		
	
	
		
			965 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			46 lines
		
	
	
		
			965 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);
 | 
						|
      }
 | 
						|
   }
 | 
						|
}
 | 
						|
#include "nw_i0_plot"
 | 
						|
/*   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    */
 | 
						|
 | 
						|
//Goes OnPlayerRespawn of the module properties
 | 
						|
void main()
 | 
						|
{
 | 
						|
 | 
						|
object oPC = GetLastRespawnButtonPresser();
 | 
						|
 | 
						|
if (!GetIsPC(oPC)) return;
 | 
						|
 | 
						|
ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectResurrection(),oPC);
 | 
						|
 | 
						|
ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectHeal(GetMaxHitPoints(oPC)), oPC);
 | 
						|
 | 
						|
RemoveEffects(oPC);
 | 
						|
 | 
						|
RemoveXPFromParty(1000, oPC, FALSE);
 | 
						|
 | 
						|
}
 |