TekaZudo
seuserver.com.br
DESCRIÇÃO
Anuncie aqui neste countdown e dê maior visibilidade ao seu lançamento |
Full Global • Custom Quests • Custom Outfits • Lottery System • Version 15x
Inicia em:
--
Participar
Solutions
-
jefersonzc's post in (Resolvido)Kickar players nos Trainers was marked as the answerBom, resolvi desenvolver eu mesmo uma solução, me baseando nos scripts que encontrei pelo caminho Segue abaixo.
1. Em data/creaturescripts/scripts/login.lua, acrescente:
player:registerEvent("Idle") 2. Em data/creaturescripts/creaturescripts.xml, acrescente:
<event type="think" name="Idle" script="idle.lua"/> 3. Na pasta data/creaturescripts/scripts, crie o arquivo idle.lua, com o seguinte código:
local room = { x1 = 1542, x2 = 1608, y1 = 1528, y2 = 1556, z1 = 8, z2 = 8 } function onThink(player, interval) local target = player:getTarget() if (player:getIp() > 0) then return true else local pos = player:getPosition() if ((pos.x >= room.x1 and pos.x <= room.x2) and (pos.y >= room.y1 and pos.y <= room.y2) and (pos.z >= room.z1 and pos.z <= room.z2)) then doRemoveCreature(player) end end return true end
Depois é só configurar o script com as coordenadas da sua room (onde ficam os trainers). Pronto, qualquer player que der quit ali dentro, esteja ele atacando os trainers ou não, vai levar kick alguns segundos depois.
Podem fechar como resolvido