good morning, this castle script is to remove players from an area, I wanted to remove them from the area above and from the basement
COH_PUSHTIME = 10800 -- Tempo (em segundos) de exhausted para usar o comando !gocastle - Padrão (3 horas)
COH_AREA = {{x = 1364, y = 1637, z = 3}, {x = 1472, y = 1792, z = 9}} -- Canto superior esquerdo / inferior direito do Castle
-- // Não mexa daqui para baixo
COH_STATUS = 565616
COH_PREPARE1 = 565617
COH_PUSHSTOR = 565618
COH_PREPARE2 = 565619
function doCastleRemoveEnemies()
for index, creature in ipairs(Game.getPlayers()) do
if isInRange(getThingPos(creature), COH_AREA[1], COH_AREA[2]) then
if getPlayerGuildName(creature) ~= getGlobalStorageValue(COH_STATUS) then
doTeleportThing(creature, getTownTemplePosition(getPlayerTown(creature)))
end
end
end
return true
end