Scripts

TR_m2_Velyn_Alari

TR_Mainland.esm
Variables 20
Local Variables
done
fightset
cattlekilled
nolore
nohello
noflee
noidle
nointruder
nothief
TR_Map
T_Local_Vampire
control
controlQ
T_Local_NPC
T_Local_NoLore
TR_m2_Nc_VelynHelp
OnPCHitMe
brotherDeath
doOnce
endCombat
Source
1begin TR_m2_Velyn_Alari 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 Berne 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 22short TR_m2_Nc_VelynHelp 23short OnPCHitMe 24short brotherDeath 25short doOnce 26short endCombat 27 28if ( OnDeath == 1 ) 29 if ( GetDeadCount "TR_m2_Adren Alari" > 0 ) 30 Journal "TR_m2_Nm_BrokenFamily" 180 31 elseif ( GetJournalIndex "TR_m2_Nm_BrokenFamily" == 20 ) 32 Journal "TR_m2_Nm_BrokenFamily" 25 33 elseif ( GetJournalIndex "TR_m2_Nm_BrokenFamily" == 10 ) 34 Journal "TR_m2_Nm_BrokenFamily" 170 35 endif 36endif 37 38if ( GetJournalIndex "TR_m2_Nm_BrokenFamily" == 30 ) 39 if ( OnPCHitMe == 1 ) 40 if ( doOnce <= 1 ) 41 set "TR_m2_Adren Alari".TR_m2_Nc_AdrenHelp to 1 42 set OnPCHitMe to 0 43 set doOnce to (doOnce + 1) 44 Player->stopCombat 45 startCombat "TR_m2_Adren Alari" 46 endif 47 if ( doOnce == 2 ) 48 startCombat Player 49 set OnPCHitMe to 0 50 endif 51 endif 52 if ( endCombat == 0 ) 53 if ( "TR_m2_Adren Alari"->getHealth <= 1 ) 54 if ( TR_m2_Nc_VelynHelp == 1 ) 55 stopCombat 56 set endCombat to 1 57 set OnPCHitMe to 0 58 setFight 0 59 setFlee 0 60 AIWander 0, 0, 0 61 endif 62 endif 63 endif 64endif 65 66if ( GetJournalIndex "TR_m2_Nm_BrokenFamily" == 40 ) 67 if ( cellChanged == 1 ) 68 disable 69 endif 70endif 71 72if ( GetJournalIndex "TR_m2_Nm_BrokenFamily" == 120 ) 73 if ( cellChanged == 1 ) 74 disable 75 endif 76endif 77 78if ( GetJournalIndex "TR_m2_Nm_BrokenFamily" == 130 ) 79 if ( cellChanged == 1 ) 80 disable 81 endif 82endif 83 84if ( brotherDeath == 1 ) 85 if ( GetJournalIndex "TR_m2_Nm_BrokenFamily" == 161 ) 86 if ( cellChanged == 1 ) 87 disable 88 endif 89 elseif ( GetJournalIndex "TR_m2_Nm_BrokenFamily" == 162 ) 90 if ( cellChanged == 1 ) 91 disable 92 endif 93 endif 94endif 95 96if ( GetJournalIndex "TR_m2_Nm_BrokenFamily" == 190 ) 97 if ( cellChanged == 1 ) 98 disable 99 endif 100endif 101 102if ( GetJournalIndex "VA_VampHunter" == 110 ) 103 setFight 100 104 setDisposition 0 105 set cattlekilled to -1 106endif 107 108if ( OnDeath == 1 ) 109 if ( GetJournalIndex "VA_VampCountess" == 50 ) 110 if ( VampClan == 1 ) 111 set VampKills to ( VampKills - 1 ) 112 elseif ( VampClan == 2 ) 113 set VampKills to ( VampKills + 1 ) 114 elseif ( VampClan == 3 ) 115 set VampKills to ( VampKills + 1 ) 116 endif 117 elseif ( GetJournalIndex "VA_VampAmulet" == 30 ) 118 if ( VampClan == 1 ) 119 set VampKills to ( VampKills - 1 ) 120 elseif ( VampClan == 2 ) 121 set VampKills to ( VampKills + 1 ) 122 elseif ( VampClan == 3 ) 123 set VampKills to ( VampKills + 1 ) 124 endif 125 endif 126 AddItem "ingred_vampire_dust_01" 1 127endif 128 129if ( done == -1 ) 130 return 131endif 132 133if ( done == 0 ) 134 AddSpell "Vampire Blood Berne" ;this is the blood disease 135 AddSpell "Vampire Attributes" 136 AddSpell "Vampire Skills" 137 AddSpell "Vampire Immunities" 138 AddSpell "Vampire Sun Damage" 139 AddSpell "Vampire Touch" 140 AddSpell "Vampire Berne Specials" 141 ModRestoration 75 142 set TR_Map to 2 143 set done to -1 144endif 145 146end