-
Notifications
You must be signed in to change notification settings - Fork 0
/
2717.gsc
115 lines (96 loc) · 2.82 KB
/
2717.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
// IW7 GSC SOURCE
// Dumped by https://github.com/xensik/gsc-tool
init()
{
if ( !isdefined( level._id_5056 ) || level._id_5056 == 0 )
return;
if ( !isdefined( game["defcon"] ) )
game["defcon"] = 4;
setdvar( "scr_defcon", game["defcon"] );
level._id_5059[5] = 0;
level._id_5059[4] = 0;
level._id_5059[3] = -1;
level._id_5059[2] = -1;
level._id_5059[1] = -1;
level._id_5057[5] = 1;
level._id_5057[4] = 1;
level._id_5057[3] = 1;
level._id_5057[2] = 1;
level._id_5057[1] = 2;
_id_12E87( game["defcon"] );
thread _id_5054();
}
_id_5055( var_0 )
{
for (;;)
{
level waittill( "player_got_killstreak_" + var_0, var_1 );
level notify( "defcon_killstreak", var_0, var_1 );
}
}
_id_5054()
{
level endon( "game_ended" );
var_0 = 10;
level thread _id_5055( var_0 );
level thread _id_5055( var_0 - 1 );
level thread _id_5055( var_0 - 2 );
level thread _id_5055( var_0 * 2 );
level thread _id_5055( var_0 * 2 - 1 );
level thread _id_5055( var_0 * 2 - 2 );
level thread _id_5055( var_0 * 3 );
level thread _id_5055( var_0 * 3 - 1 );
level thread _id_5055( var_0 * 3 - 2 );
for (;;)
{
level waittill( "defcon_killstreak", var_1, var_2 );
if ( game["defcon"] <= 1 )
continue;
if ( var_1 % var_0 == var_0 - 2 )
{
foreach ( var_4 in level.players )
{
if ( !isalive( var_4 ) )
continue;
var_4 thread scripts\mp\hud_message::showsplash( "two_from_defcon", undefined, var_2 );
}
continue;
}
if ( var_1 % var_0 == var_0 - 1 )
{
foreach ( var_4 in level.players )
{
if ( !isalive( var_4 ) )
continue;
var_4 thread scripts\mp\hud_message::showsplash( "one_from_defcon", undefined, var_2 );
}
continue;
}
_id_12E87( game["defcon"] - 1, var_2, var_1 );
}
}
_id_12E87( var_0, var_1, var_2 )
{
var_0 = int( var_0 );
var_3 = game["defcon"];
game["defcon"] = var_0;
level._id_C2A7 = level._id_5057[var_0];
setdvar( "scr_defcon", game["defcon"] );
if ( isdefined( var_1 ) )
var_1 notify( "changed_defcon" );
if ( var_0 == var_3 )
return;
if ( game["defcon"] == 3 && isdefined( var_1 ) )
{
var_1 scripts\mp\killstreaks\killstreaks::_id_8374( "airdrop_mega" );
var_1 thread scripts\mp\hud_message::showsplash( "caused_defcon", var_2 );
}
foreach ( var_5 in level.players )
{
if ( isalive( var_5 ) )
{
if ( isdefined( var_1 ) )
var_5 thread scripts\mp\hud_message::showsplash( "changed_defcon", undefined, var_1 );
}
}
}