TR_m3_q_Kha_Thul_script
TR_Mainland.esm
Variables
5
Local Variables
teleport
doOnce
greet
deaths
timer
Source
1Begin TR_m3_q_Kha_Thul_script
2
3short teleport
4short doOnce
5short greet
6short deaths
7float timer
8
9if ( CellChanged == 1 )
10 if ( GetJournalIndex "TR_m3_Kha_FlowersDark" == 101 )
11 setfight 100
12 endif
13endif
14
15if ( OnDeath )
16 set deaths to ( deaths + 1 )
17 set timer to 1
18 if ( GetJournalIndex "TR_m3_Kha_FlowersDark" != 100 )
19 if ( GetJournalIndex "TR_m3_Kha_FlowersDark" != 102 )
20 if ( deaths >= 10 )
21 setfight 30
22 set greet to 0
23 endif
24 endif
25 endif
26endif
27
28if ( MenuMode )
29 Return
30endif
31
32if ( greet == 0 )
33 if ( GetHealth > 0 )
34 if ( GetDistance player <= 500 )
35 if ( player->GetInvisible != 1 )
36 ForceGreeting
37 set greet to 1
38 endif
39 endif
40 endif
41endif
42
43if ( timer > 0 )
44 set timer to ( timer + GetSecondsPassed )
45
46 if ( timer > 4 )
47 set timer to 0
48 PlaceAtMe "T_Glb_Var_SummonFX" 1 0 0
49 PlaySound3D "conjuration hit"
50 Resurrect
51 endif
52endif
53
54if ( teleport == 1 )
55 if ( GetPCCell Khalaan == 0 )
56 PositionCell 4750 5191 9666 0 "Khalaan, Old Landing" ; TR_m3_MARK_ThulNadaa
57 AIWander 512 5 0 20 20 50
58 endif
59 EnableTeleporting
60 set T_Glob_GetTeleportingDisabled to 0
61 set teleport to 0
62 PlaySound "mysticism hit"
63 player->PositionCell 61585.098 -146827.875 220.004 0.0 "Old Ebonheart, Docks" ; TR_m3_MARK_Kha_FlowersDark
64endif
65
66End