Ir para conteúdo

Featured Replies

  • Respostas 10
  • Visualizações 638
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

Postado

@Disturbbed Cuidado com o DOUBLE POST/FLOOD

Negativado por sub moderação

Leia as regras, ele pode dar "Bump" após 24 horas.

Bruno Carvalho / Ex-Administrador TibiaKing

[email protected]

 

Em 26/12/2016 em 03:47, Spraypaint disse:

A força da alienação vem dessa fragilidade dos indivíduos, quando apenas conseguem identificar o que os separa e não o que os une.

-miltinho

 

wMwSJFE.png?1

 

Postado

Esse tutorial não foi criado por mim então não tenho ctz se vai funcionar. Créditos logo abaixo.

 

 

Vá em Pasta do seu OT -> data -> creaturescripts -> creaturescripts.xml:

<!-- Idle -->
<event type="think" name="Idle" event="script" value="idle.lua"/>

Agora vá em Pasta do seu OT -> data -> creaturescripts -> scripts -> idle.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 = "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
Para finalizar, agora vá em Pasta do seu OT -> data -> creaturescripts -> scripts -> login.lua:

registerCreatureEvent(cid, "Idle")
Para você alterar o tempo do exit, basta você abrir o config.lua e configura-la nessa parte:

idleWarningTime = 9 * 60 * 1000
idleKickTime = 10 * 60 * 1000

 

 

Créditos:ThiagoBjiw

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo