Quote Originally Posted by Furpan View Post
I'll just leave this here (ps. it'll use the spell after you've dealt wand damage, wand+spell comboer)
It doesn't turn anywhere, it just checks the distance from self, using it on Calva atm

lua code:
local Spells = {
{words = 'exori gran vis', hppc = 20, range = 3, mana = 70, list = {'crystal spider'}},
{words = 'exori gran vis', hppc = 50, range = 3, mana = 70, list = {'water elemental'}},
{words = 'exori gran vis', hppc = 60, range = 3, mana = 70, list = {'ice golem'}},
{words = 'exori vis', hppc = 0, range = 3, mana = 20, list = {'crystal spider', 'ice golem', 'water elemental', 'quara mantassin scout'}}
}

local PvPRadiusSafety = 3

function SafeRadius(radius)
for n, c in Creature.iPlayers() do
if c:DistanceFromSelf() < radius then
return true
end
end
end

BattleMessageProxy.OnReceive('shooter', function(proxy, message)
local givendmg = string.match(message, "(.+) due to your attack.")
if (givendmg) then
local id = Self.TargetID()
if (id ~= 0) then
local mp = Self.Mana()
local c = Creature.New(id)
for i = 1, #Spells do
if table.contains(Spells[i].list, c:Name():lower()) then
if Self.CanCastSpell(Spells[i].words) and mp > Spells[i].mana and c:HealthPercent() >= Spells[i].hppc then
local isUnsafe = SafeRadius(PvPRadiusSafety)
if not (isUnsafe) and c:DistanceFromSelf() <= Spells[i].range then
if c:isTarget() then
Self.Cast(Spells[i].words, Spells[i].mana)
end
end
break
end
end
end
end
end
end)
hello, nice script i use it everyday! it is possible to add a count like amount of mosnters to use the spell? thanks in advance,