Files
HeroesStone_PRC8/_module/nss/de1_wayjail_door.nss
Jaysyn904 1eefc84201 Initial Commit
Initial Commit.
2025-09-14 15:40:46 -04:00

79 lines
3.1 KiB
Plaintext

/////////////////////////////////////
// Dragon's Edge
// by Charly Carlos
/////////////////////////////////////
// On transition click script. Used to determine and launch Winzer's cutscene.
/////////////////////////////////////
#include "x2_inc_cutscene"
object oTarget = GetTransitionTarget(OBJECT_SELF);
// Standard cutscene start
void StartCutscene(object oPC, int iCut);
void main()
{
object oClicker = GetClickingObject();
SetAreaTransitionBMP(AREA_TRANSITION_RANDOM);
if ((GetLocalInt(GetModule(), "nJenakQuest")== 2) && (GetIsPC(oClicker)== TRUE) && (GetLocalInt(GetModule(), "nCutScene_Winzer1")!= 1))
{
BlackScreen(oClicker);
int iCut = 3;
SetLocalInt(GetModule(), "nCutScene_Winzer1", 1);
DelayCommand(1.0, StartCutscene(oClicker, iCut));
}else
{
AssignCommand(oClicker,JumpToObject(oTarget));
}
}
void StartCutscene(object oPC, int iCut)
{
SetCutsceneMode(oPC, TRUE);
// Setup the scene
CutSetActiveCutscene(iCut, CUT_DELAY_TYPE_CONSTANT);
CutSetActiveCutsceneForObject(oPC, iCut, TRUE);
// Cutscene objects other than the PC.
object oWinzer = GetObjectByTag("Winzer");
CutSetActiveCutsceneForObject(oWinzer, iCut);
// Waypoints.
location lPCStart = GetLocation(GetNearestObjectByTag("cs_winzer_wp_start", oPC));
location lPCSecond = GetLocation(GetNearestObjectByTag("cs_winzer_wp_2", oPC));
location lPCThird = GetLocation(GetNearestObjectByTag("cs_winzer_wp_3", oPC));
location lPCFourth = GetLocation(GetNearestObjectByTag("cs_winzer_wpb1", oPC));
location lPCWinzer = GetLocation(GetObjectByTag("Winzer_Here"));
// Setup the Cutscene
CutFadeFromBlack(1.5, oPC);
CutSetCutsceneMode(0.0, oPC, TRUE, CUT_CAMERA_HEIGHT_HIGH, TRUE);
CutJumpToLocation(1.0, oPC, lPCStart);
CutSetCamera(0.5, oPC, CAMERA_MODE_TOP_DOWN, 90.0, 1.0, 80.0, CAMERA_TRANSITION_TYPE_SNAP);
// Start the scene.
//CutSetCamera(2.5, oPC, CAMERA_MODE_TOP_DOWN, 90.0, 5.0, 80.0, CAMERA_TRANSITION_TYPE_SLOW);
CutClearAllActions(2.0, oPC, TRUE);
CutActionMoveToLocation(2.5, oPC, lPCSecond, FALSE);
CutJumpToLocation(8.0, oPC, lPCThird);
CutSetCamera(8.0, oPC, CAMERA_MODE_TOP_DOWN, 290.0, 1.0, 80.0, CAMERA_TRANSITION_TYPE_SNAP);
CutSetCamera(8.5, oPC, CAMERA_MODE_TOP_DOWN, 350.0, 1.0, 89.0, CAMERA_TRANSITION_TYPE_SLOW);
CutClearAllActions(8.5, oWinzer, TRUE);
CutActionMoveToLocation(9.0, oWinzer, lPCFourth, FALSE);
CutSpeakString(9.5, oWinzer, "I hope this scroll of Jenak's works.");
CutSetFacingPoint(12.0, oWinzer, "cs_winzer_wp_face");
CutSpeakString(13.0, oWinzer, "Let's see now...");
CutPlayAnimation(13.0, oWinzer, ANIMATION_FIREFORGET_READ, 2.0);
CutActionCastFakeSpellAtObject(15.0, SPELL_SHADOW_CONJURATION_SUMMON_SHADOW, oWinzer, oWinzer);
CutJumpToLocation(18.0, oWinzer, lPCWinzer);
CutJumpToObject(21.5, oPC, oTarget);
// End scene.
CutFadeOutAndIn(21.0, oPC, 1.5);
//CutJumpToObject(33.3, oPC, oCrystal);
//DelayCommand(33.0, ClearParty(oPC, iCut));
CutDisableCutscene(iCut, 22.0, 22.0, RESTORE_TYPE_NONE);
}