why dont make a fuction??
Code:
local Spawn = false
-- This is for just lure when you are on the spawn.
function onWalkerSelectLabel(labelName)
if (labelName == "Enter_Huntzone") then
Spawn = true
elseif (labelName == "Exit_Huntzone") then
Spawn = false
end
end
local MaxMonsters = 10
local function LureMonsters( ... )
local MonsterAmount = 0
for name, _ in Creature.iMonsters() do
MonsterAmount = MonsterAmount +1
end
if MonsterAmount => MaxMonsters and Spawn then
Walker.Stop()
Targeting.Start() -- Only if u disable before.
else
if MonsterAmount == 0 and Spawn then
Walker.Start()
Targeting.Stop() -- If you want lure without kill
end
end
end
-- I forget something bcs I take a long time without scripting.
-- Make a module and execute the function.
--PD: add a delay somewhere for wait monsters.