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