olá estou adaptando um script que o objetivo é colocar em um teleport que só membros de guilds possam passar,do jeito que está ninguem passa no teleport, com guild ou sem guild, o script base que estou usando é o a seguir:
local destination = Position(1691, 90, 6)
function onStepIn(creature, item, position, fromPosition)
local player = creature:getPlayer()
if not player then
return true
end
if playersGuild = 0 then
player:teleportTo(destination)
position:sendMagicEffect(CONST_ME_TELEPORT)
destination:sendMagicEffect(CONST_ME_TELEPORT)
else
player:teleportTo(fromPosition)
position:sendMagicEffect(CONST_ME_TELEPORT)
fromPosition:sendMagicEffect(CONST_ME_TELEPORT)
player:sendTextMessage(MESSAGE_STATUS_SMALL, 'voce precisa estar em uma guild para entrar no teleport!.')
end
return true
end
quem puder ajudar, fico muito agradecido e darei Rep para todos que tentar me ajudar, obrigado.