TR_m7_NPC_Arvena_Veldyn
TR_Mainland.esm
Variables
5
Local Variables
TR_Map
control
controlQ
T_Local_NPC
NoLore
Source
1Begin TR_m7_NPC_Arvena_Veldyn
2; This short script is there to allow dialogue to be filtered on the TR_Map local variable,
3; allowing for regional topics such as "Morrowind Lore" or "Geographic Regions" to be
4; appropriate to the location the NPC is.
5
6; control states
7; 0 = Has not cast heal yet
8; 1 = is casting heal
9; 2 = has cast heal
10
11
12; controlQ states
13; 0 = alive
14; 1 = dead
15
16
17short TR_Map
18short control
19short controlQ
20short T_Local_NPC
21short NoLore
22
23if ( OnDeath )
24 set controlQ to 1
25endif
26
27; This is to prevent her from casting the spell normally
28; Why add it in the first place? So it shows the association in CS
29if ( GetSpell "TR_m7_VeldynHeal" )
30 RemoveSpell "TR_m7_VeldynHeal"
31endif
32
33if ( controlQ == 1 )
34 return
35elseif ( controlQ == 0 )
36 if ( "TR_m7_Turesa Veldyn".control == 0 )
37 if ( "TR_m7_Turesa Veldyn"->GetHealth <= 80 )
38 if ( control == 0 )
39 set control to 1
40 endif
41 endif
42 endif
43endif
44
45if ( control == 1 )
46 cast "TR_m7_VeldynHeal" "TR_m7_Turesa Veldyn"
47 if ( GetSpellEffects "TR_m7_VeldynHeal" )
48 set control to 2
49 set controlQ to 1
50 endif
51endif
52
53set TR_Map to 7
54
55End