TR_m4_q_FG_Jubalscript
TR_Mainland.esm
Variables
9
Local Variables
TR_Map
control
controlQ
NoLore
T_Local_NPC
T_Local_NoLore
greetOnce
disableOnce
noHit
Source
1Begin TR_m4_q_FG_Jubalscript
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. This version is for "NoLore" NPCs.
5
6short TR_Map
7short control
8short controlQ
9short NoLore
10short T_Local_NPC
11short T_Local_NoLore
12short greetOnce
13short disableOnce
14short noHit
15
16if ( MenuMode == 1 )
17 return
18endif
19
20if ( disableOnce == 0 )
21 if ( GetDisabled == 0 )
22 disable
23 set disableOnce to 1
24 endif
25elseif ( disableOnce == 2 )
26 if ( CellChanged )
27 if ( GetJournalIndex TR_m4_FG_Molsa == 0 )
28 disable
29 endif
30 set disableOnce to 1
31 endif
32endif
33
34if ( GetJournalIndex "TR_m4_FG_Darvas" >= 10 )
35 if ( GetJournalIndex "TR_m4_FG_Darvas" < 100 )
36 if ( GetDisabled == 1 )
37 enable
38 endif
39 endif
40endif
41
42if ( greetOnce == 0 )
43 if ( GetJournalIndex "TR_m4_FG_Darvas" == 105 )
44 if ( GetDistance, player <= 360 )
45 ForceGreeting
46 set greetOnce to 1
47 endif
48 endif
49endif
50
51if ( TR_m4_FG_JubalGlobal == 1 )
52 if ( GetDisabled == 1 )
53 enable
54 endif
55endif
56
57if ( GetJournalIndex "TR_m4_FG_UshuKur5" == 50 )
58 if ( GetJournalIndex TR_m4_FG_Darvas == 300 )
59 if ( GetDistance, player <= 200 )
60 if ( greetOnce <= 2 )
61 set greetOnce to 3
62 ForceGreeting
63 endif
64 endif
65 endif
66endif
67
68if ( GetJournalIndex TR_m4_FG_UshuKur5 >= 200 )
69 if ( GetJournalIndex TR_m4_FG_Darvas == 300 )
70 if ( greetOnce < 5 )
71 set greetOnce to 5
72 set noHit to 0
73 SetHealth 0
74 endif
75 endif
76endif
77
78if ( disableOnce < 0 )
79 Return
80endif
81
82if ( TR_m4_FG_UshuFree == 2 )
83 if ( GetDisabled == 0 )
84 disable
85 endif
86endif
87
88if ( TR_m4_FG_UshuFree >= 3 )
89 if ( GetDisabled == 1 )
90 enable
91 endif
92endif
93
94if ( OnDeath == 1 )
95 if ( GetJournalIndex TR_m4_FG_UshuKur5 >= 200 )
96 ; do nothing
97 elseif ( GetJournalIndex "TR_m4_FG_UshuKur5F" >= 10 )
98 Journal "TR_m4_FG_UshuKur5F" 100
99 endif
100 TR_m4_UshuKur_D_Jubal->Disable
101 set TR_m4_UshuKur_D_Jubal.disableOnce to -1
102 set disableOnce to -1
103endif
104
105if ( TR_Map == 4 )
106 return
107endif
108
109set noHit to 1
110set TR_Map to 4
111AddTopic "Jubal Orda"
112
113End