generated from Jaysyn/ModuleTemplate
Initial Commit
Initial Commit
This commit is contained in:
77
_module/nss/duel_time_hard.nss
Normal file
77
_module/nss/duel_time_hard.nss
Normal file
@@ -0,0 +1,77 @@
|
||||
#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 oP1 = GetObjectByTag("pool1");
|
||||
object oP2 = GetObjectByTag("pool2");
|
||||
object oP3 = GetObjectByTag("fountain1");
|
||||
object oP4 = GetObjectByTag("fountain2");
|
||||
int lState = GetLocalInt(oMod, "lever_state");
|
||||
int oState = GetLocalInt(oMod, "fountain_state");
|
||||
int oStatep = GetLocalInt(oMod, "pool_state");
|
||||
effect eEffect = EffectVisualEffect(VFX_DUR_GLOBE_INVULNERABILITY);
|
||||
effect eEffect2 = EffectVisualEffect(VFX_NONE);
|
||||
object oSpawner = GetObjectByTag("spawner");
|
||||
AssignCommand(oSpawner, ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE));
|
||||
AssignCommand(GetObjectByTag("starfall"), ClearAllActions());
|
||||
DelayCommand(0.2, AssignCommand(GetObjectByTag("starfall"), ActionPlayAnimation(ANIMATION_FIREFORGET_VICTORY2)));
|
||||
SetLocalInt(oMod, "duel_on", 1);
|
||||
SetLocalInt(oMod, "st3", 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==1)||(oState==0)||(oStatep==1))
|
||||
{
|
||||
|
||||
|
||||
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 the pools in hard 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_DEACTIVATE));
|
||||
AssignCommand(oLever1, ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE));
|
||||
AssignCommand(oLever2, ActionPlayAnimation(ANIMATION_PLACEABLE_ACTIVATE));
|
||||
DelayCommand(8.5, AssignCommand(oCrystal1, ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE)));
|
||||
DelayCommand(8.5, AssignCommand(oCrystal2, ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE)));
|
||||
DelayCommand(8.5, AssignCommand(oCrystal3, ActionPlayAnimation(ANIMATION_PLACEABLE_DEACTIVATE)));
|
||||
SetLocalInt(oMod, "lever_state", 0);
|
||||
SetLocalInt(oMod, "pool_state", 0);
|
||||
SetLocalInt(oMod, "fountain_state", 1);
|
||||
DelayCommand(8.5, RemoveEffectOfType(oP1, GetEffectType(eEffect)));
|
||||
DelayCommand(8.5, RemoveEffectOfType(oP2, GetEffectType(eEffect)));
|
||||
DelayCommand(8.5, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eEffect, oP3));
|
||||
DelayCommand(8.5, ApplyEffectToObject(DURATION_TYPE_PERMANENT,eEffect, oP4));
|
||||
}
|
||||
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