• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Lua Castle remove enemis

jel

Member
Joined
Mar 22, 2014
Messages
302
Reaction score
12
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
 
Back
Top