//:://///////////////////////////////////////////// //:: Henchman Death Script //:: //:: NW_CH_AC7.nss //:: //:: Copyright (c) 2001 Bioware Corp. //::////////////////////////////////////////////// //:: //::////////////////////////////////////////////// //:: //:: Created By: //:: Modified by: Brent, April 3 2002 //:: Removed delay in respawning //:: the henchman - caused bugs //::////////////////////////////////////////////// //:://///////////////////////////////////////////// //:: 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 "hc_inc" //#include "subraces" void main() { // * This is used by the advanced henchmen // * Let Brent know if it interferes with animal // * companions et cetera if (GetIsObjectValid(GetMaster()) == TRUE) { object oMe = GetAssociate(ASSOCIATE_TYPE_HENCHMAN, GetMaster()); if (oMe == OBJECT_SELF // * this is to prevent 'double hits' from stopping // * the henchmen from moving to the temple of tyr // * I.e., henchmen dies 'twice', once after leaving your party || GetLocalInt(OBJECT_SELF, "NW_L_HEN_I_DIED") == TRUE) { SetPlotFlag(oMe, TRUE); SetAssociateState(NW_ASC_IS_BUSY, TRUE); AddJournalQuestEntry("Henchman", 99, GetMaster(), FALSE, FALSE, FALSE); SetIsDestroyable(FALSE, TRUE, TRUE); SetLocalInt(OBJECT_SELF, "NW_L_HEN_I_DIED", TRUE); // RemoveHenchman(GetMaster()); // effect eRaise = EffectResurrection(); ClearAllActions(); DelayCommand(0.5, ActionDoCommand(SetCommandable(TRUE))); DelayCommand(5.0, ActionDoCommand(SetAssociateState(NW_ASC_IS_BUSY, FALSE))); DelayCommand(5.0, SetPlotFlag(oMe, FALSE)); //BringBack(); SetCommandable(FALSE); } else // * I am a familiar, give 1d6 damage to my master if (GetAssociate(ASSOCIATE_TYPE_FAMILIAR, GetMaster()) == OBJECT_SELF) { //Check to see if critter is a familiar. //If so, impose an xp penalty object oMaster = GetMaster(OBJECT_SELF); // April 2002: Made it so that familiar death can never kill the player // only wound them. { int nDam =d6(); if (nDam >= GetCurrentHitPoints(GetMaster())) { nDam = GetCurrentHitPoints(GetMaster()) - 1; } effect eDam = EffectDamage(nDam); FloatingTextStrRefOnCreature(63489, GetMaster(), FALSE); ApplyEffectToObject(DURATION_TYPE_PERMANENT, eDam, GetMaster()); } } } if(GetSpawnInCondition(NW_FLAG_DEATH_EVENT)) { SignalEvent(OBJECT_SELF, EventUserDefined(1007)); } }