assabaScript
Morrowind.esm
Variables
6
Local Variables
noLore
followNow
distanceCheck
xPos
yPos
timer
Source
1Begin assabaScript
2
3short noLore
4short followNow
5short distanceCheck
6float timer
7;global NPCVoiceDistance
8
9short xPos
10short yPos
11
12if ( MenuMode == 1 )
13 return
14endif
15
16if ( OnDeath == 1 )
17 Journal B4_ErabenimsunKill 1
18endif
19
20if ( GetJournalIndex IL_RescueHermit >= 30 )
21 return
22endif
23
24if ( GetJournalIndex IL_RescueHermit < 25 )
25 return
26endif
27
28if ( GetHealth <= 0 )
29 return
30endif
31
32if ( GetCurrentAiPackage == 3 )
33;if follow is the current package, set followNow and continue...
34
35 set followNow to 1
36 SetHello 0
37
38 if ( GetAIPackageDone == 1 )
39 ;original conditions, and in case something funky happens...
40 Journal IL_RescueHermit 30
41 set followNow to 0
42 AiWander 256 0 0 40 20 20 0 0 0 0 0 0
43 Say "Vo\D\M\Flw_DM004.mp3" "Thank you."
44 SetHello 30
45 endif
46
47 if ( timer < 2 )
48 set timer to ( timer + GetSecondsPassed )
49 return
50 endif
51
52 Set xPos to GetPos X
53 Set yPos to GetPos Y
54
55 if ( xPos > 84700 )
56 if ( xPos < 83700 )
57 if ( yPos < -3200 )
58 if ( yPos > -4000 )
59 ;since the above method may not actually work...
60 Journal IL_RescueHermit 30
61 set followNow to 0
62 AiWander 256 0 0 40 20 20 0 0 0 0 0 0
63 Say "Vo\D\M\Flw_DM004.mp3" "Thank you."
64 SetHello 30
65 endif
66 endif
67 endif
68 endif
69
70 if ( GetDistance Player < NPCVoiceDistance )
71 if ( GetDistance Player < 500 )
72 set distanceCheck to 0
73 endif
74 set timer to 0
75 return
76 endif
77
78 if ( distanceCheck == 0 )
79 Say "Vo\D\M\Flw_DM001.mp3" "Where are you going?"
80 set distanceCheck to 1
81 endif
82
83else
84 ;if follow is NOT the current package, make sure followNow is zero
85 set followNow to 0
86endif
87
88End