• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Kupie skrypt na online/afk

Status
Not open for further replies.
jak na więszkości serwerów z taką ilością graczy, dodać do tego boterów to ludzi online jest 10? :D :P
 
LUA:
function onThink(interval, lastExecution, thinkInterval)
for _, pid in ipairs(getPlayersOnline()) do
if getPlayerIdleTime(pid) > 10 * 1000 * 60 then
db.executeQuery("UPDATE `players` SET `afk` = 1 WHERE `world_id` = " .. getConfigValue('worldId') .. " AND `afk` > 1;")
    end
end
return TRUE
end

Noo i do bazy w players dodać tabelke 'afk' i coś pozmieniać w whoisonline.php :P
Nie wiem czy zadziała ;)
Wiem ze cos w ten desen trzeba zrobic, ale nie wiem jak jest wysylana ilosc online na listy, wiec kupie od Kuli za 20pln.
Mozna zamknac
 
Last edited:
;ppp

Code:
  function onThink(interval, lastExecution, thinkInterval)
for _, pid in ipairs(getPlayersOnline()) do
    if getPlayerIdleTime(pid) > 2 * 1000 * 60 then
         doSendAnimatedText(getCreaturePosition(pid), "AFK", TEXTCOLOR_WHITE)
    end
end
return TRUE
end

??
taki jest na monie
 
Obecnie 337 graczy jest Online - 181 z nich jest aktywnych, 156 jest AFK.
 
Status
Not open for further replies.
Back
Top