TR_m3_MG_OE_Q7_TeleNotes_sc
TR_Mainland.esm
Variables
3
Local Variables
PCSkipEquip
pickedup
OnPCEquip
Source
1Begin TR_m3_MG_OE_Q7_TeleNotes_sc
2
3short PCSkipEquip
4short pickedup
5short OnPCEquip
6
7set PCSkipEquip to 0
8
9;for adding the spell
10if ( pickedup == 1 )
11 set pickedup to 0
12 if ( player->GetSpell "telekinesis" == 0 ) ;if you haven't already got the spell
13 Player->AddSpell "telekinesis"
14 MessageBox "You have learned the spell Telekinesis from this book."
15 PlaySound "skillraise"
16 endif
17endif
18
19; Activating from the inventory
20if ( MenuMode )
21
22 ; vanilla engine fails to set PCSkipEquip under certain conditions
23 set PCSkipEquip to 1
24
25 if ( OnPCEquip )
26
27 set pickedup to 1
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 ; never let OnActivate section happen in MenuMode
35 return
36endif
37
38; Activating in the world
39if ( OnActivate )
40
41 set pickedup to 1
42
43 Activate
44endif
45
46End