generated from Jaysyn/ModuleTemplate
117 lines
4.0 KiB
Plaintext
117 lines
4.0 KiB
Plaintext
|
|
// mod by jim lowe 9/26/2002
|
|
// added 200 xp per level xp penalty upon familiar death
|
|
|
|
//::///////////////////////////////////////////////
|
|
//:: Henchman Death Script
|
|
//::
|
|
//:: NW_CH_AC7.nss
|
|
//::
|
|
//:: Copyright (c) 2001-2008 Bioware Corp.
|
|
//:://////////////////////////////////////////////
|
|
//:: Official Campaign Henchmen Respawn
|
|
//:://////////////////////////////////////////////
|
|
//::
|
|
//:: Created By:
|
|
//:: Modified by: Brent, April 3 2002
|
|
//:: Removed delay in respawning
|
|
//:: the henchman - caused bugs
|
|
//:
|
|
//:: Georg, Oct 8 2003
|
|
//:: Rewrote teleport to temple routine
|
|
//:: because it was broken by
|
|
//:: some delicate timing issues in XP2
|
|
//:://////////////////////////////////////////////
|
|
//:://////////////////////////////////////////////////
|
|
//:: Modified By: Deva Winblood
|
|
//:: Modified On: April 9th, 2008
|
|
//:: Added Support for Dying Wile Mounted
|
|
//:://///////////////////////////////////////////////
|
|
|
|
//::///////////////////////////////////////////////
|
|
//:: Greater Restoration
|
|
//:: NW_S0_GrRestore.nss
|
|
//:: Copyright (c) 2001 Bioware Corp.
|
|
//:://////////////////////////////////////////////
|
|
/*
|
|
Removes all negative effects of a temporary nature
|
|
and all permanent effects of a supernatural nature
|
|
from the character. Does not remove the effects
|
|
relating to Mind-Affecting spells or movement alteration.
|
|
Heals target for 5d8 + 1 point per caster level.
|
|
*/
|
|
//:://////////////////////////////////////////////
|
|
//:: Created By: Preston Watamaniuk
|
|
//:: Created On: Jan 7, 2002
|
|
//:://////////////////////////////////////////////
|
|
//:: VFX Pass By: Preston W, On: June 20, 2001
|
|
#include "nw_i0_generic"
|
|
#include "nw_i0_plot"
|
|
#include "habd_include"
|
|
#include "x3_inc_horse"
|
|
/*
|
|
// * June 1: use RemoveEffects from plot include instead
|
|
void GreaterRestore(object oHench)
|
|
{
|
|
//Declare major variables
|
|
object oTarget = oHench;
|
|
effect eVisual = EffectVisualEffect(VFX_IMP_RESTORATION_GREATER);
|
|
|
|
effect eBad = GetFirstEffect(oTarget);
|
|
//Search for negative effects
|
|
while(GetIsEffectValid(eBad))
|
|
{
|
|
if (GetEffectType(eBad) == EFFECT_TYPE_ABILITY_DECREASE ||
|
|
GetEffectType(eBad) == EFFECT_TYPE_AC_DECREASE ||
|
|
GetEffectType(eBad) == EFFECT_TYPE_ATTACK_DECREASE ||
|
|
GetEffectType(eBad) == EFFECT_TYPE_DAMAGE_DECREASE ||
|
|
GetEffectType(eBad) == EFFECT_TYPE_DAMAGE_IMMUNITY_DECREASE ||
|
|
GetEffectType(eBad) == EFFECT_TYPE_SAVING_THROW_DECREASE ||
|
|
GetEffectType(eBad) == EFFECT_TYPE_SPELL_RESISTANCE_DECREASE ||
|
|
GetEffectType(eBad) == EFFECT_TYPE_SKILL_DECREASE ||
|
|
GetEffectType(eBad) == EFFECT_TYPE_BLINDNESS ||
|
|
GetEffectType(eBad) == EFFECT_TYPE_DEAF ||
|
|
GetEffectType(eBad) == EFFECT_TYPE_CURSE ||
|
|
GetEffectType(eBad) == EFFECT_TYPE_DISEASE ||
|
|
GetEffectType(eBad) == EFFECT_TYPE_POISON ||
|
|
GetEffectType(eBad) == EFFECT_TYPE_PARALYZE ||
|
|
GetEffectType(eBad) == EFFECT_TYPE_NEGATIVELEVEL)
|
|
{
|
|
//Remove effect if it is negative.
|
|
RemoveEffect(oTarget, eBad);
|
|
}
|
|
eBad = GetNextEffect(oTarget);
|
|
}
|
|
// ApplyEffectToObject(DURATION_TYPE_INSTANT, eVisual, oTarget);
|
|
} */
|
|
|
|
|
|
|
|
void main()
|
|
{
|
|
|
|
// HABD CODE START
|
|
if (HABDMakeHenchmanBleed()) return;
|
|
// HABD CODE END
|
|
|
|
// * This is used by the advanced henchmen
|
|
// * Let Brent know if it interferes with animal
|
|
// * companions et cetera
|
|
|
|
else
|
|
// * I am a familiar, drain 200 xp per level as penalty
|
|
if (GetAssociate(ASSOCIATE_TYPE_FAMILIAR, GetMaster()) == OBJECT_SELF)
|
|
{
|
|
int iXP = GetXP(GetMaster());
|
|
int iXPPenalty = 25 * GetHitDice(GetMaster());
|
|
string msg = "You have lost " + IntToString(iXPPenalty) +
|
|
" XP due to the death of your familiar.";
|
|
iXP = iXP - iXPPenalty;
|
|
if (iXP < 0)
|
|
iXP = 0;
|
|
SetXP(GetMaster(), iXP);
|
|
SendMessageToPC(GetMaster(), msg);
|
|
}
|
|
}
|
|
|