• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

HELP ANTIBOT SYSTEM

shadowsin

New Member
Joined
Jul 26, 2011
Messages
20
Reaction score
1
Someone could help me to modify this anti bot system so that when I use it, it will be sent to all online players?

Version 7.92

COMMAND;

#ifdef BLACK_BOSS_CHECKBOT
bool Commands::checkBot(Creature* c, const std::string &cmd, const std::string &param)
{
Player* target = game->getPlayerByName(param);
if(!target) {
Player* player = dynamic_cast<Player*>(c);
if(player)
player->sendTextMessage(MSG_STATUS_CONSOLE_BLUE, "Player doesn't exists.");
return false;
}
int16_t one = random_range(70,90);
target->addCheckBot(new Dzialanie(one, one-random_range(10,50), (bool)random_range(0,1)));
game->checkBot(target, 60);
Player* player = dynamic_cast<Player*>(c);
if(player)
player->sendTextMessage(MSG_STATUS_CONSOLE_BLUE, "Verification has sent!.");
return true;
}
bool Commands::checkAnswer(Creature* c, const std::string &cmd, const std::string &param)
{
Player* player = dynamic_cast<Player*>(c);
if(!player || !player->isCheckBotActive() || !player->getDzialanie())
return false;
int16_t answer = atoi(param.c_str());
if(answer != (*player->getDzialanie()).wynik) {
player->sendTextMessage(MSG_STATUS_CONSOLE_BLUE,"(BOT CHECKER): Wrong answer!");
return false;
}
player->removeCheckBot();
player->sendTextMessage(MSG_STATUS_CONSOLE_BLUE, "(BOT CHECKER): Good answer!");
return true;
}
#endif //BLACK_BOSS_CHECKBOT
 
Back
Top