Sem o Script não tem como dar suporte.
- Fórum
- OTServ
- Suporte
- Tópicos Sem Resposta
- [Encerrado] [Encerrado] Erro na creaturescripts/scripts/idle.lua
[Encerrado] [Encerrado] Erro na creaturescripts/scripts/idle.lua
Por lucascat1, 10 de jun. de 2017 em Tópicos Sem Resposta
info
Grupo: Conde
Registrado: 23/05/17
Posts: 584
Reputação: +113
Gênero: Masculino
Char no Tibia: Não Tenho

Editado Junho 10 por DarkWore
1 hora atrás, DarkWore disse:Sem o Script não tem como dar suporte.
Segue o script 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 = "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 trueend
alguém pode ajudar?
Editado Junho 10 por DarkWore
info
Grupo: Conde
Registrado: 23/05/17
Posts: 584
Reputação: +113
Gênero: Masculino
Char no Tibia: Não Tenho

1 hora atrás, lucascat1 disse:Segue o script 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 = "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
alguém pode ajudar?
Qual versão do TFS que você está usando?
Agora, DarkWore disse:Qual versão do TFS que você está usando?
The OTX Server Version: (2.6) - Codename: (SCARETALE)
Compiled with GNU C++ version 3.4.5 (mingw special) for arch 32 Bits at Nov 21 2016 17:47:43
info
Grupo: Herói
Registrado: 07/03/16
Posts: 1.4k
Reputação: +385
Gênero: Masculino

Caro membro,
Seu tópico foi movido de CreatureScripts e Movements para Scripts.
info
Grupo: Herói
Registrado: 28/11/10
Posts: 3.4k
Reputação: +585
Gênero: Masculino

info
Grupo: Herói
Registrado: 28/11/10
Posts: 3.4k
Reputação: +585
Gênero: Masculino




info
Grupo: Campones
Registrado: 07/06/17
Posts: 13
Reputação: 0
Galera, alguém pode me ajudar? Estou rodando um Otserv aqui 8.60 e quando dá a hora do evento FireStorm começar o tp não abre e na distro aparece esse erro:
error - creatureScript Interface data/creaturescripts/scripts/idle.lua:14 in function <data/creaturescripts/scripts/idle.lua:6>
Se alguém ajudar dou REP++
Editado Junho 10 por lucascat1