TR_m3_Kha_Ienni_sc
TR_Mainland.esm
Variables
10
Local Variables
TR_Map
TR_m3_Kha_ghost
control
controlQ
NoLore
stage
killed
T_Local_NPC
T_Local_NoLore
time
Source
1Begin TR_m3_Kha_Ienni_sc
2
3; This script copies T_ScNpc_Mw_Map3Nolore
4; and helps filter the dialog entries for Khalaan NPCs
5; TR_m3_Kha_ghost only enable the most basic dialogue that is needed for all ghosts
6; such as persuasion and topics like Almalexia and Solstheim
7; but otherwise keeps them nolore
8
9; this version is for TR_m3_Kh_Ienni Drothril and controls behavior of quest TR_m3_TT_SeeYou_Kha
10
11short TR_Map
12short TR_m3_Kha_ghost
13short control
14short controlQ
15short NoLore
16short stage
17short killed
18
19float time
20short T_Local_NPC
21short T_Local_NoLore
22
23
24if ( CellChanged )
25 if ( GetJournalIndex "TR_m3_TT_SeeYou_Kha" < 40 )
26 elseif ( GetDisabled )
27 else
28 SetJournalIndex "TR_m3_TT_SeeYou_Kha" 50
29 Disable
30 endif
31endif
32
33if ( stage == 2 )
34 if ( MenuMode )
35 return
36 endif
37
38 set time to ( time + GetSecondsPassed )
39
40 if ( time > 3.7 )
41 PlaceAtMe "T_Glb_Var_GhostDeathFX2" 1 0 0
42 Enable
43 set stage to 0
44 Resurrect
45 return
46 endif
47
48 if ( time > 1.7 )
49 Disable
50 endif
51endif
52
53if ( stage == 0 )
54 If ( GetHealth < 1 )
55 set stage to 1
56 If ( GetFatigue <= 0 )
57 PlaceAtMe "T_Glb_Var_GhostDeathFX1" 1 0 0
58 else
59 PlaceAtMe "T_Glb_Var_GhostDeathFX2" 1 0 0
60 endif
61 endif
62endif
63
64If ( OnDeath )
65 set time to 0
66 set stage to 2
67 set killed to 1
68endif
69
70if ( TR_m3_Kha_ghost == 1 )
71 return
72endif
73
74set TR_m3_Kha_ghost to 1
75
76set TR_Map to 3
77
78End