Files
Anphillia_PRC8/_module/nss/eye_batvamp_01.nss
Jaysyn904 28cdb617b3 Initial commit
Adding all of the current content for Anphillia Unlimited.
2024-01-04 07:49:38 -05:00

53 lines
1.4 KiB
Plaintext

//////////
// Bat to Vampire #1
//
// This Script turns the creature that this script is assigned OnDeath
// to a basic Vampire
//////////
#include "hc_inc_npccorpse"
#include "NW_I0_GENERIC"
#include "hc_inc"
#include "anph_inc"
void main()
{
// Get the tag of the bat
string sOwnerTag = GetTag(OBJECT_SELF);
// Set the effect of recreating
effect eMind = EffectVisualEffect(VFX_FNF_SUMMON_UNDEAD);
// Initialize Creature String
string sCreature;
// find out which type of vampire we have to create
if (sOwnerTag == "BatToVampire1")
{
sCreature = "vampire001";
}
else if (sOwnerTag == "BatToVampire2")
{
sCreature = "vampire002";
}
else if (sOwnerTag == "BatToVampire3")
{
sCreature = "nw_vampire002";
}
else if (sOwnerTag == "BatToVampire4")
{
sCreature = "nw_vampire004";
}
else if (sOwnerTag == "BatToVampire5")
{
sCreature = "vampire004";
}
// Apply the Recreate Effect
ApplyEffectToObject(DURATION_TYPE_INSTANT, eMind, OBJECT_SELF);
// Turn off plot flag in case it's on
SetPlotFlag(OBJECT_SELF, FALSE);
// Destroy the bat creature/corpse with a delay of 0.5 seconds
DestroyObject(OBJECT_SELF, 0.5);
// Create the new Vampier that was determined by the if/else at the location of the died bat
object oMonster = CreateObject(OBJECT_TYPE_CREATURE, sCreature, GetLocation(OBJECT_SELF));
}