TR_m7_HH_RaranSchedule
TR_Mainland.esm
Variables
2
Local Variables
OnPCEquip
PCSkipEquip
Source
1begin TR_m7_HH_RaranSchedule
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 Journal "TR_m7_HH_Raran2" 20
21
22 set OnPCEquip to 0
23 set PCSkipEquip to 0 ; OpenMW fails to open the book without this line
24 Activate
25 endif
26
27 ; this return is important
28 ; we must make sure OnActivate secton is only accessed outside of MenuMode
29 ; or the vanilla engine fails to take the book if opened from the world
30 return
31endif
32
33; Activating in the world
34if ( OnActivate )
35
36 Journal "TR_m7_HH_Raran2" 20
37
38 Activate
39endif
40
41end