TR_m4_AlynuNoteScript
TR_Mainland.esm
Variables
2
Local Variables
OnPCEquip
PCSkipEquip
Source
1Begin TR_m4_AlynuNoteScript
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 ; place actions for when the player opened the book from the inventory here
21 if ( TR_m4_And_SheKindlySpoke_Stash == 0 )
22 set TR_m4_And_SheKindlySpoke_Stash to 1
23 Journal TR_m4_And_SheKindlySpoke 50
24 if ( "TR_m4_Nals Tobor".control == 1 )
25 Journal TR_m4_And_SheKindlySpoke 210
26 endif
27 endif
28
29 set OnPCEquip to 0
30 set PCSkipEquip to 0 ; OpenMW fails to open the book without this line
31 Activate
32 endif
33
34 ; this return is important
35 ; we must make sure OnActivate secton is only accessed outside of MenuMode
36 ; or the vanilla engine fails to take the book if opened from the world
37 return
38endif
39
40; Activating in the world
41if ( OnActivate )
42
43 ; place actions for when the player opened the book from the world here
44 if ( TR_m4_And_SheKindlySpoke_Stash == 0 )
45 set TR_m4_And_SheKindlySpoke_Stash to 1
46 Journal TR_m4_And_SheKindlySpoke 50
47 if ( "TR_m4_Nals Tobor".control == 1 )
48 Journal TR_m4_And_SheKindlySpoke 210
49 endif
50 endif
51
52 Activate
53endif
54end