Scripts

TR_m2_NPC_Ancasarion

TR_Mainland.esm
Variables 15
Local Variables
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_NPC_Ancasarion 2 3; This short script is there to allow dialogue to be filtered on the TR_Map local variable, 4; allowing for regional topics such as "Morrowind Lore" or "Geographic Regions" to be 5; appropriate to the location the NPC is. This version is for Quarra vampire NPCs. 6 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 19short controlQ 20short T_Local_NPC 21short T_Local_NoLore 22 23;Combat behavior 24if ( control == 0 ) 25 if ( GetSpellEffects "TR_m2_Ancasarion_debuff" ) 26 set control to 1 27 endif 28elseif ( control == 1 ) 29 if ( GetSpell "TR_m2_Ancasarion_debuff" ) 30 RemoveSpell "TR_m2_Ancasarion_debuff" 31 endif 32 cast "TR_m2_Ancasarion_debuff_2" Player 33 if ( GetSpellEffects "TR_m2_Ancasarion_debuff_2" ) 34 set control to 2 35 endif 36elseif ( control == 2 ) 37 cast "TR_m2_Ancasarion_debuff_3" Player 38 if ( GetSpellEffects "TR_m2_Ancasarion_debuff_3" ) 39 set control to 3 40 endif 41elseif ( control == 3 ) 42 if ( GetSpellEffects "TR_m2_Ancasarion_debuff" == 0 ) 43 set control to 0 44 AddSpell "TR_m2_Ancasarion_debuff" 45 endif 46endif 47 48; Standard map 2 vampire script 49if ( GetJournalIndex "VA_VampHunter" == 110 ) 50 setFight 100 51 setDisposition 0 52 set cattlekilled to -1 53endif 54 55if ( OnDeath == 1 ) 56 if ( GetJournalIndex "VA_VampCountess" == 50 ) 57 if ( VampClan == 1 ) 58 set VampKills to ( VampKills - 1 ) 59 elseif ( VampClan == 2 ) 60 set VampKills to ( VampKills + 1 ) 61 elseif ( VampClan == 3 ) 62 set VampKills to ( VampKills + 1 ) 63 endif 64 elseif ( GetJournalIndex "VA_VampAmulet" == 30 ) 65 if ( VampClan == 1 ) 66 set VampKills to ( VampKills - 1 ) 67 elseif ( VampClan == 2 ) 68 set VampKills to ( VampKills + 1 ) 69 elseif ( VampClan == 3 ) 70 set VampKills to ( VampKills + 1 ) 71 endif 72 endif 73 AddItem "ingred_vampire_dust_01" 1 74endif 75 76if ( done == -1 ) 77 return 78endif 79 80if ( done == 2 ) 81 ;check for PC NO LONGER a Quarra Vampire 82 if ( player->GetSpell "Vampire Quarra Specials" != 1 ) 83 setfight 90 84 setdisposition 20 85 set done to -1 86 endif 87 return 88endif 89 90if ( done == 1 ) 91 ;check for PC as a Quarra Vampire 92 if ( player->GetSpell "Vampire Quarra Specials" == 1 ) 93 setfight 30 94 set done to 2 95 elseif ( player->GetSpell "Vampire Quarra Specials" != 1 ) 96 if ( fightset == 0 ) 97 setfight 90 98 setdisposition 20 99 set fightset to 1 100 endif 101 endif 102 return 103endif 104 105if ( done == 0 ) 106 AddSpell "Vampire Blood Quarra" ;this is the blood disease 107 AddSpell "Vampire Attributes" 108 AddSpell "Vampire Skills" 109 AddSpell "Vampire Immunities" 110 AddSpell "Vampire Sun Damage" 111 AddSpell "Vampire Touch" 112 AddSpell "Vampire Quarra Specials" 113 ModRestoration 75 114 set TR_Map to 2 115 set done to 1 116 117 RemoveSpell "TR_m2_Ancasarion_debuff_2" 118 RemoveSpell "TR_m2_Ancasarion_debuff_3" 119 120endif 121 122end