Pedrook
Advanced OT User
- Joined
- May 24, 2009
- Messages
- 457
- Solutions
- 3
- Reaction score
- 194
- Location
- Brazil
- GitHub
- pedrogiampietro
esou having a problem on my server, the players in the trainers do not log out, I already checked config.lua, creaturescript, movements, there is no script that implies.
and I would not want to take ban from otservlist, if anyone can help.
The strange thing is that in hunt or anywhere else it kicks normal after 15min.
I found this script but it is for 0.4, I could not run it on my server, if anyone pduer help, I use otx 1.3
and I would not want to take ban from otservlist, if anyone can help.
The strange thing is that in hunt or anywhere else it kicks normal after 15min.
I found this script but it is for 0.4, I could not run it on my server, if anyone pduer help, I use otx 1.3
LUA:
local config = {
idleWarning = getConfigValue('idleWarningTime'),
idleKick = getConfigValue('idleKickTime')
}
function onThink(cid, interval)
if(getTileInfo(getCreaturePosition(cid)).noLogout or getCreatureNoMove(cid) or
getPlayerCustomFlagValue(cid, PLAYERCUSTOMFLAG_ALLOWIDLE)) then
return true
end
local idleTime = getPlayerIdleTime(cid) + interval
doPlayerSetIdleTime(cid, idleTime)
if(config.idleKick > 0 and idleTime > config.idleKick) then
doRemoveCreature(cid)
elseif(config.idleWarning > 0 and idleTime == config.idleWarning) then
local message = "There was no variation in your behaviour for " .. math.ceil(config.idleWarning / 60000) .. " minutes"
if(config.idleKick > 0) then
message = message .. ". You will be disconnected in "
local diff = math.ceil((config.idleWarning - config.idleKick) / 60000)
if(diff > 1) then
message = message .. diff .. " minutes"
else
message = message .. "one minute"
end
message = message .. " if there is no change in your actions until then."
end
doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, message .. ".")
end
return true
end