ragashScript
Morrowind.esm
Variables
6
Local Variables
noLore
followNow
distanceCheck
doOnce
state
timer
Source
1Begin ragashScript
2
3short noLore
4short followNow
5short distanceCheck
6float timer
7short doOnce
8short state
9;global short NPCVoiceDistance
10
11if ( MenuMode == 1 )
12 Return
13endif
14
15if ( GetJournalIndex IL_RescueRagash >= 70 )
16 return
17endif
18
19if ( GetHealth <= 0 )
20 return
21endif
22
23if ( GetJournalIndex IL_RescueRagash == 0 )
24 ;disable if quest is not active
25 disable
26 return
27endif
28
29if ( state == 0 )
30 ;enable when quest is active, but only once
31 enable
32 set state to 10
33endif
34
35if ( GetJournalIndex IL_RescueRagash < 50 )
36 if ( state < 20 )
37 if ( GetDistance Player < 200 )
38 ForceGreeting
39 Set state to 20
40 endif
41 endif
42 return
43endif
44
45if ( GetCurrentAiPackage == 3 )
46;if follow is the current package, set followNow and continue...
47
48 set followNow to 1
49 SetHello 0
50
51 if ( GetAIPackageDone == 1 )
52 ;if follow is done, NPC has arrived...
53 Journal IL_RescueRagash 70
54 set followNow to 0
55 AiWander 256 0 0 40 20 20 0 0 0 0 0 0
56 Say "Vo\O\F\Flw_OF003.mp3" "Thank you."
57 ForceGreeting
58 SetHello 30
59 endif
60
61 if ( timer < 2 )
62 set timer to ( timer + GetSecondsPassed )
63 return
64 endif
65
66 if ( GetPCCell "Gnisis, Arvs-Drelen" == 0 )
67 ;if ragash is outside for abit, the quest is also done.
68 Journal IL_RescueRagash 70
69 set followNow to 0
70 AiWander 256 0 0 40 20 20 0 0 0 0 0 0
71 Say "Vo\O\F\Flw_OF003.mp3" "Thank you."
72 ForceGreeting
73 SetHello 30
74 endif
75
76 if ( GetDistance Player < NPCVoiceDistance )
77 if ( GetDistance Player < 500 )
78 set distanceCheck to 0
79 endif
80 set timer to 0
81 return
82 endif
83
84 if ( distanceCheck == 0 )
85 Say "Vo\O\F\Flw_OF004.mp3" "Hey! Wait for me!"
86 set distanceCheck to 1
87 endif
88
89else
90 ;if follow is NOT the current package, make sure followNow is zero
91 set followNow to 0
92endif
93
94End