TR_m2_q_A8_2_SeindaScript
TR_Mainland.esm
Variables
7
Local Variables
TR_Map
control
controlQ
noLore
T_Local_NPC
T_Local_NoLore
timer
Source
1Begin TR_m2_q_A8_2_SeindaScript
2; This short script is there to allow dialogue to be filtered on the TR_Map local variable,
3; allowing for regional topics such as "Morrowind Lore" or "Geographic Regions" to be
4; appropriate to the location the NPC is.
5
6short TR_Map
7short control
8short controlQ
9short noLore
10float timer
11short T_Local_NPC
12short T_Local_NoLore
13
14if ( TR_Map != 2 )
15 Set TR_Map to 2
16endif
17
18if ( GetJournalIndex TR_m2_Ak_Gem < 10 )
19 if ( GetDisabled == 0 )
20 Disable
21 endif
22elseif ( GetJournalIndex TR_m2_Ak_Gem < 40 )
23 if ( GetDisabled == 1 )
24 Enable
25 endif
26endif
27
28if ( controlQ == 0 )
29 if ( GetPCCell "Dun Akafell, Ruined Chapel" == 1 ) ;to prevent NPC from sliding along
30 if ( GetPos x <= 3395 ) ;the floor on PC cellchange.
31 SetPos x 3400
32 elseif ( GetPos x >= 3405 )
33 SetPos x 3400
34 endif
35 if ( GetPos y <= 4095 )
36 SetPos y 4100
37 elseif ( GetPos y >= 4105 )
38 SetPos y 4100
39 endif
40 if ( GetFatigue >= 0 ) ;to prevent NPC fatigue from returning to
41 if ( GetHealth > 0 ) ;original value on savegame load
42 SetFatigue -1
43 endif
44 endif
45 endif
46endif
47
48if ( OnActivate == 1 )
49 if ( GetDeadCount TR_m2_q_A8_2_Seinda == 0 )
50 if ( controlQ == 0 )
51 Set controlQ to 1
52 SetFatigue 246
53 elseif ( controlQ == 2 )
54 Activate
55 endif
56 else
57 Activate
58 endif
59endif
60
61if ( controlQ == 1 )
62 Set timer to ( timer + GetSecondsPassed )
63 if ( timer >= 3 )
64 Set controlQ to 2
65 Journal TR_m2_Ak_Gem 30
66 endif
67endif
68
69if ( OnDeath == 1 )
70 if ( GetJournalIndex TR_m2_Ak_Gem < 35 )
71 Journal TR_m2_Ak_Gem 35
72 endif
73endif
74
75if ( GetJournalIndex TR_m2_Ak_Gem >= 40 )
76 if ( CellChanged == 1 )
77 if ( GetHealth > 0 )
78 if ( GetDisabled == 0 )
79 Disable
80 endif
81 endif
82 endif
83endif
84
85End