View Full Version : Lure monsters, kill then continue luring
jrzaghetto
06-06-2017, 06:22 AM
Hi everyone, I'm using lure mode with 1 knight + druid.
I'm making the knight lure the monsters to the sqm I need, then my druid kills the monsters.
My problem, is that the knight lure the monster up to the sqm I want, but keeps walking after that. I wanted him to lure the monster to the sqm, and only when all the monsters were dead did it continue.
It is possible?
Thanks
Trykon
06-06-2017, 09:26 AM
Yes. It is possible.
jrzaghetto
06-06-2017, 02:39 PM
Yes. It is possible.
Could you explain to me how I can do it?
Trykon
06-06-2017, 06:41 PM
Could you explain to me how I can do it?
Well in walker you set label on which you need to stop walker until all monster are dead, that's it :)
jrzaghetto
06-07-2017, 05:15 PM
Well in walker you set label on which you need to stop walker until all monster are dead, that's it :)
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:
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
Oscagi
06-07-2017, 06:23 PM
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:
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??
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.
Trykon
06-07-2017, 07:59 PM
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:
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
I gave general advice. I don't really want to teach how to script. If someone knows how to script he will do it with simple advice, if not then I have more things to do than to teach half of the forum lua scripting.
Oscagi
06-07-2017, 08:00 PM
I gave general advice. I don't really want to teach how to script. If someone knows how to script he will do it with simple advice, if not then I have more things to do than to teach half of the forum lua scripting.
Chill dude.
Trykon
06-07-2017, 08:03 PM
Chill dude.
I am chilled. Just explaining myself...
If someone is asking how to do something I think myself that he needs advice or guidance not complete answer. Otherwise he would ask for ready code.
But yeah I would make it a function like you said. And then just run it on label, or activate and deactivate luring module on label.
DarkstaR
06-08-2017, 07:35 PM
Stop using scripts - this is built in. Use the lure waypoints. SLure begins luring (not attacking). ELure ends luring (starts attacking again).
There's also a dynamic lure feature which isn't tied to waypoints.
For the knight, you set targeting up to "do nothing" but still target each creature. He will stand there only auto attacking until the druid has finished killing,
jrzaghetto
06-09-2017, 01:01 AM
why dont make a fuction??
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.
You're awesome Oscagi!
People come to the forum so they can be helped.
Talking what can be done does not help at all. Speaking what is already self-explanatory also does not help at all.
What's more, people do not know how to do scripts by themselves, if you want to help, talk about functions, teach them.. or just look and do not respond ..
I asked a question so that someone could help me somehow by teaching something about script or giving me a light at the end of the tunnel.
Since no one can help, I did a quick-fix with the knowledge that I had.
Soon people like Oscagi and DarkstaR showed up to help.
Thanks for the explanations, this, in fact, helped in something.
Ps: my english is as good as my scripts, sorry
Trykon
06-09-2017, 09:17 AM
If you want to learn there is tons of tutorials on forum and outside, just Google lua tutorial, there is also xenobot.wikia with almost all commands needed so you should have no problem with thinking if there is command like this or not.
I gave general info so with minimum knowledge and with a bit of search done on forum you could easily write it by yourself. If there is scripter that wanted to help in this particular scenario, great.
This is not a nursery and even there you get help and guidance instead an answer.
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.