-
there's not an error message it just stop executing the module... Here it is:
Code:
function TargetingScript()
local Creatures = {"Water Elemental", "Quara Mantassin Scout"}
for i = CREATURES_LOW, CREATURES_HIGH do
local c = Creature.GetFromIndex(i)
if c:isAlive() and c:isVisible() and c:isReachable() and c:isTarget() then
if (GetMonstersArround(6, unpack(Creatures)) < 4) then
if (Lightning) then
if (Self.CanCastSpell("Exori amp vis")) and (c:DistanceFromSelf() <= 4) and (c:HealthPercent() >= 30)then
Self.Say("Exori amp vis")
end
end
if (ExoriGranVis) then
if (Self.CanCastSpell("Exori gran vis")) and (c:DistanceFromSelf() <=3) and (c:HealthPercent() >= 30)then
Self.Say("exori gran vis")
end
end
if (Self.CanCastSpell("Exori vis") and c:DistanceFromSelf() <=3) then
Self.Say("Exori vis")
end
else
if (UE) then
if Self.CanCastSpell("exevo gran mas vis") then
Self.Say("exevo gran mas vis")
end
end
if (ThunderStorm) then
Self.UseItemWithTarget(3202)
end
end
end
end
end
function GetMonstersArround(r, ...)
local n = 0
local m = {...}
for i = CREATURES_LOW, CREATURES_HIGH do
local c = Creature.GetFromIndex(i)
if c:isAlive() and c:isVisible() and c:isReachable()and c:isMonster() and (c:DistanceFromSelf() < r) and table.contains(m, c:Name()) then
n = n + 1
end
end
return n
end
Module.New('TargetingModule', TargetingScript, true)
-
After how long tome does it stop?
Because I noticed that a few of my simplier modules are stopping after a couple of hours if not being used. Has also happened that they stop inthe middle of a hunt, but very rarely and only if I did something to interrupt the module (like walking manually causing the actions of the module not being executed properly).