TR_m3_AT_Ordinator_Train2_sc
TR_Mainland.esm
Variables
10
Local Variables
TR_Map
control
controlQ
T_Local_NPC
T_Local_NoLore
NoLore
fightvar
doOnce
OnPCHitMe
timer
Source
1Begin TR_m3_AT_Ordinator_Train2_sc
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
6short TR_Map
7short control
8short controlQ
9short T_Local_NPC
10short T_Local_NoLore
11short NoLore
12short fightvar
13short doOnce
14short OnPCHitMe
15float timer
16
17if ( MenuMode )
18 return
19endif
20
21if ( OnDeath )
22 ModPCCrimeLevel 1000
23 return
24endif
25
26if ( OnPCHitMe )
27 if ( control == 0 )
28 set control to 1
29 ModPCCrimeLevel 40
30 endif
31 set OnPCHitMe to 0
32endif
33
34if ( control == 1 )
35 if ( GetPCCrimeLevel == 0 )
36 set control to 0
37 endif
38endif
39
40if ( doOnce == 0 )
41 if ( GetLOS player )
42 if ( GetDistance player <= 950 )
43 StartCombat "TR_m3_Fadar Elarven"
44 set fightvar to 1
45 set doOnce to 1
46 endif
47 endif
48endif
49
50if ( timer > 20 )
51 if ( fightvar == 0 )
52 if ( GetLOS player )
53 if ( GetDistance player <= 950 )
54 StartCombat "TR_m3_Fadar Elarven"
55 set fightvar to 1
56 set timer to 0
57 endif
58 endif
59 else
60 StopCombat
61 SetHealth 150
62 set fightvar to 0
63 set timer to 0
64 endif
65endif
66
67if ( doOnce == 1 )
68 set timer to ( timer + GetSecondsPassed )
69endif
70
71if ( TR_Map == 3 )
72 return
73endif
74
75set TR_Map to 3
76
77End