TR_m4_NPC_Tyrus_Viducian
TR_Mainland.esm
Variables
7
Local Variables
TR_Map
control
controlQ
NoLore
T_Local_NPC
T_Local_NoLore
timer
Source
1Begin TR_m4_NPC_Tyrus_Viducian
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. This version is for "NoLore" NPCs.
5
6; Combat behavior in plain english
7; After taking some damage drink strength potions
8; at half health drink incarnadine
9
10
11short TR_Map
12short control
13short controlQ
14short NoLore
15short T_Local_NPC
16short T_Local_NoLore
17float timer ;timer so he doesn't just chug all his strength potions at once
18
19if ( OnDeath )
20 if ( GetJournalIndex "TR_m4_And_Armistice" >= 10 )
21 Journal TR_m4_And_Armistice 200
22 endif
23endif
24
25if ( control == 1 )
26 if ( MenuMode == 0 )
27 set timer to ( timer + GetSecondsPassed )
28 if ( timer >= 1 )
29 set control to 0
30 endif
31 endif
32endif
33
34if ( GetHealth <= 0 )
35 return
36elseif ( GetHealthGetRatio < 0.5 )
37 if ( GetItemCount "T_Imp_Subst_Incarnadine_01" >= 1 )
38 equip "T_Imp_Subst_Incarnadine_01"
39 endif
40elseif ( GetHealthGetRatio < 0.9 )
41 if ( GetItemCount "p_fortify_strength_e" >= 1 )
42 if ( control == 0 )
43 if ( GetStrength < 160 )
44 equip "p_fortify_strength_e"
45 set control to 1
46 set timer to 0
47 endif
48 endif
49 endif
50endif
51
52set TR_Map to 4
53
54End