hannatScript
Morrowind.esm
Variables
4
Local Variables
noLore
distanceCheck
followNow
timer
Source
1Begin hannatScript
2
3short noLore
4short distanceCheck
5short followNow
6float timer
7
8if ( GetJournalIndex "MS_Hannat" < 1 )
9 return
10endif
11
12if ( GetJournalIndex "MS_Hannat" >= 50 )
13 if ( CellChanged == 1 )
14 disable
15 endif
16 return
17endif
18
19if ( GetHealth <= 0 )
20 if ( GetJournalIndex "MS_Hannat" <= 50 )
21 Journal "MS_Hannat" 110
22 endif
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 ( GetPCCell "Mamaea, Sanctum of Awakening" == 0 )
32 if ( GetPCCell "Mamaea, Sanctum of Black Hope" == 0 )
33 if ( GetPCCell "Mamaea, Shrine of Pitted Dreams" == 0 )
34 ;if Hannat is outside
35 Journal "MS_Hannat" 50
36 set followNow to 0
37 AiWander 256 0 0 40 20 20 0 0 0 0 0 0
38 Say "Vo\D\M\Flw_DM004.mp3" "Thank you."
39 ForceGreeting
40 SetHello 30
41 endif
42 endif
43 endif
44
45 if ( timer < 3 )
46 set timer to ( timer + GetSecondsPassed )
47 return
48 endif
49
50 if ( GetDistance Player < NPCVoiceDistance )
51 if ( GetDistance Player < 500 )
52 set distanceCheck to 0
53 endif
54 set timer to 0
55 return
56 endif
57
58 if ( distanceCheck == 0 )
59 ;since there is not "wait for me" for Dunmer male...
60 Say "Vo\D\M\Flw_DM001.mp3" "Where are you going?"
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
69End