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

OTServlist - Idle time

Sajgon

Advanced OT User
Joined
Mar 10, 2017
Messages
281
Solutions
3
Reaction score
237
Location
Sweden
Hello,
I would like to change kickIdlePlayerAfterMinutes = 15 to infinitive but how can I do this without getting banned on OTServlist?

Kind regards
 
Hello,
I would like to change kickIdlePlayerAfterMinutes = 15 to infinitive but how can I do this without getting banned on OTServlist?

Kind regards
Source edits to not count a player after 15 minutes as being online ^_^ we did similar on Archlight so afk's weren't counted but they could still afk train.
 
Source edits to not count a player after 15 minutes as being online ^_^ we did similar on Archlight so afk's weren't counted but they could still afk train.

Anything you could share to the public or private bro? :)
 
Anything you could share to the public or private bro? :)
you will have to edit protocol login information about players online and set it to real players or whatever u want, something like

C++:
   uint32_t real = 0;
   std::map<uint32_t, uint32_t> list;
   for (const auto& it : g_game.getPlayers()) {
       if (it.second->getIP() != 0) {
           int32_t value;
           it.second->getStorageValue(storageID, value);
           if (value != 1) {
               real++;
           }
       }
   }
   players.append_attribute("online") = std::to_string(real).c_str();
 
you will have to edit protocol login information about players online and set it to real players or whatever u want, something like

C++:
   uint32_t real = 0;
   std::map<uint32_t, uint32_t> list;
   for (const auto& it : g_game.getPlayers()) {
       if (it.second->getIP() != 0) {
           int32_t value;
           it.second->getStorageValue(storageID, value);
           if (value != 1) {
               real++;
           }
       }
   }
   players.append_attribute("online") = std::to_string(real).c_str();

Adding that code to after this line forgottenserver/protocolgame.cpp at master · otland/forgottenserver · GitHub would do it?
 
you will have to edit protocol login information about players online and set it to real players or whatever u want, something like

C++:
   uint32_t real = 0;
   std::map<uint32_t, uint32_t> list;
   for (const auto& it : g_game.getPlayers()) {
       if (it.second->getIP() != 0) {
           int32_t value;
           it.second->getStorageValue(storageID, value);
           if (value != 1) {
               real++;
           }
       }
   }
   players.append_attribute("online") = std::to_string(real).c_str();

Looking on status.cpp in 0.4 i found the function:
getPlayersOnline()
That i think count on otservlist...

And i just found this function on game.h on line 219
forgottenserver/game.h at master · otland/forgottenserver · GitHub

But that is so strange, did u know how to do it on 0.4 or could us who uses 0.4 to do?
 

@StreamSide What is storageID supposed to be?
I am getting this error: protocolstatus.cpp:126:31: error: ‘storageID’ was not declared in this scope
Can I just use any free storageID or needs to be a specific one?

Edit: I tried 54321 and no errors.
 
Last edited:
I used storage id you show you what you can do, if players goes afk then storage->1, thats why.
 
Hello, I'm not able to report on the website, I'm not sure why, but I come in this way to report the server guerra-war.com, this without limit of mcs being that each one is logging more than 20 mcs and ADM asks for all log in to give players online.
Thanks, I get a response
 
Back
Top