lua code:
--Config
local config = {
creatct = 2, -- Number of creatures to play alarm
dist = 4, -- Distance to consider monsters
monsters = {"Frost Dragon Hatchling", "Yeti", "Rotworm"} -- Name of monster to sound alarm
}
-- Don't touch this if you don't know what are you doing
while (true) do
local amount = 0
for _, c in Creature.iMonsters(config.dist) do
if c:isAlive() and c:isOnScreen() then
amount = amount +1
end
end
for name, creature in Creature.iMonsters() do
if (table.contains(config.monsters, name)) then
if creature:isValid() and creature:isAlive() and amount >= config.creatct and not Self.isInPz() then
alert()
end
end
end
end