Scripts

TR_m3_Vh_BardsVampire

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
ashStorm
fixHead
timer
Source
1begin TR_m3_Vh_BardsVampire 2 3; This short script is there to allow dialogue to be filtered on the TR_Map local variable, 4; allowing for regional topics such as "Morrowind Lore" or "Geographic Regions" to be 5; appropriate to the location the NPC is. This version is for Aundae vampire NPCs. 6 7; PROVINCE LOCAL VARIABLES HERE 8short nolore 9short TR_Map 10short T_Local_Vampire 11short control 12short controlQ 13 14short NoHello 15short NoFlee 16short NoIdle 17short NoIntruder 18short NoThief 19short T_Local_NPC 20short T_Local_NoLore 21 22short checkBlood 23short doOnce 24 25;Vanilla global PCVampire 26;Vanilla global PCWerewolf 27;Tamriel_Data global T_Glob_PorphyricInfected 28 29;Baluath ash storm benefits variables 30float timer 31short ashStorm 32short fixHead 33 34if ( OnDeath == 1 ) 35 Journal TR_m3_Vh_BardsTale 30 36 AddItem "ingred_vampire_dust_01" 1 37endif 38 39; Can't have a CellChanged check here because this NPC is spawned in 40set checkBlood to 0 41 42if ( T_Glob_PorphyricInfected ) 43elseif ( player->GetSpell "Vampire Blood Quarra" ) 44elseif ( player->GetSpell "Vampire Blood Aundae" ) 45elseif ( player->GetSpell "Vampire Blood Berne" ) 46elseif ( PCVampire != 0 ) 47elseif ( PCWerewolf == 1 ) 48else 49 ;Player isn't infected/vampire/cured vampire/werewolf 50 set checkBlood to 1 51endif 52 53if ( fixHead ) 54 ;Mod-added heads disappear when the Vampirism effect is removed/swapped 55 ;To fix this we equip a helmet and remove it to reset the head model 56 set fixHead to 0 57 equip T_Glb_Var_HeadFixer ;Lack of AddItem is intentional 58 RemoveItem T_Glb_Var_HeadFixer 1 59endif 60 61if ( MenuMode ) 62 return 63endif 64 65;Baluath stuff, see cure script 66set timer to ( timer + GetSecondsPassed ) 67if ( timer > 1 ) 68 set timer to 0 69 if ( ashStorm ) 70 set ashStorm to 0 71 endif 72 if ( GetWindSpeed ) 73 if ( GetCurrentWeather >= 6 ) ;ash 74 if ( GetCurrentWeather <= 7 ) ;blight 75 set ashStorm to 1 76 endif 77 endif 78 endif 79 if ( ashStorm ) 80 if ( GetSpell "T_Vamp_Ab_Baluath_Ash" == 0 ) 81 AddSpell "T_Vamp_Ab_Baluath_Ash" 82 AddSpell "T_Vamp_Sp_Baluath_Ash" 83 AddSpell "T_Vamp_Ab_Baluath_SunDmg" 84 RemoveSpell "vampire sun damage" 85 set fixHead to 1 86 endif 87 elseif ( GetSpell "T_Vamp_Ab_Baluath_Ash" ) 88 RemoveSpell "T_Vamp_Ab_Baluath_Ash" 89 RemoveSpell "T_Vamp_Sp_Baluath_Ash" 90 AddSpell "vampire sun damage" 91 RemoveSpell "T_Vamp_Ab_Baluath_SunDmg" 92 set fixHead to 1 93 endif 94endif 95 96 97;------------------------------------------------ 98; Player was not infected before changing cell, 99; so constantly check for infection and then run 100; this clan's specific global script 101;------------------------------------------------ 102 103if ( checkBlood ) 104 if ( player->GetSpellEffects "T_Vamp_Dis_Baluath" ) 105 if ( ScriptRunning "T_ScVamp_Baluath_PC" != 1 ) 106 StartScript "T_ScVamp_Baluath_PC" 107 endif 108 endif 109endif 110 111;------------------------------------------------ 112; Apply vampire spells/abilities to this NPC once 113;------------------------------------------------ 114 115if ( doOnce == 0 ) 116 AddSpell "T_Vamp_Dis_Baluath" 117 AddSpell "T_Vamp_Ab_Baluath" 118 AddSpell "Vampire Attributes" 119 AddSpell "Vampire Skills" 120 AddSpell "Vampire Immunities" 121 AddSpell "Vampire Sun Damage" 122 AddSpell "Vampire Touch" 123 ModRestoration 75 124 ;set province-specific location variable for dialogue here 125 set TR_Map to 3 126 127 set doOnce to 1 128endif 129 130end