-
Notifications
You must be signed in to change notification settings - Fork 0
/
2744.gsc
234 lines (186 loc) · 5.79 KB
/
2744.gsc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
// IW7 GSC SOURCE
// Dumped by https://github.com/xensik/gsc-tool
init()
{
level._id_8CBC = 0.55;
var_0 = scripts\mp\tweakables::_id_81E7( "player", "healthregentime" );
level._id_8CC1 = var_0 <= 0;
level._id_D3A4 = var_0;
level thread _id_C56E();
}
_id_C56E()
{
for (;;)
{
level waittill( "connected", var_0 );
var_0 thread onplayerspawned();
}
}
onplayerspawned()
{
self endon( "disconnect" );
for (;;)
{
self waittill( "spawned_player" );
thread _id_D3A5();
self _meth_8401( game["thermal_vision"] );
}
}
_id_D3A5()
{
self endon( "death" );
self endon( "disconnect" );
self endon( "joined_team" );
self endon( "joined_spectators" );
self endon( "faux_spawn" );
level endon( "game_ended" );
if ( self.health <= 0 )
return;
var_0 = 0;
var_1 = 0;
thread _id_D368( self.maxhealth * 0.55 );
for (;;)
{
scripts\engine\utility::waittill_any( "damage", "force_regen", "force_regeneration" );
if ( self.health <= 0 )
return;
if ( scripts\mp\utility\game::isjuggernaut() )
continue;
var_1 = gettime();
var_2 = self.health / self.maxhealth;
self._id_DE8E = level._id_D3A4;
if ( scripts\mp\utility\game::_id_12D6( "specialty_regenfaster" ) )
self._id_DE8E *= level._id_DE8A;
if ( var_2 <= level._id_8CBC )
self._id_2410 = 1;
thread _id_8CC4( var_1, var_2 );
}
}
_id_D367()
{
self notify( "playerBreathingBetterSound" );
self endon( "playerBreathingBetterSound" );
self endon( "death" );
self endon( "disconnect" );
self endon( "joined_team" );
self endon( "joined_spectators" );
level endon( "game_ended" );
if ( level._id_7669 )
return;
if ( !isplayer( self ) )
return;
if ( scripts\mp\utility\game::isusingremote() )
return;
if ( scripts\mp\utility\game::_id_9D48( "archetype_scout" ) )
self playlocalsound( "breathing_better_c6" );
else if ( scripts\mp\utility\game::isfemale() )
self playlocalsound( "Fem_breathing_better" );
else
self playlocalsound( "breathing_better" );
}
_id_8CC4( var_0, var_1 )
{
self notify( "healthRegeneration" );
self endon( "healthRegeneration" );
self endon( "death" );
self endon( "disconnect" );
self endon( "joined_team" );
self endon( "joined_spectators" );
level endon( "game_ended" );
if ( !scripts\mp\utility\game::_id_12D6( "specialty_adrenaline" ) )
{
if ( level._id_8CC1 )
return;
while ( scripts\mp\utility\game::istrue( self._id_8CC1 ) )
wait 0.5;
}
if ( !scripts\mp\utility\game::_id_12D6( "specialty_adrenaline" ) )
scripts\mp\utility\game::_id_1359E( self._id_DE8E, "force_regeneration" );
if ( var_1 < 0.55 )
var_2 = 1;
else
var_2 = 0;
if ( scripts\mp\utility\game::_id_12D6( "specialty_adrenaline" ) || scripts\mp\utility\game::_id_12D6( "specialty_regenfaster" ) )
self setclientomnvar( "ui_health_regen_hud", 1 );
var_3 = self.maxhealth / 50.0;
var_4 = 0.0;
var_5 = gettime();
for (;;)
{
if ( scripts\mp\utility\game::istrue( self._id_8CC1 ) && !scripts\mp\utility\game::_id_12D6( "specialty_adrenaline" ) )
return;
wait 0.05;
var_6 = 0;
if ( scripts\mp\utility\game::_id_12D6( "specialty_adrenaline" ) || scripts\mp\utility\game::_id_12D6( "specialty_adrenaline_lite" ) )
var_6 = scripts\mp\equipment\adrenaline::_id_7EF5();
else if ( scripts\mp\utility\game::_id_12D6( "specialty_regenfaster" ) )
var_6 = var_3 * level._id_DE89;
else
var_6 = var_3;
var_7 = 0;
if ( self.health < self.maxhealth )
{
var_7 = 1;
var_8 = self.health + var_6 + var_4;
var_9 = int( min( self.maxhealth, var_8 ) );
self.health = var_9;
var_4 = var_8 - var_9;
}
if ( self.health >= self.maxhealth )
{
self.health = self.maxhealth;
if ( var_7 && scripts\mp\utility\game::_id_12D6( "specialty_regenfaster" ) )
scripts\mp\missions::_id_D991( "ch_trait_icu" );
break;
}
}
self notify( "healed" );
thread scripts\mp\damage::_id_E143();
_id_D367();
self setclientomnvar( "ui_health_regen_hud", 0 );
}
_id_135F0()
{
self notify( "waiting_to_stop_remote" );
self endon( "waiting_to_stop_remote" );
self endon( "death" );
level endon( "game_ended" );
self waittill( "stopped_using_remote" );
scripts\mp\utility\game::restorebasevisionset( 0 );
}
_id_D368( var_0 )
{
level endon( "game_ended" );
self endon( "death" );
self endon( "disconnect" );
self endon( "joined_team" );
self endon( "joined_spectators" );
if ( !isplayer( self ) )
return;
self.hardcoreinjuredlooopsplayed = 0;
wait 2;
for (;;)
{
wait 0.2;
if ( self.health <= 0 )
return;
if ( self.health >= var_0 )
continue;
var_1 = level._id_8CC1 || isdefined( self._id_8CC1 ) && self._id_8CC1;
if ( scripts\mp\utility\game::isusingremote() )
continue;
if ( scripts\mp\utility\game::_id_9D48( "archetype_scout" ) )
self playlocalsound( "breathing_hurt_c6" );
else if ( scripts\mp\utility\game::isfemale() )
self playlocalsound( "Fem_breathing_hurt" );
else
self playlocalsound( "breathing_hurt" );
wait 1.5;
if ( level._id_8B38 )
{
self.hardcoreinjuredlooopsplayed++;
if ( self.hardcoreinjuredlooopsplayed > 3 )
return;
}
}
}