Areas and Fixes
Added CCOH and missing areas Changed some areas to be craftable, Fixed some on death issues, Fixed the Gaurd
This commit is contained in:
62
_module/nss/vg_c2_vampiregd.nss
Normal file
62
_module/nss/vg_c2_vampiregd.nss
Normal file
@@ -0,0 +1,62 @@
|
||||
//::///////////////////////////////////////////////
|
||||
//:: VG_C2_VAMPIREGD.nss
|
||||
//:://////////////////////////////////////////////
|
||||
/*
|
||||
Customized Vampire User Defined script.
|
||||
When receive 7777 this tells the gas
|
||||
that it should've reached the coffin
|
||||
If coffin exists, create another vampire
|
||||
in 'n' hours otherwise destroy self.
|
||||
*/
|
||||
//:://////////////////////////////////////////////
|
||||
//:: Created By: Brent
|
||||
//:: Created On: January 2002
|
||||
//:://////////////////////////////////////////////
|
||||
void main()
|
||||
{
|
||||
int iHours=(8);
|
||||
float fDuration = HoursToSeconds(iHours);
|
||||
|
||||
int nEvent = GetUserDefinedEventNumber();
|
||||
if (nEvent == 7777)
|
||||
{ SetCommandable(TRUE);
|
||||
// * search for nearest coffin
|
||||
int bFound = FALSE;
|
||||
int nCount = 0;
|
||||
while (bFound == FALSE)
|
||||
{
|
||||
object oCoffin = GetObjectByTag(GetTag(OBJECT_SELF),nCount);
|
||||
nCount++;
|
||||
if (GetIsObjectValid(oCoffin) && (GetObjectType(oCoffin) == OBJECT_TYPE_PLACEABLE))
|
||||
{
|
||||
object oVamp = CreateObject(OBJECT_TYPE_CREATURE, GetLocalString(OBJECT_SELF, "NW_L_MYCREATOR"),GetLocation(OBJECT_SELF));
|
||||
//object oVamp = CreateObject(OBJECT_TYPE_CREATURE,"vampire001",GetLocation(OBJECT_SELF),TRUE);
|
||||
SetPlotFlag(OBJECT_SELF,FALSE);
|
||||
// Lets make this vampire sleep for 'n' hours before he is ready to go
|
||||
effect eParalyze =EffectCutsceneParalyze();
|
||||
effect eInvis = EffectVisualEffect(VFX_DUR_CUTSCENE_INVISIBILITY);
|
||||
effect eSpellImmune = EffectImmunity(SPELL_ALL_SPELLS);
|
||||
effect eInvuln = EffectDamageReduction(10000,DAMAGE_POWER_PLUS_TWENTY);
|
||||
effect eSanct = EffectEthereal();
|
||||
effect eLink = EffectLinkEffects(eParalyze,eInvis);
|
||||
effect eLink2 = EffectLinkEffects(eSpellImmune,eInvuln);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eSanct,oVamp,fDuration);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eLink,oVamp,fDuration);
|
||||
ApplyEffectToObject(DURATION_TYPE_TEMPORARY,eLink2,oVamp,fDuration);
|
||||
// This vamp will become "material" again either at the specified number
|
||||
// of hours or when his coffin is destroyed. This ties into an ondeath
|
||||
// event on the coffin of course.
|
||||
|
||||
DestroyObject(OBJECT_SELF, 5.0);
|
||||
bFound = TRUE;
|
||||
}
|
||||
else
|
||||
// * if no coffin then destroy self
|
||||
if (GetIsObjectValid(oCoffin) == FALSE)
|
||||
{
|
||||
bFound = TRUE;
|
||||
DestroyObject(OBJECT_SELF, 0.1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user