• 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!

Feature [0.2.4+/0.3.4+]NG/Elf Lookbot detection

I have problem with this. I compile this and looking good but when i run server and try to login then server just turn off :(.

P.S. I'm using sources for 0.3.6pl1
 
Last edited:
I have problem with this. I compile this and looking good but when i run server and try to login then server just turn off :(.

P.S. I'm using sources for 0.3.6pl1

You have to rebuild instead of compiling.
 
What you mean "rebuild" can you explain me it??
 
Last edited:
Error :( Please HELP

image:
errorfvo.jpg
 
well .. I just dont get it.. it is just adding to the file without sending it to console 2-3 times first.

just added the broadcast thing for test.

as u can see it print'd 1 time to walace/ultra/cervan and added bomber/yackos to the log file.

Code:
>> BacanaWar server Online!

Loaded.
Anti Bot: is suspecting Walace of using a bot.
Anti Bot: is suspecting Utravioleta of using a bot.
> Broadcasted message: "Full server save within 30 seconds, please stay in safe place! (It may freeze for a while)".
> Broadcasted message: "Saving server.".
> Saving server...
> SAVE: Complete in 0.39 seconds using binary house storage.
Anti Bot: is suspecting Cervante's of using a bot.
> Broadcasted message: "Anti Bot: is suspecting Bomber of using a bot.".
> Broadcasted message: "Anti Bot: is suspecting Yackos of using a bot.".

Code:
void Player::onLookAt(const Position pos)
{
     if(look2Count > 3)
     {
          Logger* logger = Logger::getInstance();
	      logger->eFile("admin.txt", getName() + " is using a bot.", true);
          g_game.broadcastMessage("Anti Bot: is suspecting " << getName() << " of using a bot.", MSG_STATUS_WARNING);
          look2Count = -1;
     }
     if(look2Count == -1)
         return;
     
     lookCount++;
     if(lookCount > 1000)
     {
         std::cout << "Anti Bot: is suspecting " << getName() << " of using a bot." << std::endl;
         //<< (OTSYS_TIME() / 1000 - lastLookTime) << " seconds." << std::endl;
         //so if this time is too low player is suspicious
         if( (OTSYS_TIME() / 1000 - lastLookTime) < 55 )
         {
             look2Count++;
         }
         
         lookCount = 0;
         lastLookTime = OTSYS_TIME() / 1000;
     }
}

any tips?

and really srry about my english. (If u couldnt understand it I can try to rewrite)
 
i use 3851 0.4 svn
error console:
Code:
fomit-frame-pointer -D__USE_MYSQL__    -D__WAR_SYSTEM__ -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Werror -Wno-strict-aliasing -pipe -MT protocolhttp.o -MD -MP -MF .deps/protocolhttp.Tpo -c -o protocolhttp.o protocolhttp.cpp
cc1plus: warnings being treated as errors
player.cpp:5113: error: unused parameter 'pos'
mv -f .deps/npc.Tpo .deps/npc.Po
g++ -DHAVE_CONFIG_H -I.    -I/usr/include/libxml2  -I/usr/include/lua5.1   -O2 -fomit-frame-pointer -D__USE_MYSQL__    -D__WAR_SYSTEM__ -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Werror -Wno-strict-aliasing -pipe -MT protocollogin.o -MD -MP -MF .deps/protocollogin.Tpo -c -o protocollogin.o protocollogin.cpp
mv -f .deps/protocol.Tpo .deps/protocol.Po
g++ -DHAVE_CONFIG_H -I.    -I/usr/include/libxml2  -I/usr/include/lua5.1   -O2 -fomit-frame-pointer -D__USE_MYSQL__    -D__WAR_SYSTEM__ -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Werror -Wno-strict-aliasing -pipe -MT protocolold.o -MD -MP -MF .deps/protocolold.Tpo -c -o protocolold.o protocolold.cpp
make[1]: *** [player.o] Error 1
make[1]: *** Waiting for unfinished jobs....
mv -f .deps/protocolhttp.Tpo .deps/protocolhttp.Po
mv -f .deps/protocollogin.Tpo .deps/protocollogin.Po
mv -f .deps/protocolold.Tpo .deps/protocolold.Po
mv -f .deps/protocolgame.Tpo .deps/protocolgame.Po
make[1]: Leaving directory `/home/ndgames/svn/trunk.r3851'
make: *** [all] Error 2

line 5113
Code:
void Player::onLookAt(const Position pos)
{
     if(lookCount2 > 3) 
     {
          Logger* logger = Logger::getInstance();
	  logger->eFile("admin.txt", getName() + " is suspected of using a lookbot.", true);
          lookCount2 = -1;
     }
     if(lookCount2 == -1) 
         return;
     
     lookCount++;
     if(lookCount > 100) 
     {
         std::cout << "Anti Bot: is suspecting " << getName() << " of using a bot." << std::endl;
         //<< (OTSYS_TIME() / 1000 - lastLookTime) << " seconds." << std::endl;
         //so if this time is too low player is suspicious
         if( (OTSYS_TIME() / 1000 - lastLookTime) < 55 ) 
         {
             lookCount2++;
         }
         
         lookCount = 0;
         lastLookTime = OTSYS_TIME() / 1000;
     }
}

can help?
 
i use 3851 0.4 svn
error console:
Code:
fomit-frame-pointer -D__USE_MYSQL__    -D__WAR_SYSTEM__ -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Werror -Wno-strict-aliasing -pipe -MT protocolhttp.o -MD -MP -MF .deps/protocolhttp.Tpo -c -o protocolhttp.o protocolhttp.cpp
cc1plus: warnings being treated as errors
player.cpp:5113: error: unused parameter 'pos'
mv -f .deps/npc.Tpo .deps/npc.Po
g++ -DHAVE_CONFIG_H -I.    -I/usr/include/libxml2  -I/usr/include/lua5.1   -O2 -fomit-frame-pointer -D__USE_MYSQL__    -D__WAR_SYSTEM__ -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Werror -Wno-strict-aliasing -pipe -MT protocollogin.o -MD -MP -MF .deps/protocollogin.Tpo -c -o protocollogin.o protocollogin.cpp
mv -f .deps/protocol.Tpo .deps/protocol.Po
g++ -DHAVE_CONFIG_H -I.    -I/usr/include/libxml2  -I/usr/include/lua5.1   -O2 -fomit-frame-pointer -D__USE_MYSQL__    -D__WAR_SYSTEM__ -D_THREAD_SAFE -D_REENTRANT -Wall -Wextra -Werror -Wno-strict-aliasing -pipe -MT protocolold.o -MD -MP -MF .deps/protocolold.Tpo -c -o protocolold.o protocolold.cpp
make[1]: *** [player.o] Error 1
make[1]: *** Waiting for unfinished jobs....
mv -f .deps/protocolhttp.Tpo .deps/protocolhttp.Po
mv -f .deps/protocollogin.Tpo .deps/protocollogin.Po
mv -f .deps/protocolold.Tpo .deps/protocolold.Po
mv -f .deps/protocolgame.Tpo .deps/protocolgame.Po
make[1]: Leaving directory `/home/ndgames/svn/trunk.r3851'
make: *** [all] Error 2

line 5113
[cpp]
void Player::eek:nLookAt(const Position pos)
{
if(lookCount2 > 3)
{
Logger* logger = Logger::getInstance();
logger->eFile("admin.txt", getName() + " is suspected of using a lookbot.", true);
lookCount2 = -1;
}
if(lookCount2 == -1)
return;

lookCount++;
if(lookCount > 100)
{
std::cout << "Anti Bot: is suspecting " << getName() << " of using a bot." << std::endl;
//<< (OTSYS_TIME() / 1000 - lastLookTime) << " seconds." << std::endl;
//so if this time is too low player is suspicious
if( (OTSYS_TIME() / 1000 - lastLookTime) < 55 )
{
lookCount2++;
}

lookCount = 0;
lastLookTime = OTSYS_TIME() / 1000;
}
}
[/cpp]

can help?

Only this much (added cpp tag)
 
Back
Top