no from,to vc coloca as coordenadas do começo x ,y e z da sua sala aí
em data/creaturescript/script/login.lua adc antes do ultimo return true
local from,to = {x=, y=, z=}, {x=, y=, z=}
if isInRange(getCreaturePosition(cid), from, to) then
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "You has logged into the training room, hence you went back to the temple.")
end
e o 2°eu fiz por piso, ai você coloca ali na área de entrada
movements/script/ nome do seu script.lua
function onStepIn(cid, item, position, fromPosition)
local from,to,players,limit = {x=, y=, z=}, {x=, y=, z=},{},8
for _, pid in ipairs(getPlayersOnline()) do
if isInRange(getCreaturePosition(pid), from, to) then
table.insert(player, pid)
end
end
if #players >= limit then
doTeleportThing(cid, fromPosition, true)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"This training room is already full!")
doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE)
return true
end
return true
end
tag é essa:
<movevent type="StepIn" actionid="26205" event="script" value="nome do seu script.lua"/>
ai na entrada dos quatro canto você coloca o piso com esse actionID: 26205







info
Grupo: Visconde
Registrado: 26/08/12
Posts: 318
Reputação: +118
Gênero: Masculino
Galera, vo fala logo como que eu quero o script...
Tipo em um quarto, so podem entrar 8 players, quando um 9º player for tentar entrar aparecera a mensagem:
This training room is already full!
E tambem se o player der logout dentro da area non-pvp, quando ele entrasse, ele seria teleportado para o templo
e apareceria a mensagem:
You has logged into the training room, hence you went back to the temple.
Vo passa uma imagem mostrando o quarto:
Quem consegui ganha REP+
Editado Outubro 25 por Noninhouh