-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathentry.cpp
43 lines (33 loc) · 1.36 KB
/
entry.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
#include <iostream>
#include <map>
#include <string>
#include <thread>
#include <chrono>
#include <functional>
#include "cmds\commands.hpp"
#include "xorstr.h"
#include "utilities\utils.hpp"
int main() {
utils::init();
const std::unordered_map<std::string, std::function<void()>> commands = {
{xorstr("toggle"), commands::toggle_response},
{xorstr("upscale"), commands::upscale_response},
{xorstr("clickdata"), commands::clickdata_response},
{xorstr("inventory"), commands::inventory_response},
{xorstr("help"), commands::help_response},
{xorstr("cps"), commands::cps_response},
{xorstr("keybind"), commands::keybind_response},
{xorstr("rmblock"), commands::rmb_lock_response},
{xorstr("filter"), commands::filter_response}
};
for (;; std::this_thread::sleep_for(std::chrono::milliseconds(1))) {
std::cout << xorstr("> ") << std::flush;
std::cin >> commands::input;
std::cout << std::endl;
std::transform(commands::input.begin(), commands::input.end(), commands::input.begin(), [](unsigned char c) { return std::tolower(c, std::locale()); });
const auto it = commands.find(commands::input);
if (it != commands.end()) { it->second(); }
else { commands::invalid_response(); }
}
return 0;
}