Scripts

TR_m2_q_35_vampirelead

TR_Mainland.esm
Variables 47
Local Variables
done
fightset
cattlekilled
nolore
nohello
noflee
noidle
nointruder
nothief
TR_Map
T_Local_Vampire
control
controlQ
calmed
enabled
Vampire2dead
Vampire3dead
Vampire4dead
VampireAttacking
PCattacked
counter
WantsDeath
DisplayQuestions
answered
qBloodline
qResistance
qUndead
qDaedric
qBlood
qSun
qOrigin
qAge
qOutcast
DoNotUse
qAsh
qVvardenfell
qCyrodiil
qSkyrim
qArgonia
qConversion
qOffspring
qHaemophagy
bribefail
askedsomething
T_Local_NPC
T_Local_NoLore
timer
Source
1begin TR_m2_q_35_vampirelead 2 3; ------ Vampire elder script 4; ------ Displays dialogue choices when asking her the questions for the quest 5;Vampire outcasts, of Berne blood 6;Only appear in Mugan Crypt when quest Interview with a Vampire is started 7;They don't count as Berne vampires for non-agressivity or vanilla quest deathcounts 8;Local variable "cattlekilled" needs to stay, as it is used to identify generic vampires 9;local "fightset" also, used by mods same reason 10 11short done 12short fightset 13short cattlekilled 14short nolore 15short nohello 16short noflee 17short noidle 18short nointruder 19short nothief 20short TR_Map 21short T_Local_Vampire 22short control 23 24short controlQ ;set to 1 once Natasia declares her deathwish 25short calmed ;required =1 for her initial dialogue greeting 26short enabled 27short Vampire2dead ; 28short Vampire3dead ; 29short Vampire4dead ;set by "TR_m2_q_35_vampire"X when they die 30short VampireAttacking 31short PCattacked 32short counter 33short WantsDeath ;set to 1 by dialogue after asking questions, then to 2 when the grace period is over and she really attacks the player 34float timer 35 36short DisplayQuestions ;set to 1 in dialogue, makes choices appear 37short answered ;counts quest-relevant questions answered 38 39short qBloodline ;quest questions 40short qResistance 41short qUndead 42short qDaedric 43short qBlood 44short qSun 45 46short qOrigin ;player's own questions 47short qAge 48short qOutcast 49short DoNotUse ;34th variable 50short qAsh 51short qVvardenfell 52short qCyrodiil 53short qSkyrim 54short qArgonia 55short qConversion 56short qOffspring 57short qHaemophagy 58 59short bribefail ;doonce for too-specific bribefail answers 60short askedsomething ; <= 1 if player ends questions without asking one 61short T_Local_NPC 62short T_Local_NoLore 63 64; ------ Enable when on the quest: 65if ( enabled == 0 ) 66 If ( GetJournalIndex "TR_m2_MG_Ranosa2" > 0 ) 67 Enable 68 set enabled to 1 69 ElseIf ( GetDisabled == 0 ) 70 Disable 71 Endif 72endif 73 74if ( getPCCell "Mugan Crypt" == 0 ) ; don't let the player lead her into the sunlight 75 PositionCell 4440 4362 15000 0 "Mugan Crypt" ;TR_m2_MARK_Natasia 76endif 77 78 79; ------ Quest failure if questions not answered on her death 80if ( OnDeath == 1 ) 81 AddItem "ingred_vampire_dust_01" 1 82 set TR_m2_q_35_dead to ( TR_m2_q_35_dead + 1 ) 83 If ( GetJournalIndex "TR_m2_MG_Ranosa2" < 50 ) 84 Journal TR_m2_MG_Ranosa2 52 85 Endif 86endif 87 88 89; ------ Once done with dialogue, doesn't defend herself for a few seconds 90If ( MenuMode == 0 ) 91 If ( WantsDeath == 1 ) 92 If ( timer < 6 ) 93 SetFight 0 94 StopCombat 95 set timer to ( timer + GetSecondsPassed ) 96 Else 97 StartCombat, Player 98 set WantsDeath to 2 99 Endif 100 Endif 101 102 If ( WantsDeath >= 1 ) 103; ------ Update journal after questions asked 104 If ( GetJournalIndex "TR_m2_MG_Ranosa2" < 51 ) 105 If ( answered == 6 ) ;all questions answered 106 Journal "TR_m2_MG_Ranosa2" 51 107 ElseIf ( GetJournalIndex "TR_m2_MG_Ranosa2" < 50 ) 108 If ( answered >= 4 ) ;more than half the questions answered 109 If ( qResistance >= 1 ) ;including the one for the enchantment 110 Journal "TR_m2_MG_Ranosa2" 50 111 Endif 112 Endif 113 Endif 114 Endif 115 Endif 116 117 118; ------ Manage the dialogue choices when PC is asking questions 119 ;Choices 10 to 60 are the questions required by the quest, others are the player's own. 120 ;Most questions reduce disposition, and she will refuse to answer if it drops too low. 121Else ;( MenuMode == 1 ) 122 If ( DisplayQuestions == 1 ) ;choices only appear when prompted by dialogue resultbox 123 Set DisplayQuestions to 0 124 If ( askedsomething < 2 ) 125 Set askedsomething to ( askedsomething + 1 ) 126 Endif 127 If ( qBloodline == 0 ) 128 Choice "Which bloodline do you belong to?" 10 129 Else 130 If ( qOrigin == 0 ) 131 Choice "How did you become a vampire?" 100 132 Endif 133 If ( qAge == 0 ) 134 Choice "How long have you been a vampire?" 101 135 Endif 136 If ( qOutcast == 0 ) 137 Choice "Why were you cast out?" 102 138 Endif 139 Endif 140 If ( qOffspring == 0 ) 141 If ( qConversion == 1 ) 142 Choice "Have you created any vampires?" 103 143 Endif 144 Endif 145 If ( qResistance == 0 ) 146 If ( PCVampire == 1 ) 147 Choice "Can you explain our resistance to steel weapons?" 20 148 Choice "Why do some weapons hurt us more than others?" 21 149 Else 150 Choice "Describe your resistance to steel weapons." 20 151 Choice "Why do some weapons hurt you more than others?" 21 152 Endif 153 Endif 154 If ( qUndead == 0 ) 155 If ( PCVampire == 1 ) 156 Choice "Are we undead?" 30 157 Else 158 Choice "Are you undead?" 30 159 Endif 160 Else 161 If ( qHaemophagy == 0 ) 162 If ( PCVampire == 1 ) 163 Choice "Can we feed on other vampires?" 110 164 Else 165 Choice "Can you feed on other vampires?" 110 166 Endif 167 Endif 168 Endif 169 If ( qAsh == 0 ) 170 If ( PCVampire == 1 ) 171 Choice "Are Ash Vampires related to us in any way?" 104 172 Else 173 Choice "Are you related to Ash Vampires?" 104 174 Endif 175 Endif 176 If ( qDaedric == 0 ) 177 Choice "Do vampires maintain a link to the Daedric realm of Coldharbour?" 40 178 Endif 179 If ( qVvardenfell == 0 ) 180 Choice "Are you different from the vampires in Vvardenfell?" 105 181 Endif 182 If ( qCyrodiil == 0 ) 183 Choice "Are the vampires of Cyrodiil different?" 106 184 Endif 185 If ( qSkyrim == 0 ) 186 Choice "Are the vampires of Skyrim different?" 107 187 Endif 188 If ( qArgonia == 0 ) 189 If ( PCRace == 1 ) 190 If ( PCVampire == 1 ) 191 Choice "How different are we from the vampires in Argonia?" 108 192 Else 193 Choice "How different are you from the vampires in Argonia?" 108 194 Endif 195 Else 196 Choice "Are the vampires of Black Marsh different?" 108 197 Endif 198 Endif 199 If ( qBlood == 0 ) 200 If ( PCVampire == 1 ) 201 Choice "Can our thirst for blood ever be sated? Does it affect one's abilities?" 50 202 Else 203 Choice "Is your thirst for blood ever sated? Does it affect your abilities?" 50 204 Endif 205 Endif 206 If ( qConversion == 0 ) 207 Choice "How exactly is one turned into a vampire?" 109 208 Endif 209 If ( qSun == 0 ) 210 If ( PCVampire == 1 ) 211 Choice "Can we protect ourselves against sunlight?" 60 212 Else 213 Choice "Can you protect yourself against sunlight?" 60 214 Endif 215 Endif 216 Choice "I have no more questions." 70 217 Endif 218Endif 219 220 221; ------ Modify greeting if PC talks to her while attacked by other vampires 222If ( GetJournalIndex "TR_m2_MG_Ranosa2" < 50 ) 223 if ( counter < 10 ) 224 set counter to ( counter + 1 ) 225 else ;detect whether player is attacked by another vampire 226 If ( Vampire2dead == 0 ) 227 set VampireAttacking to ( VampireAttacking + "TR_m2_q_35_vampire2"->GetWeaponDrawn ) 228 set VampireAttacking to ( VampireAttacking + "TR_m2_q_35_vampire2"->GetSpellReadied ) 229 Endif 230 If ( Vampire3dead == 0 ) 231 set VampireAttacking to ( VampireAttacking + "TR_m2_q_35_vampire3"->GetWeaponDrawn ) 232 set VampireAttacking to ( VampireAttacking + "TR_m2_q_35_vampire3"->GetSpellReadied ) 233 Endif 234 If ( Vampire4dead == 0 ) 235 set VampireAttacking to ( VampireAttacking + "TR_m2_q_35_vampire4"->GetWeaponDrawn ) 236 set VampireAttacking to ( VampireAttacking + "TR_m2_q_35_vampire4"->GetSpellReadied ) 237 Endif 238 If ( VampireAttacking == 1 ) ;if player is under attack, a message will be added to her greeting 239 set PCattacked to 1 240 set VampireAttacking to 0 241 ElseIf ( VampireAttacking > 1 ) 242 set PCattacked to 2 243 set VampireAttacking to 0 244 Else 245 set PCattacked to 0 246 Endif 247 set counter to 0 248 endif 249Endif 250 251 252; ------ one-time disposition boost if Commanded 253if ( done == 1 ) 254 if ( GetEffect, sEffectCommandHumanoids == 1 ) 255 ModDisposition 30 256 set done to 2 257 endif 258endif 259 260 261; ------ No talking to her unless she's calmed/commanded (eg not by sneaking up or under invisibility) 262If ( GetEffect, sEffectCalmHumanoid == 1 ) 263 if ( calmed < 1 ) 264 set calmed to 1 265 endif 266ElseIf ( GetEffect, sEffectCommandHumanoids == 1 ) 267 if ( calmed < 1 ) 268 set calmed to 1 269 endif 270Else 271 if ( calmed == 1 ) 272 if ( GetWeaponDrawn == 1 ) 273 set calmed to 0 274 elseif ( GetSpellReadied == 1 ) 275 set calmed to 0 276 endif 277 endif 278Endif 279 280 281; ------ Berne blood & regional topic filter 282if ( done == 0 ) 283 AddSpell "Vampire Blood Berne" ;this is the blood disease 284 AddSpell "Vampire Attributes" 285 AddSpell "Vampire Skills" 286 AddSpell "Vampire Immunities" 287 AddSpell "Vampire Sun Damage" 288 AddSpell "Vampire Touch" 289 AddSpell "Vampire Berne Specials" 290 ModRestoration 75 291 ModMercantile 100 292 set TR_Map to 2 293 set done to 1 294endif 295 296end