TR_m1_q50_GO4_himnatis
TR_Mainland.esm
Variables
10
Local Variables
TR_Map
NoLore
control
state
doonce
T_Local_NPC
T_Local_NoLore
timer
plz
ply
Source
1Begin TR_m1_q50_GO4_himnatis
2
3short TR_Map
4short NoLore
5short control
6short state
7short doonce
8float timer
9float plz
10float ply
11short T_Local_NPC
12short T_Local_NoLore
13
14if ( MenuMode )
15 Return
16endif
17
18if ( doOnce == 1 )
19 if ( CellChanged )
20 if ( GetDisabled == 0 )
21 Disable
22 endif
23 endif
24endif
25
26if ( state == -1 )
27 if ( CellChanged )
28 Disable
29 endif
30endif
31
32if ( GetDisabled )
33 if ( timer > 3 )
34 SetDelete 1
35 Return
36 endif
37 set timer to ( timer + GetSecondsPassed )
38endif
39
40if ( state == 0 )
41 set TR_Map to 1
42 set state to 1
43elseif ( state == 2 )
44 set plz to ( player->GetPos z )
45 if ( plz < 8000 )
46 AddSpell chameleon_100_unique
47 PositionCell 3059 4798 7751 0 "Llothanis, The Water's Shadow Tavern" ;TR_m1_MARK_Himnatis
48 AiWander 0 0 0 0 0 0 0 0 0 0 0 0
49 set state to 1
50 set TR_m1_gritnol.flag to 0
51 endif
52 return
53elseif ( state == 3 )
54 if ( GetDistance player < 512 )
55 set plz to ( player->GetPos z )
56 set ply to ( player->GetPos y )
57 if ( plz < 8000 )
58 if ( ply > 4600 )
59 set control to 2
60 RemoveSpell chameleon_100_unique
61 set state to 4
62 endif
63 endif
64 endif
65 return
66elseif ( state == 4 )
67 if ( timer > 0.5 )
68 ForceGreeting
69 set timer to 0
70 set state to 5
71 endif
72 set timer to ( timer + GetSecondsPassed )
73 return
74elseif ( state == 5 )
75 if ( timer > 0.5 )
76 set TR_m1_gritnol.state to 13
77 set timer to 0
78 set state to 6
79 endif
80 set timer to ( timer + GetSecondsPassed )
81 return
82elseif ( state == 6 )
83 if ( GetJournalIndex TR_m1_GO_4 == 102 )
84 set control to 3
85 ForceGreeting
86 set state to -1
87 endif
88 return
89elseif ( state == 7 )
90 set control to 3
91 ForceGreeting
92 set state to 8
93endif
94
95End