TR_m7_HR_AM_Q2_Danrilk
TR_Mainland.esm
Variables
5
Local Variables
DoOnce
control
controlq
ControlA
controlB
Source
1Begin TR_m7_HR_AM_Q2_Danrilk
2
3short DoOnce
4short control
5short controlq
6short ControlA
7short controlB
8
9if ( control )
10 return
11endif
12
13if ( Ondeath == 1 ) ;okay this one sucks
14 if ( "TR_M7_HR_AM_Q2_ShellDone" < 1 ) ; If global 1 hasn't ticked up,
15 if ( GetJournalIndex "TR_m7_HR_AM_02" >= 10 ) ; If the quest is started,
16 if ( "TR_M7_HR_AM_Q2_Shellcountdown" >= 4 ) ; If global 2 exceeds 4,
17 additem "TR_m7_q_DanrilkDShell" 1 ; get the quest item!
18 set "TR_M7_HR_AM_Q2_ShellDone" to 1 ; And tick up global 1 so it doesn't happen again!
19 else ; Otherwise...
20 set controlq to GetDeadCount "TR_m7_q_danrilkdreugh" ; Set controlq to number of dead dreugh
21 set TR_M7_HR_AM_Q2_Shellcountdown to controlq
22 set TR_M7_HR_AM_Q2_Shellcountdown to ( TR_m7_HR_AM_Q2_Shellcountdown + controlA ) ;set global 2 to dead dreugh + random number
23 endif
24 endif
25 endif
26endif
27
28if ( DoOnce == 0 ) ;Random number is decided
29 Set ControlA to Random 5
30 Set DoOnce to 1
31Endif
32
33if ( Getjournalindex "TR_M7_HR_AM_05" == 100 ) ;removes the dreugh after their king is killed in the Ald Marak Redoran questline finale.
34 if ( control == 0 )
35 disable
36 set control to 1
37 endif
38endif
39
40End