TR_m4_NPC_Anjirra
TR_Mainland.esm
Variables
8
Local Variables
TR_Map
controlQ
doOnce
skoomaCounter
NoLore
T_Local_NPC
T_Local_NoLore
T_Local_Khajiit
Source
1Begin TR_m4_NPC_Anjirra
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 controlQ ;used to check if Anjirra has skooma to give (0 -- if not, 1 -- if yes)
8short doOnce
9short skoomaCounter
10short NoLore
11short T_Local_NPC
12short T_Local_NoLore
13short T_Local_Khajiit
14;global TR_m4_TG_AndoSkoomaCat ;1 == if enabled
15
16if ( OnDeath == 1 )
17 set doOnce to 1
18endif
19
20if ( doOnce == 1 ) ;nothing happens if Anjirra is dead
21 return
22endif
23
24if ( GetJournalIndex "TR_m4_TG_Shei5F" == 50 ) ;after the final delivery, Anjirra disables for good
25 if ( CellChanged == 1 )
26 set TR_m4_TG_AndoSkoomaCat to 0
27 endif
28endif
29
30if ( controlQ == 0 ) ;if Anjirra has no skooma (gave it to the PC)
31 if ( GetJournalIndex "TR_m4_TG_Shei5F" == 20 ) ;if Journal state is right
32 if ( CellChanged == 1 ) ;if cell is different
33 if ( TR_m4_TG_AndoSkoomaCat == 1 ) ;if Anjirra is enabled
34 set TR_m4_TG_AndoSkoomaCat to 0 ;set this to 0, so Anjirra disables
35 endif
36 endif
37 endif
38endif
39
40if ( TR_m4_TG_AndoSkoomaCat == 1 )
41 if ( GetDisabled == 1 )
42 enable
43 endif
44endif
45
46if ( CellChanged == 1 )
47 if ( TR_m4_TG_AndoSkoomaCat == 0 )
48 if ( GetDisabled == 0 )
49 disable
50 endif
51 endif
52endif
53
54if ( T_Local_Khajiit )
55 return
56endif
57
58set T_Local_Khajiit to 1
59set TR_Map to 4
60
61End