TR_m4_NPC_GaNahiruHunter_scp
TR_Mainland.esm
Variables
9
Local Variables
TR_Map
control
controlQ
NoLore
sneakOnce
attackOnce
stopFollowing
T_Local_NPC
T_Local_NoLore
Source
1Begin TR_m4_NPC_GaNahiruHunter_scp
2
3; This short script is there to allow dialogue to be filtered on the TR_Map local variable,
4; allowing for regional topics such as "Morrowind Lore" or "Geographic Regions" to be
5; appropriate to the location the NPC is. This version is for "NoLore" NPCs.
6
7short TR_Map
8short control
9short controlQ
10short NoLore
11short sneakOnce
12short attackOnce
13short stopFollowing
14short T_Local_NPC
15short T_Local_NoLore
16
17if ( MenuMode )
18 return
19endif
20
21if ( sneakOnce == 0 )
22 if ( GetDistance "TR_m4_ArmunGreatKagouti" < 2560 )
23 ForceSneak
24 set sneakOnce to 1
25 endif
26elseif ( sneakOnce == 1 )
27 if ( GetDistance "TR_m4_ArmunGreatKagouti" < 600 )
28 ClearForceSneak
29 set sneakOnce to 2
30 endif
31endif
32
33if ( attackOnce == 0 )
34 if ( player->GetDistance "TR_m4_ArmunGreatKagouti" < 770 )
35 StartCombat "TR_m4_ArmunGreatKagouti"
36 set attackOnce to 1
37 endif
38endif
39
40if ( GetJournalIndex "TR_m4_wil_GaNahiru" == 10 )
41 if ( stopFollowing == 0 )
42 if ( player->GetDistance "TR_m4_ArmunGreatKagouti" > 13000 )
43 if ( GetJournalIndex "TR_m4_wil_GaNahiru" < 120 )
44 Journal "TR_m4_wil_GaNahiru" 120
45 endif
46 AIWander 64 0 20 0 10 0 0
47 ModDisposition -100
48 set stopFollowing to 1
49 endif
50 endif
51endif
52
53if ( CellChanged )
54 if ( GetJournalIndex "TR_m4_wil_GaNahiru" >= 110 )
55 if ( GetDisabled == 0 )
56 Disable
57 endif
58 endif
59endif
60
61if ( TR_Map == 4 )
62 return
63endif
64
65set TR_Map to 4
66
67End