Quote Originally Posted by Gluben View Post
Works like a charm, thanks alot!
Doesn't look like it prioritizes the spells at the top though?
This is because pairs() are in random order, would need a small change:

Code:
local spells = {
    {spell = "Kura Flur", dist = 1},
    {spell = "Kura Min Flur", dist = 1}
}

Module.New("", function()
    local targetID = getSelfTargetID()

    if (targetID <= 0) then
        return
    end

    for i = 1, #spells do
        if (Creature.DistanceFromSelf(targetID) <= spells[i].dist) then
            if (Self.GetSpellCooldown(spells[i].spell) == 0) then
                Self.Say(spells[i].spell)
            end
        end
    end
end)