TR_m2_q_18_Hjotra_Script
TR_Mainland.esm
Variables
5
Local Variables
TR_Map
control
NoLore
T_Local_NPC
T_Local_NoLore
Source
1Begin TR_m2_q_18_Hjotra_Script
2; This script is on NPC TR_m2_q_18_Hjotra and controls her behavior in quest
3; TR_m2_wil_Pestilent.
4
5short TR_Map
6short control
7;short controlQ ; no need for that here
8short NoLore
9short T_Local_NPC
10short T_Local_NoLore
11
12if ( control == 1 )
13 Cast telekinesis TR_m2_q_18_Hjotra
14 set control to 2
15endif
16
17if ( control == 2 )
18 ; Teleports to Dorammu Cavern. I have added the "if ( getdistance Player > 1500 )"
19 ; loop as a failsafe for the case when getSoundPlayer doesn't work.
20 ; -- arvisrend, 20 Nov 2012
21 if ( GetSoundPlaying "mysticism hit" == 1 )
22 set control to 3
23 AddItem common_shirt_01 1
24 removespell T_Dis_FeebleLimb
25 removespell T_Dis_BonebreakFever
26 removespell T_Dis_WastingConsumption
27 setstrength 59
28 PositionCell 506 -944 -270 2420 "Dorammu Cavern" ; marker TR_m2_Mark_q_18_Hjotra
29 AiWander 0 0 0 0 0 0 0 0 0 0 0 0
30 elseif ( getdistance Player > 1500 )
31 set control to 3
32 AddItem common_shirt_01 1
33 removespell T_Dis_FeebleLimb
34 removespell T_Dis_BonebreakFever
35 removespell T_Dis_WastingConsumption
36 setstrength 59
37 PositionCell 506 -944 -270 3420 "Dorammu Cavern" ; marker TR_m2_Mark_q_18_Hjotra
38 AiWander 0 0 0 0 0 0 0 0 0 0 0 0
39 endif
40endif
41
42if ( GetJournalIndex TR_m2_wil_Pestilent == 50 )
43 if ( GetDisabled == 0 )
44 if ( CellChanged == 1 )
45 disable
46 endif
47 endif
48elseif ( GetJournalIndex TR_m2_wil_Pestilent == 52 )
49 if ( GetDisabled == 0 )
50 if ( CellChanged == 1 )
51 disable
52 endif
53 endif
54endif
55
56if ( TR_Map == 2 )
57 return
58endif
59
60set TR_Map to 2
61
62End