TR_m7_MT_WritHlevis
TR_Mainland.esm
Variables
7
Local Variables
CL1
CL2
TR_map
control
controlQ
nolore
T_Local_NPC
Source
1Begin TR_m7_MT_WritHlevis
2
3short CL1
4short CL2
5short TR_map
6short control
7short controlQ
8short nolore
9short T_Local_NPC
10
11set TR_map to 7
12
13; Combat behaviors
14; control
15; 0 - initial state
16; 1 - kill spell removed
17; 2 - intermediate state
18; 3 - Kill spell added, other offensive spells removed
19if ( Player->GetHealth <= 175 )
20 if ( control != 3 )
21 set control to 2
22 endif
23else
24 if ( control != 1 )
25 set control to 0
26 endif
27endif
28
29if ( control == 0 )
30 RemoveSpell "TR_m7_HlevisKill"
31 if ( GetSpell "TR_m7_HlevisKnockdown" == 0 )
32 AddSpell "TR_m7_HlevisKnockdown"
33 endif
34 if ( GetSpell "TR_m7_HlevisBolt" == 0 )
35 AddSpell "TR_m7_HlevisBolt"
36 endif
37 set control to 1
38elseif ( control == 2 )
39 if ( GetSpell "TR_m7_HlevisKill" == 0 )
40 AddSpell "TR_m7_HlevisKill"
41 endif
42 RemoveSpell "TR_m7_HlevisKnockdown"
43 RemoveSpell "TR_m7_HlevisBolt"
44 set control to 3
45endif
46
47; MT script stuff
48if ( MenuMode == 1 )
49 return
50endif
51
52if ( CellChanged == 1 )
53 set CL1 to GetPCCrimeLevel
54endif
55
56if ( OnDeath == 1 )
57 ; when we are killed...
58
59 if ( GetJournalIndex TR_m7_MT_Hlevis > 0 )
60 ; ... and if the player has a writ for us...
61
62 set CL2 to GetPCCrimeLevel
63 if ( CL2 > CL1 )
64 ; ... append a journal entry if the execution is seen ...
65 Player->Journal TR_m7_MT_Hlevis 80
66 else
67 ; ... append a journal entry if the execution is NOT seen ...
68 Player->Journal TR_m7_MT_Hlevis 90
69 endif
70 endif
71endif
72
73End