tenyeminweFollow
Morrowind.esm
Variables
4
Local Variables
noLore
followNow
distanceCheck
timer
Source
1Begin tenyeminweFollow
2
3short noLore
4short followNow
5short distanceCheck
6float timer
7;global short NPCVoiceDistance
8
9if ( MenuMode == 1 )
10 Return
11endif
12
13if ( GetJournalIndex MG_EscortScholar1 >= 70 )
14 Return
15endif
16
17if ( GetJournalIndex MG_EscortScholar1 < 10 )
18 Return
19endif
20
21if ( GetHealth <= 0 )
22 return
23endif
24
25if ( GetCurrentAiPackage == 3 )
26 ;if follow is the current package, set followNow and continue
27 set followNow to 1
28 SetHello 0
29
30 if ( GetAiPackageDone == 1 )
31 set followNow to 0
32 AiWander 256 0 0 40 20 20 0 0 0 0 0 0
33 Journal MG_EscortScholar1 70
34 Say "Vo\H\F\Flw_HF003.mp3" "Thank you."
35 SetHello 30
36 endif
37
38 if ( timer < 2 )
39 set timer to ( timer + GetSecondsPassed )
40 return
41 endif
42
43 if ( GetDistance "Gals Arethi" < 600 )
44 set followNow to 0
45 AiWander 256 0 0 40 20 20 0 0 0 0 0 0
46 Journal MG_EscortScholar1 70
47 Say "Vo\H\F\Flw_HF003.mp3" "Thank you."
48 SetHello 30
49 endif
50
51 if ( GetDistance Player < NPCVoiceDistance )
52 if ( GetDistance Player < 500 )
53 set distanceCheck to 0
54 endif
55 set timer to 0
56 return
57 endif
58
59 if ( distanceCheck == 0 )
60 Say "Vo\H\F\Flw_HF004.mp3" "Hey! Wait for me!"
61 set distanceCheck to 1
62 endif
63
64else
65 ;if follow is NOT the current package, make sure followNow is zero
66 set followNow to 0
67endif
68
69
70End