TR_m2_O_MM2_Lliranit
TR_Mainland.esm
Variables
5
Local Variables
TR_Map
attacked
T_Local_NPC
NoLore
timer
Source
1Begin TR_m2_O_MM2_Lliranit
2; Script on bandit NPC TR_m2_O_Liranit_Eseroth. Ensures that the player can't reasonably
3; separate her from TR_m2_o_Filwen.
4; Normally bandits in TR (and everywhere else in MW) are easy to separate, but I
5; want to make an exception here. Too many good items. -- arvisrend, 26 Nov 2012
6
7short TR_Map
8short attacked
9float timer
10short T_Local_NPC
11short NoLore
12
13; The script is supposed to do the following:
14; If the player gets in combat with TR_m2_O_Liranit_Eseroth, then her companion
15; TR_m2_o_Filwen immediately joins the fray.
16; This should seriously mess with the player's expectations, since neither
17; nontrivial AI nor levitating enemies are common in Morrowind.
18; In order not to overload the engine, the script tests for necessity of attack
19; only once in 10 seconds (thus the timer variable).
20; Once TR_m2_o_Filwen is dead, nothing happens anymore.
21
22if ( TR_Map != 2 )
23 set TR_Map to 2 ; good luck calming her
24endif
25
26if ( attacked == 0 )
27 if ( GetWeaponDrawn )
28 if ( getDeadCount TR_m2_o_Filwen == 0 )
29 TR_m2_o_Filwen->startcombat player
30 set timer to 0
31 set attacked to 1
32 else
33 set attacked to 2
34 endif
35 endif
36elseif ( attacked == 1 )
37 ; remind TR_m2_o_Filwen to attack the player on a regular
38 ; basis.
39 set timer to ( timer + GetSecondsPassed )
40 if ( timer >= 10 )
41 set attacked to 0
42 endif
43endif
44
45End