Quote Originally Posted by jrzaghetto View Post
You did not help me, but I was testing and I managed to work what I wanted.

If someone wants to:

First, create a lua:

Code:
registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")

function onWalkerSelectLabel(labelName)
	if (labelName == "killMonsters") then
	local MonsterAmount = 0
	for name, _ in Creature.iMonsters() do
	MonsterAmount = MonsterAmount + 1
	end
	if MonsterAmount >= 1 then
	wait(10000)
	else
	wait(100)
	end
end
Second, create a lure system.

Call the label.
that's it
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.