TR_m2_q_A8_5_Dras_Varethi
TR_Mainland.esm
Variables
7
Local Variables
NoLore
killedbyscript
spelltaught
control
T_Local_NPC
T_Local_NoLore
TR_Map
Source
1Begin TR_m2_q_A8_5_Dras_Varethi
2
3Short NoLore
4Short killedbyscript ; killed by Midave Llarys raid from Erethan
5Short spelltaught ; =1 if player bought spell
6Short control ; =1 if told PC comes from Erethan
7short T_Local_NPC
8short T_Local_NoLore
9short TR_Map
10
11if ( TR_Map != 2 )
12 set TR_Map to 2
13endif
14
15if ( killedbyscript == 1 )
16 if ( CellChanged == 1 )
17 if ( GetDeadCount "TR_m2_Midave_Llarys" < 1 )
18 SetHealth -5
19 RemoveItem "flameeater robe" 1
20 RemoveItem "T_Com_Adamant_Dagger_01" 1
21 TR_m2_Midave_Llarys->AddItem "T_Com_Adamant_Dagger_01" 1
22 if ( GetDeadCount "TR_m2_q_A8_5_guard" < 1 )
23 TR_m2_q_A8_5_guard->Disable
24 endif
25 set killedbyscript to 2
26 endif
27 endif
28elseif ( killedbyscript == 2 )
29 if ( GetDistance Player < 1024 )
30 if ( GetJournalIndex TR_m2_A8_5_FreeAtLast < 125 )
31 Journal TR_m2_A8_5_FreeAtLast2 130 ;FreeAtLast2 is a different journal ID so as not to interfere with other results
32 else
33 Journal TR_m2_A8_5_FreeAtLast2 131 ;if shamirr was brought by player
34 endif
35 set killedbyscript to 3
36 endif
37elseif ( killedbyscript == 0 )
38 if ( OnDeath == 1 )
39 if ( GetJournalIndex TR_m2_A8_5_FreeAtLast <= 115 )
40 Journal TR_m2_A8_5_FreeAtLast 70
41 endif
42 endif
43
44 if ( GetJournalIndex TR_m2_A8_5_FreeAtLast < 30 )
45 if ( GetJournalIndex TR_m2_A8_5_FreeAtLast != 10 ) ;allow finding him without asking Pedivur
46 if ( GetDisabled == 0 )
47 Disable
48 TR_m2_q_A8_5_passive1->Disable
49 TR_m2_q_A8_5_passive2->Disable
50 endif
51 endif
52 elseif ( GetJournalIndex TR_m2_A8_5_FreeAtLast == 30 )
53 if ( GetDistance Player < 512 )
54 ForceGreeting
55 endif
56 elseif ( GetJournalIndex TR_m2_A8_5_FreeAtLast == 45 )
57 set killedbyscript to 1
58 elseif ( GetJournalIndex TR_m2_A8_5_FreeAtLast == 55 ) ;in this case stage may become 115 by finding shamirr's corpse: variable directly set by dialogue
59 set killedbyscript to 1
60 elseif ( GetJournalIndex TR_m2_A8_5_FreeAtLast == 65 )
61 set killedbyscript to 1
62 elseif ( GetJournalIndex TR_m2_A8_5_FreeAtLast == 123 )
63 set killedbyscript to 1 ;will also be set to be killed by stage 125-126 if still alive
64 endif
65endif
66
67end