TR_m2_q_18_MaenasiScript
TR_Mainland.esm
Variables
6
Local Variables
TR_Map
control
controlQ
NoLore
T_Local_NPC
T_Local_NoLore
Source
1Begin TR_m2_q_18_MaenasiScript
2; This short script is there to allow dialogue to be filtered on the TR_Map local variable,
3; allowing for regional topics such as "Morrowind Lore" or "Geographic Regions" to be
4; appropriate to the location the NPC is. This version is for "NoLore" NPCs.
5
6; minor modifications made for performance reasons -- arvisrend, 26 July 2012
7
8short TR_Map
9short control
10short controlQ
11short NoLore
12short T_Local_NPC
13short T_Local_NoLore
14
15if ( MenuMode == 1 ) ; just in case
16 return
17endif
18
19; Death Magic Block
20
21if ( OnDeath == 1 )
22 if ( GetDeadCount TR_m2_q_18_PackRat < 1 ) ; to summarise: she dies, rat replaced with priest
23 PlaceAtPC "TR_m2_q_18_Gathys" 1 256 1 ; he runs the complex bits in his script
24 PlaySound "mysticism hit"
25 PlaySound "mysticism area"
26 else
27 Journal TR_m2_wil_Faith 51
28 endif
29endif
30
31
32; Baldrahn wrapup Block
33
34if ( GetJournalIndex TR_m2_wil_Faith == 20 ) ; at Baldrahn
35 if ( CellChanged == 1 )
36 if ( control == 0 )
37 TR_m2_q_18_PackRat->disable
38 disable
39 set control to 1
40 endif
41 endif
42endif
43
44; Theft Blocks
45
46if ( GetItemCount TR_m2_q_18_BlindAmulet < 1 ) ; if player steals amulet
47 if ( GetJournalIndex TR_m2_wil_Faith < 20 ) ; and hasn't taken her to Baldrahn/the bridge
48 if ( GetDeadCount TR_m2_q_18_Maenasi < 1 ) ; ("steals" mean "steals", not "takes from corpse")
49 set controlQ to 5
50 ForceGreeting
51 return
52 endif
53 elseif ( GetJournalIndex TR_m2_wil_Faith == 20 ) ; and has taken her to Baldrahn
54 if ( GetDeadCount TR_m2_q_18_Maenasi < 1 ) ; ("steals" mean "steals", not "takes from corpse")
55 set controlQ to 7
56 ForceGreeting
57 return
58 endif
59 endif
60endif
61
62; Journey Checker Blocks
63
64if ( GetInterior == 1 ) ; don't need any of this if the player takes crazy detours inside
65 return
66endif
67
68if ( GetJournalIndex TR_m2_wil_Faith == 11 )
69 if ( GetCurrentAIPackage == 3 ) ; if she's following
70 if ( Player->GetPos y >= 56459 )
71 if ( Player->GetPos x >= 282602 )
72 if ( Player->GetPos x <= 287890 ) ; if player has hit the bridge zone
73 set controlQ to 1
74 ForceGreeting
75 endif
76 endif
77 endif
78 endif
79endif
80
81if ( GetJournalIndex TR_m2_wil_Faith == 11 )
82 if ( GetCurrentAIPackage == 3 ) ; if she's following
83 if ( TR_m2_q_18_BaldrahnMark->GetDistance Player <= 2500 )
84 set controlQ to 3
85 ForceGreeting
86 endif
87 endif
88endif
89
90; Standard Block
91
92if ( TR_Map == 2 )
93 return
94endif
95
96set TR_Map to 2
97
98End