TR_m2_q_HT_VQ6_DaeUp_sc
TR_Mainland.esm
Variables
3
Local Variables
state
control
controlQ
Source
1Begin TR_m2_q_HT_VQ6_DaeUp_sc
2
3;This script is placed on the Daedra in Tel Muthada, Upper 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 == 6 )
37 return
38endif
39
40if ( control == 5 ) ;if all telvanni dead
41 set control to 6
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 y > 900 ) ;Scamp 1
47 Set state to 1 ;so toggle to attack Rradir
48 elseif ( GetPos y > 800 ) ;Scamp 2
49 Set state to 3 ;so toggle to attack Cheela
50 elseif ( GetPos y > 300 ) ;Daedroth 1
51 Set state to 5 ;so toggle to attack Ah-seeus
52 elseif ( GetPos y > 200 ) ;Daedroth 2
53 Set state to 7 ;so toggle to attack Gols Farethan
54 else
55 Set state to 9 ;so toggle to attack Aren Sinn
56 endif
57elseif ( state == 1 ) ;if toggled to attack Rradir
58 StartCombat "TR_m2_Rradirr" ;attack Rradir
59 Set state to 2
60elseif ( state == 2 ) ;if attacking Rradir
61 if ( GetDeadCount "TR_m2_Rradirr" > 0 ) ;if Rradir is dead
62 Set control to ( control + 1 ) ;note another Telvanni has died
63 Set state to 3 ;toggle to attack Cheela
64 endif
65elseif ( state == 3 ) ;if toggled to attack Cheela
66 StartCombat "TR_m2_Cheela" ;attack Cheela
67 Set state to 4
68elseif ( state == 4 ) ;if attacking Cheela
69 if ( GetDeadCount "TR_m2_Cheela" > 0 ) ;if Cheela is dead
70 Set control to ( control + 1 ) ;note another Telvanni has died
71 Set state to 5 ;toggle to attack Ah-seeus
72 endif
73elseif ( state == 5 ) ;if toggled to attack Ah-seeus
74 StartCombat "TR_m2_Ah-seeus" ;attack Ah-seeus
75 Set state to 6
76elseif ( state == 6 ) ;if attacking Ah-seeus
77 if ( GetDeadCount "TR_m2_Ah-seeus" > 0 ) ;if Ah-seeus is dead
78 Set control to ( control + 1 ) ;note another Telvanni has died
79 Set state to 7 ;attack Gols Farethan
80 endif
81elseif ( state == 7 ) ;if toggled to attack Gols Farethan
82 StartCombat "TR_m2_Gols Farethan" ;attack Gols Farethan
83 Set state to 8
84elseif ( state == 8 ) ;if attacking Gols Farethan
85 if ( GetDeadCount "TR_m2_Gols Farethan" > 0 ) ;if Gols Farethan is dead
86 Set control to ( control + 1 ) ;note another Telvanni has died
87 Set state to 9 ;attack Aren Sinn
88 endif
89elseif ( state == 9 ) ;if toggled to attack Aren Sinn
90 StartCombat "TR_m2_Aren Sinn" ;attack Aren Sinn
91 Set state to 10
92elseif ( state == 10 ) ;if attacking Aren Sinn
93 if ( GetDeadCount "TR_m2_Aren Sinn" > 0 ) ;if Aren Sinn is dead
94 Set control to ( control + 1 ) ;note another Telvanni has died
95 Set state to 1 ;attack Rradir
96 endif
97endif
98
99
100End