TR_m4_VA_OrlukhGroSc
TR_Mainland.esm
Variables
17
Local Variables
nolore
TR_Map
T_Local_Vampire
control
controlQ
NoHello
NoFlee
NoIdle
NoIntruder
NoThief
T_Local_NPC
T_Local_NoLore
checkBlood
doOnce
andasOnce
state
HealTimer
Source
1begin TR_m4_VA_OrlukhGroSc
2
3short nolore
4short TR_Map
5short T_Local_Vampire
6short control
7short controlQ
8
9short NoHello
10short NoFlee
11short NoIdle
12short NoIntruder
13short NoThief
14short T_Local_NPC
15short T_Local_NoLore
16
17short checkBlood
18short doOnce
19short andasOnce
20short state
21float HealTimer
22
23;-----------------------------------------------
24; Drop vampire dust on death like vanilla
25;-----------------------------------------------
26
27if ( OnDeath )
28 AddItem "ingred_vampire_dust_01" 1
29endif
30
31if ( GetPCCell "Bal Foyen, Andas Estate: Treasure Vault" ) ;If I am in the Vault
32 if ( GetDistance Player < 10000 )
33 if ( andasOnce == 0 )
34 AiFollow Player 0 0 0 0
35 StartCombat TR_m4_q_HlaVaultGuard2
36 Set andasOnce to 1
37 elseif ( andasOnce == 1 )
38 if ( TR_m4_VA_DeadAndas >= 3 )
39 AiWander 0 0 0
40 set andasOnce to 2
41 endif
42 endif
43 endif
44endif
45
46if ( andasOnce == 1 )
47 if ( MenuMode )
48 return
49 endif
50 set HealTimer to ( HealTimer + GetSecondsPassed )
51 if ( HealTimer > 0.5 )
52 ModCurrentHealth 15
53 set HealTimer to 0
54 endif
55endif
56
57
58;-----------------------------------------------
59; Check player infection/vampire status
60;-----------------------------------------------
61
62if ( CellChanged )
63 set checkBlood to 0
64 set state to 0
65
66 if ( T_Glob_PorphyricInfected )
67 elseif ( player->GetSpell "Vampire Blood Quarra" )
68 elseif ( player->GetSpell "Vampire Blood Aundae" )
69 elseif ( player->GetSpell "Vampire Blood Berne" )
70 elseif ( PCVampire != 0 )
71 elseif ( PCWerewolf == 1 )
72 else
73 ;Player isn't infected/vampire/cured vampire/werewolf
74 set checkBlood to 1
75 endif
76endif
77
78if ( MenuMode )
79 return
80endif
81
82;------------------------------------------------
83; Player was not infected before changing cell,
84; so constantly check for infection and then run
85; this clan's specific global script
86;------------------------------------------------
87
88if ( checkBlood )
89 if ( player->GetSpellEffects "T_Vamp_Dis_Orlukh" )
90 if ( ScriptRunning "T_ScVamp_Orlukh_PC" != 1 )
91 StartScript "T_ScVamp_Orlukh_PC"
92 endif
93 endif
94
95;------------------------------------------------
96; Player was infected/vampire before changing cell,
97; so check whether player is in an enemy clan
98;------------------------------------------------
99
100elseif ( state != 1 )
101 if ( VampClan == 101 )
102 SetFight 30 ;Player is a friendly vampire
103 else
104 SetFight 90 ;Player is an enemy vampire
105 endif
106
107 set state to 1
108endif
109
110;------------------------------------------------
111; Apply vampire spells/abilities to this NPC once
112;------------------------------------------------
113
114if ( doOnce == 0 )
115 AddSpell "T_Vamp_Dis_Orlukh"
116 AddSpell "T_Vamp_Ab_Orlukh"
117 AddSpell "Vampire Attributes"
118 AddSpell "Vampire Skills"
119 AddSpell "Vampire Immunities"
120 AddSpell "Vampire Sun Damage"
121 AddSpell "Vampire Touch"
122 ModRestoration 75
123 ;set province-specific location variable for dialogue here
124 set TR_Map to 4
125 set doOnce to 1
126endif
127
128end