Scripts

T_ScNpc_Mw_Map4VampOrlukh

Tamriel_Data.esm
Variables 16
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
Source
1begin T_ScNpc_Mw_Map4VampOrlukh 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 32;----------------------------------------------- 33; Drop vampire dust on death like vanilla 34;----------------------------------------------- 35 36if ( OnDeath ) 37 AddItem "ingred_vampire_dust_01" 1 38endif 39 40;----------------------------------------------- 41; Check player infection/vampire status 42;----------------------------------------------- 43 44if ( CellChanged ) 45 set checkBlood to 0 46 set state to 0 47 48 if ( T_Glob_PorphyricInfected ) 49 elseif ( player->GetSpell "Vampire Blood Quarra" ) 50 elseif ( player->GetSpell "Vampire Blood Aundae" ) 51 elseif ( player->GetSpell "Vampire Blood Berne" ) 52 elseif ( PCVampire != 0 ) 53 elseif ( PCWerewolf == 1 ) 54 else 55 ;Player isn't infected/vampire/cured vampire/werewolf 56 set checkBlood to 1 57 endif 58endif 59 60if ( MenuMode ) 61 return 62endif 63 64;------------------------------------------------ 65; Player was not infected before changing cell, 66; so constantly check for infection and then run 67; this clan's specific global script 68;------------------------------------------------ 69 70if ( checkBlood ) 71 if ( player->GetSpellEffects "T_Vamp_Dis_Orlukh" ) 72 if ( ScriptRunning "T_ScVamp_Orlukh_PC" != 1 ) 73 StartScript "T_ScVamp_Orlukh_PC" 74 endif 75 endif 76 77;------------------------------------------------ 78; Player was infected/vampire before changing cell, 79; so check whether player is in an enemy clan 80;------------------------------------------------ 81 82elseif ( state != 1 ) 83 if ( VampClan == 101 ) 84 SetFight 30 ;Player is a friendly vampire 85 else 86 SetFight 90 ;Player is an enemy vampire 87 endif 88 89 set state to 1 90endif 91 92;------------------------------------------------ 93; Apply vampire spells/abilities to this NPC once 94;------------------------------------------------ 95 96if ( doOnce == 0 ) 97 AddSpell "T_Vamp_Dis_Orlukh" 98 AddSpell "T_Vamp_Ab_Orlukh" 99 AddSpell "Vampire Attributes" 100 AddSpell "Vampire Skills" 101 AddSpell "Vampire Immunities" 102 AddSpell "Vampire Sun Damage" 103 AddSpell "Vampire Touch" 104 ModRestoration 75 105 ;set province-specific location variable for dialogue here 106 set TR_Map to 4 107 set T_Local_Khajiit to -1 108 109 if ( GetRace "T_Els_Cathay" ) 110 set T_Local_Khajiit to 1 111 elseif ( GetRace "T_Els_Cathay-raht" ) 112 set T_Local_Khajiit to 1 113 elseif ( GetRace "T_Els_Dagi-raht" ) 114 set T_Local_Khajiit to 1 115 elseif ( GetRace "T_Els_Ohmes" ) 116 set T_Local_Khajiit to 1 117 elseif ( GetRace "T_Els_Ohmes-raht" ) 118 set T_Local_Khajiit to 1 119 elseif ( GetRace "T_Els_Suthay" ) 120 set T_Local_Khajiit to 1 121 elseif ( GetRace "T_Els_Tojay" ) 122 set T_Local_Khajiit to 1 123 elseif ( GetRace "Khajiit" ) 124 set T_Local_Khajiit to 1 125 endif 126 set doOnce to 1 127endif 128 129end