TR_m7_Qaidilwe_Script
TR_Mainland.esm
Variables
8
Local Variables
TR_Map
control
controlQ
T_Local_NPC
NoLore
doOnce
hostile
OnPCHitMe
Source
1Begin TR_m7_Qaidilwe_Script
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.
5
6short TR_Map
7short control
8short controlQ
9short T_Local_NPC
10short NoLore
11
12short doOnce
13
14short hostile
15short OnPCHitMe
16
17; attacking after distraction or during the fight will turn the whole crew hostile
18if ( hostile == 1 )
19 set hostile to 2
20 setfight 90
21 startcombat player
22 return
23endif
24
25if ( getJournalIndex, "TR_m7_HO_HighAndDry_a" >= 20 )
26 if ( hostile == 0 )
27 if ( OnPCHitMe == 1 )
28 set hostile to 1
29 set "TR_m7_Tharkul gro-Sham".hostile to 1
30 set "TR_m7_Drissa Vendil".hostile to 1
31 endif
32 endif
33endif
34
35; move her from the ship and disable wandering if you distracted the crew
36if ( doOnce == 0 )
37 if ( getJournalIndex, "TR_m7_HO_HighAndDry" == 110 )
38 set doOnce to 1
39 stopcombat
40 aiwander 0 0 0
41 positioncell 16918 -260000 176 19200 "Hlan Oek"
42 endif
43endif
44
45; set a global var for death if it still matters
46if ( OnDeath == 1 )
47 if ( TR_m7_HO_HighAndDry_CrewKilled == 0 )
48 set TR_m7_HO_HighAndDry_CrewKilled to 1
49 endif
50endif
51
52; forcegreeting when she comes to help Tharkul ( when close enough to him or the player )
53if ( control == 1 )
54 if ( MenuMode )
55 return
56 elseif ( "TR_m7_Medyn Arns"->OnDeath == 1 )
57 ; in case you killed Medyn Arns before her approach
58 set control to 0
59 Journal "TR_m7_HO_HighAndDry_a" 30
60 return
61 elseif ( getDistance, player < 700 )
62 set control to 0
63 forcegreeting
64 return
65 elseif ( getDistance, "TR_m7_Medyn Arns" < 700 )
66 set control to 0
67 forcegreeting
68 return
69 endif
70endif
71
72if ( TR_Map == 7 )
73 return
74endif
75
76set TR_Map to 7
77
78End