173 lines
5.7 KiB
Plaintext
173 lines
5.7 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 on action taken in the conversation editor
|
||
|
void main()
|
||
|
{
|
||
|
|
||
|
object oPC = GetPCSpeaker();
|
||
|
|
||
|
object oTarget;
|
||
|
object oTarget1;
|
||
|
object oTarget2;
|
||
|
object oTarget3;
|
||
|
object oTarget4;
|
||
|
object oTarget5;
|
||
|
object oTarget6;
|
||
|
object oTarget7;
|
||
|
object oTarget8;
|
||
|
|
||
|
location lTarget;
|
||
|
location lTarget1;
|
||
|
location lTarget2;
|
||
|
location lTarget3;
|
||
|
location lTarget4;
|
||
|
location lTarget5;
|
||
|
location lTarget6;
|
||
|
location lTarget7;
|
||
|
location lTarget8;
|
||
|
|
||
|
oTarget = GetWaypointByTag("RouldChamber");
|
||
|
|
||
|
lTarget = GetLocation(oTarget);
|
||
|
|
||
|
//only do the jump if the location is valid.
|
||
|
//though not flawless, we just check if it is in a valid area.
|
||
|
//the script will stop if the location isn't valid - meaning that
|
||
|
//nothing put after the teleport will fire either.
|
||
|
//the current location won't be stored, either
|
||
|
|
||
|
if (GetAreaFromLocation(lTarget)==OBJECT_INVALID) return;
|
||
|
|
||
|
oTarget = oPC;
|
||
|
|
||
|
//Visual effects can't be applied to waypoints, so if it is a WP
|
||
|
//apply to the WP's location instead
|
||
|
|
||
|
int nInt;
|
||
|
int nInt1;
|
||
|
int nInt2;
|
||
|
int nInt3;
|
||
|
int nInt4;
|
||
|
int nInt5;
|
||
|
int nInt6;
|
||
|
int nInt7;
|
||
|
int nInt8;
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
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));
|
||
|
|
||
|
object oSpawn;
|
||
|
object oSpawn1;
|
||
|
object oSpawn2;
|
||
|
object oSpawn3;
|
||
|
object oSpawn4;
|
||
|
object oSpawn5;
|
||
|
object oSpawn6;
|
||
|
object oSpawn7;
|
||
|
object oSpawn8;
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
oTarget1 = GetWaypointByTag("galoyalist1");
|
||
|
oTarget2 = GetWaypointByTag("galoyalist2");
|
||
|
oTarget3 = GetWaypointByTag("galoyalist3");
|
||
|
oTarget4 = GetWaypointByTag("galoyalist4");
|
||
|
oTarget5 = GetWaypointByTag("galoyalist5");
|
||
|
oTarget6 = GetWaypointByTag("galoyalist6");
|
||
|
oTarget7 = GetWaypointByTag("galoyalist7");
|
||
|
oTarget8 = GetWaypointByTag("galoyalist8");
|
||
|
|
||
|
lTarget1 = GetLocation(oTarget1);
|
||
|
lTarget2 = GetLocation(oTarget2);
|
||
|
lTarget3 = GetLocation(oTarget3);
|
||
|
lTarget4 = GetLocation(oTarget4);
|
||
|
lTarget5 = GetLocation(oTarget5);
|
||
|
lTarget6 = GetLocation(oTarget6);
|
||
|
lTarget7 = GetLocation(oTarget7);
|
||
|
lTarget8 = GetLocation(oTarget8);
|
||
|
|
||
|
oSpawn1 = CreateObject(OBJECT_TYPE_CREATURE, "gageneral", lTarget1);
|
||
|
oSpawn2 = CreateObject(OBJECT_TYPE_CREATURE, "galoyalista", lTarget2);
|
||
|
oSpawn3 = CreateObject(OBJECT_TYPE_CREATURE, "galoyalist", lTarget3);
|
||
|
oSpawn4 = CreateObject(OBJECT_TYPE_CREATURE, "galoyalist", lTarget4);
|
||
|
oSpawn5 = CreateObject(OBJECT_TYPE_CREATURE, "galoyalist", lTarget5);
|
||
|
oSpawn6 = CreateObject(OBJECT_TYPE_CREATURE, "galoyalist", lTarget6);
|
||
|
oSpawn7 = CreateObject(OBJECT_TYPE_CREATURE, "galoyalist", lTarget7);
|
||
|
oSpawn8 = CreateObject(OBJECT_TYPE_CREATURE, "galoyalist", lTarget8);
|
||
|
|
||
|
oTarget1 = oSpawn1;
|
||
|
oTarget2 = oSpawn2;
|
||
|
oTarget3 = oSpawn3;
|
||
|
oTarget4 = oSpawn4;
|
||
|
oTarget5 = oSpawn5;
|
||
|
oTarget6 = oSpawn6;
|
||
|
oTarget7 = oSpawn7;
|
||
|
oTarget8 = oSpawn8;
|
||
|
|
||
|
//Visual effects can't be applied to waypoints, so if it is a WP
|
||
|
//apply to the WP's location instead
|
||
|
|
||
|
nInt1 = GetObjectType(oTarget1);
|
||
|
nInt2 = GetObjectType(oTarget2);
|
||
|
nInt3 = GetObjectType(oTarget3);
|
||
|
nInt4 = GetObjectType(oTarget4);
|
||
|
nInt5 = GetObjectType(oTarget5);
|
||
|
nInt6 = GetObjectType(oTarget6);
|
||
|
nInt7 = GetObjectType(oTarget7);
|
||
|
nInt8 = GetObjectType(oTarget8);
|
||
|
|
||
|
if (nInt1 != OBJECT_TYPE_WAYPOINT) DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_GATE), oTarget1));
|
||
|
else DelayCommand(0.5, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_GATE), GetLocation(oTarget1)));
|
||
|
|
||
|
if (nInt2 != OBJECT_TYPE_WAYPOINT) DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_GATE), oTarget2));
|
||
|
else DelayCommand(0.5, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_GATE), GetLocation(oTarget2)));
|
||
|
|
||
|
if (nInt3 != OBJECT_TYPE_WAYPOINT) DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_GATE), oTarget3));
|
||
|
else DelayCommand(0.5, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_GATE), GetLocation(oTarget3)));
|
||
|
|
||
|
if (nInt4 != OBJECT_TYPE_WAYPOINT) DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_GATE), oTarget4));
|
||
|
else DelayCommand(0.5, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_GATE), GetLocation(oTarget4)));
|
||
|
|
||
|
if (nInt5 != OBJECT_TYPE_WAYPOINT) DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_GATE), oTarget5));
|
||
|
else DelayCommand(0.5, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_GATE), GetLocation(oTarget5)));
|
||
|
|
||
|
if (nInt6 != OBJECT_TYPE_WAYPOINT) DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_GATE), oTarget6));
|
||
|
else DelayCommand(0.5, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_GATE), GetLocation(oTarget6)));
|
||
|
|
||
|
if (nInt7 != OBJECT_TYPE_WAYPOINT) DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_GATE), oTarget7));
|
||
|
else DelayCommand(0.5, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_GATE), GetLocation(oTarget7)));
|
||
|
|
||
|
if (nInt8 != OBJECT_TYPE_WAYPOINT) DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_GATE), oTarget8));
|
||
|
else DelayCommand(0.5, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_SUMMON_GATE), GetLocation(oTarget8)));
|
||
|
|
||
|
object oObjectD = GetObjectByTag("GAGENDOOR");
|
||
|
AssignCommand(oObjectD, PlaySound("as_cv_shopmetal2"));
|
||
|
AssignCommand(oObjectD, PlaySound("as_hr_x2chnratl1"));
|
||
|
SetLocked (oObjectD, FALSE);
|
||
|
ActionOpenDoor(oObjectD);
|
||
|
|
||
|
|
||
|
ExecuteScript("killself",OBJECT_SELF);
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
}
|
||
|
|