Explicaçao: quando o player pisa no tile do treiner é mandando uma mensagem dizendo que se ele nao se movimentar em alguns minutos ele será mandado para o templo e será kikado automaticamente.
- Primeiro passo.
MoveEvent/Scripts
autokick.lua
events1,events2= {},{}
local config = {tempo = 15,storage = 20000 }
function onStepIn(cid, item, frompos, topos)
if isPlayer(cid) and getPlayerStorageValue(cid, config.storage) <= 0 then
doPlayerSendTextMessage(cid, 22, "[Trainer]: Movimente-se a cada " .. config.tempo .. " minutos, caso contrário, seu char será levado ao templo.")
setPlayerStorageValue(cid, config.storage, 1)
events1[getPlayerGUID(cid)] = addEvent(setPlayerStorageValue, config.tempo*60*1000-1000, cid, config.storage, -1)
events2[getPlayerGUID(cid)] = addEvent(doTeleportThing, config.tempo*60*1000-500, cid, getTownTemplePosition(getPlayerTown(cid)))
end
return true
end
function onStepOut(cid, item, frompos, topos)
if isPlayer(cid) and getPlayerStorageValue(cid, config.storage) >= 1 then
setPlayerStorageValue(cid, config.storage, -1)
doPlayerSendTextMessage(cid, 23, "System kick off!")
stopEvent(events1[getPlayerGUID(cid)])
stopEvent(events2[getPlayerGUID(cid)])
end
return true
end
- segundo passo:
em movements.xml adicione as tags:
<movevent type="StepIn" actionid="25000" event="script" value="autokick.lua"/>
<movevent type="StepOut" actionid="25000" event="script" value="autokick.lua"/>
Agora abra o MAP EDITOR e coloque no TILE dos trainers o action id 25000
Créditos : Vodkart.







info
Grupo: Campones
Registrado: 03/05/13
Posts: 4
Reputação: 0
Char no Tibia: osanjos
Queria que players que desse exit nos treines que fosse kickando depois de 15 minutos, já fui no confing.php e nada de serem kickandos
idleWarningTime = 15 * 60 * 10000000000
idleKickTime = 15 * 60 * 10000000000
reportsExpirationAfterReads = 1
playerQueryDeepness = 2
tileLimit = 0
protectionTileLimit = 0
houseTileLimit = 0
Ajuadaaa R+ para que ajuda