TR_m4_q_S_dur_juu_script
TR_Mainland.esm
Variables
25
Local Variables
slaveStatus
NoLore
TR_Map
TR_m4_MundSlave
talk
bountyState
currentCrime
suspicion
helpingFarandrano
showChoices
better
metManawi
metGaldalior
spirit
missionState
missionDay
missionHour
refuseHelp
past
checkSuspicion
checkedSuspicion
shipped
T_Local_NPC
T_Local_NoLore
timer
Source
1Begin TR_m4_q_S_dur_juu_script
2
3;Slave Status... each slave has a status as follows
4;0 = Owned ( default state... does not indicate who they are owned by )
5;1 = For Sale ( someone in the game can "sell" this slave via dialogue )
6;2 = Owned By the Player ( the player has purchased this slave and the slave follows the player )
7;3 = Freed ( the player has freed this slave, the slave eventually disables himself)
8;dead = not in slave status, but a state one should check for
9
10short slaveStatus
11short NoLore
12short TR_Map
13short TR_m4_MundSlave
14short talk
15short bountyState
16short currentCrime
17short suspicion
18short helpingFarandrano
19short showChoices
20short better
21short metManawi
22short metGaldalior
23short spirit
24short missionState
25short missionDay
26short missionHour
27short refuseHelp
28short past
29short checkSuspicion
30short checkedSuspicion
31short shipped
32float timer
33short T_Local_NPC
34short T_Local_NoLore
35
36if ( GetDisabled == 1 )
37 Return
38elseif ( slaveStatus == 3 )
39 if ( GetJournalIndex TR_m4_MP_SlaveWhisperer < 150 )
40 Journal TR_m4_MP_SlaveWhisperer 150
41 endif
42 if ( GetCurrentAIPackage == 3 )
43 AIWander 512 0 0 0 0 0 0 0 0 0 0 0
44 endif
45 if ( GetItemCount Slave_Bracer_Left > 0 )
46 Drop Slave_Bracer_Left 1
47 endif
48 if ( GetItemCount Slave_Bracer_Right > 0 )
49 Drop Slave_Bracer_Right 1
50 endif
51 if ( CellChanged == 1 )
52 Disable
53 endif
54 Return
55endif
56
57if ( OnDeath == 1 )
58 if ( GetJournalIndex TR_m4_MP_SlaveWhisperer > 0 )
59 Journal TR_m4_MP_SlaveWhisperer 140
60 endif
61endif
62
63if ( GetPCCell "Ebonheart, Argonian Mission" == 1 )
64 set slaveStatus to 3
65 ModPCFacRep 5 "Twin Lamps"
66 if ( spirit >= -50 )
67 Say "vo\a\m\Flw_AM003.mp3" "Thank you."
68 endif
69endif
70
71if ( TR_Map != 4 )
72 set TR_Map to 4
73endif
74
75if ( CellChanged == 1 )
76 if ( missionState == 2 )
77 set missionState to 3
78 elseif ( shipped == 1 )
79 if ( GetJournalIndex TR_m4_MP_SlaveWhisperer < 140 )
80 if ( GetCurrentAIPackage != 3 )
81 SetJournalIndex TR_m4_MP_SlaveWhisperer 160
82 Disable
83 endif
84 endif
85 set shipped to 0
86 endif
87endif
88
89if ( MenuMode == 1 )
90 if ( showChoices != 0 )
91 if ( helpingFarandrano == 1 )
92 if ( showChoices == 1 )
93 choice "Nevermind." 2
94 endif
95 if ( better == 0 )
96 choice "Aren't you better off as a slave?" 3
97 endif
98 if ( refuseHelp == 0 )
99 if ( GetJournalIndex TR_m4_MP_SlaveWhisperer1 < 10 )
100 choice "I will ask the Argonian Mission for help." 4
101 endif
102 choice "It would be unlawful to help you." 6
103 choice "Why would anyone want to help a stinking lizard?" 7
104 endif
105 choice "Farandrano wants me to convince you to stop asking outlanders for help." 5
106 endif
107 if ( past == 0 )
108 if ( helpingFarandrano == 0 )
109 if ( showChoices == 1 )
110 choice "Nevermind." 2
111 endif
112 endif
113 choice "How did you become a slave?" 8
114 endif
115 set showChoices to 0
116 endif
117 if ( missionState == 1 )
118 set missionDay to Day
119 set missionHour to GameHour
120 set missionState to 2
121 elseif ( missionState == 3 )
122 if ( missionDay != Day )
123 set missionState to 4
124 elseif ( ( missionHour + 3 ) >= GameHour )
125 set missionState to 4
126 endif
127 endif
128 if ( checkSuspicion == 1 )
129 if ( checkedSuspicion == 0 )
130 if ( helpingFarandrano == 1 )
131 if ( suspicion >= ( ( GetDisposition / 2 ) + player->GetSpeechcraft ) )
132 set checkedSuspicion to 1
133 choice "Continue" 10
134 endif
135 endif
136 endif
137 ;MessageBox "su: %.0f sp: %0.f" suspicion spirit
138 set checkSuspicion to 0
139 endif
140 Return
141endif
142
143if ( bountyState == 0 )
144 if ( GetCurrentAIPackage == 3 )
145 set currentCrime to GetPCCrimeLevel
146 "TR_m4_q_dur_crime"->Lock 100
147 "TR_m4_q_dur_crime"->ExplodeSpell "open"
148 set bountyState to 1
149 set timer to 0
150 endif
151elseif ( bountyState == 1 )
152 set timer to ( timer + GetSecondsPassed )
153 if ( timer > 0.3 )
154 if ( GetPCCrimeLevel > currentCrime )
155 "TR_m4_Farandrano"->StartCombat player
156 "TR_m4_Llanani Daran"->StartCombat player
157 ModPCCrimeLevel 995
158 endif
159 set bountyState to 2
160 endif
161 Return
162elseif ( bountyState == 2 )
163 if ( GetCurrentAIPackage != 3 )
164 set bountyState to 0
165 endif
166endif
167
168if ( talk == 3 )
169 Return
170elseif ( GetHealth <= 1 )
171 Return
172endif
173
174if ( GetDistance player < 200 )
175 ForceGreeting
176 Return
177endif
178
179set timer to ( timer + GetSecondsPassed )
180
181if ( timer < 5 )
182 Return
183endif
184
185if ( talk == 0 )
186 if ( player->GetInvisible == 0 )
187 if ( GetPCSneaking == 0 )
188 if ( GetDistance player < 1000 )
189 Say "vo\a\m\Fle_AM002.mp3" "Help us!"
190 set talk to 1
191 set timer to 0
192 endif
193 endif
194 endif
195elseif ( talk == 1 )
196 if ( player->GetInvisible == 1 )
197 set talk to 2
198 elseif ( GetDistance player > 1200 )
199 set talk to 2
200 endif
201 if ( talk == 2 )
202 if ( SayDone == 1 )
203 Say "vo\a\m\Fle_AM001.mp3" "Stop! Help!"
204 endif
205 set timer to 0
206 set talk to 0
207 endif
208endif
209
210End