XOM91K wrote:Gh0ster wrote:SkyFall wrote:для другого айди? )
то есть у них всё равно будет разная стата )
Ну нужно будет бота заставить записывать в таблицу бнет статы.
Причем делается это путем изменения одной строки в update_dota_elo.cpp
Если юзать вановский бот то запросы надо менять в ghostdbmysql.cpp (c) Serc
Добавлено: 17.12.2016 16:29
Ладно выложу код stats который сделал я у себя :| :
static int _handle_stats_command(t_connection * c, char const *text)
{
text = skip_command(text);
if (text[0] == '\0')
{
t_account * myacc = conn_get_account(c);
char * dotastats = new char[MAX_MESSAGE_LEN];
snprintf(dotastats, MAX_MESSAGE_LEN, "DotA stats: %s",
account_get_name(myacc));
message_send_text(c, message_type_info, c, dotastats);
snprintf(dotastats, MAX_MESSAGE_LEN, "Score: [%s] %d pts",
account_get_drank(myacc), account_get_pts(myacc));
message_send_text(c, message_type_info, c, dotastats);
snprintf(dotastats, MAX_MESSAGE_LEN, "Games W/L: %d/%d (Win: %d%s)",
account_get_wins(myacc), account_get_losses(myacc), account_get_winspcnt(myacc), account_get_percentsymvol(myacc));
message_send_text(c, message_type_info, c, dotastats);
snprintf(dotastats, MAX_MESSAGE_LEN, "Hero K/D/A: %d/%d/%d",
account_get_kills(myacc), account_get_deaths(myacc), account_get_assists(myacc));
message_send_text(c, message_type_info, c, dotastats);
snprintf(dotastats, MAX_MESSAGE_LEN, "Leave: %d(%d%s)",
account_get_leavecnt(myacc), account_get_leavepcnt(myacc), account_get_percentsymbol(myacc));
message_send_text(c, message_type_info, c, dotastats);
delete[]dotastats;
}
else
{
t_account * myacc;
if (!(myacc = accountlist_find_account(text)))
{
message_send_text(c, message_type_info, c, "Неизвестный пользователь!");
}
else
{
char * dotastats = new char[MAX_MESSAGE_LEN];
snprintf(dotastats, MAX_MESSAGE_LEN, "DotA stats: %s",
account_get_name(myacc));
message_send_text(c, message_type_info, c, dotastats);
snprintf(dotastats, MAX_MESSAGE_LEN, "Score: [%s] %d pts",
account_get_drank(myacc), account_get_pts(myacc));
message_send_text(c, message_type_info, c, dotastats);
snprintf(dotastats, MAX_MESSAGE_LEN, "Games W/L: %d/%d (Win: %d%s)",
account_get_wins(myacc), account_get_losses(myacc), account_get_winspcnt(myacc), account_get_percentsymvol(myacc));
message_send_text(c, message_type_info, c, dotastats);
snprintf(dotastats, MAX_MESSAGE_LEN, "Hero K/D/A: %d/%d/%d",
account_get_kills(myacc), account_get_deaths(myacc), account_get_assists(myacc));
message_send_text(c, message_type_info, c, dotastats);
snprintf(dotastats, MAX_MESSAGE_LEN, "Leave: %d(%d%s)",
account_get_leavecnt(myacc), account_get_leavepcnt(myacc),account_get_percentsymbol(myacc));
message_send_text(c, message_type_info, c, dotastats);
delete[]dotastats;
}
}
return 0;
}