-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathscript_1c1d447ddbce2c00.gsc
117 lines (111 loc) · 2.58 KB
/
script_1c1d447ddbce2c00.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
// Decompiled by Serious. Credits to Scoba for his original tool, Cerberus, which I heavily upgraded to support remaining features, other games, and other platforms.
#using scripts\zm_common\zm_utility.gsc;
#using scripts\core_common\flag_shared.gsc;
#namespace namespace_a71af4de;
/*
Name: init
Namespace: namespace_a71af4de
Checksum: 0xFD38C07E
Offset: 0xD8
Size: 0x2C
Parameters: 0
Flags: Linked
*/
function init()
{
if(!zm_utility::is_trials())
{
level thread nuked_population_sign_think();
}
}
/*
Name: nuked_population_sign_think
Namespace: namespace_a71af4de
Checksum: 0x12D3DA4C
Offset: 0x110
Size: 0x348
Parameters: 0
Flags: Linked
*/
function nuked_population_sign_think()
{
level flag::init(#"hash_35762ecd1ee8f3c1");
level endon(#"end_game", #"hash_5aa1c9627e8626e0");
var_50f6b3f4 = getent("counter_tens", "targetname");
var_d02e9cd = getent("counter_ones", "targetname");
n_step = 36;
n_ones = 0;
n_tens = 0;
var_aa6e55d3 = 0;
var_50f6b3f4 rotateroll(n_step, 0.05);
var_d02e9cd rotateroll(n_step, 0.05);
level.population_count = 0;
while(true)
{
if(var_aa6e55d3 < level.total_zombies_killed - level.zombie_total_subtract)
{
n_ones--;
n_time = set_dvar_float_if_unset("scr_dial_rotate_time", "0.5");
if(n_ones < 0)
{
n_ones = 9;
var_50f6b3f4 rotateroll(0 - n_step, n_time);
var_50f6b3f4 playsound("zmb_counter_flip");
n_tens--;
}
if(n_tens < 0)
{
n_tens = 9;
}
var_d02e9cd rotateroll(0 - n_step, n_time);
var_d02e9cd playsound("zmb_counter_flip");
var_d02e9cd waittill(#"rotatedone");
level.population_count = n_ones + (n_tens * 10);
if(level.population_count == 0 || level.population_count == 33 || level.population_count == 66 || level.population_count == 99)
{
level notify(#"update_doomsday_clock");
}
var_aa6e55d3++;
}
if(level.population_count == 15 || level.var_20cc3d90 === level.population_count)
{
level flag::set(#"hash_35762ecd1ee8f3c1");
}
else
{
level flag::clear(#"hash_35762ecd1ee8f3c1");
}
wait(0.05);
}
}
/*
Name: set_dvar_float_if_unset
Namespace: namespace_a71af4de
Checksum: 0x2CC14AEB
Offset: 0x460
Size: 0x82
Parameters: 3
Flags: Linked
*/
function set_dvar_float_if_unset(dvar, value, reset = 0)
{
if(reset || getdvarstring(dvar) == "")
{
setdvar(dvar, value);
}
return getdvarfloat(dvar, 0);
}
/*
Name: function_3134b684
Namespace: namespace_a71af4de
Checksum: 0x34DF3F52
Offset: 0x4F0
Size: 0x3C
Parameters: 0
Flags: None
*/
function function_3134b684()
{
level.var_20cc3d90 = level.population_count;
level flag::set(#"hash_35762ecd1ee8f3c1");
}