[Encerrado] Tempo Do Exit

gabriellinhares

só na brisa
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 10/04/10Posts: 16

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...

gabriellinhares

só na brisa
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 10/04/10Posts: 16

kickIdlePlayerAfterMinutes = 15

 

ja tava 15 0.0

Bruno1177

avatar
Visconde
Visconde

INFOS

Grupo: ViscondeRegistrado: 07/07/09Posts: 428Char no Tibia: '-'

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

 

 

Att. BruMatt

justinbiebersign.png

 

minem.png

 

Contato: bruux@xtibia.com

 

 

 

Entrada na Equipe: 14/05/2010 Cargo: Estagiário

Promoção: 04/07/2010 Cargo: Imprensa

gabriellinhares

só na brisa
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 10/04/10Posts: 16

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

Bruno1177

avatar
Visconde
Visconde

INFOS

Grupo: ViscondeRegistrado: 07/07/09Posts: 428Char no Tibia: '-'

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

 

Att. BruMatt

justinbiebersign.png

 

minem.png

 

Contato: bruux@xtibia.com

 

 

 

Entrada na Equipe: 14/05/2010 Cargo: Estagiário

Promoção: 04/07/2010 Cargo: Imprensa

Sukx

XTibia.com - 2010
avatar
Artesão
Artesão

INFOS

Grupo: ArtesãoRegistrado: 01/09/08Posts: 119

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 

att.

Sukx loading.gif

 

Contato:



GMail - Sukx.01@gmail.com

 

Stigal

don't ever stop...
avatar
Herói
Herói

INFOS

Grupo: HeróiRegistrado: 28/11/10Posts: 3402Gênero: Masculino
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.

VI6MDIG.png

 

"O fracasso é a oportunidade de se começar de novo inteligentemente"

Minhas Redes Sociais: Youtube | Página & Grupo | Steam  | Discord Xtibia | Skype: @mrooger

 

OTpanel