T_ScBook_SpDemoralizeCreature
Tamriel_Data.esm
Variables
2
Local Variables
PCSkipEquip
pickedup
Source
1Begin T_ScBook_SpDemoralizeCreature
2
3short PCSkipEquip
4short pickedup
5
6;for adding the spell and giving the appropriate message depending on player's intelligence
7if ( pickedup == 1 )
8 set pickedup to 0
9 if ( player->GetSpell "T_Com_Ilu_MonstrousVision" == 0 ) ;if you haven't already got the spell
10 if ( player->GetIntelligence >= 55 )
11 Player->AddSpell "T_Com_Ilu_MonstrousVision"
12 MessageBox "You have learned the spell Monstrous Vision from this scroll."
13 PlaySound "skillraise"
14 elseif ( player->GetIntelligence >= 45 )
15 MessageBox "There is a spell to be learned from this scroll, but you cannot decipher it."
16 endif
17 endif
18endif
19
20; for activating if the book from the inventory screen
21if ( PCSkipEquip == 1 )
22 set PCSkipEquip to 0
23 set pickedup to 1
24 return
25endif
26
27; prevents the book being opened from the gameworld whilst in menu mode
28if ( MenuMode == 1 )
29 return
30endif
31
32; for activating the book when it is placed in the game world
33if ( OnActivate == 1 )
34 Activate
35 set pickedup to 1
36endif
37
38End