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