I haven't tested this script. Let me know if it works or not.
This script will work only if your cavebot script hunts only on one floor (without ladders, stairs, rope places etc). If you run it with script that hunts on more than one floor it will most likely get stuck. It might also get stuck if there are monsters on way to refil but you shouldn't have that problem with demon spawn in yalahar.
LeaveLabel is bold name of label in example below:
Code:
[startHunt]
[NODE]
[NODE]
[NODE]
[NODE]
[checkSupplies] -- Goto startHunt if enough supplies or go to leaveRespawn if not.
[leaveRespawn]
lua code:
local antyLure = {
leaveLabel = "leaveRespawn",
maxMonsters = 2,
monsterList = { "Demon", "Some Other Monster"} -- optional (jus comment whole line if you want to track all monsters)
}
-- --[[ DO NOT EDIT ANYTHING BELOW THIS LINE ]]--
function countMonstersOnScreen(monsterList)
local count = 0
for name, obj in Creature.iMonsters() do
if (monsterList and table.contains(monsterList, name:lower()) or true) then
count = count + 1
end
end
return count
end
Module.New("anty-lure", function()
if (not IS_LURED) then
if (countMonstersOnScreen(antyLure.monsterList) > antyLure.maxMonsters) then
IS_LURED = true
Targeting.StartIgnoring()
Walker.Goto(antyLure.leaveLabel)
end
end
if (Self.isInPz() and IS_LURED) then
Targeting.StopIgnoring()
IS_LURED = false
end
end)
This script will simply refill every time someone lure on you. If you don't want it to do refil I would actually have to edit your wpts to make it wait upstairs until creatures get back to thier normal spawn positions, but I don't really feel like doing that tbh xD