TR_m4_NPC_Dravil
TR_Mainland.esm
Variables
7
Local Variables
TR_Map
control
controlQ
check
ran_check
T_Local_NPC
NoLore
Source
1Begin TR_m4_NPC_Dravil
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 check
10short ran_check
11short T_Local_NPC
12short NoLore
13;global Random100
14
15if ( MenuMode )
16 return
17endif
18
19if ( OnDeath )
20 if ( GetJournalIndex "TR_m4_Arv_Dravil" < 200 )
21 Journal "TR_m4_Arv_Dravil" 200
22 endif
23endif
24
25if ( GetHealth <= 5 )
26 return
27endif
28
29; Dravil is perpetually angry
30if ( GetDisposition > 15 )
31 SetDisposition 15
32endif
33
34if ( GetDistance, player <= 128 )
35 if ( check == 0 )
36 set ran_check to random 100
37 set check to 1
38 endif
39endif
40
41if ( check == 1 )
42 if ( GetDistance player >= 130 )
43 if ( ran_check < 10 )
44 set check to 2
45 set controlQ to 1
46 MessageBox "[As you go past him, Dravil spits at your feet and curses.]"
47 Say "vo\d\m\Atk_DM004.wav" "You n'wah..."
48 Journal "TR_m4_Arv_Dravil" 10
49 elseif ( ran_check >= 10 )
50 set check to 0
51 endif
52 endif
53endif
54
55if ( TR_Map == 4 )
56 return
57endif
58
59set TR_Map to 4
60
61End