TR_m2_q_HT_VQ6_DaeLow_sc
TR_Mainland.esm
Variables
3
Local Variables
state
control
controlQ
Source
1Begin TR_m2_q_HT_VQ6_DaeLow_sc
2
3;This script is placed on the Daedra in Tel Muthada, Lower Tower
4;It makes them attack the Telvanni ahead of them
5
6Short state
7Short control ;counts number of dead Telvanni
8Short controlQ
9
10if ( controlQ == 1 )
11 if ( TR_m2_HT_Vaerin_Q6Done == 1 )
12 if ( GetDisabled == 0 )
13 Disable
14 endif
15 endif
16 return
17endif
18
19if ( OnDeath )
20 set controlQ to 1
21 set TR_m2_HT_Vaerin_DaedraDead to ( TR_m2_HT_Vaerin_DaedraDead + 1 )
22 return
23endif
24
25if ( TR_m2_HT_Vaerin_RitualDone == 0 )
26 if ( GetDisabled == 0 )
27 Disable
28 endif
29 return
30else
31 if ( GetDisabled )
32 Enable
33 endif
34endif
35
36if ( control == 4 )
37 return
38endif
39
40if ( control == 3 ) ;if all 3 vamps dead
41 set control to 4
42 SetFight 100
43 StartCombat player
44 return ;don't run script.
45elseif ( state == 0 ) ;this determines which NPC the script is placed on
46 if ( GetPos x > 400 ) ;Dremora
47 Set state to 1 ;so toggle to attack Bilos Telsaran
48 elseif ( GetPos x > -450 ) ;Scamp
49 Set state to 5 ;so toggle to attack Elbewen
50 else ;Daedroth
51 Set state to 3 ;so toggle to attack Erimir
52 endif
53elseif ( state == 1 ) ;if toggled to attack Bilos Telsaran
54 StartCombat "TR_m2_Bilos Telsaran" ;attack Bilos Telsaran
55 Set state to 2
56elseif ( state == 2 ) ;if attacking Bilos Telsaran
57 if ( GetDeadCount "TR_m2_Bilos Telsaran" > 0 ) ;if Bilos Telsaran is dead
58 Set control to ( control + 1 ) ;note another Telvanni has died
59 Set state to 3 ;toggle to attack Erimir
60 endif
61elseif ( state == 3 ) ;if toggled to attack Erimir
62 StartCombat "TR_m2_Erimir" ;attack Erimir
63 Set state to 4
64elseif ( state == 4 ) ;if attacking Erimir
65 if ( GetDeadCount "TR_m2_Erimir" > 0 ) ;if Sathas Marvayn is dead
66 Set control to ( control + 1 ) ;note another Telvanni has died
67 Set state to 5 ;toggle to attack Elbewen
68 endif
69elseif ( state == 5 ) ;if toggled to attack Elbewen
70 StartCombat "TR_m2_Elbewen" ;attack Elbewen
71 Set state to 6
72elseif ( state == 6 ) ;if attacking Elbewen
73 if ( GetDeadCount "TR_m2_Elbewen" > 0 ) ;if Elbewen is dead
74 Set control to ( control + 1 ) ;note another Telvanni has died
75 Set state to 1 ;attack Bilos Telsaran
76 endif
77endif
78
79
80End