Scripts

TR_m2_Norem_Inte_Vamp1_sc

TR_Mainland.esm
Variables 16
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
Source
1Begin TR_m2_Norem_Inte_Vamp1_sc 2 3;This script is placed on the vampires "TR_m2_v_Sathas_Marvayn", "TR_m2_v_Samera_Varrus" 4;and "TR_m2_v_Waylor" in Norem, Interior. It makes them attack the 2 outlaws nearby. These are Quarra vamps. 5 6Short state 7short done 8short fightset 9short cattlekilled 10short nolore 11short nohello 12short noflee 13short noidle 14short nointruder 15short nothief 16short TR_Map 17short T_Local_Vampire 18short control ;counts the number of dead outlaws 19short controlQ 20short T_Local_NPC 21short T_Local_NoLore 22 23if ( controlQ == 1 ) 24 return 25endif 26 27;this handles the vampires attacking the outlaws 28if ( control == 3 ) 29;do nothing 30elseif ( control == 2 ) ;if both outlaws dead 31 Set state to -1 ;stop attacking 32 Set control to 3 33elseif ( state == 0 ) ;initially, determine which NPC this script is placed on 34 if ( GetPos x < 3100 ) ;NPC is Sathas Marvayn 35 Set state to 1 ;so toggle to attack Hascolm 36 elseif ( GetPos x < 3270 ) ;NPC is Samera Varrus 37 Set state to 3 ;so toggle to attack Gakken gro-Gayash 38 else ;NPC is Waylor 39 Set state to 3 ;so toggle to attack Gakken gro-Gayash 40 endif 41elseif ( state == 1 ) ;if toggled to attack Hascolm 42 StartCombat "TR_m2_o_Hascolm" ;attack Hascolm 43 Set state to 2 44elseif ( state == 2 ) ;if attacking Hascolm 45 if ( GetDeadCount "TR_m2_o_Hascolm" > 0 ) ;if Hascolm is dead 46 Set control to ( control + 1 ) ;note that an outlaw has died 47 Set state to 3 ;toggle to attack Gakken gro-Gayash 48 endif 49elseif ( state == 3 ) ;if toggled to attack Gakken gro-Gayash 50 StartCombat "TR_m2_o_Gakken_gro-Gay" ;attack Gakken gro-Gayash 51 Set state to 4 52elseif ( state == 4 ) ;if attacking Gakken gro-Gayash 53 if ( GetDeadCount "TR_m2_o_Gakken_gro-Gay" > 0 ) ;if Gakken gro-Gayash is dead 54 Set control to ( control + 1 ) ;note that an outlaw has died 55 Set state to 1 ;toggle to attack Hascolm 56 endif 57endif 58 59;the rest of the script is the standard TR vampire stuff for Quarra vampires 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 103endif 104 105if ( control >= 2 ) 106 if ( done == 1 ) 107 ;check for PC as a Quarra Vampire 108 if ( player->GetSpell "Vampire Quarra Specials" == 1 ) 109 setfight 30 110 set done to 2 111 else 112 if ( fightset == 0 ) 113 setfight 90 114 setdisposition 20 115 set fightset to 1 116 endif 117 endif 118 return 119 elseif ( done == 2 ) 120 ;check for PC NO LONGER a Quarra Vampire 121 if ( player->GetSpell "Vampire Quarra Specials" != 1 ) 122 setfight 90 123 setdisposition 20 124 set done to -1 125 endif 126 endif 127endif 128 129End