Lankhmar_PRC8/_module/nss/hench_ondeath.nss
Jaysyn904 ebc0c6a9b2 Initial commit
Initial commit [v9.7]
2025-04-03 12:54:47 -04:00

30 lines
1.1 KiB
Plaintext

//Henchman Death Script
#include "nw_i0_plot"
#include "x0_i0_henchman"
void main()
{
//set local int to start conv thread for player to rejoin
//this part written by kookoo and Mistress on 29 May 2008
SetLocalInt(GetMaster(OBJECT_SELF), GetResRef(OBJECT_SELF) + "_dead", 1);
// * This is used by the advanced henchmen
// * Let Brent know if it interferes with animal
// * companions et cetera
if (GetAssociateType(OBJECT_SELF) == ASSOCIATE_TYPE_HENCHMAN)
{
SetLocalInt(OBJECT_SELF, "X2_L_IJUSTDIED", 10);
SetKilled(GetMaster());
SetDidDie();
object oHench = OBJECT_SELF;
// * Take them out of stealth mode too (Nov 1 - BK)
SetActionMode(oHench, ACTION_MODE_STEALTH, FALSE);
// * Remove invisibility type effects off of henchmen (Nov 7 - BK)
RemoveSpellEffects(SPELL_INVISIBILITY, oHench, oHench);
RemoveSpellEffects(SPELL_IMPROVED_INVISIBILITY, oHench, oHench);
RemoveSpellEffects(SPELL_SANCTUARY, oHench, oHench);
RemoveSpellEffects(SPELL_ETHEREALNESS, oHench, oHench);
}
RemoveHenchman(GetMaster(), OBJECT_SELF);
}