CharGenRaceNPC
Morrowind.esm
Variables
2
Local Variables
state
timer
Source
1begin CharGenRaceNPC
2
3;this is the guard on the dock who asks race
4
5short state
6float timer
7
8if ( menumode == 1)
9 return
10endif
11
12if ( GetDisabled == 1 )
13 return
14endif
15
16
17if ( OnActivate == 1 )
18 return
19endif
20
21;done, standing
22if ( state == -1 )
23 if ( GetDistance, Player < 150 )
24 set timer to timer + GetSecondsPassed
25 if ( timer > 6 )
26 set timer to 0
27 say, "vo\Misc\CharGenDock3.wav", "Head on in."
28 endif
29 endif
30endif
31
32if ( state == 0 )
33 ;walk him out to dock
34 ;AITravel -8593, -73295, 227 ;up on boat
35 AITravel -8914, -73093, 126 ;before plank
36 set state to 10
37
38elseif ( state == 10 )
39
40 if ( GetDistance, Player < 108 )
41 set state to 20
42 AiWander 0 0 0 90 0 0 0 0 0 0 0 0
43 endif
44
45;PC has reached him, start talking
46elseif ( State == 20 )
47
48 DisablePlayerControls
49 Say "Vo\Misc\CharGenDock1.wav", "You finally arrived, but our records don't show from where."
50 set State to 30
51
52elseif ( state == 30 )
53
54 if ( saydone == 1 )
55 Enableracemenu
56 set state to 40
57 endif
58
59elseif ( state == 40 )
60
61 set timer to ( timer + Getsecondspassed )
62
63 ;let then look around delay
64 if ( timer >= 1.5 )
65
66 Say "Vo\Misc\CharGenDock2.wav", "Great. I'm sure you'll fit right in. Follow me up to the office and they'll finish your release."
67 set State to 50
68 set timer to 0
69
70 endif
71
72elseif ( state == 50 )
73
74 if ( SayDone == 1 )
75 EnablePlayerControls
76 ;AITravel -9879, -72443, 208 ;goes up to office door
77 AITravel -9944, -72481, 126 ;next to door
78 ;AIEscort Player, 12, -9944, -72481, 126 ;next to door
79 set state to -1
80 endif
81
82endif
83
84
85end CharGenRaceNPC