Alangara_PRC8/_module/nss/bigdragons1.nss
Jaysyn904 86feb9ca6f Initial commit
Initial commit.
2024-06-05 21:21:06 -04:00

63 lines
1.7 KiB
Plaintext

#include "nw_i0_2q4luskan"
/* Script generated by
Lilac Soul's NWN Script Generator, v. 2.0
For download info, please visit:
http://nwvault.ign.com/View.php?view=Other.Detail&id=4683&id=625 */
//Put this OnEnter
void main()
{
object oPC = GetEnteringObject();
if (!GetIsPC(oPC)) return;
int DoOnce = GetLocalInt(OBJECT_SELF, GetTag(OBJECT_SELF));
if (DoOnce==TRUE) return;
SetLocalInt(OBJECT_SELF, GetTag(OBJECT_SELF), TRUE);
object oTarget;
oTarget = GetObjectByTag("drastat1");
//Visual effects can't be applied to waypoints, so if it is a WP
//apply to the WP's location instead
int nInt;
nInt = GetObjectType(oTarget);
if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_DESTRUCTION), oTarget);
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_DESTRUCTION), GetLocation(oTarget));
DestroyObject(oTarget, 3.0);
oTarget = GetObjectByTag("drastat2");
//Visual effects can't be applied to waypoints, so if it is a WP
//apply to the WP's location instead
nInt = GetObjectType(oTarget);
if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_DESTRUCTION), oTarget);
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_DESTRUCTION), GetLocation(oTarget));
DestroyObject(oTarget, 3.0);
location lTarget;
oTarget = GetWaypointByTag("dragon21");
lTarget = GetLocation(oTarget);
DelayCommand(1.0, CreateObjectVoid(OBJECT_TYPE_CREATURE, "wyrmling_blu005", lTarget));
oTarget = GetWaypointByTag("dragon22");
lTarget = GetLocation(oTarget);
DelayCommand(1.0, CreateObjectVoid(OBJECT_TYPE_CREATURE, "wyrmling_blu005", lTarget));
}