varvurSarethiScript
Morrowind.esm
Variables
5
Local Variables
noLore
followNow
distanceCheck
doOnce
timer
Source
1Begin varvurSarethiScript
2
3short noLore
4short followNow
5short distanceCheck
6float timer
7short doOnce
8
9if ( MenuMode == 1 )
10 return
11endif
12
13if ( GetHealth <= 0 )
14 return
15endif
16
17if ( doOnce == 1 )
18 if ( CellChanged == 1 )
19 if ( GetPCCell "Ald-ruhn, Sarethi Manor" == 1 )
20 ;teleport him to his room when the quest is over...
21 AddItem extravagant_belt_01 1
22 AddItem extravagant_pants_01 1
23 AddItem extravagant_shirt_01_r 1
24 AddItem extravagant_shoes_01 1
25 PositionCell 1500 510 -100 180 "Ald-ruhn, Sarethi Guard Quarters"
26 ;tell his dad he's moved...
27 Set "athyn sarethi".varvurMoved to 1
28 Set doOnce to 2
29 endif
30 endif
31endif
32
33if ( GetJournalIndex HR_RescueSarethi >= 70 )
34 return
35endif
36
37if ( GetJournalIndex HR_RescueSarethi < 50 )
38 return
39endif
40
41if ( GetCurrentAiPackage == 3 )
42;if follow is the current package, set followNow and continue...
43
44 set followNow to 1
45 SetHello 0
46
47 if ( GetTarget "malsa ules" == 1 )
48 ;kludge to force him to FOLLOW and not attack and get killed
49 StopCombat
50 endif
51
52 if ( GetTarget "tidras deltis" == 1 )
53 StopCombat
54 endif
55
56 if ( GetDistance "Athyn Sarethi" < 256 )
57 ;if Varvur is this close to Athyn, the quest is over
58 Journal HR_RescueSarethi 70
59 set followNow to 0
60 AiWander 256 0 0 40 20 20 0 0 0 0 0 0
61 Set doOnce to 1
62 Say "Vo\D\M\Flw_DM004.mp3" "Thank you."
63 SetHello 30
64
65 ;make the guards STOP attacking you if they're attacking you...
66
67 "bevadar bels"->StopCombat
68 "idros givyn"->StopCombat
69 "malsa ules"->StopCombat
70 "nathyne uvelas"->StopCombat
71 "nidryne redas"->StopCombat
72 "novor gorvas"->StopCombat
73 "tereri irethi"->StopCombat
74 "tidras deltis"->StopCombat
75 "velsa orethi"->StopCombat
76 "vevul alver"->StopCombat
77
78 "bevadar bels"->SetFight 30
79 "idros givyn"->SetFight 30
80 "malsa ules"->SetFight 30
81 "nathyne uvelas"->SetFight 30
82 "nidryne redas"->SetFight 30
83 "novor gorvas"->SetFight 30
84 "tereri irethi"->SetFight 30
85 "tidras deltis"->SetFight 30
86 "velsa orethi"->SetFight 30
87 "vevul alver"->SetFight 30
88
89 endif
90
91 if ( timer < 2 )
92 set timer to ( timer + GetSecondsPassed )
93 return
94 endif
95
96 if ( GetDistance Player < NPCVoiceDistance )
97 if ( GetDistance Player < 500 )
98 set distanceCheck to 0
99 endif
100 set timer to 0
101 return
102 endif
103
104 if ( distanceCheck == 0 )
105 Say "Vo\D\M\Flw_DM001.mp3" "Where are you going?"
106 set distanceCheck to 1
107 endif
108
109else
110 ;if follow is NOT the current package, make sure followNow is zero
111 set followNow to 0
112endif
113
114End
115
116
117End