60 lines
1.5 KiB
Plaintext
60 lines
1.5 KiB
Plaintext
|
/* 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();
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|