TR_m4_V_ZabamallitOrlukh
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
state
T_Local_Khajiit
OnPCHitMe
Source
1begin TR_m4_V_ZabamallitOrlukh
2
3;Should check for all vanilla and T_D province mod infection
4;---
5;Checks run on cellchange and then constantly if applicable
6;No need for always-running global scripts like vanilla
7
8; PROVINCE LOCAL VARIABLES HERE
9short nolore
10short TR_Map
11short T_Local_Vampire
12short control
13short controlQ
14
15short NoHello
16short NoFlee
17short NoIdle
18short NoIntruder
19short NoThief
20short T_Local_NPC
21short T_Local_NoLore
22
23short checkBlood
24short doOnce
25short state
26short T_Local_Khajiit
27
28;Vanilla global PCVampire
29;Vanilla global PCWerewolf
30;Tamriel_Data global T_Glob_PorphyricInfected
31
32short OnPCHitMe
33
34if ( OnPCHitMe )
35 if ( control == 0 )
36 set "TR_m4_V_Zabamallit_1".control to 1
37 set "TR_m4_V_Zabamallit_2".control to 1
38 set "TR_m4_V_Zabamallit_3".control to 1
39 "TR_m4_V_Zabamallit_1"->SetFight 100
40 "TR_m4_V_Zabamallit_2"->SetFight 100
41 "TR_m4_V_Zabamallit_3"->SetFight 100
42 endif
43 startcombat player
44endif
45
46;-----------------------------------------------
47; Drop vampire dust on death like vanilla
48;-----------------------------------------------
49
50if ( OnDeath )
51 AddItem "ingred_vampire_dust_01" 1
52endif
53
54;-----------------------------------------------
55; Check player infection/vampire status
56;-----------------------------------------------
57
58if ( CellChanged )
59 set checkBlood to 0
60 set state to 0
61
62 if ( T_Glob_PorphyricInfected )
63 elseif ( player->GetSpell "Vampire Blood Quarra" )
64 elseif ( player->GetSpell "Vampire Blood Aundae" )
65 elseif ( player->GetSpell "Vampire Blood Berne" )
66 elseif ( PCVampire != 0 )
67 elseif ( PCWerewolf == 1 )
68 else
69 ;Player isn't infected/vampire/cured vampire/werewolf
70 set checkBlood to 1
71 endif
72endif
73
74if ( MenuMode )
75 return
76endif
77
78;------------------------------------------------
79; Player was not infected before changing cell,
80; so constantly check for infection and then run
81; this clan's specific global script
82;------------------------------------------------
83
84if ( checkBlood )
85 if ( player->GetSpellEffects "T_Vamp_Dis_Orlukh" )
86 if ( ScriptRunning "T_ScVamp_Orlukh_PC" != 1 )
87 StartScript "T_ScVamp_Orlukh_PC"
88 endif
89 endif
90
91;------------------------------------------------
92; Player was infected/vampire before changing cell,
93; so check whether player is in an enemy clan
94;------------------------------------------------
95
96elseif ( state != 1 )
97 if ( VampClan == 101 )
98 SetFight 30 ;Player is a friendly vampire
99 else
100 SetFight 90 ;Player is an enemy vampire
101 endif
102
103 set state to 1
104endif
105
106;------------------------------------------------
107; Apply vampire spells/abilities to this NPC once
108;------------------------------------------------
109
110if ( doOnce == 0 )
111 AddSpell "T_Vamp_Dis_Orlukh"
112 AddSpell "T_Vamp_Ab_Orlukh"
113 AddSpell "Vampire Attributes"
114 AddSpell "Vampire Skills"
115 AddSpell "Vampire Immunities"
116 AddSpell "Vampire Sun Damage"
117 AddSpell "Vampire Touch"
118 ModRestoration 75
119 ;set province-specific location variable for dialogue here
120 set TR_Map to 4
121 set T_Local_Khajiit to -1
122
123 if ( GetRace "T_Els_Cathay" )
124 set T_Local_Khajiit to 1
125 elseif ( GetRace "T_Els_Cathay-raht" )
126 set T_Local_Khajiit to 1
127 elseif ( GetRace "T_Els_Dagi-raht" )
128 set T_Local_Khajiit to 1
129 elseif ( GetRace "T_Els_Ohmes" )
130 set T_Local_Khajiit to 1
131 elseif ( GetRace "T_Els_Ohmes-raht" )
132 set T_Local_Khajiit to 1
133 elseif ( GetRace "T_Els_Suthay" )
134 set T_Local_Khajiit to 1
135 elseif ( GetRace "T_Els_Tojay" )
136 set T_Local_Khajiit to 1
137 elseif ( GetRace "Khajiit" )
138 set T_Local_Khajiit to 1
139 endif
140 set doOnce to 1
141endif
142
143end