Initial commit. Updated release archive.
This commit is contained in:
18
_module/nss/nwf_vampbat2.nss
Normal file
18
_module/nss/nwf_vampbat2.nss
Normal file
@@ -0,0 +1,18 @@
|
||||
void main()
|
||||
{
|
||||
object oCreature = GetNearestCreature(CREATURE_TYPE_PLAYER_CHAR, PLAYER_CHAR_IS_PC);
|
||||
if (GetIsObjectValid(oCreature) == TRUE && GetDistanceToObject(oCreature) < 10.0)
|
||||
{
|
||||
effect eMind = EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD);
|
||||
string sCreature = "vampire001";
|
||||
// * 20% chance of a vampire maiden instead
|
||||
if (Random(100) > 80)
|
||||
{
|
||||
sCreature = "vampiremaiden";
|
||||
}
|
||||
object oMonster = CreateObject(OBJECT_TYPE_CREATURE, sCreature, GetLocation(OBJECT_SELF));
|
||||
ApplyEffectToObject(DURATION_TYPE_INSTANT, eMind, oMonster);
|
||||
SetPlotFlag(OBJECT_SELF, FALSE);
|
||||
DestroyObject(OBJECT_SELF, 0.5);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user