TR_m4_VA_budak_scr
TR_Mainland.esm
Variables
19
Local Variables
nolore
TR_Map
T_Local_Vampire
control
controlQ
NoHello
NoFlee
NoIdle
NoIntruder
NoThief
T_Local_NPC
T_Local_NoLore
checkblood
state
doonce
disableonce
yellonce
enableonce
replaceonce
Source
1begin TR_m4_VA_budak_scr
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 state
19short doonce
20short disableonce
21short yellonce
22short enableonce
23short replaceonce
24
25
26if ( CellChanged )
27 if ( replaceonce == 0 )
28 if ( GetJournalIndex, "TR_m4_VA_IronandBlood" >= 30 )
29 if ( GetDeadCount, TR_m4_budak == 0 )
30 placeatme, "TR_m4_budak2", 1, 0, 0
31 endif
32 disable
33 set replaceonce to 1
34 endif
35 endif
36 if ( GetJournalIndex, "TR_m4_VA_IronandBlood" < 30 )
37 if ( VampClan == 101 )
38 enable
39 endif
40 endif
41endif
42
43if ( OnDeath )
44 if ( GetJournalIndex TR_m4_VA_IronandBlood > 25 )
45 Journal TR_m4_VA_IronandBlood 200
46 endif
47 AddItem "ingred_vampire_dust_01" 1
48endif
49
50if ( disableonce == 0 )
51 disable
52 set disableonce to 1
53endif
54
55if ( TR_m4_orlukhgate02_glb == 1 )
56 if ( enableonce == 0 )
57 enable
58 set enableonce to 1
59 endif
60 if ( yellonce == 0 )
61 if ( GetDistance, Player <= 500 )
62 ForceGreeting
63 set yellonce to 1
64 endif
65 endif
66endif
67
68
69;-----------------------------------------------
70; Check player infection/vampire status
71;-----------------------------------------------
72
73if ( CellChanged )
74 set checkBlood to 0
75 set state to 0
76
77 if ( T_Glob_PorphyricInfected )
78 elseif ( player->GetSpell "Vampire Blood Quarra" )
79 elseif ( player->GetSpell "Vampire Blood Aundae" )
80 elseif ( player->GetSpell "Vampire Blood Berne" )
81 elseif ( PCVampire != 0 )
82 elseif ( PCWerewolf == 1 )
83 else
84 ;Player isn't infected/vampire/cured vampire/werewolf
85 set checkBlood to 1
86 endif
87endif
88
89if ( MenuMode )
90 return
91endif
92
93;------------------------------------------------
94; Player was not infected before changing cell,
95; so constantly check for infection and then run
96; this clan's specific global script
97;------------------------------------------------
98
99if ( checkBlood )
100 if ( player->GetSpellEffects "T_Vamp_Dis_Orlukh" )
101 if ( ScriptRunning "T_ScVamp_Orlukh_PC" != 1 )
102 StartScript "T_ScVamp_Orlukh_PC"
103 endif
104 endif
105
106;------------------------------------------------
107; Player was infected/vampire before changing cell,
108; so check whether player is in an enemy clan
109;------------------------------------------------
110
111elseif ( state != 1 )
112 if ( VampClan == 101 )
113 SetFight 30 ;Player is a friendly vampire
114 elseif ( VampClan == 0 )
115 SetFight 30 ;Player not a vampire
116 else
117 SetFight 90 ;Player is an enemy vampire
118 endif
119
120 set state to 1
121endif
122
123;------------------------------------------------
124; Apply vampire spells/abilities to this NPC once
125;------------------------------------------------
126
127if ( doOnce == 0 )
128 AddSpell "T_Vamp_Dis_Orlukh"
129 AddSpell "T_Vamp_Ab_Orlukh"
130 AddSpell "Vampire Attributes"
131 AddSpell "Vampire Skills"
132 AddSpell "Vampire Immunities"
133 AddSpell "Vampire Sun Damage"
134 AddSpell "Vampire Touch"
135 ModRestoration 75
136 ;set province-specific location variable for dialogue here
137 set TR_Map to 4
138 set doOnce to 1
139endif
140
141end