tarvynFollow
Morrowind.esm
Variables
4
Local Variables
noLore
followNow
distanceCheck
timer
Source
1Begin tarvynFollow
2short noLore
3short followNow
4short distanceCheck
5float timer
6;global NPCVoiceDistance
7
8if ( MenuMode == 1 )
9 Return
10endif
11
12if ( GetJournalIndex HH_EscortMerchant >= 70 )
13 Return
14endif
15
16if ( GetJournalIndex HH_EscortMerchant < 50 )
17 Return
18endif
19
20if ( GetHealth <= 0 )
21 return
22endif
23
24if ( GetCurrentAiPackage == 3 )
25;if follow is the current package, set followNow and continue...
26
27 set followNow to 1
28 SetHello 0
29
30 if ( GetAIPackageDone == 1 )
31 ;original conditions, and in case something funky happens...
32 Journal HH_EscortMerchant 70
33 set followNow to 0
34 AiWander 256 0 0 40 20 20 0 0 0 0 0 0
35 Say "Vo\D\M\Flw_DM004.mp3" "Thank you."
36 SetHello 30
37 endif
38
39 if ( timer < 2 )
40 set timer to ( timer + GetSecondsPassed )
41 return
42 endif
43
44 if ( GetPCCell "Pelagiad, Halfway Tavern" == 1 )
45 ;since the above method may not actually work...
46 Journal HH_EscortMerchant 70
47 set followNow to 0
48 AiWander 256 0 0 40 20 20 0 0 0 0 0 0
49 Say "Vo\D\M\Flw_DM004.mp3" "Thank you."
50 SetHello 30
51 endif
52
53 if ( GetDistance Player < NPCVoiceDistance )
54 if ( GetDistance Player < 500 )
55 set distanceCheck to 0
56 endif
57 set timer to 0
58 return
59 endif
60
61 if ( distanceCheck == 0 )
62 Say "Vo\D\M\Flw_DM001.mp3" "Where are you going?"
63 set distanceCheck to 1
64 endif
65
66else
67 ;if follow is NOT the current package, make sure followNow is zero
68 set followNow to 0
69endif
70
71End