TR_m7_HR_AM_Q4_SarylHahnim
TR_Mainland.esm
Variables
8
Local Variables
TR_Map
control
controlq
DoOnce
T_Local_NPC
NoLore
T_Local_NoLore
controlvar
Source
1Begin TR_m7_HR_AM_Q4_SarylHahnim
2;Needs to stand at -3752, -2810, -1556 [0, 0, 326](Ibbi-Suen Mine, Lower Mine) after quest 4 ends.
3
4short TR_Map
5short control
6short controlq
7short DoOnce
8short T_Local_NPC
9short NoLore
10short T_Local_NoLore
11short controlvar ; this short is what determines whether Saryl is a follower or not
12
13if ( OnDeath )
14 if ( GetJournalIndex "TR_m7_HR_AM_04" >= 10 )
15 if ( GetJournalIndex "TR_m7_HR_AM_04" < 100 )
16 Journal TR_m7_HR_AM_04 50
17 endif
18 endif
19endif
20
21If ( controlq == 2 )
22 Return
23Endif
24
25If ( "TR_m7_IbbiSuen_MineState" == 2 ) ;House Redoran moving into Ibbi-Suen mine after its been cleared for a week
26 If ( Cellchanged == 1 )
27 If ( GetJournalIndex "TR_m7_HR_AM_04" >= 100 )
28 Positioncell -3556 -2627 -1575 326 "Ibbi-Suen Mine, Lower Mine" ; corresponding MARK is TR_m7_MARK_SarylHahnim
29 AiWander 0 0 0 60 30 10 0 0 0 0 0 0
30 set controlq to 2
31 set controlvar to 0
32 AIwander 0 0 0 0
33 Endif
34 Endif
35Endif
36
37If ( controlvar == 1 ) ;forcegreets the player to congratulate them on murdering over a dozen people
38 If ( GetJournalIndex "TR_m7_HR_AM_04" >= 80 )
39 If ( Getdistance "Player" <= 500 )
40 Set DoOnce to 1
41 Forcegreeting
42 Endif
43 Endif
44Endif
45
46If ( controlvar == 1 ) ;activates if the player leaves Ibbi-Suen. Get the hell back here >:(
47 If ( GetPCCell "Ibbi-Suen Mine" != 1 )
48 Set controlvar to 0
49 Set DoOnce to 1
50 ForceGreeting
51 Endif
52Endif
53
54If ( controlq == 0 ) ;enables the npc at the end of the last quest so he doesn't teleport into existence at the start of the next
55 If ( GetJournalIndex "TR_m7_HR_AM_03" >= 50 )
56 Enable
57 Set controlq to 1
58Elseif ( getdisabled == 0 )
59 Disable
60 Endif
61Endif
62
63if ( TR_Map == 7 )
64 return
65endif
66
67set TR_Map to 7
68
69End