TR_m2_Norem_Inte_Outl2_sc
TR_Mainland.esm
Variables
6
Local Variables
state
TR_Map
control
controlQ
T_Local_NPC
nolore
Source
1Begin TR_m2_Norem_Inte_Outl2_sc
2
3;This script is placed on "TR_m2_o_Torus_Malidus", "TR_m2_o_Flings_Scales", and "TR_m2_o_Staron"
4;in Norem, Interior. It makes them attack the 4 vampires in front of them.
5
6Short state
7Short TR_Map
8Short control ;counts number of vamps dead
9Short controlQ
10short T_Local_NPC
11short nolore
12
13if ( controlQ == 1 )
14 return
15endif
16
17if ( OnDeath )
18 set controlQ to 1
19 return
20endif
21
22if ( control == 5 )
23 return
24endif
25
26if ( control == 4 ) ;if all vamps dead
27 set control to 5
28 SetFight 100
29 return ;don't run script.
30elseif ( state == 0 ) ;this determines which NPC the script is placed on
31 if ( GetPos, x > 3980 ) ;NPC is Staron
32 Set state to 1 ;so toggle to attack Dro Dato
33 elseif ( GetPos, x > 3850 ) ;NPC is Flings Scales
34 Set state to 3 ;so toggle to attack Khadba gro-Magal
35 else ;NPC is Torus Malidus
36 Set state to 5 ;so toggle to attack Tirandus Nesca
37 endif
38elseif ( state == 1 ) ;if toggled to attack Dro Dato
39 StartCombat, "TR_m2_v_Dro_Dato" ;attack Dro Dato
40 Set state to 2
41elseif ( state == 2 ) ;if attacking Dro Dato
42 if ( GetDeadCount "TR_m2_v_Dro_Dato" > 0 ) ;if Dro Dato is dead
43 Set control to ( control + 1 ) ;record another vamp has died
44 Set state to 3 ;toggle to attack Khadba gro-Maga instead
45 endif
46elseif ( state == 3 ) ;if toggled to attack Khadba gro-Maga
47 StartCombat, "TR_m2_v_Khadba_gro-Maga" ;attack Khadba gro-Maga
48 Set state to 4
49elseif ( state == 4 ) ;if attacking Khadba gro-Maga
50 if ( GetDeadCount "TR_m2_v_Khadba_gro-Maga" > 0 ) ;if Khadba gro-Maga is dead
51 Set control to ( control + 1 ) ;record another vamp has died
52 Set state to 5 ;toggle to attack Tirandus Nesca instead
53 endif
54elseif ( state == 5 ) ;if toggled to attack Tirandus Nesca
55 StartCombat, "TR_m2_v_Tirandus_Nesca" ;attack Tirandus Nesca
56 Set state to 6
57elseif ( state == 6 ) ;if attacking Tirandus Nesca
58 if ( GetDeadCount "TR_m2_v_Tirandus_Nesca" > 0 ) ;if Tirandus Nesca is dead
59 Set control to ( control + 1 ) ;record another vamp has died
60 Set state to 7 ;toggle to attack Zargoryn Thalen instead
61 endif
62elseif ( state == 7 ) ;if toggled to attack Zargoryn Thalen
63 StartCombat, "TR_m2_v_Zargorynthalen" ;attack Zargoryn Thalen
64 Set state to 8
65elseif ( state == 8 ) ;if attacking Zargoryn Thalen
66 if ( GetDeadCount "TR_m2_v_Zargorynthalen" > 0 ) ;if Zargoryn Thalen is dead
67 Set control to ( control + 1 ) ;record another vamp has died
68 Set state to 1 ;toggle to attack Dro Dato instead
69 endif
70endif
71
72;standard TR stuff
73if ( TR_Map == 2 )
74 return
75endif
76
77Set TR_Map to 2
78
79End