Scripts

TR_m2_Norem_Inte_Vamp2_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_Inte_Vamp2_sc 2 3;This script is placed on the vampires "TR_m2_v_Tirandus_Nesca", "TR_m2_v_Zargorynthalen", 4;"TR_m2_v_Khadba_gro-Maga", "and TR_m2_v_Dro_Dato" in Norem, Interior. 5;It makes them attack the 2 outlaws nearby. 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 the 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 == 4 ) 31;do nothing 32elseif ( control == 3 ) ;if all three outlaws dead 33 Set state to -1 ;stop attacking 34 Set control to 4 35elseif ( state == 0 ) ;initially, determine which NPC this script is placed on 36 if ( GetPos, x < 3500 ) ;NPC is Tirandus Nesca 37 Set state to 1 ;so toggle to attack Torus Maridus 38 elseif ( GetPos, x < 3700 ) ;NPC is Zargoryn Thalen 39 Set state to 3 ;so toggle to attack Torus Maridus 40 elseif ( GetPos, x < 4200 ) ;NPC is Khadba gro-Magal 41 Set state to 3 ;so toggle to attack Flings-Scales 42 else ;NPC is Dro'Dato 43 Set state to 3 ;so toggle to attack Staron 44 endif 45elseif ( state == 1 ) ;if toggled to attack Torus Maridus 46 StartCombat, "TR_m2_o_Torus_Malidus" ;attack Torus Maridus 47 Set state to 2 48elseif ( state == 2 ) ;if attacking Torus Maridus 49 if ( GetDeadCount "TR_m2_o_Torus_Malidus" > 0 ) ;if Torus Maridus is dead 50 Set control to ( control + 1 ) ;note another outlaw dead 51 Set state to 3 ;toggle to attack Flings-Scales 52 endif 53elseif ( state == 3 ) ;if toggled to attack Flings-Scales 54 StartCombat, "TR_m2_o_Flings_Scales" ;attack Flings-Scales 55 Set state to 4 56elseif ( state == 4 ) ;if attacking Flings-Scales 57 if ( GetDeadCount "TR_m2_o_Flings_Scales" > 0 ) ;if Flings-Scales is dead 58 Set control to ( control + 1 ) ;note another outlaw dead 59 Set state to 5 ;toggle to attack Staron 60 endif 61elseif ( state == 5 ) ;if toggled to attack Staron 62 StartCombat, "TR_m2_o_Staron" ;attack Staron 63 Set state to 6 64elseif ( state == 6 ) ;if attacking Staron 65 if ( GetDeadCount "TR_m2_o_Staron" > 0 ) ;if Staron is dead 66 Set control to ( control + 1 ) ;note another outlaw dead 67 Set state to 1 ;toggle to attack Torus Maridus 68 endif 69endif 70 71;the rest of the script is the standard TR vampire stuff for Aundae vampires 72if ( GetJournalIndex "VA_VampHunter" == 110 ) 73 setFight 100 74 setDisposition 0 75 set cattlekilled to -1 76 return 77endif 78 79if ( OnDeath == 1 ) 80 if ( GetJournalIndex "VA_VampCountess" == 50 ) 81 if ( VampClan == 1 ) 82 set VampKills to ( VampKills - 1 ) 83 elseif ( VampClan == 2 ) 84 set VampKills to ( VampKills + 1 ) 85 elseif ( VampClan == 3 ) 86 set VampKills to ( VampKills + 1 ) 87 endif 88 elseif ( GetJournalIndex "VA_VampAmulet" == 30 ) 89 if ( VampClan == 1 ) 90 set VampKills to ( VampKills - 1 ) 91 elseif ( VampClan == 2 ) 92 set VampKills to ( VampKills + 1 ) 93 elseif ( VampClan == 3 ) 94 set VampKills to ( VampKills + 1 ) 95 endif 96 endif 97 AddItem "ingred_vampire_dust_01" 1 98 set controlQ to 1 99 return 100endif 101 102if ( done == -1 ) 103 return 104elseif ( done == 0 ) 105 AddSpell, "Vampire Blood Quarra" ;this is the blood disease 106 AddSpell, "Vampire Attributes" 107 AddSpell, "Vampire Skills" 108 AddSpell, "Vampire Immunities" 109 AddSpell, "Vampire Sun Damage" 110 AddSpell, "Vampire Touch" 111 AddSpell, "Vampire Quarra Specials" 112 ModRestoration 75 113 set TR_Map to 2 114 set done to 1 115 set T_Local_Khajiit to -1 116 if ( GetRace "T_Els_Cathay" ) 117 set T_Local_Khajiit to 1 118 elseif ( GetRace "T_Els_Cathay-raht" ) 119 set T_Local_Khajiit to 1 120 elseif ( GetRace "T_Els_Dagi-raht" ) 121 set T_Local_Khajiit to 1 122 elseif ( GetRace "T_Els_Ohmes" ) 123 set T_Local_Khajiit to 1 124 elseif ( GetRace "T_Els_Ohmes-raht" ) 125 set T_Local_Khajiit to 1 126 elseif ( GetRace "T_Els_Suthay" ) 127 set T_Local_Khajiit to 1 128 elseif ( GetRace "T_Els_Tojay" ) 129 set T_Local_Khajiit to 1 130 elseif ( GetRace "Khajiit" ) 131 set T_Local_Khajiit to 1 132 endif 133endif 134 135if ( control >= 3 ) 136 if ( done == 1 ) 137 ;check for PC as a Quarra Vampire 138 if ( player->GetSpell "Vampire Quarra Specials" == 1 ) 139 setfight 30 140 set done to 2 141 else 142 if ( fightset == 0 ) 143 setfight 90 144 setdisposition 20 145 set fightset to 1 146 endif 147 endif 148 return 149 elseif ( done == 2 ) 150 ;check for PC NO LONGER a Quarra Vampire 151 if ( player->GetSpell "Vampire Quarra Specials" != 1 ) 152 setfight 90 153 setdisposition 20 154 set done to -1 155 endif 156 endif 157endif 158 159End