TR_m4_NPC_BanditDuo
TR_Mainland.esm
Variables
7
Local Variables
TR_Map
control
controlQ
OnPCHitMe
T_Local_NPC
NoLore
timer
Source
1Begin TR_m4_NPC_BanditDuo
2; This short script is there to allow dialogue to be filtered on the TR_Map local variable,
3; allowing for regional topics such as "Morrowind Lore" or "Geographic Regions" to be
4; appropriate to the location the NPC is.
5
6short TR_Map
7short control
8short controlQ
9short OnPCHitMe
10float timer
11short T_Local_NPC
12short NoLore
13
14; controlQ = 1: ready to stop following
15; controlQ = 2: greet player, without weapons
16; controlQ = 3: greet player, with weapons
17; controlQ = 10: attacked by player, without weapons
18; controlQ = 11: attacked by player, with weapons
19
20if ( MenuMode )
21 return
22endif
23
24if ( OnDeath )
25 "TR_m4_Agdistrius Rictor"->ForceGreeting
26 return
27endif
28
29if ( CellChanged )
30 if ( GetJournalIndex "TR_m4_wil_BanditDuo" >= 100 )
31 if ( GetDisabled == 0 )
32 Disable
33 endif
34 endif
35endif
36
37if ( GetJournalIndex "TR_m4_wil_BanditDuo" == 50 )
38 if ( controlQ == 0 )
39 set timer to ( timer + GetSecondsPassed )
40 if ( timer > 300 )
41 set timer to 0
42 set controlQ to 1
43 endif
44 elseif ( controlQ == 1 )
45 if ( GetDistance player < 720 )
46 if ( GetDistance "TR_m4_AA_OutpostBanditCheck" > 5000 )
47 if ( GetItemCount "T_Imp_Silver_Claymore_AugFleet" == 0 )
48 set controlQ to 2
49 else
50 set controlQ to 3
51 endif
52 ForceGreeting
53 return
54 endif
55 endif
56 endif
57endif
58
59if ( OnPCHitMe == 1 )
60 if ( controlQ == 0 )
61 if ( GetItemCount "T_Imp_Silver_Claymore_AugFleet" == 0 )
62 AddItem "steel dagger" 1
63 "TR_m4_Agdistrius Rictor"->AddItem "iron dagger" 1
64 set controlQ to 10
65 else
66 set controlQ to 11
67 endif
68 if ( GetJournalIndex "TR_m4_wil_BanditDuo" == 50 )
69 ForceGreeting
70 return
71 endif
72 endif
73endif
74
75if ( TR_Map == 4 )
76 return
77endif
78
79set TR_Map to 4
80
81End