Hello.
It's certainly possible to make a lure script using LUA only, but there's such function on Cavebot and Targeting which makes it easier to users. So i will just make a simple script as example that you can improve or so.
Basically, you will use Cavebot-Lure waypoints and Targeting->(Monsters)->Stance: Lure to lure monsters to a specific sqm and the scripts below to cast exori when your character reaches those sqms.
This script will cast exori if you are on specific locations, which should be the spots that you stay when after luring.
local LureLocations = {
{ X = 12345, Y = 13245, Z = 6 },
{ X = 12345, Y = 13245, Z = 6 },
{ X = 12345, Y = 13245, Z = 6 },
}
local Monsters = { 'Demon Skeleton', 'Vampire' }
local MinMonsters = 3 -- Min. count to cast exori.
local SafeHealth = 70 -- Only if your HP % is higher or equal to this valaue.
if hppc() >= SafeHealth and mp() >= 150 and cancast() then
local player_x = posx()
local player_y = posy()
local player_z = posz()
for _, lureloc in ipairs(LureLocations) do
if player_x == lureloc.X and player_y == lureloc.Y and player_z == lureloc.Z and maround(1, unpack(Monsters)) >= MinMonsters then
cast('exori')
wait(1200)
break
end
end
end
This script will do the same thing above, but it's an attempt to automatically detect when you are on lure waypoints. But this may not be good to be used when you have some lure waypoints that you don't wanna exori or so.
local Monsters = { 'Demon Skeleton', 'Vampire' }
local MinMonsters = 3 -- Min. count to cast exori.
local SafeHealth = 70 -- Only if your HP % is higher or equal to this valaue.
local wpt = waypoint()
if wpt.id >= 0 and wpt.name:lower() == 'lure' and posx() == wpt.x and posy() == wpt.y and posz() == wpt.z and hppc() >= SafeHealth and mp() >= 150 and cancast() and maround(1, unpack(Monsters)) >= MinMonsters then
cast('exori')
wait(1200)
end