satyanaScript
Morrowind.esm
Variables
5
Local Variables
doOnce
noLore
xpos
ypos
timer
Source
1Begin satyanaScript
2
3;for Gary's betrayal quest thingy in Arenim Ancestral Tomb
4;always wondered if these GetPos things could be used for this
5;will find out soon
6
7short doOnce
8;this is used as a state flag...
9
10short noLore
11;not a bore
12
13float timer
14
15short xpos
16short ypos
17
18if ( GetJournalIndex MS_ArenimTomb >= 100 )
19 ;post-quest, regardless of how it turns out, she's gone
20 if ( CellChanged == 1 )
21 Disable
22 endif
23endif
24
25if ( MenuMode == 0 )
26 if ( Player->GetItemCount "amulet_Agustas_unique" > 0 )
27 ;when the player finds the amulet...
28 if ( timer != -1 )
29 set timer to ( timer+ GetSecondsPassed )
30 if ( timer > 3 )
31 if ( GetDistance Player <= 256 )
32 AiWander 128 0 0 0 0 0 0 0
33 ForceGreeting
34 Set timer to -1
35 endif
36 endif
37 endif
38 return
39 endif
40endif
41
42if ( GetCurrentAIPackage != 3 )
43 Set doOnce to 0
44 return
45endif
46
47set xpos to GetPos X
48set ypos to GetPos Y
49
50if ( GetJournalIndex MS_ArenimTomb >= 100 )
51 if ( xpos > 1900 )
52 if ( ypos < 800 )
53 ;approaching the entrance
54 ;if you're leaving, reset her and keep her from following you out
55 AiTravel 1470 910 -540 0
56 Set doOnce to 0
57 return
58 endif
59 endif
60endif
61
62if ( xpos < -2000 )
63 if ( ypos > 1500 )
64 ;near the body of her father's friend
65 Set doOnce to 2
66 return
67 endif
68endif
69
70if ( xpos > 2000 )
71 if ( ypos > 1300 )
72 ;in final room with her father's body
73 Set doOnce to 3
74 return
75 endif
76endif
77
78Set doOnce to 1
79;default if you're following...
80
81End