sondaaleFollow
Morrowind.esm
Variables
4
Local Variables
noLore
followNow
distanceCheck
timer
Source
1Begin sondaaleFollow
2
3short noLore
4short followNow
5short distanceCheck
6float timer
7;global short NPCVoiceDistance
8
9if ( MenuMode == 1 )
10 return
11endif
12
13if ( GetJournalIndex FG_Telasero >= 70 )
14 return
15endif
16
17if ( GetJournalIndex FG_Telasero < 50 )
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
28 set followNow to 1
29 SetHello 0
30
31 if ( GetAIPackageDone == 1 )
32 ;original conditions, and in case something funky happens...
33 Journal FG_Telasero 70
34 set followNow to 0
35 AiWander 256 0 0 40 20 20 0 0 0 0 0 0
36 Say "Vo\F\M\Flw_HF003.mp3" "Thank you."
37 SetHello 30
38 endif
39
40 if ( timer < 2 )
41 set timer to ( timer + GetSecondsPassed )
42 return
43 endif
44
45 if ( GetPCCell "Telasero, Lower Level" == 0 )
46 if ( GetPCCell "Telasero, Upper Level" == 0 )
47 ;since the above method may not actually work...
48 Journal FG_Telasero 70
49 set followNow to 0
50 AiWander 256 0 0 40 20 20 0 0 0 0 0 0
51 Say "Vo\H\F\Flw_HF003.mp3" "Thank you."
52 SetHello 30
53 endif
54 endif
55
56 if ( GetDistance Player < NPCVoiceDistance )
57 if ( GetDistance Player < 500 )
58 set distanceCheck to 0
59 endif
60 set timer to 0
61 return
62 endif
63
64 if ( distanceCheck == 0 )
65 Say "Vo\H\F\Flw_HF004.mp3" "Hey! Wait for me!"
66 set distanceCheck to 1
67 endif
68
69else
70 ;if follow is NOT the current package, make sure followNow is zero
71 set followNow to 0
72endif
73
74End