Scripts

TR_m2_Norem_Sanc_Vamp_sc

TR_Mainland.esm
Variables 17
Local Variables
state
done
fightset
cattlekilled
nolore
nohello
noflee
noidle
nointruder
nothief
TR_Map
T_Local_Vampire
control
controlQ
T_Local_NPC
T_Local_NoLore
T_Local_Khajiit
Source
1Begin TR_m2_Norem_Sanc_Vamp_sc 2 3;This script is placed on the two vampires "TR_m2_v_Darriss" and "TR_m2_v_Grath_gro-Gakk" 4;in Norem, Sanctuary. it makes them fight the two outlaws in the cell. it also includes the 5;standard TR vampire script - these vampires are both Berne 6 7Short state 8short done 9short fightset 10short cattlekilled 11short nolore 12short nohello 13short noflee 14short noidle 15short nointruder 16short nothief 17short TR_Map 18short T_Local_Vampire 19short control ;counts number of dead outlaws 20short controlQ 21short T_Local_NPC 22short T_Local_NoLore 23short T_Local_Khajiit 24 25if ( controlQ == 1 ) 26 return 27endif 28 29;this handles the vampires attacking the outlaws 30if ( control == 3 ) 31;do nothing 32elseif ( control == 2 ) ;if both outlaws dead 33 Set state to -1 ;stop attacking 34 Set control to 3 ;and reset 35elseif ( state == 0 ) ;initially, determine which NPC this script is placed on 36 if ( GetPos, x > 4200 ) ;NPC is Darriss 37 Set state to 1 ;so toggle to attack Martia Velurius 38 else ;NPC is Grath gro-Gakk 39 Set state to 3 ;so toggle to attack Herma Homeless 40 endif 41elseif ( state == 1 ) ;if toggled to attack Martia Velurius 42 StartCombat, "TR_m2_o_Martia_Velurius" ;attack Martia Velurius 43 Set state to 2 44elseif ( state == 2 ) ;if attacking Martia Velurius 45 if ( GetDeadCount "TR_m2_o_Martia_Velurius" > 0 ) ;if Martia Velurius is dead 46 Set control to ( control + 1 ) ;note another outlaw dead 47 Set state to 3 ;toggle to attack Herma Homeless 48 endif 49elseif ( state == 3 ) ;if toggled to attack Herma Homeless 50 StartCombat, "TR_m2_o_Herma_Homeless" ;attack Herma Homeless 51 Set state to 4 52elseif ( state == 4 ) ;if attacking Herma Homeless 53 if ( GetDeadCount "TR_m2_o_Herma_Homeless" > 0 ) ;if Herma Homeless is dead 54 Set control to ( control + 1 ) ;note another outlaw dead 55 Set state to 1 ;toggle to attack Martia Velurius 56 endif 57endif 58 59;rest of the script is standard TR vampire stuff 60if ( GetJournalIndex "VA_VampHunter" == 110 ) 61 setFight 100 62 setDisposition 0 63 set cattlekilled to -1 64 return 65endif 66 67if ( OnDeath == 1 ) 68 if ( GetJournalIndex "VA_VampCountess" == 50 ) 69 if ( VampClan == 1 ) 70 set VampKills to ( VampKills - 1 ) 71 elseif ( VampClan == 2 ) 72 set VampKills to ( VampKills + 1 ) 73 elseif ( VampClan == 3 ) 74 set VampKills to ( VampKills + 1 ) 75 endif 76 elseif ( GetJournalIndex "VA_VampAmulet" == 30 ) 77 if ( VampClan == 1 ) 78 set VampKills to ( VampKills - 1 ) 79 elseif ( VampClan == 2 ) 80 set VampKills to ( VampKills + 1 ) 81 elseif ( VampClan == 3 ) 82 set VampKills to ( VampKills + 1 ) 83 endif 84 endif 85 AddItem "ingred_vampire_dust_01" 1 86 set controlQ to 1 87 return 88endif 89 90if ( done == -1 ) 91 return 92elseif ( done == 0 ) 93 AddSpell, "Vampire Blood Quarra" ;this is the blood disease 94 AddSpell, "Vampire Attributes" 95 AddSpell, "Vampire Skills" 96 AddSpell, "Vampire Immunities" 97 AddSpell, "Vampire Sun Damage" 98 AddSpell, "Vampire Touch" 99 AddSpell, "Vampire Quarra Specials" 100 ModRestoration 75 101 set TR_Map to 2 102 set done to 1 103 set T_Local_Khajiit to -1 104 if ( GetRace "T_Els_Cathay" ) 105 set T_Local_Khajiit to 1 106 elseif ( GetRace "T_Els_Cathay-raht" ) 107 set T_Local_Khajiit to 1 108 elseif ( GetRace "T_Els_Dagi-raht" ) 109 set T_Local_Khajiit to 1 110 elseif ( GetRace "T_Els_Ohmes" ) 111 set T_Local_Khajiit to 1 112 elseif ( GetRace "T_Els_Ohmes-raht" ) 113 set T_Local_Khajiit to 1 114 elseif ( GetRace "T_Els_Suthay" ) 115 set T_Local_Khajiit to 1 116 elseif ( GetRace "T_Els_Tojay" ) 117 set T_Local_Khajiit to 1 118 elseif ( GetRace "Khajiit" ) 119 set T_Local_Khajiit to 1 120 endif 121endif 122 123if ( control >= 2 ) 124 if ( done == 1 ) 125 ;check for PC as a Quarra Vampire 126 if ( player->GetSpell "Vampire Quarra Specials" == 1 ) 127 setfight 30 128 set done to 2 129 else 130 if ( fightset == 0 ) 131 setfight 90 132 setdisposition 20 133 set fightset to 1 134 endif 135 endif 136 return 137 elseif ( done == 2 ) 138 ;check for PC NO LONGER a Quarra Vampire 139 if ( player->GetSpell "Vampire Quarra Specials" != 1 ) 140 setfight 90 141 setdisposition 20 142 set done to -1 143 endif 144 endif 145endif 146 147End