This repository has been archived by the owner on Feb 4, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 64
/
Config.cpp
1756 lines (1537 loc) · 55.1 KB
/
Config.cpp
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
#include <fstream>
#include <Windows.h>
#include <shellapi.h>
#include <ShlObj.h>
#include "nlohmann/json.hpp"
#include "imgui/imgui.h"
#include "imgui/imgui_internal.h"
#include "Config.h"
#include "Helpers.h"
#include "Hacks/AntiAim.h"
#include "Hacks/Backtrack.h"
#include "Hacks/Glow.h"
#include "Hacks/Sound.h"
#include "SDK/Platform.h"
int CALLBACK fontCallback(const LOGFONTW* lpelfe, const TEXTMETRICW*, DWORD, LPARAM lParam)
{
const wchar_t* const fontName = reinterpret_cast<const ENUMLOGFONTEXW*>(lpelfe)->elfFullName;
if (fontName[0] == L'@')
return TRUE;
if (HFONT font = CreateFontW(0, 0, 0, 0,
FW_NORMAL, FALSE, FALSE, FALSE,
ANSI_CHARSET, OUT_DEFAULT_PRECIS,
CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY,
DEFAULT_PITCH, fontName)) {
DWORD fontData = GDI_ERROR;
if (HDC hdc = CreateCompatibleDC(nullptr)) {
SelectObject(hdc, font);
// Do not use TTC fonts as we only support TTF fonts
fontData = GetFontData(hdc, 'fctt', 0, NULL, 0);
DeleteDC(hdc);
}
DeleteObject(font);
if (fontData == GDI_ERROR) {
if (char buff[1024]; WideCharToMultiByte(CP_UTF8, 0, fontName, -1, buff, sizeof(buff), nullptr, nullptr))
reinterpret_cast<std::vector<std::string>*>(lParam)->emplace_back(buff);
}
}
return TRUE;
}
Config::Config() noexcept
{
if (PWSTR pathToDocuments; SUCCEEDED(SHGetKnownFolderPath(FOLDERID_Documents, 0, nullptr, &pathToDocuments))) {
path = pathToDocuments;
CoTaskMemFree(pathToDocuments);
}
path /= "Osiris";
listConfigs();
misc.clanTag[0] = '\0';
misc.name[0] = '\0';
visuals.playerModel[0] = '\0';
load(u8"default.json", false);
LOGFONTW logfont;
logfont.lfCharSet = ANSI_CHARSET;
logfont.lfPitchAndFamily = DEFAULT_PITCH;
logfont.lfFaceName[0] = L'\0';
EnumFontFamiliesExW(GetDC(nullptr), &logfont, fontCallback, (LPARAM)&systemFonts, 0);
std::sort(std::next(systemFonts.begin()), systemFonts.end());
}
#pragma region Read
static void from_json(const json& j, ColorToggle& ct)
{
from_json(j, static_cast<Color4&>(ct));
read(j, "Enabled", ct.enabled);
}
static void from_json(const json& j, Color3& c)
{
read(j, "Color", c.color);
read(j, "Rainbow", c.rainbow);
read(j, "Rainbow Speed", c.rainbowSpeed);
}
static void from_json(const json& j, ColorToggle3& ct)
{
from_json(j, static_cast<Color3&>(ct));
read(j, "Enabled", ct.enabled);
}
static void from_json(const json& j, ColorToggleRounding& ctr)
{
from_json(j, static_cast<ColorToggle&>(ctr));
read(j, "Rounding", ctr.rounding);
}
static void from_json(const json& j, ColorToggleOutline& cto)
{
from_json(j, static_cast<ColorToggle&>(cto));
read(j, "Outline", cto.outline);
}
static void from_json(const json& j, ColorToggleThickness& ctt)
{
from_json(j, static_cast<ColorToggle&>(ctt));
read(j, "Thickness", ctt.thickness);
}
static void from_json(const json& j, ColorToggleThicknessRounding& cttr)
{
from_json(j, static_cast<ColorToggleRounding&>(cttr));
read(j, "Thickness", cttr.thickness);
}
static void from_json(const json& j, Font& f)
{
read<value_t::string>(j, "Name", f.name);
if (!f.name.empty())
config->scheduleFontLoad(f.name);
if (const auto it = std::find_if(config->getSystemFonts().begin(), config->getSystemFonts().end(), [&f](const auto& e) { return e == f.name; }); it != config->getSystemFonts().end())
f.index = std::distance(config->getSystemFonts().begin(), it);
else
f.index = 0;
}
static void from_json(const json& j, Snapline& s)
{
from_json(j, static_cast<ColorToggleThickness&>(s));
read(j, "Type", s.type);
}
static void from_json(const json& j, Box& b)
{
from_json(j, static_cast<ColorToggleRounding&>(b));
read(j, "Type", b.type);
read(j, "Scale", b.scale);
read<value_t::object>(j, "Fill", b.fill);
}
static void from_json(const json& j, Shared& s)
{
read(j, "Enabled", s.enabled);
read<value_t::object>(j, "Font", s.font);
read<value_t::object>(j, "Snapline", s.snapline);
read<value_t::object>(j, "Box", s.box);
read<value_t::object>(j, "Name", s.name);
read(j, "Text Cull Distance", s.textCullDistance);
}
static void from_json(const json& j, Weapon& w)
{
from_json(j, static_cast<Shared&>(w));
read<value_t::object>(j, "Ammo", w.ammo);
}
static void from_json(const json& j, Trail& t)
{
from_json(j, static_cast<ColorToggleThickness&>(t));
read(j, "Type", t.type);
read(j, "Time", t.time);
}
static void from_json(const json& j, Trails& t)
{
read(j, "Enabled", t.enabled);
read<value_t::object>(j, "Local Player", t.localPlayer);
read<value_t::object>(j, "Allies", t.allies);
read<value_t::object>(j, "Enemies", t.enemies);
}
static void from_json(const json& j, Projectile& p)
{
from_json(j, static_cast<Shared&>(p));
read<value_t::object>(j, "Trails", p.trails);
}
static void from_json(const json& j, HealthBar& o)
{
from_json(j, static_cast<ColorToggle&>(o));
read(j, "Type", o.type);
}
static void from_json(const json& j, Player& p)
{
from_json(j, static_cast<Shared&>(p));
read<value_t::object>(j, "Weapon", p.weapon);
read<value_t::object>(j, "Flash Duration", p.flashDuration);
read(j, "Audible Only", p.audibleOnly);
read(j, "Spotted Only", p.spottedOnly);
read<value_t::object>(j, "Health Bar", p.healthBar);
read<value_t::object>(j, "Skeleton", p.skeleton);
read<value_t::object>(j, "Head Box", p.headBox);
read<value_t::object>(j, "Line of sight", p.lineOfSight);
}
static void from_json(const json& j, OffscreenEnemies& o)
{
from_json(j, static_cast<ColorToggle&>(o));
read<value_t::object>(j, "Health Bar", o.healthBar);
}
static void from_json(const json& j, BulletTracers& o)
{
from_json(j, static_cast<ColorToggle&>(o));
}
static void from_json(const json& j, ImVec2& v)
{
read(j, "X", v.x);
read(j, "Y", v.y);
}
static void from_json(const json& j, Config::Legitbot& a)
{
read(j, "Enabled", a.enabled);
read(j, "Aimlock", a.aimlock);
read(j, "Silent", a.silent);
read(j, "Friendly fire", a.friendlyFire);
read(j, "Visible only", a.visibleOnly);
read(j, "Scoped only", a.scopedOnly);
read(j, "Ignore flash", a.ignoreFlash);
read(j, "Ignore smoke", a.ignoreSmoke);
read(j, "Auto scope", a.autoScope);
read(j, "Fov", a.fov);
read(j, "Smooth", a.smooth);
read(j, "Reaction time", a.reactionTime);
read(j, "Hitboxes", a.hitboxes);
read(j, "Min damage", a.minDamage);
read(j, "Killshot", a.killshot);
read(j, "Between shots", a.betweenShots);
}
static void from_json(const json& j, Config::RecoilControlSystem& r)
{
read(j, "Enabled", r.enabled);
read(j, "Silent", r.silent);
read(j, "Ignore Shots", r.shotsFired);
read(j, "Horizontal", r.horizontal);
read(j, "Vertical", r.vertical);
}
static void from_json(const json& j, Config::Ragebot& r)
{
read(j, "Enabled", r.enabled);
read(j, "Aimlock", r.aimlock);
read(j, "Silent", r.silent);
read(j, "Friendly fire", r.friendlyFire);
read(j, "Visible only", r.visibleOnly);
read(j, "Scoped only", r.scopedOnly);
read(j, "Ignore flash", r.ignoreFlash);
read(j, "Ignore smoke", r.ignoreSmoke);
read(j, "Auto shot", r.autoShot);
read(j, "Auto scope", r.autoScope);
read(j, "Auto stop", r.autoStop);
read(j, "Between shots", r.betweenShots);
read(j, "Disable multipoint if low fps", r.disableMultipointIfLowFPS);
read(j, "Disable backtrack if low fps", r.disableBacktrackIfLowFPS);
read(j, "Priority", r.priority);
read(j, "Fov", r.fov);
read(j, "Hitboxes", r.hitboxes);
read(j, "Hitchance", r.hitChance);
read(j, "Multipoint", r.multiPoint);
read(j, "Min damage", r.minDamage);
read(j, "Min damage override", r.minDamageOverride);
}
static void from_json(const json& j, Config::Triggerbot& t)
{
read(j, "Enabled", t.enabled);
read(j, "Magnet", t.magnet);
read(j, "Friendly fire", t.friendlyFire);
read(j, "Scoped only", t.scopedOnly);
read(j, "Ignore flash", t.ignoreFlash);
read(j, "Ignore smoke", t.ignoreSmoke);
read(j, "Hitboxes", t.hitboxes);
read(j, "Hitchance", t.hitChance);
read(j, "Shot delay", t.shotDelay);
read(j, "Min damage", t.minDamage);
read(j, "Killshot", t.killshot);
}
static void from_json(const json& j, Config::LegitAntiAimConfig& a)
{
read(j, "Enabled", a.enabled);
read(j, "Extend", a.extend);
read(j, "Invert key", a.invert);
}
static void from_json(const json& j, Config::RageAntiAimConfig& a)
{
read(j, "Enabled", a.enabled);
read(j, "Pitch", a.pitch);
read(j, "Yaw base", reinterpret_cast<int&>(a.yawBase));
read(j, "Manual forward Key", a.manualForward);
read(j, "Manual backward Key", a.manualBackward);
read(j, "Manual right Key", a.manualRight);
read(j, "Manual left Key", a.manualLeft);
read(j, "Yaw modifier", a.yawModifier);
read(j, "Yaw add", a.yawAdd);
read(j, "Jitter Range", a.jitterRange);
read(j, "Spin base", a.spinBase);
read(j, "At targets", a.atTargets);
}
static void from_json(const json& j, Config::FakeAngle& a)
{
read(j, "Enabled", a.enabled);
read(j, "Invert", a.invert);
read(j, "Left limit", a.leftLimit);
read(j, "Right limit", a.rightLimit);
read(j, "Peek mode", a.peekMode);
read(j, "Lby mode", a.lbyMode);
}
static void from_json(const json& j, Config::Fakelag& f)
{
read(j, "Enabled", f.enabled);
read(j, "Mode", f.mode);
read(j, "Limit", f.limit);
}
static void from_json(const json& j, Config::Tickbase& t)
{
read(j, "Doubletap", t.doubletap);
read(j, "Hideshots", t.hideshots);
read(j, "Teleport", t.teleport);
}
static void from_json(const json& j, Config::Backtrack& b)
{
read(j, "Enabled", b.enabled);
read(j, "Ignore smoke", b.ignoreSmoke);
read(j, "Ignore flash", b.ignoreFlash);
read(j, "Time limit", b.timeLimit);
read(j, "Fake Latency", b.fakeLatency);
read(j, "Fake Latency Amount", b.fakeLatencyAmount);
}
static void from_json(const json& j, Config::Chams::Material& m)
{
from_json(j, static_cast<Color4&>(m));
read(j, "Enabled", m.enabled);
read(j, "Health based", m.healthBased);
read(j, "Blinking", m.blinking);
read(j, "Wireframe", m.wireframe);
read(j, "Cover", m.cover);
read(j, "Ignore-Z", m.ignorez);
read(j, "Material", m.material);
}
static void from_json(const json& j, Config::Chams& c)
{
read_array_opt(j, "Materials", c.materials);
}
static void from_json(const json& j, Config::GlowItem& g)
{
from_json(j, static_cast<Color4&>(g));
read(j, "Enabled", g.enabled);
read(j, "Health based", g.healthBased);
read(j, "Style", g.style);
}
static void from_json(const json& j, Config::PlayerGlow& g)
{
read<value_t::object>(j, "All", g.all);
read<value_t::object>(j, "Visible", g.visible);
read<value_t::object>(j, "Occluded", g.occluded);
}
static void from_json(const json& j, Config::StreamProofESP& e)
{
read(j, "Key", e.key);
read(j, "Allies", e.allies);
read(j, "Enemies", e.enemies);
read(j, "Weapons", e.weapons);
read(j, "Projectiles", e.projectiles);
read(j, "Loot Crates", e.lootCrates);
read(j, "Other Entities", e.otherEntities);
}
static void from_json(const json& j, Config::Visuals::FootstepESP& ft)
{
read<value_t::object>(j, "Enabled", ft.footstepBeams);
read(j, "Thickness", ft.footstepBeamThickness);
read(j, "Radius", ft.footstepBeamRadius);
}
static void from_json(const json& j, Config::Visuals& v)
{
read(j, "Disable post-processing", v.disablePostProcessing);
read(j, "Inverse ragdoll gravity", v.inverseRagdollGravity);
read(j, "No fog", v.noFog);
read<value_t::object>(j, "Fog controller", v.fog);
read<value_t::object>(j, "Fog options", v.fogOptions);
read(j, "No 3d sky", v.no3dSky);
read(j, "No aim punch", v.noAimPunch);
read(j, "No view punch", v.noViewPunch);
read(j, "No view bob", v.noViewBob);
read(j, "No hands", v.noHands);
read(j, "No sleeves", v.noSleeves);
read(j, "No weapons", v.noWeapons);
read(j, "No smoke", v.noSmoke);
read(j, "Smoke circle", v.smokeCircle);
read(j, "Wireframe smoke", v.wireframeSmoke);
read(j, "No molotov", v.noMolotov);
read(j, "Wireframe molotov", v.wireframeMolotov);
read(j, "No blur", v.noBlur);
read(j, "No scope overlay", v.noScopeOverlay);
read(j, "No grass", v.noGrass);
read(j, "No shadows", v.noShadows);
read<value_t::object>(j, "Motion Blur", v.motionBlur);
read<value_t::object>(j, "Shadows changer", v.shadowsChanger);
read(j, "Full bright", v.fullBright);
read(j, "Zoom", v.zoom);
read(j, "Zoom key", v.zoomKey);
read(j, "Thirdperson Transparency", v.thirdpersonTransparency);
read(j, "Thirdperson", v.thirdperson);
read(j, "Thirdperson key", v.thirdpersonKey);
read(j, "Thirdperson distance", v.thirdpersonDistance);
read(j, "Freecam", v.freeCam);
read(j, "Freecam key", v.freeCamKey);
read(j, "Freecam speed", v.freeCamSpeed);
read(j, "Keep FOV", v.keepFov);
read(j, "FOV", v.fov);
read(j, "Far Z", v.farZ);
read(j, "Flash reduction", v.flashReduction);
read(j, "Skybox", v.skybox);
read<value_t::object>(j, "World", v.world);
read<value_t::object>(j, "Props", v.props);
read<value_t::object>(j, "Sky", v.sky);
read<value_t::string>(j, "Custom skybox", v.customSkybox);
read(j, "Deagle spinner", v.deagleSpinner);
read(j, "Screen effect", v.screenEffect);
read(j, "Hit effect", v.hitEffect);
read(j, "Hit effect time", v.hitEffectTime);
read(j, "Hit marker", v.hitMarker);
read(j, "Hit marker time", v.hitMarkerTime);
read(j, "Playermodel T", v.playerModelT);
read(j, "Playermodel CT", v.playerModelCT);
read(j, "Custom Playermodel", v.playerModel, sizeof(v.playerModel));
read(j, "Disable jiggle bones", v.disableJiggleBones);
read<value_t::object>(j, "Bullet Tracers", v.bulletTracers);
read<value_t::object>(j, "Bullet Impacts", v.bulletImpacts);
read<value_t::object>(j, "Hitbox on Hit", v.onHitHitbox);
read(j, "Bullet Impacts time", v.bulletImpactsTime);
read<value_t::object>(j, "Molotov Hull", v.molotovHull);
read<value_t::object>(j, "Smoke Hull", v.smokeHull);
read<value_t::object>(j, "Molotov Polygon", v.molotovPolygon);
read<value_t::object>(j, "Viewmodel", v.viewModel);
read<value_t::object>(j, "Spread circle", v.spreadCircle);
read(j, "Asus walls", v.asusWalls);
read(j, "Asus props", v.asusProps);
read(j, "Smoke timer", v.smokeTimer);
read<value_t::object>(j, "Smoke timer BG", v.smokeTimerBG);
read<value_t::object>(j, "Smoke timer TIMER", v.smokeTimerTimer);
read<value_t::object>(j, "Smoke timer TEXT", v.smokeTimerText);
read(j, "Molotov timer", v.molotovTimer);
read<value_t::object>(j, "Molotov timer BG", v.molotovTimerBG);
read<value_t::object>(j, "Molotov timer TIMER", v.molotovTimerTimer);
read<value_t::object>(j, "Molotov timer TEXT", v.molotovTimerText);
read<value_t::object>(j, "Console Color", v.console);
read<value_t::object>(j, "Smoke Color", v.smokeColor);
read<value_t::object>(j, "Molotov Color", v.molotovColor);
read<value_t::object>(j, "Footstep", v.footsteps);
}
static void from_json(const json& j, sticker_setting& s)
{
read(j, "Kit", s.kit);
read(j, "Wear", s.wear);
read(j, "Scale", s.scale);
read(j, "Rotation", s.rotation);
s.onLoad();
}
static void from_json(const json& j, item_setting& i)
{
read(j, "Enabled", i.enabled);
read(j, "Definition index", i.itemId);
read(j, "Quality", i.quality);
read(j, "Paint Kit", i.paintKit);
read(j, "Definition override", i.definition_override_index);
read(j, "Seed", i.seed);
read(j, "StatTrak", i.stat_trak);
read(j, "Wear", i.wear);
read(j, "Custom name", i.custom_name, sizeof(i.custom_name));
read(j, "Stickers", i.stickers);
i.onLoad();
}
static void from_json(const json& j, PurchaseList& pl)
{
read(j, "Enabled", pl.enabled);
read(j, "Only During Freeze Time", pl.onlyDuringFreezeTime);
read(j, "Show Prices", pl.showPrices);
read(j, "No Title Bar", pl.noTitleBar);
read(j, "Mode", pl.mode);
read<value_t::object>(j, "Pos", pl.pos);
}
static void from_json(const json& j, Config::Misc::SpectatorList& sl)
{
read(j, "Enabled", sl.enabled);
read(j, "No Title Bar", sl.noTitleBar);
read<value_t::object>(j, "Pos", sl.pos);
}
static void from_json(const json& j, Config::Misc::KeyBindList& sl)
{
read(j, "Enabled", sl.enabled);
read(j, "No Title Bar", sl.noTitleBar);
read<value_t::object>(j, "Pos", sl.pos);
}
static void from_json(const json& j, Config::Misc::PlayerList& o)
{
read(j, "Enabled", o.enabled);
read(j, "Steam ID", o.steamID);
read(j, "Rank", o.rank);
read(j, "Wins", o.wins);
read(j, "Money", o.money);
read(j, "Health", o.health);
read(j, "Armor", o.armor);
read<value_t::object>(j, "Pos", o.pos);
}
static void from_json(const json& j, Config::Misc::JumpStats& js)
{
read(j, "Enabled", js.enabled);
read(j, "Show fails", js.showFails);
read(j, "Show color on fail", js.showColorOnFail);
read(j, "Simplify naming", js.simplifyNaming);
}
static void from_json(const json& j, Config::Misc::Velocity& v)
{
read(j, "Enabled", v.enabled);
read(j, "Position", v.position);
read(j, "Alpha", v.alpha);
read<value_t::object>(j, "Color", v.color);
}
static void from_json(const json& j, Config::Misc::KeyBoardDisplay& kbd)
{
read(j, "Enabled", kbd.enabled);
read(j, "Position", kbd.position);
read(j, "Show key Tiles", kbd.showKeyTiles);
read<value_t::object>(j, "Color", kbd.color);
}
static void from_json(const json& j, Config::Misc::Watermark& o)
{
read(j, "Enabled", o.enabled);
read<value_t::object>(j, "Pos", o.pos);
}
static void from_json(const json& j, PreserveKillfeed& o)
{
read(j, "Enabled", o.enabled);
read(j, "Only Headshots", o.onlyHeadshots);
}
static void from_json(const json& j, KillfeedChanger& o)
{
read(j, "Enabled", o.enabled);
read(j, "Headshot", o.headshot);
read(j, "Dominated", o.dominated);
read(j, "Revenge", o.revenge);
read(j, "Penetrated", o.penetrated);
read(j, "Noscope", o.noscope);
read(j, "Thrusmoke", o.thrusmoke);
read(j, "Attackerblind", o.attackerblind);
}
static void from_json(const json& j, AutoBuy& o)
{
read(j, "Enabled", o.enabled);
read(j, "Primary weapon", o.primaryWeapon);
read(j, "Secondary weapon", o.secondaryWeapon);
read(j, "Armor", o.armor);
read(j, "Utility", o.utility);
read(j, "Grenades", o.grenades);
}
static void from_json(const json& j, Config::Misc::Logger& o)
{
read(j, "Modes", o.modes);
read(j, "Events", o.events);
}
static void from_json(const json& j, Config::Visuals::MotionBlur& mb)
{
read(j, "Enabled", mb.enabled);
read(j, "Forward", mb.forwardEnabled);
read(j, "Falling min", mb.fallingMin);
read(j, "Falling max", mb.fallingMax);
read(j, "Falling intensity", mb.fallingIntensity);
read(j, "Rotation intensity", mb.rotationIntensity);
read(j, "Strength", mb.strength);
}
static void from_json(const json& j, Config::Visuals::Fog& f)
{
read(j, "Start", f.start);
read(j, "End", f.end);
read(j, "Density", f.density);
}
static void from_json(const json& j, Config::Visuals::ShadowsChanger& sw)
{
read(j, "Enabled", sw.enabled);
read(j, "X", sw.x);
read(j, "Y", sw.y);
}
static void from_json(const json& j, Config::Visuals::Viewmodel& vxyz)
{
read(j, "Enabled", vxyz.enabled);
read(j, "Fov", vxyz.fov);
read(j, "X", vxyz.x);
read(j, "Y", vxyz.y);
read(j, "Z", vxyz.z);
read(j, "Roll", vxyz.roll);
}
static void from_json(const json& j, Config::Visuals::MolotovPolygon& mp)
{
read(j, "Enabled", mp.enabled);
read<value_t::object>(j, "Self", mp.self);
read<value_t::object>(j, "Team", mp.team);
read<value_t::object>(j, "Enemy", mp.enemy);
}
static void from_json(const json& j, Config::Visuals::OnHitHitbox& h)
{
read<value_t::object>(j, "Color", h.color);
read(j, "Duration", h.duration);
}
static void from_json(const json& j, Config::Misc& m)
{
read(j, "Menu key", m.menuKey);
read(j, "Anti AFK kick", m.antiAfkKick);
read(j, "Adblock", m.adBlock);
read(j, "Force relay", m.forceRelayCluster);
read(j, "Auto strafe", m.autoStrafe);
read(j, "Bunny hop", m.bunnyHop);
read(j, "Custom clan tag", m.customClanTag);
read(j, "Clock tag", m.clocktag);
read(j, "Clan tag", m.clanTag, sizeof(m.clanTag));
read(j, "Animated clan tag", m.animatedClanTag);
read(j, "Fast duck", m.fastDuck);
read(j, "Moonwalk", m.moonwalk);
read(j, "Knifebot", m.knifeBot);
read(j, "Knifebot mode", m.knifeBotMode);
read(j, "Block bot", m.blockBot);
read(j, "Block bot Key", m.blockBotKey);
read(j, "Edge Jump", m.edgeJump);
read(j, "Edge Jump Key", m.edgeJumpKey);
read(j, "Mini Jump", m.miniJump);
read(j, "Mini Jump Crouch lock", m.miniJumpCrouchLock);
read(j, "Mini Jump Key", m.miniJumpKey);
read(j, "Jump Bug", m.jumpBug);
read(j, "Jump Bug Key", m.jumpBugKey);
read(j, "Edge Bug", m.edgeBug);
read(j, "Edge Bug Key", m.edgeBugKey);
read(j, "Pred Amnt", m.edgeBugPredAmnt);
read(j, "Auto pixel surf", m.autoPixelSurf);
read(j, "Auto pixel surf Pred Amnt", m.autoPixelSurfPredAmnt);
read(j, "Auto pixel surf Key", m.autoPixelSurfKey);
read<value_t::object>(j, "Velocity", m.velocity);
read<value_t::object>(j, "Keyboard display", m.keyBoardDisplay);
read(j, "Slowwalk", m.slowwalk);
read(j, "Slowwalk key", m.slowwalkKey);
read(j, "Slowwalk Amnt", m.slowwalkAmnt);
read(j, "Fake duck", m.fakeduck);
read(j, "Fake duck key", m.fakeduckKey);
read<value_t::object>(j, "Auto peek", m.autoPeek);
read(j, "Auto peek key", m.autoPeekKey);
read<value_t::object>(j, "Noscope crosshair", m.noscopeCrosshair);
read<value_t::object>(j, "Recoil crosshair", m.recoilCrosshair);
read<value_t::object>(j, "Headshot line", m.headshotLine);
read(j, "Auto pistol", m.autoPistol);
read(j, "Auto reload", m.autoReload);
read(j, "Auto accept", m.autoAccept);
read(j, "Radar hack", m.radarHack);
read(j, "Reveal ranks", m.revealRanks);
read(j, "Reveal money", m.revealMoney);
read(j, "Reveal suspect", m.revealSuspect);
read(j, "Reveal votes", m.revealVotes);
read(j, "Chat revealer", m.chatRevealer);
read<value_t::object>(j, "Spectator list", m.spectatorList);
read<value_t::object>(j, "Keybind list", m.keybindList);
read<value_t::object>(j, "Player list", m.playerList);
read<value_t::object>(j, "Jump stats", m.jumpStats);
read<value_t::object>(j, "Watermark", m.watermark);
read<value_t::object>(j, "Offscreen Enemies", m.offscreenEnemies);
read(j, "Disable model occlusion", m.disableModelOcclusion);
read(j, "Aspect Ratio", m.aspectratio);
read(j, "Kill message", m.killMessage);
read<value_t::string>(j, "Kill message string", m.killMessageString);
read(j, "Name stealer", m.nameStealer);
read(j, "Disable HUD blur", m.disablePanoramablur);
read(j, "Fast plant", m.fastPlant);
read(j, "Fast Stop", m.fastStop);
read<value_t::object>(j, "Bomb timer", m.bombTimer);
read<value_t::object>(j, "Hurt indicator", m.hurtIndicator);
read(j, "Prepare revolver", m.prepareRevolver);
read(j, "Prepare revolver key", m.prepareRevolverKey);
read(j, "Hit sound", m.hitSound);
read(j, "Quick healthshot key", m.quickHealthshotKey);
read(j, "Grenade predict", m.nadePredict);
read<value_t::object>(j, "Grenade predict Damage", m.nadeDamagePredict);
read<value_t::object>(j, "Grenade predict Trail", m.nadeTrailPredict);
read<value_t::object>(j, "Grenade predict Circle", m.nadeCirclePredict);
read(j, "Max angle delta", m.maxAngleDelta);
read(j, "Fix tablet signal", m.fixTabletSignal);
read<value_t::string>(j, "Custom Hit Sound", m.customHitSound);
read(j, "Kill sound", m.killSound);
read<value_t::string>(j, "Custom Kill Sound", m.customKillSound);
read<value_t::object>(j, "Purchase List", m.purchaseList);
read<value_t::object>(j, "Reportbot", m.reportbot);
read(j, "Opposite Hand Knife", m.oppositeHandKnife);
read<value_t::object>(j, "Preserve Killfeed", m.preserveKillfeed);
read<value_t::object>(j, "Killfeed changer", m.killfeedChanger);
read(j, "Sv pure bypass", m.svPureBypass);
read(j, "Inventory Unlocker", m.inventoryUnlocker);
read(j, "Unlock hidden cvars", m.unhideConvars);
read<value_t::object>(j, "Autobuy", m.autoBuy);
read<value_t::object>(j, "Logger", m.logger);
read<value_t::object>(j, "Logger options", m.loggerOptions);
read(j, "Name", m.name, sizeof(m.name));
read(j, "Custom name", m.customName);
}
static void from_json(const json& j, Config::Misc::Reportbot& r)
{
read(j, "Enabled", r.enabled);
read(j, "Target", r.target);
read(j, "Delay", r.delay);
read(j, "Rounds", r.rounds);
read(j, "Abusive Communications", r.textAbuse);
read(j, "Griefing", r.griefing);
read(j, "Wall Hacking", r.wallhack);
read(j, "Aim Hacking", r.aimbot);
read(j, "Other Hacking", r.other);
}
void Config::load(size_t id, bool incremental) noexcept
{
load((const char8_t*)configs[id].c_str(), incremental);
}
void Config::load(const char8_t* name, bool incremental) noexcept
{
json j;
if (std::ifstream in{ path / name }; in.good()) {
j = json::parse(in, nullptr, false);
if (j.is_discarded())
return;
} else {
return;
}
if (!incremental)
reset();
read(j, "Legitbot", legitbot);
read(j, "Legitbot Key", legitbotKey);
read<value_t::object>(j, "Draw legitbot fov", legitbotFov);
read<value_t::object>(j, "Recoil control system", recoilControlSystem);
read(j, "Ragebot", ragebot);
read(j, "Ragebot Key", ragebotKey);
read(j, "Min damage override Key", minDamageOverrideKey);
read(j, "Triggerbot", triggerbot);
read(j, "Triggerbot Key", triggerbotKey);
read<value_t::object>(j, "Legit Anti aim", legitAntiAim);
read<value_t::object>(j, "Rage Anti aim", rageAntiAim);
read(j, "Disable in freezetime", disableInFreezetime);
read<value_t::object>(j, "Fake angle", fakeAngle);
read<value_t::object>(j, "Fakelag", fakelag);
read<value_t::object>(j, "Tickbase", tickbase);
read<value_t::object>(j, "Backtrack", backtrack);
read(j["Glow"], "Items", glow);
read(j["Glow"], "Players", playerGlow);
read(j["Glow"], "Key", glowKey);
read(j, "Chams", chams);
read(j["Chams"], "Key", chamsKey);
read<value_t::object>(j, "ESP", streamProofESP);
read<value_t::object>(j, "Visuals", visuals);
read(j, "Skin changer", skinChanger);
::Sound::fromJson(j["Sound"]);
read<value_t::object>(j, "Misc", misc);
}
#pragma endregion
#pragma region Write
static void to_json(json& j, const ColorToggle& o, const ColorToggle& dummy = {})
{
to_json(j, static_cast<const Color4&>(o), dummy);
WRITE("Enabled", enabled);
}
static void to_json(json& j, const Color3& o, const Color3& dummy = {})
{
WRITE("Color", color);
WRITE("Rainbow", rainbow);
WRITE("Rainbow Speed", rainbowSpeed);
}
static void to_json(json& j, const ColorToggle3& o, const ColorToggle3& dummy = {})
{
to_json(j, static_cast<const Color3&>(o), dummy);
WRITE("Enabled", enabled);
}
static void to_json(json& j, const ColorToggleRounding& o, const ColorToggleRounding& dummy = {})
{
to_json(j, static_cast<const ColorToggle&>(o), dummy);
WRITE("Rounding", rounding);
}
static void to_json(json& j, const ColorToggleThickness& o, const ColorToggleThickness& dummy = {})
{
to_json(j, static_cast<const ColorToggle&>(o), dummy);
WRITE("Thickness", thickness);
}
static void to_json(json& j, const ColorToggleOutline& o, const ColorToggleOutline& dummy = {})
{
to_json(j, static_cast<const ColorToggle&>(o), dummy);
WRITE("Outline", outline);
}
static void to_json(json& j, const ColorToggleThicknessRounding& o, const ColorToggleThicknessRounding& dummy = {})
{
to_json(j, static_cast<const ColorToggleRounding&>(o), dummy);
WRITE("Thickness", thickness);
}
static void to_json(json& j, const Font& o, const Font& dummy = {})
{
WRITE("Name", name);
}
static void to_json(json& j, const Snapline& o, const Snapline& dummy = {})
{
to_json(j, static_cast<const ColorToggleThickness&>(o), dummy);
WRITE("Type", type);
}
static void to_json(json& j, const Box& o, const Box& dummy = {})
{
to_json(j, static_cast<const ColorToggleRounding&>(o), dummy);
WRITE("Type", type);
WRITE("Scale", scale);
WRITE("Fill", fill);
}
static void to_json(json& j, const Shared& o, const Shared& dummy = {})
{
WRITE("Enabled", enabled);
WRITE("Font", font);
WRITE("Snapline", snapline);
WRITE("Box", box);
WRITE("Name", name);
WRITE("Text Cull Distance", textCullDistance);
}
static void to_json(json& j, const HealthBar& o, const HealthBar& dummy = {})
{
to_json(j, static_cast<const ColorToggle&>(o), dummy);
WRITE("Type", type);
}
static void to_json(json& j, const Player& o, const Player& dummy = {})
{
to_json(j, static_cast<const Shared&>(o), dummy);
WRITE("Weapon", weapon);
WRITE("Flash Duration", flashDuration);
WRITE("Audible Only", audibleOnly);
WRITE("Spotted Only", spottedOnly);
WRITE("Health Bar", healthBar);
WRITE("Skeleton", skeleton);
WRITE("Head Box", headBox);
WRITE("Line of sight", lineOfSight);
}
static void to_json(json& j, const Weapon& o, const Weapon& dummy = {})
{
to_json(j, static_cast<const Shared&>(o), dummy);
WRITE("Ammo", ammo);
}
static void to_json(json& j, const Trail& o, const Trail& dummy = {})
{
to_json(j, static_cast<const ColorToggleThickness&>(o), dummy);
WRITE("Type", type);
WRITE("Time", time);
}
static void to_json(json& j, const Trails& o, const Trails& dummy = {})
{
WRITE("Enabled", enabled);
WRITE("Local Player", localPlayer);
WRITE("Allies", allies);
WRITE("Enemies", enemies);
}
static void to_json(json& j, const OffscreenEnemies& o, const OffscreenEnemies& dummy = {})
{
to_json(j, static_cast<const ColorToggle&>(o), dummy);
WRITE("Health Bar", healthBar);
}
static void to_json(json& j, const BulletTracers& o, const BulletTracers& dummy = {})
{
to_json(j, static_cast<const ColorToggle&>(o), dummy);
}
static void to_json(json& j, const Projectile& o, const Projectile& dummy = {})
{
j = static_cast<const Shared&>(o);
WRITE("Trails", trails);
}
static void to_json(json& j, const ImVec2& o, const ImVec2& dummy = {})
{
WRITE("X", x);
WRITE("Y", y);
}
static void to_json(json& j, const Config::Legitbot& o, const Config::Legitbot& dummy = {})
{
WRITE("Enabled", enabled);
WRITE("Aimlock", aimlock);
WRITE("Silent", silent);
WRITE("Friendly fire", friendlyFire);
WRITE("Visible only", visibleOnly);
WRITE("Scoped only", scopedOnly);
WRITE("Ignore flash", ignoreFlash);
WRITE("Ignore smoke", ignoreSmoke);
WRITE("Auto scope", autoScope);
WRITE("Hitboxes", hitboxes);
WRITE("Fov", fov);
WRITE("Smooth", smooth);
WRITE("Reaction time", reactionTime);
WRITE("Min damage", minDamage);
WRITE("Killshot", killshot);
WRITE("Between shots", betweenShots);
}
static void to_json(json& j, const Config::RecoilControlSystem& o, const Config::RecoilControlSystem& dummy = {})
{
WRITE("Enabled", enabled);
WRITE("Silent", silent);
WRITE("Ignore Shots", shotsFired);
WRITE("Horizontal", horizontal);
WRITE("Vertical", vertical);
}
static void to_json(json& j, const Config::Ragebot& o, const Config::Ragebot& dummy = {})
{
WRITE("Enabled", enabled);
WRITE("Aimlock", aimlock);