TR_m7_AI_TT_EralasSc
TR_Mainland.esm
Variables
7
Local Variables
TR_Map
NoLore
T_Local_NoLore
T_Local_NPC
control
controlQ
controlA
Source
1Begin TR_m7_AI_TT_EralasSc
2
3short TR_Map
4short NoLore
5short T_Local_NoLore
6short T_Local_NPC
7short control
8short controlQ
9short controlA
10
11if ( TR_Map == 7 )
12 if ( GetJournalIndex TR_m7_AI_TT_Q5 < 60 )
13 return
14 endif
15endif
16
17if ( controlQ == 3 )
18 return
19endif
20
21if ( GetJournalIndex TR_m7_AI_TT_Q5 >= 90 )
22 set controlQ to 3
23 return
24endif
25
26if ( control > 0 )
27 if ( control != 3 )
28 if ( GetPCCell "Bessarnamidan, Upper Level" == 1 )
29 set control to 0
30 endif
31 endif
32endif
33
34if ( controlQ == 2 )
35 if ( controlA == 0 )
36 if ( TR_m7_AI_TT_HouseSupport >= 3 )
37 if ( GetDeadCount "TR_m7_Nidara Beris" == 0 )
38 if ( GetDistance "TR_m7_Nidara Beris" < 5000 )
39 set controlA to 1
40 endif
41 endif
42 endif
43 endif
44 if ( GetPCCell "Bessarnamidan" == 0 )
45 set controlQ to 1
46 AiWander 0 0 0
47 set control to 1
48 if ( controlA == 1 )
49 if ( GetDeadCount "TR_m7_Nidara Beris" > 0 )
50 if ( GetDistance "TR_m7_Nidara Beris" > 5000 )
51 set controlA to 0
52 endif
53 endif
54 endif
55 if ( controlA == 0 )
56 if ( control == 1 )
57 ForceGreeting
58 endif
59 endif
60 if ( control == 1 )
61 if ( Player->GetItemCount TR_m7_AI_TT_Dagger > 0 )
62 set control to 3
63 else
64 set control to 2
65 StartScript TR_m7_AI_TT_5_RepositionSc
66 endif
67 endif
68 endif
69endif
70
71if ( OnDeath == 1 )
72 "TR_m7_Ivul_Hleryn"->ModDisposition -10
73 if ( TR_m7_AI_TT_HouseSupport == 3 )
74 set TR_m7_AI_TT_HouseSupport to 4
75 elseif ( TR_m7_AI_TT_HouseSupport == 5 )
76 set TR_m7_AI_TT_HouseSupport to 6
77 elseif ( TR_m7_AI_TT_HouseSupport == 7 )
78 set TR_m7_AI_TT_HouseSupport to 8
79 endif
80endif
81
82if ( TR_Map == 0 )
83 set TR_Map to 7
84endif
85
86End