TR_m7_Oth_FamoriNote_sc
TR_Mainland.esm
Variables
2
Local Variables
OnPCEquip
PCSkipEquip
Source
1Begin TR_m7_Oth_FamoriNote_sc
2
3short OnPCEquip
4short PCSkipEquip
5
6set PCSkipEquip to 0
7; any actions that might end the script must be placed lower than this line
8
9; Activating from the inventory
10
11if ( MenuMode )
12
13 ; the vanilla engine fails to set PCSkipEquip under certain
14 ; conditions, so we must do it ourselves for
15 ; OnPCEquip to work properly
16
17 set PCSkipEquip to 1
18 if ( OnPCEquip )
19
20 AddTopic "Bera Famori"
21 set OnPCEquip to 0
22 set PCSkipEquip to 0 ; OpenMW fails to open the book without this line
23 Activate
24 endif
25
26 ; this return is important
27 ; we must make sure OnActivate secton is only accessed outside of MenuMode
28 ; or the vanilla engine fails to take the book if opened from the world
29 return
30endif
31
32; Activating in the world
33if ( OnActivate )
34
35 AddTopic "Bera Famori"
36
37 Activate
38endif
39
40end