sapriusScript
Morrowind.esm
Variables
4
Local Variables
noLore
followNow
distanceCheck
timer
Source
1Begin sapriusScript
2
3
4short noLore
5short followNow
6short distanceCheck
7float timer
8;global short NPCVoiceDistance
9
10if ( MenuMode == 1 )
11 return
12endif
13
14if ( GetJournalIndex IL_ProtectEntius >= 70 )
15 return
16endif
17
18if ( GetJournalIndex IL_ProtectEntius < 50 )
19 return
20endif
21
22if ( GetHealth <= 0 )
23 return
24endif
25
26if ( GetCurrentAiPackage == 3 )
27;if follow is the current package, set followNow and continue...
28
29 set followNow to 1
30 SetHello 0
31
32 if ( GetAIPackageDone == 1 )
33 ;original conditions, and in case something funky happens...
34 Journal IL_ProtectEntius 70
35 set followNow to 0
36 AiWander 256 0 0 40 20 20 0 0 0 0 0 0
37 Say "Vo\I\M\Flw_IM003.mp3" "Thank you."
38 SetHello 30
39 endif
40
41 if ( timer < 2 )
42 set timer to ( timer + GetSecondsPassed )
43 return
44 endif
45
46 if ( GetPCCell "Ebonheart, Hawkmoth Legion Garrison" == 1 )
47 ;since the above method may not actually work...
48 Journal IL_ProtectEntius 70
49 set followNow to 0
50 AiWander 256 0 0 40 20 20 0 0 0 0 0 0
51 Say "Vo\I\M\Flw_IM003.mp3" "Thank you."
52 SetHello 30
53 endif
54
55 if ( GetDistance Player < NPCVoiceDistance )
56 if ( GetDistance Player < 500 )
57 set distanceCheck to 0
58 endif
59 set timer to 0
60 return
61 endif
62
63 if ( distanceCheck == 0 )
64 ;there is no "wait for me" for Imperial male
65 Say "Vo\I\M\Flw_IM001.mp3" "Where are you going?"
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