88 lines
3.2 KiB
Plaintext
88 lines
3.2 KiB
Plaintext
#include "x0_i0_petrify"
|
|
#include "nw_i0_generic"
|
|
/* 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 oMod = GetModule();
|
|
SetLocalInt(oMod, "xcheck", 0);
|
|
SetLocalInt(oMod, "challenge", 1);
|
|
SetLocalInt(oMod, "d1", 1);
|
|
object oTarget;
|
|
object oSpawn;
|
|
location lTarget;
|
|
object oTarget2 = GetWaypointByTag("big_wp");
|
|
lTarget = GetLocation(oTarget);
|
|
location bTarget = GetLocation(oTarget2);
|
|
object oLever = GetObjectByTag("cr_lever");
|
|
object oCrystal1 = GetObjectByTag("crystal1");
|
|
object oCrystal2 = GetObjectByTag("crystal2");
|
|
object oCrystal3 = GetObjectByTag("crystal3");
|
|
int oGameMode = GetLocalInt(oMod, "gamemode");
|
|
SetLocalInt(oPC, "lives", 1);
|
|
int lState = GetLocalInt(oMod, "lever_state");
|
|
FloatingTextStringOnCreature("You have 2 lives to complete the challenge", oPC);
|
|
if (lState!=1)
|
|
{
|
|
DelayCommand(0.0, PlaySound("sce_positive"));
|
|
AssignCommand(oLever, ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE));
|
|
AssignCommand(oCrystal1, ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE));
|
|
AssignCommand(oCrystal2, ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE));
|
|
AssignCommand(oCrystal3, ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE));
|
|
SetLocalInt(oMod, "lever_state", 1);
|
|
RecomputeStaticLighting(GetArea(OBJECT_SELF));
|
|
}
|
|
object oP1 = GetObjectByTag("pool1");
|
|
object oP2 = GetObjectByTag("pool2");
|
|
object oP3 = GetObjectByTag("fountain1");
|
|
object oP4 = GetObjectByTag("fountain2");
|
|
object oLever1 = GetObjectByTag("pool_lever");
|
|
object oLever2 = GetObjectByTag("fount_lever");
|
|
effect eEffect = EffectVisualEffect(VFX_DUR_GLOBE_INVULNERABILITY);
|
|
AssignCommand(oLever1, ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE));
|
|
AssignCommand(oLever2, ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE));
|
|
RemoveEffectOfType(oP1, GetEffectType(eEffect));
|
|
RemoveEffectOfType(oP2, GetEffectType(eEffect));
|
|
RemoveEffectOfType(oP3, GetEffectType(eEffect));
|
|
RemoveEffectOfType(oP4, GetEffectType(eEffect));
|
|
SetLocalInt(oMod, "fountain_state", 0);
|
|
SetLocalInt(oMod, "pool_state", 0);
|
|
object oSpawner = GetObjectByTag("spawner");
|
|
AssignCommand(oSpawner, ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE));
|
|
if (oGameMode==1)
|
|
{
|
|
oTarget = GetWaypointByTag("big_wp");
|
|
lTarget = GetLocation(oTarget);
|
|
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "dragon2", bTarget);
|
|
}
|
|
else
|
|
{
|
|
oTarget = GetWaypointByTag("big_wp");
|
|
lTarget = GetLocation(oTarget);
|
|
oSpawn = CreateObject(OBJECT_TYPE_CREATURE, "dragon1", bTarget);
|
|
}
|
|
oTarget = oSpawn;
|
|
SetIsTemporaryEnemy(oPC, oTarget);
|
|
AssignCommand(oTarget, ActionAttack(oPC));
|
|
AssignCommand(oTarget, DetermineCombatRound(oPC));
|
|
oTarget = oSpawn;
|
|
|
|
//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) DelayCommand(0.5, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_PWKILL), oTarget));
|
|
else DelayCommand(0.5, ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_PWKILL), GetLocation(oTarget)));
|
|
SetLocked(GetObjectByTag("arena_gate"), TRUE);
|
|
}
|
|
|