TR_m1_Q59_MaI_Script_3
TR_Mainland.esm
Variables
10
Local Variables
looking
DoOnce
testvar
TR_Map
state
daycount
dday
T_Local_NPC
NoLore
timer
Source
1Begin TR_m1_Q59_MaI_Script_3
2
3;This is the standard "detect script" used in the Redram Oran Investigation
4;quest for Tinera and Varrac..
5
6short looking
7short DoOnce
8short testvar
9short TR_Map
10float timer
11short state
12short daycount
13short dday
14short T_Local_NPC
15short NoLore
16
17If ( MenuMode )
18 Return
19endif
20
21if ( state == -1 )
22 Return
23endif
24
25if ( TR_Map != 1 )
26 set TR_Map to 1
27endif
28
29if ( GetJournalIndex "TR_m1_PT_MaI_4" >= 402 )
30 if ( GetJournalIndex "TR_m1_PT_MaI_4" <= 404 )
31 SetFight 100
32 SetDisposition 0
33 set state to -1
34 endif
35endif
36
37
38if ( state == 0 )
39 if ( GetJournalIndex "TR_m1_PT_MaI_4" == 122 )
40 set state to 1
41 set daycount to DaysPassed
42 endif
43endif
44
45if ( state == 1 )
46 set dday to ( DaysPassed - daycount )
47 if ( dday >= 2 )
48 set state to -1
49 endif
50endif
51
52if ( GetJournalIndex "TR_m1_PT_MaI_3" == 30 )
53 set timer to ( timer + GetSecondsPassed )
54 if ( timer > 15 )
55 if ( getLOS Player )
56 set DoOnce to -3
57 ForceGreeting
58 endif
59 endif
60endif
61
62if ( DoOnce >= -2 )
63 if ( GetJournalIndex "TR_m1_PT_MaI_3" == 35 )
64 SetFight 100
65 SetDisposition 0
66 set DoOnce to -3
67 endif
68endif
69
70if ( GetJournalIndex "TR_m1_PT_MaI_3" < 10 )
71 Return
72elseif ( GetJournalIndex "TR_m1_PT_MaI_3" >= 30 )
73 Return
74endif
75
76set timer to ( timer + GetSecondsPassed )
77set testvar to ( Player->GetArmorType 5 )
78
79if ( GetJournalIndex "TR_m1_PT_MaI_3" < 20 )
80 if ( GetDistance Player <= 256 )
81 if ( getLOS Player )
82 if ( testvar != -1 )
83 set DoOnce to -1
84 ForceGreeting
85 elseif ( GetPCSneaking != 1 )
86 set DoOnce to -1
87 ForceGreeting
88 endif
89 endif
90 endif
91endif
92
93if ( timer < 3 )
94 Return
95endif
96
97set timer to 0
98set looking to 1
99
100if ( Player->GetInvisible )
101 set looking to 0
102elseif ( Player->GetChameleon >= 85 )
103 set looking to 0
104elseif ( GetLOS Player == 0 )
105 set looking to 0
106endif
107
108if ( looking == 1 )
109 if ( GetDetected Player )
110 set DoOnce to -2
111 set timer to 0
112 ForceGreeting
113 endif
114endif
115
116end