Initial module commit
Initial module commit.
This commit is contained in:
45
_module/nss/losexponresp.nss
Normal file
45
_module/nss/losexponresp.nss
Normal file
@@ -0,0 +1,45 @@
|
||||
|
||||
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);
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user