Lua:
positionsArena = {
fromPosition = Position(1549, 994, 7),
toPosition = Position(1579, 1020, 7)
},
local CastlePrepareDeath = CreatureEvent('CastlePrepareDeath')
function CastlePrepareDeath.onPrepareDeath(player, killer)
player:teleportTo(Position(1525, 1032, 7))
player:setHealth(player:getMaxHealth())
player:addMana(player:getMaxMana())
player:sendTextMessage(MESSAGE_EVENT_ADVANCE,'[Event Castle] ' .. player:getName() .. ' was killed.')
return true
end
CastlePrepareDeath:register()
how could i check this arena to activate only if the player is in it