TR_m4_MT_Seraliwrit
TR_Mainland.esm
Variables
9
Local Variables
CL1
CL2
TR_map
control
controlQ
fightennia
OnPCHitMe
nolore
T_Local_NPC
Source
1Begin TR_m4_MT_Seraliwrit
2; log a journal entry for each successful 'hit' the player performs for the Morag Tong
3
4; script location: should be placed on each and every target of the Morag Tong, with
5; changes to reflect the person it is running on.
6
7short CL1
8short CL2
9short TR_map
10short control
11short controlQ
12short fightennia
13short OnPCHitMe
14short nolore
15short T_Local_NPC
16
17set TR_map to 4
18
19if ( MenuMode == 1 )
20 return
21endif
22
23if ( OnPCHitMe == 1 )
24 set fightennia to 1
25 if ( GetTarget Player == 0 )
26 StartCombat Player
27 endif
28 Set OnPCHitMe to 0
29endif
30
31if ( fightennia == 1 )
32 if ( "TR_m4_Ennia_Faleille"->GetTarget Player == 1 )
33 "TR_m4_Ennia_Faleille"->StopCombat
34 "TR_m4_Ennia_Faleille"->SetFight 30
35 set fightennia to 0
36 endif
37endif
38
39if ( CellChanged == 1 )
40 set CL1 to GetPCCrimeLevel
41endif
42
43if ( OnDeath == 1 )
44 ; when we are killed...
45
46 if ( GetJournalIndex TR_m4_MT_Serali > 0 )
47 ; ... and if the player has a writ for us...
48
49 set CL2 to GetPCCrimeLevel
50 if ( CL2 > CL1 )
51 ; ... append a journal entry if the execution is seen ...
52 Player->Journal TR_m4_MT_Serali 80
53 else
54 ; ... append a journal entry if the execution is NOT seen ...
55 Player->Journal TR_m4_MT_Serali 90
56 endif
57 endif
58endif
59
60End