generated from Jaysyn/ModuleTemplate
Initial Commit
Initial Commit
This commit is contained in:
76
_module/nss/duel_time_med.nss
Normal file
76
_module/nss/duel_time_med.nss
Normal file
@@ -0,0 +1,76 @@
|
||||
#include "x0_i0_petrify"
|
||||
#include "nw_i0_generic"
|
||||
void main()
|
||||
{
|
||||
int nInt;
|
||||
object oTarget;
|
||||
object oTarget1;
|
||||
object oPC = GetPCSpeaker();
|
||||
object oMod = GetModule();
|
||||
object oLever = GetObjectByTag("cr_lever");
|
||||
object oLever1 = GetObjectByTag("pool_lever");
|
||||
object oLever2 = GetObjectByTag("fount_lever");
|
||||
object oCrystal1 = GetObjectByTag("crystal1");
|
||||
object oCrystal2 = GetObjectByTag("crystal2");
|
||||
object oCrystal3 = GetObjectByTag("crystal3");
|
||||
object oP3 = GetObjectByTag("fountain1");
|
||||
object oP4 = GetObjectByTag("fountain2");
|
||||
object oP1 = GetObjectByTag("pool1");
|
||||
object oP2 = GetObjectByTag("pool2");
|
||||
int lState = GetLocalInt(oMod, "lever_state");
|
||||
int oState = GetLocalInt(oMod, "fountain_state");
|
||||
int oStatep = GetLocalInt(oMod, "pool_state");
|
||||
object oSpawner = GetObjectByTag("spawner");
|
||||
AssignCommand(oSpawner, ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE));
|
||||
effect eEffect = EffectVisualEffect(VFX_DUR_GLOBE_INVULNERABILITY);
|
||||
effect eEffect2 = EffectVisualEffect(VFX_NONE);
|
||||
AssignCommand(GetObjectByTag("starfall"), ClearAllActions());
|
||||
DelayCommand(0.2, AssignCommand(GetObjectByTag("starfall"), ActionPlayAnimation(ANIMATION_FIREFORGET_VICTORY2)));
|
||||
SetLocalInt(oMod, "duel_on", 1);
|
||||
SetLocalInt(oMod, "st2", 1);
|
||||
oTarget = GetObjectByTag("duel_effect");
|
||||
nInt = GetObjectType(oTarget);
|
||||
if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_PWKILL), oTarget);
|
||||
else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_FNF_PWKILL), GetLocation(oTarget));
|
||||
oTarget1 = GetObjectByTag("starfall");
|
||||
ClearAllActions();
|
||||
SetPlotFlag(GetObjectByTag("starfall"), FALSE);
|
||||
if ((lState==0)||(oState==1)||(oStatep==0))
|
||||
{
|
||||
DelayCommand(1.8, AssignCommand(oTarget1, JumpToLocation(GetLocation(GetObjectByTag ("s_duel_wp")))));
|
||||
DelayCommand(1.8, AssignCommand(oPC, JumpToLocation(GetLocation(GetObjectByTag ("p_duel_wp")))));
|
||||
DelayCommand(5.5, AssignCommand(GetObjectByTag("starfall"), ActionSpeakString("You may only use crystals and fountains in medium mode",TALKVOLUME_SHOUT)));
|
||||
DelayCommand(7.5, AssignCommand(GetObjectByTag("starfall"), ActionPlayAnimation(ANIMATION_FIREFORGET_VICTORY2)));
|
||||
DelayCommand(7.5, AssignCommand(GetObjectByTag("starfall"), ActionSpeakString("Activate!",TALKVOLUME_SHOUT)));
|
||||
DelayCommand(10.5, AssignCommand(GetObjectByTag("starfall"), ActionSpeakString("Ready?",TALKVOLUME_SHOUT)));
|
||||
DelayCommand(12.5, AssignCommand(GetObjectByTag("starfall"), ActionSpeakString("GO!!!",TALKVOLUME_SHOUT)));
|
||||
DelayCommand(13.5,SetIsTemporaryEnemy(oPC, oTarget1));
|
||||
DelayCommand(13.5,AssignCommand(oTarget1, ActionAttack(oPC)));
|
||||
DelayCommand(8.5, AssignCommand(oPC, PlaySound("sce_positive")));
|
||||
AssignCommand(oLever, ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE));
|
||||
AssignCommand(oLever1, ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE));
|
||||
AssignCommand(oLever2, ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE));
|
||||
DelayCommand(8.5, AssignCommand(oCrystal1, ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE)));
|
||||
DelayCommand(8.5, AssignCommand(oCrystal2, ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE)));
|
||||
DelayCommand(8.5, AssignCommand(oCrystal3, ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE)));
|
||||
SetLocalInt(oMod, "lever_state", 1);
|
||||
SetLocalInt(oMod, "pool_state", 1);
|
||||
SetLocalInt(oMod, "fountain_state", 0);
|
||||
DelayCommand(8.5, RemoveEffectOfType(oP3, GetEffectType(eEffect)));
|
||||
DelayCommand(8.5, RemoveEffectOfType(oP4, GetEffectType(eEffect)));
|
||||
DelayCommand(8.5, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eEffect, oP1));
|
||||
DelayCommand(8.5, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eEffect, oP2));
|
||||
RecomputeStaticLighting(GetArea(OBJECT_SELF));
|
||||
}
|
||||
else
|
||||
{
|
||||
DelayCommand(1.8, AssignCommand(oTarget1, JumpToLocation(GetLocation(GetObjectByTag ("s_duel_wp")))));
|
||||
DelayCommand(1.8, AssignCommand(oPC, JumpToLocation(GetLocation(GetObjectByTag ("p_duel_wp")))));
|
||||
DelayCommand(5.5, AssignCommand(GetObjectByTag("starfall"), ActionSpeakString("Ready?",TALKVOLUME_SHOUT)));
|
||||
DelayCommand(6.5, AssignCommand(GetObjectByTag("starfall"), ActionSpeakString("GO!!!",TALKVOLUME_SHOUT)));
|
||||
DelayCommand(7.2,SetIsTemporaryEnemy(oPC, oTarget1));
|
||||
DelayCommand(7.5,AssignCommand(oTarget1, ActionAttack(oPC)));
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user