TR_m3_q_MarethDuel_sc
TR_Mainland.esm
Variables
7
Local Variables
TR_Map
NoLore
control
controlQ
doOnce
T_Local_NPC
T_Local_NoLore
Source
1begin TR_m3_q_MarethDuel_sc
2;Script for the non-lethal duel with TR_m3_q_Mareth Nevaram during TR_m3_Wil_AccountsPayable. Based on TR_m7_Ns_ArenaNonLethal_sc
3
4; Globals
5; TR_m3_q_AccPayDuelWon (-1 = Mareth victory, 0 = default, 1 = player victory, 5 = Mareth killed)
6; TR_m3_q_AccPayDuelActive (0 = inactive, 1 = active)
7
8short TR_Map
9short NoLore
10short control
11short controlQ
12short doOnce
13short T_Local_NPC
14short T_Local_NoLore
15
16if ( TR_m3_q_AccPayDuelActive == 1 )
17 if ( onDeath )
18 Set TR_m3_q_AccPayDuelActive to 0
19 Set TR_m3_q_AccPayDuelWon to 5
20 Set control to 1
21 Set controlQ to 1
22 "TR_m3_Sathas Dorvi"->forceGreeting
23 endif
24 if ( control == 0 )
25 if ( GetHealth > 0 )
26 if ( GetHealthGetRatio <= 0.20 )
27 set control to 1
28 set TR_m3_q_AccPayDuelActive to 0
29 set TR_m3_q_AccPayDuelWon to 1
30 setFight 20
31 stopCombat
32 "TR_m3_Sathas Dorvi"->forceGreeting
33 elseif ( player->GetHealthGetRatio <= 0.20 )
34 set control to 1
35 set TR_m3_q_AccPayDuelActive to 0
36 set TR_m3_q_AccPayDuelWon to -1
37 setFight 20
38 stopCombat
39 "TR_m3_Sathas Dorvi"->forceGreeting
40 endif
41 endif
42 endif
43endif
44
45if ( controlQ == 1 )
46 if ( onactivate )
47 MessageBox "You may not loot Mareth Nevaram's corpse."
48 endif
49endif
50
51if ( CellChanged )
52 if ( GetJournalIndex "TR_m3_Wil_AccountsPayable" >= 40 )
53 if ( doOnce < 1 )
54 disable
55 set doOnce to 1
56 endif
57 endif
58endif
59
60if ( TR_Map != 3 )
61 set TR_Map to 3
62endif
63
64end