miquel011
08-07-2014, 02:53 PM
I just clean this thread because i found the error, but i don't know how to fix that.
I added exori gran ico into targeting to delete 1 multiple spell, basically i noticed it ADDS KBs to my Memory usage when it change the target ( he's changing the target name over and over) But, i don't know if it's correct, but it adds over and over, so more targets = more RAM usage.
How the hell i fix that? spent over 5h already :/
The code looks like that now:
--[[Mages Multiple Strike Spells]]--
local targets = {"Swarmer", "Lesser Swarmer", "Insectoid Worker", "Waspoid", "Crawler", "Ladybug", "Spitter", "Kollos", "Spidris", "Spidris Elite", "Hive Overseer"}
-- Just change below to suit your needs.
local magia = {}
magia [1] = { spell = "exori ico" } --Max spell
magia [2] = { spell = "exori hur" } --Gran spell
Module.New("Multiple Strike Spells", function(module)
for _, data in ipairs(magia ) do
local c = Creature.GetByID(Self.TargetID())
if table.contains(targets, c:Name()) then
if c:DistanceFromSelf() <= 3 then
if Self.TargetID() ~= 0 then
for x=1, #magia do
if Self.CanCastSpell(data.spell) then
Self.Say(data.spell)
wait(500, 1500)
end
end
end
end
end
end
module:Delay(1000)
end)
I added exori gran ico into targeting to delete 1 multiple spell, basically i noticed it ADDS KBs to my Memory usage when it change the target ( he's changing the target name over and over) But, i don't know if it's correct, but it adds over and over, so more targets = more RAM usage.
How the hell i fix that? spent over 5h already :/
The code looks like that now:
--[[Mages Multiple Strike Spells]]--
local targets = {"Swarmer", "Lesser Swarmer", "Insectoid Worker", "Waspoid", "Crawler", "Ladybug", "Spitter", "Kollos", "Spidris", "Spidris Elite", "Hive Overseer"}
-- Just change below to suit your needs.
local magia = {}
magia [1] = { spell = "exori ico" } --Max spell
magia [2] = { spell = "exori hur" } --Gran spell
Module.New("Multiple Strike Spells", function(module)
for _, data in ipairs(magia ) do
local c = Creature.GetByID(Self.TargetID())
if table.contains(targets, c:Name()) then
if c:DistanceFromSelf() <= 3 then
if Self.TargetID() ~= 0 then
for x=1, #magia do
if Self.CanCastSpell(data.spell) then
Self.Say(data.spell)
wait(500, 1500)
end
end
end
end
end
end
module:Delay(1000)
end)