GA

[Encerrado] Tempo Do Exit

Por gabriellinhares, 17 de abr. de 2010 em Tópicos Sem Resposta

10
2.7k
gabriellinharesG
17 de abril de 2010 às 10:05

Tipo no meu serv os cara dao exit nos trainers e fika o char logado por umas 4 horas ou mais

 

queria q o char ficasse só uns 15 minutos...

SukxS
17 de abril de 2010 às 10:18

Você tem que mudar a tempo no config.lua

 

Não lembro agora mas é algo como:

 

IdleTime... =

 

Deixe 15

gabriellinharesG
17 de abril de 2010 às 10:22

kickIdlePlayerAfterMinutes = 15

 

ja tava 15 0.0

Bruno1177B
17 de abril de 2010 às 10:30

Entao diminua para 10. ou entao coloque a conta 15 * 60 ou os segundos direto = 900

 

 

Att. BruMatt

Editado Abril 17 por BruMatt

SukxS
17 de abril de 2010 às 11:08

Talvez o erro esteja no script idlekick.lua, um globalevent se n me engano.

 

Veja se está correto o tempo no script.

gabriellinharesG
17 de abril de 2010 às 11:19

olha só idle.lua no creaturescripts

 

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 = "You have been idle 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 you are still idle"
	end

	doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, message .. ".")
end

return true
end

Bruno1177B
17 de abril de 2010 às 11:21

não é ali no /60000 ?? se for ali em vez de 60000s poem 900s que equivale a 15min!!

 

Att. BruMatt

17 de abril de 2010 às 12:59

vou testar aqui e ja mando se deu certo ou n

SukxS
17 de abril de 2010 às 14:14

olha só idle.lua no creaturescripts

 

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 = "You have been idle 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 you are still idle"
	end

	doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, message .. ".")
end

return true
end

 

Não vi nenhum erro no script.

 

No seu config.lua está assim??

idleWarningTime = 14 * 60 * 1000
idleKickTime = 15 * 60 * 1000 

Editado Abril 17 por Sukx

8 anos depois...
StigalS
19 de abril de 2018 às 17:48
A questão neste tópico de suporte foi encerrada por falta de respostas. Este tópico está fechado e foi movido para Suporte - Tópicos Sem Resposta.

+ Caso a dúvida não tenha sido resolvida você poderá criar outro tópico solicitando ajuda.
* Lembre-se que é permitido dar UP no tópico a cada 24 horas para assim o destacar e manter movimentado.