TR_m2_FG_Arfilscript
TR_Mainland.esm
Variables
10
Local Variables
TR_Map
control
controlQ
doonce
T_Local_NPC
T_Local_NoLore
nohello
noidle
nolore
freezeOnce
Source
1Begin TR_m2_FG_Arfilscript
2
3; it's also for Helnim FG lol.
4; "doonce" is used to control disabling Arfil before the quest.
5; "controlQ" is used to control his being paralyzed.
6; "control" is used in his greetings. control=1 is when he is following, control=2 is when he is waiting to return, control=3 is when he has returned to the FG.
7
8short TR_Map
9short control
10short controlQ
11short doonce
12short T_Local_NPC
13short T_Local_NoLore
14short nohello
15short noidle
16short nolore
17short freezeOnce
18
19if ( TR_map == 0 )
20 set TR_map to 2
21 aiwander 0 0 0
22endif
23
24if ( getjournalindex TR_m2_FG_Hartise_Tainted == 0 )
25 if ( doonce == 0 )
26 disable
27 set doonce to 1
28 endif
29endif
30
31if ( onactivate == 1 )
32 if ( controlQ == 0 )
33 messagebox, "Arfil is motionless, and does not speak."
34 if ( getjournalindex TR_m2_FG_Hartise_Tainted < 20 )
35 journal TR_m2_FG_Hartise_Tainted 20
36 endif
37 elseif ( controlQ >= 1 )
38 activate
39 endif
40endif
41
42
43if ( getjournalindex TR_m2_FG_Hartise_Tainted == 10 )
44 if ( getdisabled == 0 )
45 if ( freezeOnce == 1 )
46 LoopGroup Idle 1
47 set freezeOnce to 2
48 elseif ( freezeOnce == 0 )
49 LoopGroup Idle 1
50 PlayGroup RunForward 2
51 set freezeOnce to 1
52 endif
53 endif
54
55 if ( getdisabled == 1 )
56 enable
57 PlayGroup RunForward 2 ;animation group wizardry
58 endif
59endif
60
61if ( controlQ == 0 )
62 if ( GetEffect sEffectCureParalyzation )
63 set controlQ to 1
64 set nohello to 1
65 set noidle to 1
66 aiwander 0 5 5
67 removespell TR_m2_FG_Paralysis
68 PlayGroup Idle 0
69 elseif ( GetEffect sEffectDispel )
70 set controlQ to 1
71 set nohello to 1
72 set noidle to 1
73 removespell TR_m2_FG_Paralysis
74 aiwander 0 5 5
75 PlayGroup Idle 0
76 endif
77endif
78
79End