-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathARMY.QC
1708 lines (1390 loc) · 45.8 KB
/
ARMY.QC
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
/*=======================================================//
// ARMY.QC - CustomTF 3.2.OfN - 30/1/2001 - //
// by Sergio Fumaña Grunwaldt - OfteN [cp] //
=========================================================//
Army job stuff - Revamped on 20/06/2004
=========================================================*/
#define WAYPOINT_TYPE_PRIMARY 0
#define WAYPOINT_TYPE_SECONDARY 1
#define WAYPOINT_TYPE_ENEMYLASTSEEN 2
#define ARMY_MAXFRAGS_PRESTIGE 40
// Gizmo - used for the grunty entity
#define allowed_weapons wait // weapons the grunt can use
#define GRUNTY_MODE_FOLLOWOWNER 1
#define GRUNTY_MODE_HOLDPOSITION 2
#define GRUNTY_MODE_USEWAYPOINTS 3
#define grunty_mode penance_time
#define GRUNTY_TACTICMODE_NORMAL 0
#define GRUNTY_TACTICMODE_SEEK 1
#define GRUNTY_TACTICMODE_STATIC 2
#define grunty_tacticMode is_malfunctioning
#define GRUNTY_ENGAGEENEMY_NO 0
#define GRUNTY_ENGAGEENEMY_YES 1
#define grunty_engageEnemy is_detpacking
#define GRUNTY_ONOBSTACLE_JUMP 0
#define GRUNTY_ONOBSTACLE_STOP 1
#define GRUNTY_ONOBSTACLE_AUTO 2
#define grunty_onObstacle is_toffingadet
#define GRUNTY_ATTACKRANGE_ANY 0
#define GRUNTY_ATTACKRANGE_SMALL 1
#define GRUNTY_ATTACKRANGE_MEDIUM 2
#define GRUNTY_ATTACKRANGE_LARGE 3
#define grunty_attackRange delay_time
/*================================================================================
ARMY RATING/PRESTIGE IS CLACULATED WITH:
----------------------------------------
AverageTeamScore When started beeing army player
EXPLANATION OF HOW THE ENTITY FIELDS ARE USED (thnx? np.. :P)
---------------------------------------------
Entity fields used for player:
------------------------------
.dont_do_triggerwork - Army rating, its a float: 0 = 0% 1 = 100%
.else_goal - Difference between player frags and average of his team when started beeing army guy
=================================================================================*/
float(entity obj, entity builder) CheckArea;
void(entity player) PrintArmyTime;
void(entity sld, entity player, string msg, float priority) PrintFromSoldier;
entity(entity player) GetArmyTimer;
string(entity thething) GetEnemyName;
float(float slot) TeleSoldier;
float(entity player) GetFreeReserve;
float(entity player) GetMyAverageTeamScore;
void(entity player) ArmyUpdateRating;
void(entity player, float avg_score) AdjustArmyRating;
// OfN moved files..
void( entity dest, entity g, float printLevel ) Grunty_PrintDetails;
void() grunty_stand;
void() grunty_run;
void() GruntyCheckFire;
void(entity attacker, float damage) grunty_pain;
void() grunty_touch;
void() grunty_pain1;
void() grunty_axepain1;
void(entity grunty) grunty_setstartframe;
/*
$frame stand1 stand2 stand3 stand4 stand5 stand6 stand7 stand8 stand9
$frame stand10 stand11 stand12 stand13
*/
void() JobArmy =
{
if (self.current_menu == #MENU_ARMY)
{
// Gizmo - this should just always switch to the tactical menu to make impulse scripts easier
// if (self.job & #JOB_EXTRA1 || self.job & #JOB_EXTRA2)
// Menu_Army_Input(7); // yeah hackish.. but does the job
// else
// {
// if (self.demon_one)
Menu_Army_Input(6); // same comment :P
// }
return;
}
self.current_menu = #MENU_ARMY;
self.menu_count = #MENU_REFRESH_RATE;
};
void(entity soul, float currentsoul) Menu_Army1;
void(entity soul, float currentsoul) Menu_Army2;
void(entity soul, float currentsoul) Menu_Army3;
void() Menu_Army =
{
local float currentsoul;
currentsoul = GetCurrentSoul(self);
local entity soul;
soul = GetSummon(self,currentsoul);
if (soul)
{
if (soul.is_haxxxoring == 1)
Menu_Army2(soul, currentsoul); // tactical menu
else if ( soul.is_haxxxoring == 2 )
Menu_Army3( soul, currentsoul ); // allowed weapons menu
else
Menu_Army1(soul, currentsoul); // normal soldier menu
}
else
Menu_Army1(soul, currentsoul); // army tele menu
};
void(entity soul, float currentsoul) Menu_Army1 =
{
local float readytime,temp;
local string st,st2,st3;
local string st4, st5;
local float extras;
st2 = st3 = "";
extras = GetJobExtras(self);
if (soul)
{
if (soul.martyr_enemy==world && soul.demon_two==world)
st3 = " .. Set ðòéíáòù waypoint \n .. Set óåãïîäáòù waypoint ";
else if (soul.martyr_enemy!=world && soul.demon_two==world && visible2(soul,soul.martyr_enemy))
st3 = " .. Set ðòéíáòù waypoint \n .. Set óåãïîäáòù waypoint ";
else if (soul.martyr_enemy!=world && soul.demon_two==world)
st3 = "‹ .. Set ðòéíáòù waypoint \n .. Set óåãïîäáòù waypoint ";
else if (soul.martyr_enemy==world && soul.demon_two!=world && visible2(soul,soul.demon_two))
st3 = " .. Set ðòéíáòù waypoint \n .. Set óåãïîäáòù waypoint ";
else if (soul.martyr_enemy==world && soul.demon_two!=world)
st3 = " .. Set ðòéíáòù waypoint \n‹ .. Set óåãïîäáòù waypoint ";
else if (soul.martyr_enemy!=world && soul.demon_two!=world && visible2(soul,soul.demon_two) && visible2(soul,soul.martyr_enemy))
st3 = " .. Set ðòéíáòù waypoint \n .. Set óåãïîäáòù waypoint ";
else if (soul.martyr_enemy!=world && soul.demon_two!=world && visible2(soul,soul.demon_two))
st3 = "‹ .. Set ðòéíáòù waypoint \n .. Set óåãïîäáòù waypoint ";
else if (soul.martyr_enemy!=world && soul.demon_two!=world && visible2(soul,soul.martyr_enemy))
st3 = " .. Set ðòéíáòù waypoint \n‹ .. Set óåãïîäáòù waypoint ";
else if (soul.martyr_enemy!=world && soul.demon_two!=world)
st3 = "‹ .. Set ðòéíáòù waypoint \n‹ .. Set óåãïîäáòù waypoint ";
if (!extras)
{
if (self.delay_time == -1)
st2=" Áãôéïî: ¼soldier waiting¾\n\n";
else if (self.delay_time != #FALSE)
st2=" Áãôéïî: ¼soldier ready¾ \n\n";
else
st2=" Áãôéïî: \n\n";
}
else
{
if (soul.increase_team1 == 0)
st2="Óïìäéåò £±:";
else if (soul.increase_team1 == 1)
st2="Óïìäéåò £²:";
else if (soul.increase_team1 == 2)
st2="Óïìäéåò £³:";
if (self.delay_time == -1)
st2 = strcat(st2," ¼soldier waiting¾\n\n");
else if (self.delay_time != #FALSE)
st2 = strcat(st2," ¼soldier ready¾ \n\n");
else
st2 = strcat(st2," \n\n");
}
st4="\n.. Follow me¡ \n.. Stay there¡ \n.. Use your waypoints¡ ";
if (soul.penance_time==1)
st4="\n* .. Follow me¡ \n.. Stay there¡ \n.. Use your waypoints¡ ";
else if (soul.penance_time==2)
st4="\n.. Follow me¡ \n* .. Stay there¡ \n.. Use your waypoints¡ ";
else if (soul.penance_time==3)
st4="\n.. Follow me¡ \n.. Stay there¡ \n* .. Use your waypoints¡ ";
#ifndef NO_GRUNTY_EMERGENCY_TELE
if (!extras)
st5 = "\n\n.. Ôáãôéãáì \n\n®® Detonate soldier brain\n\n.. Emergency teleport \n\n.. Îïôèéîç \n";
else
st5 = "\n\n.. Ôáãôéãáì .. Òåóåòöå\n\n®® Detonate soldier brain\n\n.. Emergency teleport \n\n.. Îïôèéîç \n";
#else
if (!extras)
st5 = "\n\n.. Ôáãôéãáì \n\n®® Detonate soldier brain\n\n.. Îïôèéîç \n";
else
st5 = "\n\n.. Ôáãôéãáì .. Òåóåòöå\n\n®® Detonate soldier brain\n\n.. Îïôèéîç \n";
#endif
CenterPrint7(self, soul.undercover_name, soul.netname,"\n\n", st2, st3,st4,st5);
return;
}
else // so.. soul == world
{
// First, get army rating string
st5 = ftos(rint(self.dont_do_triggerwork*100));
st5 = colstr(st5,#COLSTR_NUMBER);
st5 = strcat("žŸ Áòíù Òáôéîç: ",st5);
st5 = strcat(st5,"¥ žŸ\n");
self.#cprint_fx = self.#cprint_fx + 1;
// Update army rating at a moderate frequency as it calculates the average team score and it's heavy
if (self.#cprint_fx & 8)
ArmyUpdateRating(self);
if (!extras)
{
// Gizmo - does this fix the bug where it says in-use/ready for reserve when you don't have reserve?
// if ( self.delay_time > 0 )
if ( self.delay_time != -1 && self.delay_time != #FALSE )
self.delay_time = currentsoul + 1;
st3 = "Áãôéïî: \n\n";
st4 = ".. Îïôèéîç \n\n";
}
else
{
if (currentsoul == 0)
st3 = "Òåóåòöå £±: \n\n";
else if (currentsoul == 1)
st3 = "Òåóåòöå £²: \n\n";
else if (currentsoul == 2)
st3 = "Òåóåòöå £³: \n\n";
st4 = ".. Îïôèéîç .. Òåóåòöå\n\n";
}
if (self.delay_time - 1 == currentsoul) // We point to a ready soldier
{
//CenterPrint4(self, st3,".. Teleport soldier \n\n",st4,"\nReady for teleporting!");
if (self.#cprint_fx & 1)
CenterPrint5(self, st3,".. Teleport soldier¡ \n\n",st4,st5,"\nReady for teleporting!");
else
CenterPrint5(self, st3,".. Teleport soldier¡ \n\n",st4,st5,"\nÒåáäù æïò ôåìåðïòôéîç¡");
}
else
{
if (self.delay_time == #FALSE) // ArmyTimer running
{
local entity ArmyTimer;
ArmyTimer=GetArmyTimer(self);
if (!ArmyTimer)
{
CenterPrint(self,"ERROR: Unable to find ArmyTimer entity for player");
return;
}
if (ArmyTimer.job - 1 == currentsoul)
{
readytime=fabs(floor(ArmyTimer.nextthink - time));
if (readytime<60)
{
st=ftos(readytime);
st2=" seconds";
}
else
{
temp=floor(readytime/60);//+1;
if (temp>1)
st2=" minutes";
else
st2=" minute";
st=ftos(floor(readytime/60));//+1);
}
//CenterPrint6(self, st3,"\n\n",st4,"\n¨Preparing teleporting...©\n\nÔéíå ìåæô: ",st,st2);
if (self.#cprint_fx & 1)
CenterPrint7(self, st3,"\n\n",st4,st5,"\nÛPreparing teleporting...Ý\n\nÔéíå ìåæô: ",st,st2);
else
CenterPrint7(self, st3,"\n\n",st4,st5,"\n[Preparing teleporting...]\n\nÔéíå ìåæô: ",st,st2);
}
else // in use for another reserve
{
st = "\nTeleporter in use for reserve £";
st2 = ftos(ArmyTimer.job);
st = strcat(st,st2);
//CenterPrint4(self, st3,"\n\n",st4,st);
CenterPrint5(self, st3,"\n\n",st4,st5,st);
}
}
else // Something is ready
{
st = "\nSoldier ready in reserve £";
st2 = ftos(self.delay_time);
st = strcat(st,st2);
//CenterPrint4(self, st3,"\n\n",st4,st);
CenterPrint5(self, st3,"\n\n",st4,st5,st);
}
}
}
//ideas:
//((centered soldier status
// \n attacking)) ((xxxx)) - seeking xxxx - standing - on patrol|walking - following you - following u (forced)//1 prt (2 vars, one for displaying and keep preference and the other for ai)
//((1.. tactic mode: normal - agressive - static // 1 prt))
// 2.. ignore enemy: on - off
// normal - tries to return to waypoints when enemy not visible (like in the aussie version)
// agressive - he tries to reach enemy when not visible (like before when no tactic stuff)
// patrol - forces grunty to use waypoints - and reports when he cant
// static - soldier dont move when attacking if no waypoints, if there r he moves on the line between them
// passive - makes soldier to ignore enemy completely
//NO! AI improvement - 0 none 1 desires to be close to enemy 2 desires to be farther
//((3.. obstacle: sort - stop // 1 prt
//4.. talk mode: on - off))
//((5.. reports: all - most - some - off // 1 prt
//st=
//6.. show soldier's inventory
//
// health:)) ((500)) ((hp // 1 prt
// 0.. NOTHING)) // 1 prt
//FULL
// (when in patrol or others) hmmm... forgot my xxxx waypoint, sorry!
// when forced "follow me", random time until "lemme kill them!" and restore status
// when forced "follow me" super_time controls time between the "i can see the enemy from here"
// inv in new menu, so spacing nicer
// "use ur waypoints!" in first menu
// follow me, stay there and use ur waypoints defined in a variable to restore last intention when enemy becomes not visible
//self.demon_one = AssignEasyWaypoint
// scan for other targets when aggressive and enemy not visible
// when aggressive augmnet probability of direct walk to last seen mark
// * primary
//in waypoint donothing, if soldier already have assinged the corresponding waypoint to another entity dremove(self);
};
void(entity soul, float currentsoul) Menu_Army2 =
{
local string st,st2,st3,st4,st5,st6,st7, tmp;
local float extras;
extras = GetJobExtras(self);
st = st2 = st3 = st4 = st6 = "";
if (soul==world) // our sold was killed (this never gets executed?)
{
ResetMenu();
return;
}
if (soul.enemy!=world && visible2(soul,soul.enemy))
{
st2="\n\nAttacking ";
st3=GetEnemyName(soul.enemy);
}
else if (soul.enemy!=world)
{
st2="\n\nSeeking ";
st3=GetEnemyName(soul.enemy);
}
else if (soul.goalentity==self)
st2="\n\nFollowing You";
else if (soul.goalentity==world)
st2="\n\nStanding";
else if (soul.goalentity!=world)
st2="\n\nOn Patrol";
if (!extras)
st2 = strcat("žŸ Óïìäéåò Óôáôõó žŸ",st2);
else
{
if (currentsoul == 0)
st2 = strcat("žŸ Óïìäéåò £± Óôáôõó žŸ",st2);
else if (currentsoul == 1)
st2 = strcat("žŸ Óïìäéåò £² Óôáôõó žŸ",st2);
else if (currentsoul == 2)
st2 = strcat("žŸ Óïìäéåò £³ Óôáôõó žŸ",st2);
}
st5 = ""; // this will be preferred range
// tactic mode option
if (soul.is_malfunctioning==0)
st4 = "\n\n.. Ôáãôéã Íïäå: normal\n";
else if (soul.is_malfunctioning==1)
st4 = "\n\n.. Ôáãôéã Íïäå: seek \n";
else if (soul.is_malfunctioning==2)
st4 = "\n\n.. Ôáãôéã Íïäå: static\n";
// engage enemy option
if ( soul.is_detpacking )
st4 = strcat( st4, ".. Åîçáçå Åîåíù: yes \n" );
else
st4 = strcat( st4, ".. Åîçáçå Åîåíù: no \n" );
// on obstacle option
if ( !soul.is_toffingadet )
st4 = strcat( st4, ".. Ïî Ïâóôáãìå: jump \n" );
else if ( soul.is_toffingadet == 1 )
st4 = strcat( st4, ".. Ïî Ïâóôáãìå: stop \n" );
else
st4 = strcat( st4, ".. Ïî Ïâóôáãìå: auto \n" );
// attack range option, don't allow on static since he only moves to goto waypoints or to follow his owner on that mode
if ( soul.is_malfunctioning != 2 ) {
if (soul.delay_time == 0)
st5 = ".. Áôôáãë Òáîçå: any \n";
else if (soul.delay_time == 1)
st5 = ".. Áôôáãë Òáîçå: small \n";
else if (soul.delay_time == 2)
st5 = ".. Áôôáãë Òáîçå: medium\n";
else if (soul.delay_time == 3)
st5 = ".. Áôôáãë Òáîçå: large \n";
}
if (!extras)
{
if (soul.all_active==0)
st6=".. Òåðïòôó: all \n\n.. Back to standard menu \n\nš.. Allowed Weapons \n\n.. Inventory \n\n.. Îïôèéîç \n\nÍáø ÈÐ: ";
else if (soul.all_active==1)
st6=".. Òåðïòôó: most \n\n.. Back to standard menu \n\nš.. Allowed Weapons \n\n.. Inventory \n\n.. Îïôèéîç \n\nÍáø ÈÐ: ";
else if (soul.all_active==2)
st6=".. Òåðïòôó: some \n\n.. Back to standard menu \n\nš.. Allowed Weapons \n\n.. Inventory \n\n.. Îïôèéîç \n\nÍáø ÈÐ: ";
else if (soul.all_active==3)
st6=".. Òåðïòôó: none \n\n.. Back to standard menu \n\nš.. Allowed Weapons \n\n.. Inventory \n\n.. Îïôèéîç \n\nÍáø ÈÐ: ";
}
else
{
if (soul.all_active==0)
st6=".. Òåðïòôó: all \n\n.. Back to standard menu \n\nš.. Allowed Weapons \n\n.. Òåóåòöå .. Inventory\n\n.. Îïôèéîç \n\nÍáø ÈÐ: ";
else if (soul.all_active==1)
st6=".. Òåðïòôó: most \n\n.. Back to standard menu \n\nš.. Allowed Weapons \n\n.. Òåóåòöå .. Inventory\n\n.. Îïôèéîç \n\nÍáø ÈÐ: ";
else if (soul.all_active==2)
st6=".. Òåðïòôó: some \n\n.. Back to standard menu \n\nš.. Allowed Weapons \n\n.. Òåóåòöå .. Inventory\n\n.. Îïôèéîç \n\nÍáø ÈÐ: ";
else if (soul.all_active==3)
st6=".. Òåðïòôó: none \n\n.. Back to standard menu \n\nš.. Allowed Weapons \n\n.. Òåóåòöå .. Inventory\n\n.. Îïôèéîç \n\nÍáø ÈÐ: ";
}
st7=ftos(floor(soul.max_health));
st7 = strcat(st7," Ëéììó: ");
tmp = ftos(soul.frags);
st7 = strcat(st7,tmp);
CenterPrint7(self,st,st2,st3,st4,st5,st6,st7);
};
void( entity soul, float currentsoul ) Menu_Army3 = {
local string st1, st2, st3, st4, st5;
if ( soul == world ) {
ResetMenu ();
return;
}
if ( soul.#allowed_weapons & #WEAP_AXE )
st1 = "#CHAR_BOUGHT “.. Axe \n";
else
st1 = " “.. Axe \n";
if ( soul.#allowed_weapons & #WEAP_SHOTGUN )
st2 = "#CHAR_BOUGHT ”.. Shotgun \n";
else
st2 = " ”.. Shotgun \n";
if ( soul.#allowed_weapons & #WEAP_SUPER_SHOTGUN )
st3 = "#CHAR_BOUGHT •.. Super Shotgun \n";
else
st3 = " •.. Super Shotgun \n";
if ( soul.#allowed_weapons & #WEAP_NAILGUN )
st4 = "#CHAR_BOUGHT –.. Nailgun \n";
else
st4 = " –.. Nailgun \n";
if ( soul.#allowed_weapons & #WEAP_ROCKET_LAUNCHER )
st5 = "#CHAR_BOUGHT —.. Rocket Launcher \n\n";
else
st5 = " —.. Rocket Launcher \n\n";
CenterPrint7( self, "žŸ Áììï÷åä ×åáðïîó žŸ\n\n", st1, st2, st3, st4, st5, " ’.. Back to tactical menu" );
};
void(float inp, entity soul, float currentsoul) Menu_Army_Input1;
void(float inp, entity soul, float currentsoul) Menu_Army_Input2;
void(float inp, entity soul, float currentsoul) Menu_Army_Input3;
void(float inp) Menu_Army_Input =
{
local float currentsoul;
currentsoul = GetCurrentSoul(self);
local entity soul;
soul = GetSummon(self,currentsoul);
if (soul)
{
if (soul.is_haxxxoring == 1)
Menu_Army_Input2(inp, soul, currentsoul);
else if ( soul.is_haxxxoring == 2 )
Menu_Army_Input3( inp, soul, currentsoul );
else
Menu_Army_Input1(inp, soul, currentsoul);
}
else
Menu_Army_Input1(inp, soul, currentsoul);
};
void( float inp, entity soul, float currentsoul ) Menu_Army_Input3 = {
if ( soul == world ) {
ResetMenu ();
self.impulse = 0;
return;
}
if ( inp == 1 ) {
self.impulse = 0;
if ( soul.#allowed_weapons & #WEAP_AXE )
soul.#allowed_weapons = soul.#allowed_weapons - #WEAP_AXE;
else
soul.#allowed_weapons = soul.#allowed_weapons + #WEAP_AXE;
Menu_Army3( soul, currentsoul );
CuTFMenuSound( #MENUSOUND_BROWSE );
return;
}
if ( inp == 2 ) {
self.impulse = 0;
if ( soul.#allowed_weapons & #WEAP_SHOTGUN )
soul.#allowed_weapons = soul.#allowed_weapons - #WEAP_SHOTGUN;
else
soul.#allowed_weapons = soul.#allowed_weapons + #WEAP_SHOTGUN;
Menu_Army3( soul, currentsoul );
CuTFMenuSound( #MENUSOUND_BROWSE );
return;
}
if ( inp == 3 ) {
self.impulse = 0;
if ( soul.#allowed_weapons & #WEAP_SUPER_SHOTGUN )
soul.#allowed_weapons = soul.#allowed_weapons - #WEAP_SUPER_SHOTGUN;
else
soul.#allowed_weapons = soul.#allowed_weapons + #WEAP_SUPER_SHOTGUN;
Menu_Army3( soul, currentsoul );
CuTFMenuSound( #MENUSOUND_BROWSE );
return;
}
if ( inp == 4 ) {
self.impulse = 0;
if ( soul.#allowed_weapons & #WEAP_NAILGUN )
soul.#allowed_weapons = soul.#allowed_weapons - #WEAP_NAILGUN;
else
soul.#allowed_weapons = soul.#allowed_weapons + #WEAP_NAILGUN;
Menu_Army3( soul, currentsoul );
CuTFMenuSound( #MENUSOUND_BROWSE );
return;
}
if ( inp == 5 ) {
self.impulse = 0;
if ( soul.#allowed_weapons & #WEAP_ROCKET_LAUNCHER )
soul.#allowed_weapons = soul.#allowed_weapons - #WEAP_ROCKET_LAUNCHER;
else
soul.#allowed_weapons = soul.#allowed_weapons + #WEAP_ROCKET_LAUNCHER;
Menu_Army3( soul, currentsoul );
CuTFMenuSound( #MENUSOUND_BROWSE );
return;
}
if ( inp == 10 ) {
self.impulse = 0;
soul.is_haxxxoring = 1;
Menu_Army2( soul, currentsoul );
CuTFMenuSound( #MENUSOUND_BROWSE );
return;
}
};
void(float inp, entity soul, float currentsoul) Menu_Army_Input2 =
{
if (inp == 10 || soul==world) // NOTHING
{
ResetMenu();
self.impulse = 0;
return;
}
if (inp == 1)
{
self.impulse = 0;
soul.is_malfunctioning=soul.is_malfunctioning+1;
if (soul.is_malfunctioning > 2)
soul.is_malfunctioning = 0;
if ( soul.enemy != world ) {
// Gizmo - check for static tactic mode
if ( soul.is_malfunctioning == 2 ) {
if ( soul.goalentity == soul.enemy ) {
if ( soul.penance_time == 1 )
soul.goalentity = soul.real_owner;
else if ( soul.penance_time == 3 )
soul.goalentity = ReturnEasyWaypoint( soul, soul );
else
soul.goalentity = world;
}
} else {
soul.goalentity = soul.enemy;
}
}
Menu_Army2(soul, currentsoul);
CuTFMenuSound(#MENUSOUND_BROWSE);
return;
}
if (inp == 2) // engage enemy??
{
self.impulse = 0;
if (soul.is_detpacking == 0)
{
soul.is_detpacking=1;
PrintFromSoldier(soul,self,"i'm gonna kill them all!\n",#PRINT_HIGH);
}
else
{
soul.is_detpacking=0;
soul.has_teleporter = 0;
soul.effects = soul.effects - (soul.effects & #EF_DIMLIGHT);
if (soul.enemy!=world)//soul.goalentity)
{
soul.enemy=world;
soul.goalentity = ReturnEasyWaypoint(soul,soul);
}
PrintFromSoldier(soul,self,"Ignoring enemy!\n",#PRINT_HIGH);
}
Menu_Army2(soul, currentsoul);
CuTFMenuSound(#MENUSOUND_BROWSE);
}
if (inp == 3) // jump or stop??
{
self.impulse = 0;
soul.is_toffingadet = soul.is_toffingadet + 1;
if ( soul.is_toffingadet > 2 )
soul.is_toffingadet = 0;
Menu_Army2(soul, currentsoul);
CuTFMenuSound(#MENUSOUND_BROWSE);
}
if (inp == 4)
{
if (soul.is_malfunctioning != 2) // preferred range, none small medium or large
{
soul.delay_time=soul.delay_time+1;
if (soul.delay_time > 3)
soul.delay_time=0;
Menu_Army2(soul, currentsoul);
CuTFMenuSound(#MENUSOUND_BROWSE);
}
self.impulse = 0;
return;
}
if (inp == 5)
{
self.impulse = 0;
soul.all_active=soul.all_active+1;
if (soul.all_active > 3)
soul.all_active=0;
Menu_Army2(soul, currentsoul);
CuTFMenuSound(#MENUSOUND_BROWSE);
return;
}
if (inp == 6)
{
self.impulse = 0;
soul.is_haxxxoring = 0;
Menu_Army1(soul, currentsoul);
CuTFMenuSound(#MENUSOUND_BROWSE);
return;
}
if (inp == 7)
{
local float extras;
extras = GetJobExtras(self);
if (!extras)
return;
currentsoul = currentsoul +1;
if (currentsoul > extras)
currentsoul = 0;
SetCurrentSoul(self,currentsoul);
CuTFMenuSound(#MENUSOUND_BROWSE);
Menu_Army();
self.impulse = 0;
return;
}
// Gizmo - allowed weapons
if ( inp == 8 ) {
self.impulse = 0;
soul.is_haxxxoring = 2;
Menu_Army3( soul, currentsoul );
CuTFMenuSound( #MENUSOUND_BROWSE );
return;
}
if (inp == 9) // Army info
{
ResetMenu();
Grunty_PrintDetails( self, soul, 1 );
self.impulse = 0;
return;
}
};
void(float inp, entity soul, float currentsoul) Menu_Army_Input1 =
{
local float extras;
extras = GetJobExtras(self);
if (inp == 10) // NOTHING
{
ResetMenu();
self.impulse = 0;
//if (self.delay_time == #FALSE && !(self.job & #JOB_DEMON_OUT))
if (self.delay_time == #FALSE && soul == world)//!HasMonster(self)) // <-- TOCHANGE
{
sprint(self,#PRINT_HIGH,"Army HQ Still ");
PrintArmyTime(self);
sprint(self,#PRINT_HIGH," time left until next teleporting\n");
self.job_finished=time+0.5;
}
return;
}
else if (inp == 1 && soul == world) // Teleport it!
{
//if (self.delay_time == #TRUE && !(self.job & #JOB_DEMON_OUT))
if (self.delay_time - 1 == currentsoul)//!HasMonster(self)) // <-- TOCHANGE
{
ResetMenu();
if (TeleSoldier(currentsoul))
{
self.delay_time=#FALSE; // needed for setarmytimer
SetArmyTimer(self,#FALSE); // prepare reserve soldier
}
self.impulse = 0;
}
return;
}
else if (inp == 7 && extras !=0) // Next reserve
{
currentsoul = currentsoul +1;
if (currentsoul > extras)
currentsoul = 0;
SetCurrentSoul(self,currentsoul);
Menu_Army();
CuTFMenuSound(#MENUSOUND_BROWSE);
self.impulse = 0;
return;
}
else if (inp == 8) // Kill it!
{
if (soul!=world)
{
/*
if (soul.health < #MINHP_TOKILL_MONSTERS)
{
ResetMenu();
sprint(self,#PRINT_HIGH,"The explosive implanted in your soldier brain is damaged...\n");
PrintFromSoldier(soul,self,"Argh! what's that noise?\n",#PRINT_CHAT);
// Do pain frames and sound
local entity oself;
oself = self;
self = soul;
if (isMelee())
grunty_axepain1();
else
grunty_pain1();
self = oself;
//ok, done
self.impulse = 0;
}
else
{
*/
ResetMenu();
sprint(self,#PRINT_HIGH,"You detonate the micro-explosive implanted in his brain!\n");
KillSoul(self,soul.increase_team1);
teamprefixsprint(self.team_no, self);
teamsprint6(self,self.netname, " detonates his soldier ",soul.netname,"\n","","");
self.impulse = 0;
}
return;
}
if (soul == world)
return;
if (inp == 1) // primary waypoint
{
if (soul.martyr_enemy != world)
RemoveWaypoint(soul.martyr_enemy,soul);
if (soul.demon_two != world)
RemoveWaypoint(soul.demon_two,soul);
soul.martyr_enemy = CreateWaypoint(self.origin, #WAYPOINT_LIFE, #WAYPOINT_TYPE_PRIMARY, soul);
soul.martyr_enemy.goalentity = world;
soul.penance_time=3;
if (visible2(soul,soul.martyr_enemy)) soul.goalentity = soul.martyr_enemy;
ResetMenu(); // reset menu?
//CuTFMenuSound(#MENUSOUND_BUY);
self.impulse = 0;
PrintFromSoldier(soul,self,"yes sir!\n",#PRINT_HIGH);
return;
}
else if (inp == 2) // secondary waypoint
{
if (soul.demon_two != world)
RemoveWaypoint(soul.demon_two,soul);
if (soul.martyr_enemy==world)
{
self.impulse=0;
PrintFromSoldier(soul,self,"you must set my primary waypoint first!\n",#PRINT_CHAT);
ResetMenu(); // reset menu?
return;
}
soul.demon_two = CreateWaypoint(self.origin, #WAYPOINT_LIFE, #WAYPOINT_TYPE_SECONDARY, soul);
soul.demon_two.goalentity = soul.martyr_enemy;
soul.job = 2;
soul.penance_time=3;
soul.goalentity = ReturnEasyWaypoint(soul,soul);
if (soul.martyr_enemy!=world) soul.martyr_enemy.goalentity = soul.demon_two;
ResetMenu(); // reset menu?
//CuTFMenuSound(#MENUSOUND_BUY);
self.impulse = 0;
PrintFromSoldier(soul,self,"Ok\n",#PRINT_HIGH);
return;
}
else if (inp == 3) // FOLLOW ME, GRUNTY!
{
if (soul.enemy!=world)
{
// Gizmo - we may be seeking out the enemy
if ( visible2( soul,soul.enemy ) || soul.#grunty_tacticMode == #GRUNTY_TACTICMODE_SEEK )
{
soul.penance_time = 1;
if ( soul.is_malfunctioning != 2 )
PrintFromSoldier( soul, self, "i'm fighting the enemy!\n", #PRINT_CHAT );
else {
if ( soul.goalentity != self ) {
soul.goalentity = self;
PrintFromSoldier( soul, self, "Ok!\n", #PRINT_HIGH );
} else
PrintFromSoldier( soul, self, "Already following you!\n", #PRINT_CHAT );
}
ResetMenu();
self.impulse=0;
return;
}
}
soul.has_teleporter = 0;
soul.effects = soul.effects - (soul.effects & #EF_DIMLIGHT);
soul.penance_time = 1;
if (soul.goalentity != self)
{
soul.goalentity = self;
PrintFromSoldier(soul,self,"Ok!\n",#PRINT_HIGH);
}
else
PrintFromSoldier(soul,self,"Already following you!\n",#PRINT_CHAT);
ResetMenu();
//CuTFMenuSound(#MENUSOUND_BUY);
self.impulse = 0;
return;
}
else if (inp == 4) // Stay there!
{
if (soul.enemy!=world)
{
if (visible2(soul,soul.enemy))
{
soul.penance_time = 2;
if ( soul.is_malfunctioning != 2 )
PrintFromSoldier( soul, self, "i'm fighting the enemy!\n", #PRINT_CHAT );
else {
soul.goalentity = world;
PrintFromSoldier( soul, self, "Holding position...\n", #PRINT_HIGH );
}
ResetMenu();
self.impulse=0;
return;
}
soul.has_teleporter = 0;
soul.effects = soul.effects - (soul.effects & #EF_DIMLIGHT);
}
soul.goalentity = world;
PrintFromSoldier(soul,self,"Holding position...\n",#PRINT_HIGH);
soul.penance_time = 2;
ResetMenu();
//CuTFMenuSound(#MENUSOUND_BUY);
self.impulse = 0;
return;
}
else if (inp == 5) // Use your waypoints!
{
if (soul.enemy!=world)
{
if (visible2(soul,soul.enemy))
{
soul.penance_time = 3;
if ( soul.is_malfunctioning != 2 )
PrintFromSoldier( soul, self, "i'm fighting the enemy!\n", #PRINT_CHAT );
else {
soul.goalentity = ReturnEasyWaypoint( soul, soul );
if ( soul.goalentity != world )
PrintFromSoldier( soul, self, "Moving on!\n", #PRINT_HIGH );
}