TR_m3_NPC_DelvenBeriel
TR_Mainland.esm
Variables
6
Local Variables
TR_Map
control
controlQ
T_Local_NPC
NoLore
timer
Source
1Begin TR_m3_NPC_DelvenBeriel
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 T_Local_NPC
10short NoLore
11float timer
12
13
14if ( MenuMode )
15 return
16elseif ( control == 3 )
17 return
18elseif ( control == 0 )
19 if ( GetTarget Player )
20 set control to 1
21 endif
22elseif ( control == 1 )
23 ;start chugging potions
24 if ( GetItemCount "T_Com_Potion_Sanctuary_E" >= 1 )
25 equip "T_Com_Potion_Sanctuary_E"
26 set control to 2
27 elseif ( GetItemCount "p_reflection_e" >= 1 )
28 equip "p_reflection_e"
29 set control to 2
30 elseif ( GetItemCount "p_fortify_health_e" >= 1 )
31 equip "p_fortify_health_e"
32 set control to 2
33 elseif ( GetItemCount "p_fortify_attack_e" >= 1 )
34 equip "p_fortify_attack_e"
35 set control to 2
36 elseif ( GetItemCount "p_fortify_agility_e" >= 1 )
37 equip "p_fortify_agility_e"
38 set control to 2
39 elseif ( GetItemCount "p_fortify_speed_e" >= 1 )
40 equip "p_fortify_speed_e"
41 set control to 2
42 elseif ( GetItemCount "potion_local_liquor_01" >= 1 )
43 equip "potion_local_liquor_01"
44 set control to 2
45 else
46 set control to 3
47 endif
48elseif ( control == 2 )
49 set timer to ( timer + GetSecondsPassed )
50 if ( timer >= 0.2 )
51 set control to 1
52 set timer to 0
53 endif
54endif
55
56if ( TR_Map )
57 return
58endif
59
60set TR_Map to 3
61
62End