-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDiscord RPC.cpp
More file actions
175 lines (146 loc) · 3.49 KB
/
Discord RPC.cpp
File metadata and controls
175 lines (146 loc) · 3.49 KB
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
#include "Class/Discord.h"
#include "Class/cel.h"
Discord* g_Discord;
void wronginput()
{
cel::print("Неверный ввод", color_red);
Sleep(1500);
system("exit");
}
void logo(int color)
{
cel::print(" _nnnn_", color);
cel::print(" dGGGGMMb", color);
cel::print(" @p~qp~~qMb", color);
cel::print(" M|@||@) M|", color);
cel::print(" @,----.JM|", color);
cel::print(" JS^\__/ qKL", color);
cel::print(" dZP qKRb", color);
cel::print(" dZP qKKb", color);
cel::print(" fZP SMMb", color);
cel::print(" HZM MMMM", color);
cel::print(" FqM MMMM", color);
cel::print(" 8D7____________JHE8", color);
cel::print("", color);
cel::print(" Discord RPC", color_white);
cel::print(" Author : maj0r", color_white);
cel::spacing();
}
void mainmenu()
{
int userin;
cel::spacing();
cel::print("Выбор стиля", color_blue);
cel::spacing();
cel::printbracket("1", "Хакер", color_blue);
cel::printbracket("2", "Собачка", color_blue);
cel::spacing();
cel::printonline("Консоль : ", color_blue);
cin >> userin;
if (userin == 1)
{
g_Discord->SetupHacker();
}
else if (userin == 2)
{
g_Discord->SetupDog();
}
else
{
wronginput();
}
}
void initializing()
{
ifstream readdata("RPCData.txt");
string appid;
int saveyn;
if (!FileIsExist("RPCData.txt"))
{
cel::spacing();
cel::print("Введите AppId", color_blue);
cel::spacing();
cel::printonline("Консоль : ", color_blue);
cin >> appid;
cel::spacing();
cel::print("Сохранить AppId для последуещего использования?", color_blue);
cel::spacing();
cel::printbracket("1", "Да", color_blue);
cel::spacing();
cel::printbracket("2", "Нет", color_blue);
cel::spacing();
cel::printonline("Консоль : ", color_blue);
cin >> saveyn;
if (saveyn == 1)
{
ofstream datasystem;
datasystem.open("RPCData.txt");
datasystem << appid;
datasystem.close();
if (FileIsExist("RPCData.txt"))
{
cel::print("Успешно сохранено!", color_green);
mainmenu();
}
else if (!FileIsExist("RPCData.txt"))
{
cel::print("Ошибка сохранения!", color_green);
Sleep(1000);
system("exit");
}
}
else if (saveyn == 2)
{
mainmenu();
}
else
{
wronginput();
}
}
else if (FileIsExist("RPCData.txt"))
{
readdata >> appid;
readdata.close();
cel::spacing();
cel::print(("Успешно загружено из файла! " + appid), color_green);
// Загрузка из файла, пока что просто переводит на mainmenu (Пофиксил строчками выше :) )
mainmenu();
}
g_Discord->Initialize(appid);
}
void starting()
{
int yesno;
cel::spacing();
cel::print("Пройти обучение?", color_blue);
cel::spacing();
cel::printbracket("1", "Да", color_green);
cel::printbracket("2", "Нет", color_green);
cel::spacing();
cel::printonline("Консоль : ", color_blue);
cin >> yesno;
if (yesno == 1)
{
system("start https://github.com/maj0roff/Discord-RPC/blob/master/README.md");
}
else if (yesno == 2)
{
initializing();
}
else
{
wronginput();
}
cel::spacing();
}
int main()
{
setlocale(LC_ALL, "rus");
SetConsoleCP(1251);
SetConsoleOutputCP(1251);
logo(color_blue);
starting();
cel::print("Для выхода нажмите любую клавишу", color_red);
system("pause");
}