TR_m2_He_TG2_NPC_NevalScript
TR_Mainland.esm
Variables
8
Local Variables
state
TR_Map
nolore
T_Local_NPC
control
controlQ
permit
suspicion
Source
1Begin TR_m2_He_TG2_NPC_NevalScript
2
3short state
4short TR_Map
5short nolore
6short T_Local_NPC
7short control
8short controlQ
9short permit
10short suspicion
11
12if ( GetPCCell "Helnim, Zafirbel Bay Company, Vault" != 1 )
13 return
14endif
15
16if ( TR_Map == 0 )
17 set TR_Map to 1
18endif
19
20if ( GetDistance, Player <= 256 )
21 if ( state == 0 )
22 if ( GetDetected, player == 1 )
23 ForceGreeting
24 endif
25 endif
26elseif ( GetDistance, Player >= 384 )
27 if ( state == 1 )
28 set state to 0
29 endif
30endif
31
32if ( GetAttacked == 1 )
33 set state to 2
34endif
35
36if ( control == 1 )
37 AITravel, 2114, 4486, 15446, 0 ; marker TR_m2_MARK_He_TG2_Neval
38 set control to 2
39elseif ( control == 2 )
40 if ( GetAIPackageDone == 1 )
41 set control to 3
42 AITravel, 3389, 4478, 15702, 0 ; marker TR_m2_MARK_He_TG2_Neval
43 endif
44elseif ( control == 3 )
45 if ( GetAIPackageDone == 1 )
46 set control to 4
47 AITravel, 3402, 3962, 15823, 0 ; marker TR_m2_MARK_He_TG2_Neval
48 endif
49elseif ( control == 4 )
50 if ( GetAIPackageDone == 1 )
51 set control to 5
52 AITravel, 3134, 3974, 15823, 0 ; marker TR_m2_MARK_He_TG2_Neval
53 endif
54elseif ( control == 5 )
55 if ( GetAIPackageDone == 1 )
56 set control to 6
57 AITravel, 3114, 3482, 15823, 0 ; marker TR_m2_MARK_He_TG2_Neval
58 endif
59elseif ( control == 6 )
60 if ( GetAIPackageDone == 1 )
61 set control to 7
62 AITravel, 2623, 3505, 15823, 0 ; marker TR_m2_MARK_He_TG2_Neval
63 endif
64elseif ( control == 7 )
65 if ( GetAIPackageDone == 1 )
66 set control to 8
67 AITravel, 2623, 3938, 15823, 0 ; marker TR_m2_MARK_He_TG2_Neval
68 endif
69elseif ( control == 8 )
70 if ( GetAIPackageDone == 1 )
71 set control to 9
72 AITravel, 2090, 3974, 15823, 0 ; marker TR_m2_MARK_He_TG2_Neval
73 endif
74elseif ( control == 9 )
75 if ( GetAIPackageDone == 1 )
76 set control to 10
77 AITravel, 2115, 4219, 15823, 0 ; marker TR_m2_MARK_He_TG2_Neval
78 endif
79elseif ( control == 10 )
80 if ( GetAIPackageDone == 1 )
81 if ( GetForceRun == 1 )
82 ClearForceRun
83 endif
84 AITravel, 2097, 3969, 15329, 0 ; marker TR_m2_MARK_He_TG2_Neval
85 set control to -1
86 set state to 0
87 endif
88endif
89
90if ( permit == 0 )
91 if ( TR_m2_He_VaultTrespass->GetDistance player <= 128 )
92 if ( GetDetected player == 1 )
93 ModPCCrimeLevel 250
94 StartCombat player
95 set permit to 2
96 set state to 2
97 else
98 set suspicion to 1
99 set state to 0
100 endif
101 endif
102endif
103
104if ( CellChanged == 1 )
105 if ( state >= 1 )
106 set state to 0
107 endif
108 if ( control >= 1 )
109 set control to 0
110 endif
111 if ( controlQ >= 1 )
112 set controlQ to 0
113 endif
114 if ( permit >= 1 )
115 set permit to 0
116 endif
117 if ( suspicion >= 1 )
118 set suspicion to 0
119 endif
120 PositionCell 2097 3969 15329 20700 "Helnim, Zafirbel Bay Company, Vault" ; marker TR_m2_MARK_He_TG2_Neval
121 AIWander, 64, 0, 0, 60, 30, 10, 0, 0, 0, 0, 0, 0
122endif
123
124End