generated from Jaysyn/ModuleTemplate
Initial Commit
Initial Commit
This commit is contained in:
59
_module/nss/starfall_reset.nss
Normal file
59
_module/nss/starfall_reset.nss
Normal file
@@ -0,0 +1,59 @@
|
||||
/* Script generated by
|
||||
Lilac Soul's NWN Script Generator, v. 1.6
|
||||
|
||||
For download info, please visit:
|
||||
http://www.lilacsoul.revility.com */
|
||||
|
||||
//Put this OnUsed
|
||||
void main()
|
||||
{
|
||||
|
||||
object oPC = GetFirstPC();
|
||||
|
||||
if (!GetIsPC(oPC)) return;
|
||||
|
||||
object oTarget;
|
||||
oTarget = GetObjectByTag("starfall");
|
||||
|
||||
//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_UNSUMMON), oTarget);
|
||||
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_UNSUMMON), GetLocation(oTarget));
|
||||
|
||||
oTarget = GetObjectByTag("starfall");
|
||||
|
||||
DestroyObject(oTarget, 3.0);
|
||||
|
||||
object oSpawn;
|
||||
location lTarget;
|
||||
oTarget = GetWaypointByTag("starfall_wp");
|
||||
|
||||
lTarget = GetLocation(oTarget);
|
||||
|
||||
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "starfall", lTarget);
|
||||
|
||||
oTarget = oSpawn;
|
||||
|
||||
//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) DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_STRIKE_HOLY), oTarget));
|
||||
else DelayCommand(0.5, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_STRIKE_HOLY), GetLocation(oTarget)));
|
||||
|
||||
oTarget = GetObjectByTag("starfall");
|
||||
AdjustReputation(oPC, oTarget, 100);
|
||||
|
||||
while (GetIsPC(oPC) == TRUE)
|
||||
{
|
||||
AdjustReputation(oPC, oTarget, 100);
|
||||
oPC = GetNextPC();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user