HuleeyaFollow
Morrowind.esm
Variables
5
Local Variables
noLore
followDone
followNow
distanceCheck
timer
Source
1Begin HuleeyaFollow
2
3short noLore
4short followDone
5short followNow
6short distanceCheck
7float timer
8
9if ( MenuMode == 1 )
10 Return
11endif
12
13if ( FollowDone == 1 )
14 Return
15endif
16
17if ( GetHealth <= 0 )
18 return
19endif
20
21if ( GetCurrentAiPackage == 3 )
22 ;if follow is the current package, set followNow and continue
23 set followNow to 1
24 SetHello 0
25
26 if ( GetAIPackageDone == 1 )
27 ;if the follow is done, set followDone to 1, reset followNow to 0
28 set followDone to 1
29 set followNow to 0
30
31 ;Give NPC new package to avoid dumb-looking behavior
32 AiWander 256 0 0 40 20 20 0 0 0 0 0 0
33
34 ;And journal entry gives feedback to the player...
35 Journal, "A1_7HuleeyaInformant", 20
36
37 ;And increase PC Reputation...
38 Player->ModReputation 1
39
40 ;And increase Huleeya's Dispositions
41 ModDisposition 30
42
43 ;force a greeting to make sure quest is over
44 ForceGreeting
45
46 ;and say something
47 Say "Vo\A\M\Flw_AM003.mp3" "Thank you."
48
49 ;and start doing idles, hellos, etc. again
50 SetHello 30
51
52 endif
53
54 if ( GetPCCell "Vivec, Jobasha's Rare Books" == 1 )
55 ;do it all here also
56 set followDone to 1
57 set followNow to 0
58 AiWander 256 0 0 40 20 20 0 0 0 0 0 0
59 Journal, "A1_7HuleeyaInformant", 20
60 Player->ModReputation 1
61 ModDisposition 30
62 ForceGreeting
63 Say "Vo\A\M\Flw_AM003.mp3" "Thank you."
64 SetHello 30
65 endif
66
67 if ( timer < 3 )
68 set timer to ( timer + GetSecondsPassed )
69 return
70 endif
71
72 if ( GetDistance Player < NPCVoiceDistance )
73 if ( GetDistance Player < 500 )
74 set distanceCheck to 0
75 endif
76 set timer to 0
77 return
78 endif
79
80 if ( distanceCheck == 0 )
81 Say "Vo\A\M\Flw_AM001.mp3" "Where are you going?"
82 set distanceCheck to 1
83 endif
84
85else
86 ;if follow is NOT the current package, make sure followNow is zero
87 set followNow to 0
88endif
89
90End