Initial Upload
Initial Upload
This commit is contained in:
36
_module/nss/lose_xp_quest_oc.nss
Normal file
36
_module/nss/lose_xp_quest_oc.nss
Normal file
@@ -0,0 +1,36 @@
|
||||
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 Repeat(object oPC)
|
||||
{
|
||||
int nInt = GetCampaignInt("deathquest","exp_loss",oPC);
|
||||
if(nInt==1)
|
||||
{
|
||||
RemoveXPFromParty(10, oPC, FALSE);
|
||||
DelayCommand(30.0, Repeat(oPC));
|
||||
}
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
object oPC = OBJECT_SELF;
|
||||
Repeat(oPC);
|
||||
}
|
||||
|
Reference in New Issue
Block a user