Scripts

TR_m4_Bal_NPC_SathramVolos_Sc

TR_Mainland.esm
Variables 20
Local Variables
nolore
TR_Map
T_Local_Vampire
control
controlQ
NoHello
NoFlee
NoIdle
NoIntruder
NoThief
T_Local_NPC
T_Local_NoLore
checkBlood
doOnce
state
ashStorm
fixHead
TR_m4_Bal_ClanMember
greeting
timer
Source
1begin TR_m4_Bal_NPC_SathramVolos_Sc 2 3; Baluath Questline 4; Script running on Sathram Volos. 5 6; PROVINCE LOCAL VARIABLES HERE 7short nolore 8short TR_Map 9short T_Local_Vampire 10short control 11short controlQ 12 13short NoHello 14short NoFlee 15short NoIdle 16short NoIntruder 17short NoThief 18short T_Local_NPC 19short T_Local_NoLore 20 21short checkBlood 22short doOnce 23short state 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 34; Sathram Volos 35short TR_m4_Bal_ClanMember 36short greeting 37 38;----------------------------------------------- 39; Drop vampire dust on death like vanilla 40;----------------------------------------------- 41 42if ( OnDeath ) 43 AddItem "ingred_vampire_dust_01" 1 44 45 ; Sathram Volos 46 if ( TR_m4_Bal_ClanMember == 1 ) 47 set TR_m4_baluathdead to ( TR_m4_baluathdead + 1 ) 48 elseif ( GetJournalIndex "TR_m4_Bal4_Sathram" > 0 ) 49 if ( GetJournalIndex "TR_m4_Bal4_Sathram" < 100 ) 50 Journal "TR_m4_Bal4_Sathram" 200 51 endif 52 endif 53endif 54 55;----------------------------------------------- 56; Check player infection/vampire status 57;----------------------------------------------- 58 59if ( CellChanged ) 60 set checkBlood to 0 61 set state to 0 62 63 if ( T_Glob_PorphyricInfected ) 64 elseif ( player->GetSpell "Vampire Blood Quarra" ) 65 elseif ( player->GetSpell "Vampire Blood Aundae" ) 66 elseif ( player->GetSpell "Vampire Blood Berne" ) 67 elseif ( PCVampire != 0 ) 68 elseif ( PCWerewolf == 1 ) 69 else 70 ;Player isn't infected/vampire/cured vampire/werewolf 71 set checkBlood to 1 72 endif 73endif 74 75if ( fixHead ) 76 ;Mod-added heads disappear when the Vampirism effect is removed/swapped 77 ;To fix this we equip a helmet and remove it to reset the head model 78 set fixHead to 0 79 equip T_Glb_Var_HeadFixer ;Lack of AddItem is intentional 80 RemoveItem T_Glb_Var_HeadFixer 1 81endif 82 83if ( MenuMode ) 84 return 85endif 86 87;Baluath stuff, see cure script 88set timer to ( timer + GetSecondsPassed ) 89if ( timer > 1 ) 90 set timer to 0 91 if ( ashStorm ) 92 set ashStorm to 0 93 endif 94 if ( GetWindSpeed ) 95 if ( GetCurrentWeather >= 6 ) ;ash 96 if ( GetCurrentWeather <= 7 ) ;blight 97 set ashStorm to 1 98 endif 99 endif 100 endif 101 if ( ashStorm ) 102 if ( GetSpell "T_Vamp_Ab_Baluath_Ash" == 0 ) 103 AddSpell "T_Vamp_Ab_Baluath_Ash" 104 AddSpell "T_Vamp_Sp_Baluath_Ash" 105 AddSpell "T_Vamp_Ab_Baluath_SunDmg" 106 RemoveSpell "vampire sun damage" 107 set fixHead to 1 108 endif 109 elseif ( GetSpell "T_Vamp_Ab_Baluath_Ash" ) 110 RemoveSpell "T_Vamp_Ab_Baluath_Ash" 111 RemoveSpell "T_Vamp_Sp_Baluath_Ash" 112 AddSpell "vampire sun damage" 113 RemoveSpell "T_Vamp_Ab_Baluath_SunDmg" 114 set fixHead to 1 115 endif 116endif 117 118 119;------------------------------------------------ 120; Player was not infected before changing cell, 121; so constantly check for infection and then run 122; this clan's specific global script 123;------------------------------------------------ 124 125if ( checkBlood ) 126 if ( player->GetSpellEffects "T_Vamp_Dis_Baluath" ) 127 if ( ScriptRunning "T_ScVamp_Baluath_PC" != 1 ) 128 StartScript "T_ScVamp_Baluath_PC" 129 endif 130 endif 131 132;------------------------------------------------ 133; Player was infected/vampire before changing cell, 134; so check whether player is in an enemy clan 135;------------------------------------------------ 136 137elseif ( state != 1 ) 138 if ( VampClan == 100 ) 139 SetFight 30 ;Player is a friendly vampire 140 else 141 SetFight 90 ;Player is an enemy vampire 142 endif 143 144 set state to 1 145endif 146 147;------------------------------------------------ 148; Apply vampire spells/abilities to this NPC once 149;------------------------------------------------ 150 151if ( doOnce == 0 ) 152 AddSpell "T_Vamp_Dis_Baluath" 153 AddSpell "T_Vamp_Ab_Baluath" 154 AddSpell "Vampire Attributes" 155 AddSpell "Vampire Skills" 156 AddSpell "Vampire Immunities" 157 AddSpell "Vampire Sun Damage" 158 AddSpell "Vampire Touch" 159 ;set province-specific location variable for dialogue here 160 set TR_Map to 4 161 set doOnce to 1 162endif 163 164;------------------------------------------------ 165; Sathram Volos quest-specific behavior 166;------------------------------------------------ 167 168end