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.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.
you will have to edit protocol login information about players online and set it to real players or whatever u want, something likeAnything you could share to the public or private bro?
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?
He got it ^_^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();
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?
nope, here it is.