-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVariables.h
401 lines (341 loc) · 7.26 KB
/
Variables.h
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
#pragma once
#include "DLL_MAIN.h"
#include "json/json.h"
using namespace std;
enum removals
{
vis_recoil = 0,
vis_smoke,
flash,
scope,
zoom,
post_processing,
fog,
shadow,
};
enum weap_type {
def,
scar,
scout,
_awp,
rifles,
pistols,
heavy_pistols
};
struct chams_t
{
bool enable;
int material;
color_t material_color;
unsigned int overlay;
color_t glow_color[2];
color_t glass_color;
color_t metallic_color;
color_t wireframe_color;
int phong_amount;
int rim_amount;
};
enum chams_type
{
enemy_visible,
enemy_xqz,
enemy_history,
enemy_ragebot_shot,
local_default,
local_desync,
local_arms,
local_weapon,
chams_max,
};
struct CWeaponConfig {
bool enable;
int mindamage;
int mindamage_override;
int hitchance;
int doubletap_hc;
bool multipoint;
bool quickstop;
int quickstop_options;
int max_misses;
bool static_scale;
int scale_head;
int scale_body;
unsigned int hitscan;
unsigned int prefer_safepoint;
unsigned int force_safepoint;
};
struct CGlobalVariables
{
struct {
bool enable;
bool backtrack;
} legitbot;
struct
{
bool enable;
bool silent;
int fov;
bool autoshoot;
int autoscope;
bool resolver;
bool dt_teleport;
int recharge_time;
bool zeusbot;
int zeuschance;
CWeaponConfig weapon[7];
int active_index;
} ragebot;
struct
{
bool enable;
int pitch;
int yaw;
bool attarget;
bool attarget_off_when_offsreen;
int desync_direction;
int desync_amount;
bool avoid_overlap;
bool aa_on_use;
bool desync;
bool manual_antiaim;
bool ignore_attarget;
int fakelag;
bool fakelag_when_standing;
bool fakelag_when_exploits;
bool fakelag_on_peek;
int fakelagfactor;
int min, max;
int jitter_angle;
} antiaim;
struct
{
bool enable;
bool teammates;
bool dormant;
bool box;
color_t box_color;
bool healthbar;
bool name;
color_t name_color;
unsigned int flags;
color_t flags_color;
bool weapon;
color_t weapon_color;
bool skeleton;
color_t skeleton_color;
bool ammo;
color_t ammo_color;
bool zeus_warning;
unsigned int hitmarker;
bool visualize_damage;
color_t hitmarker_color;
bool hitmarker_sound;
int hitmarker_sound_type;
unsigned int remove;
bool glow;
color_t glow_color;
int glowtype;
bool preverse_killfeed;
bool local_glow;
color_t local_glow_clr;
bool indicators;
bool indicators_rage;
bool hitlog;
bool bullet_tracer;
color_t bullet_tracer_color;
bool bullet_impact;
bool bullet_tracer_local;
color_t bullet_tracer_local_color;
color_t bullet_impact_color;
color_t client_impact_color;
int impacts_size;
int bullet_tracer_type;
int aspect_ratio;
bool shot_multipoint;
bool snipercrosshair;
bool clantagspammer;
int transparentprops;
bool out_of_fov;
color_t out_of_fov_color;
int out_of_fov_distance;
int out_of_fov_size;
int active_chams_index;
// local player esp
bool nightmode;
bool customize_color;
int nightmode_amount;
int prop_alpha_amount;
//bool removepostprocessing;
int nightmode_val;
color_t nightmode_color;
color_t nightmode_prop_color;
color_t nightmode_skybox_color;
int thirdperson_dist;
bool chamsragdoll;
int points_size;
bool override_hp;
color_t hp_color;
int prop, wall;
color_t points_color;
int taser_range;
color_t taser_range_color;
bool nadepred;
color_t nadepred_color;
unsigned int eventlog;
color_t eventlog_color;
bool speclist;
bool watermark;
bool monitor;
bool force_crosshair;
bool kill_effect;
int anim_id;
bool blend_on_scope;
int blend_value;
chams_t chams[chams_max];
bool ragdoll_force;
struct {
struct {
bool enable;
bool trajectories;
unsigned int filter; // team, enemy, local
color_t colors[3];
} projectiles;
struct {
bool enabled;
bool planted_bomb;
color_t color;
} weapons;
} world;
} visuals;
struct
{
bool bunnyhop;
bool autostrafe;
bool knifebot;
int restrict_type;
bool antiuntrusted = true;
int viewmodelfov;
int viewmodel_x, viewmodel_y, viewmodel_z;
int worldfov;
int zoomfov;
struct {
bool enable;
int main;
int pistol;
unsigned int misc;
}autobuy;
bool slidewalk;
int agents_t, agents_ct;
} misc;
struct
{
std::string active_config_name;
int active_config_index;
color_t color;
bool open;
int y;
bool guiinited;
int current_tab;
} menu;
struct {
std::string active_script_name;
int active_script_index;
} js;
};
extern CGlobalVariables vars;
enum binds_enum_t
{
bind_override_dmg,
bind_force_safepoint,
bind_baim,
bind_double_tap,
bind_hide_shots,
bind_aa_inverter,
bind_manual_left,
bind_manual_right,
bind_manual_back,
bind_manual_forward,
bind_fake_duck,
bind_slow_walk,
bind_third_person,
bind_peek_assist,
bind_max
};
extern c_bind g_Binds[bind_max];
extern void CreateConfigFolder();
typedef Json::Value json_t;
class CConfig
{
private:
string GetModuleFilePath(HMODULE hModule);
string GetModuleBaseDir(HMODULE hModule);
public:
struct preload_cfg {
std::string created_by;
std::string created_at;
std::string last_modified_user;
std::string last_modified_date;
bool can_be_loaded;
};
vector<std::string> ConfigList;
void ReadConfigs(LPCTSTR lpszFileName);
void ResetToDefault();
bool init = false;
CConfig()
{
Setup();
}
void SaveColor(color_t color, const char* name, json_t* json) {
auto& j = *json;
j[name][str("red")] = color.get_red();
j[name][str("green")] = color.get_green();
j[name][str("blue")] = color.get_blue();
j[name][str("alpha")] = color.get_alpha();
}
void SaveBind(c_bind* bind, const char* name, json_t* json) {
auto& j = *json;
j[name][str("key")] = bind->key;
j[name][str("type")] = bind->type;
j[name][str("active")] = bind->active;
}
void LoadBool(bool* pointer, const char* name, json_t json) {
if (json.isMember(name)) *pointer = json[name].asBool();
}
void LoadInt(int* pointer, const char* name, json_t json) {
if (json.isMember(name)) *pointer = json[name].asInt();
}
void LoadUInt(unsigned int* pointer, const char* name, json_t json) {
if (json.isMember(name)) *pointer = json[name].asUInt();
}
void LoadFloat(float* pointer, const char* name, json_t json) {
if (json.isMember(name)) *pointer = json[name].asFloat();
}
void LoadColor(color_t* pointer, const char* name, json_t json) {
if (!json.isMember(name))
return;
const auto& location = json[name];
if (location.isMember(str("red")) && location.isMember(str("green"))
&& location.isMember(str("blue")) && location.isMember(str("alpha"))) {
pointer->set_red(location[str("red")].asInt());
pointer->set_green(location[str("green")].asInt());
pointer->set_blue(location[str("blue")].asInt());
pointer->set_alpha(location[str("alpha")].asInt());
}
}
void LoadBind(c_bind* pointer, const char* name, json_t json) {
if (!json.isMember(name))
return;
const auto& location = json[name];
if (location.isMember(str("key")) && location.isMember(str("type"))) {
pointer->key = location[str("key")].asUInt();
pointer->type = location[str("type")].asUInt();
pointer->active = location[str("active")].asBool();
}
}
void Setup();
void PreLoad(string cfg_name, preload_cfg* p);
void Save(string cfg_name, bool create = false);
void Load(string cfg_name);
void Remove(string cfg_name);
};
extern CConfig Config;