TR_m4_NPC_FGMapCourier
TR_Mainland.esm
Variables
10
Local Variables
TR_Map
control
controlQ
NoLore
disableOnce
moveOnce
T_Local_NPC
T_Local_NoLore
timer
xPos
Source
1begin TR_m4_NPC_FGMapCourier
2
3short TR_Map
4short control
5short controlQ
6short NoLore
7short disableOnce
8short moveOnce
9float timer
10short T_Local_NPC
11short T_Local_NoLore
12float xPos
13
14if ( disableOnce == 0 )
15 disable
16 set disableOnce to 1
17endif
18
19if ( MenuMode )
20 Return
21endif
22
23if ( moveOnce == 0 )
24 if ( GetJournalIndex "TR_m4_FG_MapB" == 10 )
25 set timer to 0
26 set moveOnce to 1
27; ForceJump
28 set xPos to ( GetPos X )
29 endif
30elseif ( moveOnce == 1 )
31 set xPos to ( xPos - ( GetSecondsPassed * 1600 ) )
32 SetPos X xPos
33 PlaySound3D "Hand To Hand Hit"
34 Say "Vo\d\m\Hit_DM006.mp3" "Argh!"
35 set moveOnce to 2
36elseif ( moveOnce == 2 )
37 set xPos to ( xPos - ( GetSecondsPassed * 1600 ) )
38 SetPos X xPos
39 if ( timer > 0.1 )
40 PlayGroup Death4 1
41; ClearForceJump
42 Fall
43 ModCurrentFatigue -180
44 set moveOnce to 3
45 endif
46elseif ( moveOnce == 3 )
47 set xPos to ( xPos - ( GetSecondsPassed * 1600 ) )
48 SetPos X xPos
49 if ( timer > 0.3 )
50 set moveOnce to 4
51 endif
52elseif ( moveOnce == 4 )
53 if ( GetFatigue > 0 )
54 if ( GetHealth > 0 )
55 PlayGroup Idle
56 endif
57 set moveOnce to -1
58 endif
59endif
60
61if ( moveOnce > 0 )
62 set timer to ( timer + GetSecondsPassed )
63 if ( GetHealth <= 0 )
64 set moveOnce to -1
65 endif
66endif
67
68if ( GetDistance, "TR_m4_Garonag gro-Muk" >= 1600 )
69 if ( controlQ == 0 )
70 if ( GetJournalIndex "TR_m4_FG_MapB" >= 15 )
71 if ( GetJournalIndex "TR_m4_FG_MapB" <= 17 )
72 AiWander 0 0 0 0 0 0 0
73 ModDisposition 40
74 SetHello 40
75 set controlQ to 1
76 endif
77 endif
78 endif
79endif
80
81if ( GetJournalIndex "TR_m4_FG_Map" >= 20 )
82 if ( GetDisabled == 1 )
83 enable
84 endif
85endif
86
87if ( OnDeath == 1 )
88 if ( GetJournalIndex "TR_m4_FG_MapB" < 40 )
89 if ( GetJournalIndex "TR_m4_FG_MapB" > 10 )
90 Journal "TR_m4_FG_MapB" 40
91 endif
92 endif
93endif
94
95if ( TR_Map == 4 )
96 return
97endif
98
99set TR_Map to 4
100
101End