-
Notifications
You must be signed in to change notification settings - Fork 9
/
script_14af1fd264ffe8cc.gsc
2080 lines (2029 loc) · 44.4 KB
/
script_14af1fd264ffe8cc.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
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// 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\trials\zm_trial_red_tribute.gsc;
#using script_39347d985163e17;
#using scripts\zm\zm_red_util.gsc;
#using script_6c983b627f4a3d51;
#using scripts\zm\zm_red_challenges.gsc;
#using scripts\zm_common\zm_weapons.gsc;
#using scripts\zm_common\zm_utility.gsc;
#using scripts\zm_common\zm_unitrigger.gsc;
#using scripts\zm_common\zm_perks.gsc;
#using scripts\zm_common\zm_melee_weapon.gsc;
#using scripts\zm_common\zm_loadout.gsc;
#using scripts\zm_common\zm_laststand.gsc;
#using scripts\zm_common\zm_customgame.gsc;
#using scripts\zm_common\bgbs\zm_bgb_bullet_boost.gsc;
#using scripts\zm_common\zm_bgb.gsc;
#using scripts\zm_common\zm_audio.gsc;
#using scripts\core_common\flag_shared.gsc;
#using scripts\core_common\util_shared.gsc;
#using scripts\core_common\math_shared.gsc;
#using scripts\core_common\laststand_shared.gsc;
#using scripts\core_common\clientfield_shared.gsc;
#using scripts\core_common\array_shared.gsc;
#using scripts\core_common\aat_shared.gsc;
#namespace namespace_f8f28e08;
/*
Name: init
Namespace: namespace_f8f28e08
Checksum: 0x4ADA6114
Offset: 0x2A8
Size: 0xA6
Parameters: 0
Flags: Linked
*/
function init()
{
if(zm_utility::is_standard())
{
return;
}
function_a8243f37();
namespace_c8efdadc::init();
level.var_6463d67c = 100;
level.var_48e2ab90 = 0.3;
level.var_b4ff4ec = &function_529e8585;
level.var_50ce2afd = &function_50ce2afd;
level.var_bec5bf67 = &function_bec5bf67;
}
/*
Name: function_ab6fd86c
Namespace: namespace_f8f28e08
Checksum: 0x3525E66B
Offset: 0x358
Size: 0x82
Parameters: 2
Flags: Linked
*/
function function_ab6fd86c(e_player, s_bowl)
{
e_player.var_4a25bda8 = s_bowl zm_unitrigger::create(&function_4909d78c, 64, &function_2c76782d);
zm_unitrigger::unitrigger_force_per_player_triggers(e_player.var_4a25bda8, 1);
e_player.var_4a25bda8.e_player = e_player;
}
/*
Name: function_4909d78c
Namespace: namespace_f8f28e08
Checksum: 0x7C926F4
Offset: 0x3E8
Size: 0x428
Parameters: 1
Flags: Linked
*/
function function_4909d78c(e_player)
{
if(e_player != self.stub.e_player)
{
self sethintstringforplayer(e_player, "");
return false;
}
if(!e_player zm_red_util::can_see(self.origin, 0, 0))
{
self sethintstringforplayer(e_player, "");
return false;
}
if(e_player flag::exists(#"hash_8cdde8e6a8607f1") && e_player flag::get(#"hash_8cdde8e6a8607f1"))
{
self sethintstringforplayer(e_player, "");
return false;
}
if(level.var_2dffd020 == 0)
{
self sethintstringforplayer(e_player, #"hash_4aa00a9bc891ac28");
return true;
}
if(isdefined(e_player.var_ccc18354))
{
n_time = gettime() / 1000;
if(n_time >= e_player.var_ccc18354)
{
e_player.var_ccc18354 = undefined;
}
self sethintstringforplayer(e_player, "");
return false;
}
if(isdefined(e_player.var_a7b66476) && e_player.var_a7b66476)
{
self sethintstringforplayer(e_player, #"hash_70048eaa02800fdb");
return true;
}
if(e_player.var_9e09931e != 0)
{
str_prompt = zm_utility::function_d6046228(#"hash_57948661b0f24299", #"hash_5e5a534b4a1e00a7");
self sethintstringforplayer(e_player, str_prompt);
return true;
}
if(isdefined(e_player.var_43300e) && e_player.var_43300e)
{
if(e_player function_324787f7())
{
str_prompt = zm_utility::function_d6046228(#"hash_42cb69becded0870", #"hash_648ba551adc3865c");
self sethintstringforplayer(e_player, str_prompt);
return true;
}
self sethintstringforplayer(e_player, #"hash_19e66c91a9933726");
return true;
}
if(e_player.var_9e09931e == 0)
{
self sethintstringforplayer(e_player, #"hash_11d1636b778203d5");
return true;
}
if(e_player function_324787f7())
{
str_prompt = zm_utility::function_d6046228(#"hash_10c127acbe34c506", #"hash_4597718560da3ea2");
self sethintstringforplayer(e_player, str_prompt);
return true;
}
self sethintstringforplayer(e_player, #"hash_19e66c91a9933726");
return true;
}
/*
Name: function_324787f7
Namespace: namespace_f8f28e08
Checksum: 0xB585D1E3
Offset: 0x820
Size: 0x6A
Parameters: 0
Flags: Linked
*/
function function_324787f7()
{
wpn_current = self getcurrentweapon();
if(zm_loadout::is_hero_weapon(wpn_current) || (isdefined(wpn_current.isriotshield) && wpn_current.isriotshield))
{
return false;
}
return true;
}
/*
Name: function_2c76782d
Namespace: namespace_f8f28e08
Checksum: 0xB7035DB1
Offset: 0x898
Size: 0x174
Parameters: 0
Flags: Linked
*/
function function_2c76782d()
{
self endon(#"death");
while(true)
{
waitresult = undefined;
waitresult = self waittill(#"trigger");
e_player = waitresult.activator;
if(!zm_utility::can_use(e_player))
{
continue;
}
if(self.stub.e_player !== e_player)
{
continue;
}
if(!namespace_5c5619de::is_active() && e_player.var_9e09931e != 0)
{
e_player function_123bcbcf();
e_player function_53a333a8(undefined);
}
else
{
if(isdefined(e_player.var_43300e) && e_player.var_43300e && !e_player function_324787f7())
{
continue;
}
else if(isdefined(e_player.var_4373c66b) && e_player.var_4373c66b)
{
e_player.var_4373c66b = undefined;
e_player notify(#"hash_3cd13a6cb08bba96");
}
}
}
}
/*
Name: function_3165516b
Namespace: namespace_f8f28e08
Checksum: 0x9A6509AA
Offset: 0xA18
Size: 0x1D4
Parameters: 2
Flags: Linked
*/
function function_3165516b(var_1e2067f4, n_phase)
{
self endon(#"death");
n_color = 1;
switch(n_phase)
{
case 1:
{
n_color = 1;
var_a3f33bc5 = 1;
break;
}
case 2:
{
n_color = 2;
var_a3f33bc5 = 2;
break;
}
case 3:
{
n_color = 3;
var_a3f33bc5 = 4;
break;
}
case 4:
default:
{
n_color = 4;
var_a3f33bc5 = 8;
break;
}
}
self clientfield::set("" + #"hash_47490b879090eb55", n_color);
util::wait_network_frame();
self clientfield::set("" + #"hash_7b1dd5c08e2585c", var_1e2067f4);
util::wait_network_frame();
self clientfield::set("" + #"hash_47490b879090eb55", 0);
self clientfield::set("" + #"hash_7b1dd5c08e2585c", 0);
wait(1.3);
level thread namespace_c8efdadc::function_9c8540b4(self, var_a3f33bc5);
}
/*
Name: function_123bcbcf
Namespace: namespace_f8f28e08
Checksum: 0x5F13A361
Offset: 0xBF8
Size: 0xA6C
Parameters: 0
Flags: Linked
*/
function function_123bcbcf()
{
b_reward = 1;
switch(self.var_9e09931e)
{
case 0:
{
b_reward = 0;
break;
}
case 1:
{
a_str_rewards = [];
if(zm_custom::function_901b751c(#"zmpowerupsactive"))
{
a_str_rewards[a_str_rewards.size] = #"double_points";
a_str_rewards[a_str_rewards.size] = #"insta_kill";
}
a_players = getplayers();
if(a_players.size == 1 && (!(isdefined(self.var_6482c679) && self.var_6482c679)) && !zm_utility::is_trials())
{
a_str_rewards[a_str_rewards.size] = #"extra_life";
}
wpn_bowie = getweapon(#"bowie_knife");
if(!self hasweapon(wpn_bowie) && zm_custom::function_901b751c(#"zmweaponsknife"))
{
a_str_rewards[a_str_rewards.size] = #"bowie_knife";
}
str_reward = function_56c888ce(a_str_rewards);
switch(str_reward)
{
case "double_points":
{
self thread function_d36fb590("double_points", 6, 1);
break;
}
case "insta_kill":
{
self thread function_d36fb590("insta_kill", 6, 1);
break;
}
case "extra_life":
{
self thread function_d36fb590("self_revive", 6, 1);
self.var_6482c679 = 1;
break;
}
case "bowie_knife":
{
self thread function_11be5095(undefined, 6, 0, #"bowie_knife");
break;
}
}
break;
}
case 2:
{
a_str_rewards = array(#"weapon");
if(zm_custom::function_901b751c(#"zmpowerupsactive"))
{
a_str_rewards[a_str_rewards.size] = #"full_ammo";
a_str_rewards[a_str_rewards.size] = #"fire_sale";
}
wpn_bn = getweapon(#"bowie_knife");
if(!self hasweapon(wpn_bn) && zm_custom::function_901b751c(#"zmweaponsknife"))
{
a_str_rewards[a_str_rewards.size] = #"bowie_knife";
}
str_reward = function_56c888ce(a_str_rewards);
switch(str_reward)
{
case "full_ammo":
{
self thread function_d36fb590("full_ammo", 15, 1);
break;
}
case "fire_sale":
{
self thread function_d36fb590("fire_sale", 15, 1);
break;
}
case "weapon":
{
self thread function_11be5095(1, 15, 1, undefined);
break;
}
case "bowie_knife":
{
self thread function_11be5095(undefined, 15, 0, #"bowie_knife");
break;
}
}
break;
}
case 3:
{
a_str_rewards = array(#"weapon");
wpn_current = self getcurrentweapon();
if(zm_weapons::is_weapon_upgraded(wpn_current))
{
a_str_rewards[a_str_rewards.size] = #"aat";
}
if(zm_custom::function_901b751c(#"zmspecweaponisenabled") && zm_custom::function_901b751c(#"zmpowerupsactive"))
{
a_str_rewards[a_str_rewards.size] = #"weapon_power";
}
str_reward = function_56c888ce(a_str_rewards);
switch(str_reward)
{
case "aat":
{
self thread function_7dc3dfdb(15);
break;
}
case "weapon_power":
{
self thread function_d36fb590("hero_weapon_power", 15, 2);
break;
}
case "weapon":
{
self thread function_11be5095(2, 15, 1, undefined);
break;
}
}
break;
}
case 4:
{
if(!isdefined(self.var_123836f9))
{
self.var_123836f9 = 0;
}
a_str_rewards = array(#"weapon");
if(zm_custom::function_901b751c(#"zmperksactive") && self.var_123836f9 < 2)
{
a_str_rewards[a_str_rewards.size] = #"free_perk";
}
a_players = getplayers();
if(a_players.size == 1 && (!(isdefined(self.var_17d719b9) && self.var_17d719b9)) && zm_custom::function_901b751c(#"zmpowerupsactive") && !zm_utility::is_trials())
{
a_str_rewards[a_str_rewards.size] = #"extra_life";
}
var_b42aa272 = 1;
wpn_pegasus = getweapon(#"thunderstorm");
if(self hasweapon(wpn_pegasus))
{
n_ammo = self getammocount(wpn_pegasus);
if(n_ammo)
{
var_b42aa272 = 0;
}
}
if(var_b42aa272 && zm_custom::function_901b751c(#"zmequipmentisenabled") && zm_weapons::get_is_in_box(level.var_49d60273))
{
a_str_rewards[a_str_rewards.size] = #"pegasus";
}
str_reward = function_56c888ce(a_str_rewards);
switch(str_reward)
{
case "weapon":
{
self thread function_11be5095(3, 15, 1, undefined);
break;
}
case "free_perk":
{
self thread function_8665509b(15);
self.var_123836f9++;
break;
}
case "extra_life":
{
self thread function_d36fb590("self_revive", 15, 1);
self.var_17d719b9 = 1;
break;
}
case "pegasus":
{
self thread function_11be5095(undefined, 15, 0, #"thunderstorm");
break;
}
}
break;
}
}
if(b_reward)
{
self thread function_3165516b(self.s_tribute_bowl.var_e668d197, self.var_9e09931e);
self thread function_6c62f074(self.var_9e09931e);
}
self set_tribute(0);
}
/*
Name: set_tribute
Namespace: namespace_f8f28e08
Checksum: 0x746EA457
Offset: 0x1670
Size: 0x52
Parameters: 1
Flags: Linked
*/
function set_tribute(n_amount)
{
self.n_tribute = n_amount;
n_index = self getentitynumber();
level.var_edbe6a7f[n_index] = self.n_tribute;
}
/*
Name: function_56c888ce
Namespace: namespace_f8f28e08
Checksum: 0xF8F3BB04
Offset: 0x16D0
Size: 0x120
Parameters: 1
Flags: Linked
*/
function function_56c888ce(a_str_rewards)
{
if(!a_str_rewards.size)
{
return #"empty";
}
n_max = a_str_rewards.size;
if(n_max > 5)
{
n_max = 5;
}
var_c481f7e6 = randomint(n_max * 1000);
if(var_c481f7e6 <= 1000)
{
str_reward = a_str_rewards[0];
}
else
{
if(var_c481f7e6 <= (1000 * 2))
{
str_reward = a_str_rewards[1];
}
else
{
if(var_c481f7e6 <= (1000 * 3))
{
str_reward = a_str_rewards[2];
}
else
{
if(var_c481f7e6 <= (1000 * 4))
{
str_reward = a_str_rewards[3];
}
else
{
str_reward = a_str_rewards[4];
}
}
}
}
return str_reward;
}
/*
Name: function_29e6dc49
Namespace: namespace_f8f28e08
Checksum: 0x3A9D35F0
Offset: 0x17F8
Size: 0x16A
Parameters: 2
Flags: Linked
*/
function function_29e6dc49(var_be164210 = 1, var_6c9485fc = 15)
{
self endon(#"death");
if(!zm_custom::function_901b751c(#"zmpowerupsactive"))
{
return;
}
v_loc = level.var_d5ba7324.origin + (vectorscale((0, 0, -1), 8));
v_dir = anglestoforward(level.var_d5ba7324.angles);
level.var_b3556b34 = level.var_d5ba7324.origin + (v_dir * 150);
level thread zm_utility::function_4a25b584(v_loc, var_6c9485fc, 100, 1, 0.25, 200, level.var_b3556b34);
if(isdefined(var_be164210) && var_be164210)
{
self.var_a7b66476 = 1;
wait(5);
self.var_a7b66476 = undefined;
}
}
/*
Name: function_d36fb590
Namespace: namespace_f8f28e08
Checksum: 0x275938DE
Offset: 0x1970
Size: 0x24C
Parameters: 3
Flags: Linked
*/
function function_d36fb590(var_aa4f9213, var_6c9485fc = 15, n_fx_type = 1)
{
self endon(#"death");
if(!zm_custom::function_901b751c(#"zmpowerupsactive"))
{
return;
}
if(var_6c9485fc)
{
self thread function_29e6dc49(0, var_6c9485fc);
}
var_8b84b3ce = self.s_tribute_bowl.var_1a34d8e;
v_spawn_angles = self.s_tribute_bowl.var_7b63dcba;
v_forward = anglestoforward(v_spawn_angles);
var_8b84b3ce = var_8b84b3ce + (v_forward * 7) + (vectorscale((0, 0, -1), 3));
var_24a867e4 = function_ed4a5d52(var_aa4f9213);
if(!isdefined(var_24a867e4))
{
return;
}
var_4d0b3b87 = util::spawn_model(var_24a867e4, var_8b84b3ce, v_spawn_angles);
var_4d0b3b87 playsound(#"zmb_spawn_powerup");
var_4d0b3b87 playloopsound(#"zmb_spawn_powerup_loop");
b_give_reward = self function_dcda5d87(var_4d0b3b87, 1, 1, n_fx_type);
if(b_give_reward)
{
level thread zm_audio::sndannouncerplayvox(var_aa4f9213);
if(var_aa4f9213 == "self_revive")
{
self zm_laststand::function_3a00302e();
}
else
{
level [[level._custom_powerups[var_aa4f9213].grab_powerup]](self);
}
}
self stoploopsound();
}
/*
Name: function_ed4a5d52
Namespace: namespace_f8f28e08
Checksum: 0x86463164
Offset: 0x1BC8
Size: 0x116
Parameters: 1
Flags: Linked
*/
function function_ed4a5d52(var_f0de9b92)
{
var_24a867e4 = undefined;
switch(var_f0de9b92)
{
case "double_points":
{
var_24a867e4 = "p7_zm_power_up_double_points";
break;
}
case "carpenter":
{
var_24a867e4 = "p7_zm_power_up_carpenter";
break;
}
case "insta_kill":
{
var_24a867e4 = "p7_zm_power_up_insta_kill";
break;
}
case "full_ammo":
{
var_24a867e4 = "p7_zm_power_up_max_ammo";
break;
}
case "fire_sale":
{
var_24a867e4 = "p7_zm_power_up_firesale";
break;
}
case "self_revive":
{
var_24a867e4 = "p8_zm_gla_heart_zombie";
break;
}
case "hero_weapon_power":
{
var_24a867e4 = "p8_zm_powerup_full_power";
break;
}
}
return var_24a867e4;
}
/*
Name: function_f152b354
Namespace: namespace_f8f28e08
Checksum: 0x107FFF0F
Offset: 0x1CE8
Size: 0x124
Parameters: 2
Flags: None
*/
function function_f152b354(str_bgb, var_6c9485fc = 15)
{
self endon(#"death");
if(var_6c9485fc)
{
self thread function_29e6dc49(0, var_6c9485fc);
}
var_8b84b3ce = self.s_tribute_bowl.var_1a34d8e + (vectorscale((0, 0, -1), 6));
v_spawn_angles = self.s_tribute_bowl.var_7b63dcba;
var_4d0b3b87 = util::spawn_model(#"wpn_t8_zm_elixir_bottle_world", var_8b84b3ce, v_spawn_angles);
b_taken = self function_dcda5d87(var_4d0b3b87, 1, 0, 1);
if(b_taken)
{
self thread give_bgb(str_bgb);
}
}
/*
Name: function_11be5095
Namespace: namespace_f8f28e08
Checksum: 0xEF17C6A1
Offset: 0x1E18
Size: 0x24C
Parameters: 4
Flags: Linked
*/
function function_11be5095(var_7ed75e97, var_6c9485fc = 15, b_upgraded = 0, var_5876e0e2 = undefined)
{
self endon(#"death");
if(var_6c9485fc)
{
self thread function_29e6dc49(0, var_6c9485fc);
}
if(isdefined(var_5876e0e2))
{
str_weapon_name = var_5876e0e2;
}
else
{
str_weapon_name = get_weapon(var_7ed75e97);
if(!isdefined(str_weapon_name))
{
return;
}
if(isdefined(b_upgraded) && b_upgraded)
{
str_weapon_name = str_weapon_name + "_upgraded";
}
}
v_loc = self.s_tribute_bowl.var_1a34d8e + (vectorscale((0, 0, -1), 8));
v_angles = self.s_tribute_bowl.var_7b63dcba + (0, 0, 0);
if(isdefined(level.var_592fbce6[str_weapon_name]))
{
n_amount = level.var_592fbce6[str_weapon_name];
v_forward = anglestoforward(v_angles);
v_loc = v_loc + (v_forward * n_amount);
}
var_4d0b3b87 = zm_utility::spawn_buildkit_weapon_model(self, getweapon(str_weapon_name), undefined, v_loc, v_angles);
b_rotate = 1;
if(str_weapon_name == #"thunderstorm")
{
b_rotate = 0;
}
b_give_reward = self function_dcda5d87(var_4d0b3b87, b_rotate, 0, 1);
if(b_give_reward)
{
self function_e2a25377(str_weapon_name);
}
}
/*
Name: function_e2a25377
Namespace: namespace_f8f28e08
Checksum: 0xEBD7B72F
Offset: 0x2070
Size: 0xFA
Parameters: 1
Flags: Linked
*/
function function_e2a25377(str_weapon_name)
{
var_498a708 = getweapon(str_weapon_name);
if(self hasweapon(zm_weapons::get_base_weapon(var_498a708), 1))
{
self takeweapon(zm_weapons::get_base_weapon(var_498a708), 1);
}
if(isdefined(var_498a708.ismeleeweapon) && var_498a708.ismeleeweapon)
{
self zm_melee_weapon::award_melee_weapon(str_weapon_name);
weapon_given = var_498a708;
}
else
{
weapon_given = self zm_weapons::weapon_give(var_498a708, 1);
}
return weapon_given;
}
/*
Name: function_53a333a8
Namespace: namespace_f8f28e08
Checksum: 0x1DB8C41D
Offset: 0x2178
Size: 0x324
Parameters: 3
Flags: Linked
*/
function function_53a333a8(var_ecffa2a8, var_41f9c5ff = undefined, var_893baaf = undefined)
{
if(isbot(self))
{
return;
}
if(self laststand::player_is_in_laststand())
{
return;
}
if(isdefined(var_41f9c5ff))
{
if(!(isdefined(self.var_4373c66b) && self.var_4373c66b))
{
var_41f9c5ff = self function_73fda38e(var_41f9c5ff);
self set_tribute(self.n_tribute + var_41f9c5ff);
self.var_6b3806e8 = self.var_6b3806e8 + (var_41f9c5ff / level.var_8b7ab859);
self playsoundtoplayer(#"hash_51923ec42cdda138", self);
}
}
else if(isdefined(var_ecffa2a8))
{
n_amount = self function_955b59b2(var_ecffa2a8, var_893baaf);
if(isdefined(self.var_4373c66b) && self.var_4373c66b)
{
n_amount = 0;
}
else
{
set_tribute(self.n_tribute + n_amount);
self.var_6b3806e8 = self.var_6b3806e8 + (n_amount / level.var_8b7ab859);
self playsoundtoplayer(#"hash_51923ec42cdda138", self);
}
}
var_1f5eb74c = self.var_9e09931e;
self function_ae2c0ba5();
if(var_1f5eb74c != self.var_9e09931e)
{
switch(self.var_9e09931e)
{
case 1:
{
self playsoundtoplayer(#"hash_15350c3643360459", self);
break;
}
case 2:
{
self playsoundtoplayer(#"hash_15350c3643360459", self);
break;
}
case 3:
{
self playsoundtoplayer(#"hash_15350c3643360459", self);
break;
}
case 4:
{
self playsoundtoplayer(#"hash_15350c3643360459", self);
break;
}
}
self notify(#"hash_24326081081c2468", {#hash_9e09931e:self.var_9e09931e});
self thread function_b858f95a();
}
}
/*
Name: function_73fda38e
Namespace: namespace_f8f28e08
Checksum: 0xAAFA2B8B
Offset: 0x24A8
Size: 0x110
Parameters: 1
Flags: Linked
*/
function function_73fda38e(n_amount)
{
if(!n_amount)
{
return 0;
}
switch(self.var_9e09931e)
{
case 0:
{
n_amount = n_amount * 1.5;
break;
}
case 1:
{
n_amount = n_amount * 0.7;
break;
}
case 2:
{
n_amount = n_amount * 0.5;
break;
}
case 3:
case 4:
{
n_amount = n_amount * 0.35;
break;
}
}
if(zm_trial_red_tribute::is_active())
{
n_amount = n_amount * 1.5;
}
if(n_amount == 0)
{
n_amount = 1;
}
return n_amount;
}
/*
Name: function_b858f95a
Namespace: namespace_f8f28e08
Checksum: 0x8CFDF3BE
Offset: 0x25C0
Size: 0xAC
Parameters: 0
Flags: Linked
*/
function function_b858f95a()
{
self endon(#"death");
if(isplayer(self) && isdefined(self.s_tribute_bowl))
{
s_bowl = self.s_tribute_bowl;
if(isdefined(s_bowl.var_9d32404) && isdefined(self.var_9e09931e))
{
s_bowl.var_9d32404 clientfield::set("" + #"hash_21f5fab6a3d22093", self.var_9e09931e);
}
}
}
/*
Name: function_955b59b2
Namespace: namespace_f8f28e08
Checksum: 0x1285F15B
Offset: 0x2678
Size: 0x30A
Parameters: 2
Flags: Linked
*/
function function_955b59b2(var_5436555f, var_893baaf)
{
n_amount = 0;
switch(var_5436555f)
{
case 0:
{
n_amount = level.var_8b7ab859 * 0.02;
break;
}
case 11:
{
n_amount = level.var_8b7ab859 * 0.01;
break;
}
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
case 7:
{
n_scale = function_9275b11b();
n_amount = level.var_8b7ab859 * n_scale;
break;
}
case 13:
{
n_amount = level.var_8b7ab859 * 0.015;
break;
}
case 10:
{
n_frac = var_893baaf / self.maxhealth;
n_amount = (level.var_8b7ab859 * 0.15) * n_frac;
break;
}
case 9:
{
n_amount = (level.var_8b7ab859 * 0.025) * var_893baaf;
break;
}
case 12:
{
n_amount = level.var_8b7ab859 * 0.05;
break;
}
case 14:
{
n_amount = level.var_8b7ab859 * 0.02;
break;
}
case 8:
{
n_amount = level.var_8b7ab859 * 0.05;
break;
}
case 15:
case 16:
case 17:
case 18:
case 19:
case 20:
{
n_amount = level.var_8b7ab859 * 0.014;
break;
}
default:
{
n_amount = 0;
break;
}
}
n_amount = self function_73fda38e(n_amount);
return n_amount;