local version = "1.25"
--[[
Evelynn - Widowmaker
Author: Draconis
Version: 1.25
Copyright 2014
Dependency: Standalone
--]]
if myHero.charName ~= "Evelynn" then return end
require 'SxOrbwalk'
require 'VPrediction'
------------------------------------------------------
-- Callbacks
------------------------------------------------------
function OnLoad()
print("Evelynn - Widowmaker: Sucessfully loaded!")
Variables()
Menu()
PriorityOnLoad()
if VIP_USER then
HookPackets()
end
end
function OnTick()
ComboKey = Settings.combo.comboKey
HarassKey = Settings.harass.harassKey
FleeKey = Settings.flee.fleeKey
JungleClearKey = Settings.jungle.jungleKey
LaneClearKey = Settings.lane.laneKey
if ComboKey then
Combo(Target)
end
if HarassKey then
Harass(Target)
end
if FleeKey then
Flee(Target)
end
if JungleClearKey then
JungleClear()
end
if LaneClearKey then
LaneClear()
end
if Settings.ks.killSteal then
KillSteal()
end
Checks()
end
function OnDraw()
if not myHero.dead and not Settings.drawing.mDraw then
if SkillQ.ready and Settings.drawing.qDraw then
DrawCircle(myHero.x, myHero.y, myHero.z, SkillQ.range, RGB(Settings.drawing.qColor[2], Settings.drawing.qColor[3], Settings.drawing.qColor[4]))
end
if SkillE.ready and Settings.drawing.eDraw then
DrawCircle(myHero.x, myHero.y, myHero.z, SkillE.range, RGB(Settings.drawing.eColor[2], Settings.drawing.eColor[3], Settings.drawing.eColor[4]))
end
if SkillR.ready and Settings.drawing.rDraw then
DrawCircle(myHero.x, myHero.y, myHero.z, SkillW.range, RGB(Settings.drawing.rColor[2], Settings.drawing.rColor[3], Settings.drawing.rColor[4]))
end
if Settings.drawing.Target and Target ~= nil then
DrawCircle(Target.x, Target.y, Target.z, 70, 0xCE00FF)
end
if Settings.drawing.myHero then
DrawCircle(myHero.x, myHero.y, myHero.z, myHero.range + GetDistance(myHero, myHero.minBBox), RGB(Settings.drawing.myColor[2], Settings.drawing.myColor[3], Settings.drawing.myColor[4]))
end
end
end
------------------------------------------------------
-- Functions
------------------------------------------------------
function Combo(unit)
if ValidTarget(unit) and unit ~= nil and unit.type == myHero.type then
if Settings.combo.useW then CastW(unit) end
CastQ(unit)
CastE(unit)
if Settings.combo.comboItems then return end
if Settings.combo.useR then CastR(unit) end
end
end
function Flee(unit)
Mv = Vector(myHero) + 400 * (Vector(mousePos) - Vector(myHero)):normalized()
myHero:MoveTo(Mv.x, Mv.z)
if ValidTarget(unit) and unit ~= nil then
CastQ(unit)
CastW(unit)
end
end
function Harass(unit)
if ValidTarget(unit) and unit ~= nil and unit.type == myHero.type and not IsMyManaLow() then
if Settings.harass.harassMode == 1 then
if Settings.harass.useQ then CastQ(unit) end
if Settings.harass.useE then CastE(unit) end
elseif Settings.harass.harassMode == 2 then
if Settings.harass.useQ then CastQ(unit) end
end
end
end
function LaneClear()
enemyMinions:update()
if LaneClearKey then
for i, minion in pairs(enemyMinions.objects) do
if ValidTarget(minion) and minion ~= nil then
if Settings.lane.laneQ and GetDistance(minion) <= SkillQ.range and SkillQ.ready then CastSpell(_Q) end
if Settings.lane.laneE and GetDistance(minion) <= SkillE.range and SkillE.ready then CastSpell(_E, minion) end
end
end
end
end
function JungleClear()
if Settings.jungle.jungleKey then
local JungleMob = GetJungleMob()
if JungleMob ~= nil then
if Settings.jungle.jungleQ and GetDistance(JungleMob) <= SkillQ.range and SkillQ.ready then
CastSpell(_Q)
end
if Settings.jungle.jungleE and GetDistance(JungleMob) <= SkillE.range and SkillE.ready then
CastSpell(_E, JungleMob)
end
end
end
end
function CastQ(unit)
if SkillQ.ready and GetDistance(unit) <= SkillQ.range then
CastSpell(_Q)
end
end
function CastE(unit)
if SkillE.ready and GetDistance(unit) <= SkillE.range then
CastSpell(_E, unit)
end
end
function CastW(unit)
if ComboKey then
if SkillW.ready and GetDistance(unit) <= SkillW.range then
CastSpell(_W)
end
elseif FleeKey then
if SkillW.ready and GetDistance(unit) <= math.huge then
CastSpell(_W)
end
end
end
function CastR(unit)
if Settings.combo.useR == 1 then return end
if unit ~= nil and GetDistance(unit) <= SkillR.range and SkillR.ready then
AOECastPosition, MainTargetHitChance, nTargets = VP:GetCircularAOECastPosition(unit, SkillR.delay, SkillR.width, SkillR.range, SkillR.speed, myHero)
if MainTargetHitChance >= 2 then
if Settings.combo.useR == 2 and nTargets >= 1 then
CastSpell(_R, AOECastPosition.x, AOECastPosition.z)
elseif Settings.combo.useR == 3 and nTargets >= 2 then
CastSpell(_R, AOECastPosition.x, AOECastPosition.z)
elseif Settings.combo.useR == 4 and nTargets >= 3 then
CastSpell(_R, AOECastPosition.x, AOECastPosition.z)
elseif Settings.combo.useR == 5 and nTargets >= 4 then
CastSpell(_R, AOECastPosition.x, AOECastPosition.z)
end
end
end
end
function KillSteal()
for _, enemy in ipairs(GetEnemyHeroes()) do
qDmg = getDmg("Q", enemy, myHero)
eDmg = getDmg("E", enemy, myHero)
if ValidTarget(enemy) and enemy.visible then
if enemy.health <= qDmg then
CastQ(enemy)
elseif enemy.health <= qDmg + eDmg then
CastE(enemy)
CastQ(enemy)
elseif enemy.health <= eDmg then
CastE(enemy)
end
if Settings.ks.autoIgnite then
AutoIgnite(enemy)
end
end
end
end
function AutoIgnite(unit)
if ValidTarget(unit, Ignite.range) and unit.health <= 50 + (20 * myHero.level) then
if Ignite.ready then
CastSpell(Ignite.slot, unit)
end
end
end
------------------------------------------------------
-- Checks, menu & stuff
------------------------------------------------------
function Checks()
SkillQ.ready = (myHero:CanUseSpell(_Q) == READY)
SkillW.ready = (myHero:CanUseSpell(_W) == READY)
SkillE.ready = (myHero:CanUseSpell(_E) == READY)
SkillR.ready = (myHero:CanUseSpell(_R) == READY)
if myHero:GetSpellData(SUMMONER_1).name:find(Ignite.name) then
Ignite.slot = SUMMONER_1
elseif myHero:GetSpellData(SUMMONER_2).name:find(Ignite.name) then
Ignite.slot = SUMMONER_2
end
Ignite.ready = (Ignite.slot ~= nil and myHero:CanUseSpell(Ignite.slot) == READY)
Target = GetCustomTarget()
SxOrb:ForceTarget(Target)
if Settings.drawing.lfc.lfc then _G.DrawCircle = DrawCircle2 else _G.DrawCircle = _G.oldDrawCircle end
end
function IsMyManaLow()
if myHero.mana < (myHero.maxMana * ( Settings.harass.harassMana / 100)) then
return true
else
return false
end
end
function Menu()
Settings = scriptConfig("Evelynn - Widowmaker "..version.."", "DraconisEve")
Settings:addSubMenu("["..myHero.charName.."] - Combo Settings", "combo")
Settings.combo:addParam("comboKey", "Combo Key", SCRIPT_PARAM_ONKEYDOWN, false, 32)
Settings.combo:addParam("useR", "Use "..SkillR.name.." (R) in Combo", SCRIPT_PARAM_LIST, 2, { "No", ">1 targets", ">2 targets", ">3 targets", ">4 targets" })
Settings.combo:addParam("useW", "Use "..SkillW.name.." (W) in Combo", SCRIPT_PARAM_ONOFF, true)
Settings.combo:addParam("comboItems", "Use Items in Combo", SCRIPT_PARAM_ONOFF, true)
Settings.combo:permaShow("comboKey")
Settings:addSubMenu("["..myHero.charName.."] - Harass Settings", "harass")
Settings.harass:addParam("harassKey", "Harass Key", SCRIPT_PARAM_ONKEYDOWN, false, GetKey("C"))
Settings.harass:addParam("harassMode", "Choose Harass Mode", SCRIPT_PARAM_LIST, 1, { "Q + E", "Q" })
Settings.harass:addParam("useQ", "Use "..SkillQ.name.." (Q) in Harass", SCRIPT_PARAM_ONOFF, true)
Settings.harass:addParam("useE", "Use "..SkillE.name.." (E) in Harass", SCRIPT_PARAM_ONOFF, true)
Settings.harass:addParam("harassMana", "Min. Mana Percent: ", SCRIPT_PARAM_SLICE, 50, 0, 100, 0)
Settings.harass:permaShow("harassKey")
Settings:addSubMenu("["..myHero.charName.."] - Flee Settings", "flee")
Settings.flee:addParam("fleeKey", "Flee Key", SCRIPT_PARAM_ONKEYDOWN, false, GetKey("G"))
Settings.flee:addParam("useQ", "Use "..SkillQ.name.." (Q) in Flee", SCRIPT_PARAM_ONOFF, true)
Settings.flee:addParam("useE", "Use "..SkillW.name.." (W) in Flee", SCRIPT_PARAM_ONOFF, true)
Settings.flee:permaShow("fleeKey")
Settings:addSubMenu("["..myHero.charName.."] - Lane Clear Settings", "lane")
Settings.lane:addParam("laneKey", "Lane Clear Key", SCRIPT_PARAM_ONKEYDOWN, false, GetKey("V"))
Settings.lane:addParam("laneQ", "Clear with "..SkillQ.name.." (Q)", SCRIPT_PARAM_ONOFF, true)
Settings.lane:addParam("laneE", "Clear with "..SkillE.name.." (E)", SCRIPT_PARAM_ONOFF, true)
Settings.lane:permaShow("laneKey")
Settings:addSubMenu("["..myHero.charName.."] - Jungle Clear Settings", "jungle")
Settings.jungle:addParam("jungleKey", "Jungle Clear Key", SCRIPT_PARAM_ONKEYDOWN, false, GetKey("V"))
Settings.jungle:addParam("jungleQ", "Clear with "..SkillQ.name.." (Q)", SCRIPT_PARAM_ONOFF, true)
Settings.jungle:addParam("jungleE", "Clear with "..SkillE.name.." (E)", SCRIPT_PARAM_ONOFF, true)
Settings.jungle:permaShow("jungleKey")
Settings:addSubMenu("["..myHero.charName.."] - KillSteal Settings", "ks")
Settings.ks:addParam("killSteal", "Use Smart Kill Steal", SCRIPT_PARAM_ONOFF, true)
Settings.ks:addParam("autoIgnite", "Auto Ignite", SCRIPT_PARAM_ONOFF, true)
Settings.ks:permaShow("killSteal")
Settings:addSubMenu("["..myHero.charName.."] - Draw Settings", "drawing")
Settings.drawing:addParam("mDraw", "Disable All Range Draws", SCRIPT_PARAM_ONOFF, false)
Settings.drawing:addParam("Target", "Draw Circle on Target", SCRIPT_PARAM_ONOFF, true)
Settings.drawing:addParam("myHero", "Draw My Range", SCRIPT_PARAM_ONOFF, true)
Settings.drawing:addParam("myColor", "Draw My Range Color", SCRIPT_PARAM_COLOR, {255, 255, 255, 255})
Settings.drawing:addParam("qDraw", "Draw "..SkillQ.name.." (Q) Range", SCRIPT_PARAM_ONOFF, true)
Settings.drawing:addParam("qColor", "Draw "..SkillQ.name.." (Q) Color", SCRIPT_PARAM_COLOR, {255, 255, 255, 255})
Settings.drawing:addParam("eDraw", "Draw "..SkillE.name.." (E) Range", SCRIPT_PARAM_ONOFF, true)
Settings.drawing:addParam("eColor", "Draw "..SkillE.name.." (E) Color", SCRIPT_PARAM_COLOR, {255, 255, 255, 255})
Settings.drawing:addParam("rDraw", "Draw "..SkillR.name.." (R) Range", SCRIPT_PARAM_ONOFF, true)
Settings.drawing:addParam("rColor", "Draw "..SkillR.name.." (R) Color", SCRIPT_PARAM_COLOR, {255, 255, 255, 255})
Settings.drawing:addSubMenu("Lag Free Circles", "lfc")
Settings.drawing.lfc:addParam("lfc", "Lag Free Circles", SCRIPT_PARAM_ONOFF, false)
Settings.drawing.lfc:addParam("CL", "Quality", 4, 75, 75, 2000, 0)
Settings.drawing.lfc:addParam("Width", "Width", 4, 1, 1, 10, 0)
Settings:addSubMenu("["..myHero.charName.."] - Misc Settings", "misc")
Settings.misc:addParam("slowsW", "Use "..SkillW.name.." (W) if slowed", SCRIPT_PARAM_ONOFF, true)
Settings:addSubMenu("["..myHero.charName.."] - Orbwalking Settings", "Orbwalking")
SxOrb:LoadToMenu(Settings.Orbwalking)
TargetSelector = TargetSelector(TARGET_LESS_CAST_PRIORITY, SkillR.range, DAMAGE_MAGIC, true)
TargetSelector.name = "Evelynn"
Settings:addTS(TargetSelector)
end
function Variables()
SkillQ = { name = "Hate Spike", range = 500, delay = nil, speed = nil, width = nil, ready = false }
SkillW = { name = "Dark Frenzy", range = 650, delay = nil, speed = nil, width = nil, ready = false }
SkillE = { name = "Ravage", range = 275, delay = nil, speed = nil, width = nil, ready = false }
SkillR = { name = "Agony's Embrace", range = 650, delay = 0.250, speed = 1300, width = 350, ready = false }
Ignite = { name = "summonerdot", range = 600, slot = nil }
enemyMinions = minionManager(MINION_ENEMY, SkillQ.range, myHero, MINION_SORT_HEALTH_ASC)
VP = VPrediction()
JungleMobs = {}
JungleFocusMobs = {}
if GetGame().map.shortName == "twistedTreeline" then
TwistedTreeline = true
else
TwistedTreeline = false
end
_G.oldDrawCircle = rawget(_G, 'DrawCircle')
_G.DrawCircle = DrawCircle2
priorityTable = {
AP = {
"Annie", "Ahri", "Akali", "Anivia", "Annie", "Brand", "Cassiopeia", "Diana", "Evelynn", "FiddleSticks", "Fizz", "Gragas", "Heimerdinger", "Karthus",
"Kassadin", "Katarina", "Kayle", "Kennen", "Leblanc", "Lissandra", "Lux", "Malzahar", "Mordekaiser", "Morgana", "Nidalee", "Orianna",
"Ryze", "Sion", "Swain", "Syndra", "Teemo", "TwistedFate", "Veigar", "Viktor", "Vladimir", "Xerath", "Ziggs", "Zyra", "Velkoz"
},
Support = {
"Alistar", "Blitzcrank", "Janna", "Karma", "Leona", "Lulu", "Nami", "Nunu", "Sona", "Soraka", "Taric", "Thresh", "Zilean", "Braum"
},
Tank = {
"Amumu", "Chogath", "DrMundo", "Galio", "Hecarim", "Malphite", "Maokai", "Nasus", "Rammus", "Sejuani", "Nautilus", "Shen", "Singed", "Skarner", "Volibear",
"Warwick", "Yorick", "Zac"
},
AD_Carry = {
"Ashe", "Caitlyn", "Corki", "Draven", "Ezreal", "Graves", "Jayce", "Jinx", "KogMaw", "Lucian", "MasterYi", "MissFortune", "Pantheon", "Quinn", "Shaco", "Sivir",
"Talon","Tryndamere", "Tristana", "Twitch", "Urgot", "Varus", "Vayne", "Yasuo", "Zed"
},
Bruiser = {
"Aatrox", "Darius", "Elise", "Fiora", "Gangplank", "Garen", "Irelia", "JarvanIV", "Jax", "Khazix", "LeeSin", "Nocturne", "Olaf", "Poppy",
"Renekton", "Rengar", "Riven", "Rumble", "Shyvana", "Trundle", "Udyr", "Vi", "MonkeyKing", "XinZhao"
}
}
Items = {
BRK = { id = 3153, range = 450, reqTarget = true, slot = nil },
BWC = { id = 3144, range = 400, reqTarget = true, slot = nil },
DFG = { id = 3128, range = 750, reqTarget = true, slot = nil },
HGB = { id = 3146, range = 400, reqTarget = true, slot = nil },
RSH = { id = 3074, range = 350, reqTarget = false, slot = nil },
STD = { id = 3131, range = 350, reqTarget = false, slot = nil },
TMT = { id = 3077, range = 350, reqTarget = false, slot = nil },
YGB = { id = 3142, range = 350, reqTarget = false, slot = nil },
BFT = { id = 3188, range = 750, reqTarget = true, slot = nil },
RND = { id = 3143, range = 275, reqTarget = false, slot = nil }
}
if not TwistedTreeline then
JungleMobNames = {
["SRU_MurkwolfMini2.1.3"] = true,
["SRU_MurkwolfMini2.1.2"] = true,
["SRU_MurkwolfMini8.1.3"] = true,
["SRU_MurkwolfMini8.1.2"] = true,
["SRU_BlueMini1.1.2"] = true,
["SRU_BlueMini7.1.2"] = true,
["SRU_BlueMini21.1.3"] = true,
["SRU_BlueMini27.1.3"] = true,
["SRU_RedMini10.1.2"] = true,
["SRU_RedMini10.1.3"] = true,
["SRU_RedMini4.1.2"] = true,
["SRU_RedMini4.1.3"] = true,
["SRU_KrugMini11.1.1"] = true,
["SRU_KrugMini5.1.1"] = true,
["SRU_RazorbeakMini9.1.2"] = true,
["SRU_RazorbeakMini9.1.3"] = true,
["SRU_RazorbeakMini9.1.4"] = true,
["SRU_RazorbeakMini3.1.2"] = true,
["SRU_RazorbeakMini3.1.3"] = true,
["SRU_RazorbeakMini3.1.4"] = true
}
FocusJungleNames = {
["SRU_Blue1.1.1"] = true,
["SRU_Blue7.1.1"] = true,
["SRU_Murkwolf2.1.1"] = true,
["SRU_Murkwolf8.1.1"] = true,
["SRU_Gromp13.1.1"] = true,
["SRU_Gromp14.1.1"] = true,
["Sru_Crab16.1.1"] = true,
["Sru_Crab15.1.1"] = true,
["SRU_Red10.1.1"] = true,
["SRU_Red4.1.1"] = true,
["SRU_Krug11.1.2"] = true,
["SRU_Krug5.1.2"] = true,
["SRU_Razorbeak9.1.1"] = true,
["SRU_Razorbeak3.1.1"] = true,
["SRU_Dragon6.1.1"] = true,
["SRU_Baron12.1.1"] = true
}
else
FocusJungleNames = {
["TT_NWraith1.1.1"] = true,
["TT_NGolem2.1.1"] = true,
["TT_NWolf3.1.1"] = true,
["TT_NWraith4.1.1"] = true,
["TT_NGolem5.1.1"] = true,
["TT_NWolf6.1.1"] = true,
["TT_Spiderboss8.1.1"] = true
}
JungleMobNames = {
["TT_NWraith21.1.2"] = true,
["TT_NWraith21.1.3"] = true,
["TT_NGolem22.1.2"] = true,
["TT_NWolf23.1.2"] = true,
["TT_NWolf23.1.3"] = true,
["TT_NWraith24.1.2"] = true,
["TT_NWraith24.1.3"] = true,
["TT_NGolem25.1.1"] = true,
["TT_NWolf26.1.2"] = true,
["TT_NWolf26.1.3"] = true
}
end
for i = 0, objManager.maxObjects do
local object = objManager:getObject(i)
if object and object.valid and not object.dead then
if FocusJungleNames[object.name] then
JungleFocusMobs[#JungleFocusMobs+1] = object
elseif JungleMobNames[object.name] then
JungleMobs[#JungleMobs+1] = object
end
end
end
end
function SetPriority(table, hero, priority)
for i=1, #table, 1 do
if hero.charName:find(table[i]) ~= nil then
TS_SetHeroPriority(priority, hero.charName)
end
end
end
function arrangePrioritys()
for i, enemy in ipairs(GetEnemyHeroes()) do
SetPriority(priorityTable.AD_Carry, enemy, 1)
SetPriority(priorityTable.AP, enemy, 2)
SetPriority(priorityTable.Support, enemy, 3)
SetPriority(priorityTable.Bruiser, enemy, 4)
SetPriority(priorityTable.Tank, enemy, 5)
end
end
function arrangePrioritysTT()
for i, enemy in ipairs(GetEnemyHeroes()) do
SetPriority(priorityTable.AD_Carry, enemy, 1)
SetPriority(priorityTable.AP, enemy, 1)
SetPriority(priorityTable.Support, enemy, 2)
SetPriority(priorityTable.Bruiser, enemy, 2)
SetPriority(priorityTable.Tank, enemy, 3)
end
end
function UseItems(unit)
if unit ~= nil then
for _, item in pairs(Items) do
item.slot = GetInventorySlotItem(item.id)
if item.slot ~= nil then
if item.reqTarget and GetDistance(unit) < item.range then
CastSpell(item.slot, unit)
elseif not item.reqTarget then
if (GetDistance(unit) - getHitBoxRadius(myHero) - getHitBoxRadius(unit)) < 50 then
CastSpell(item.slot)
end
end
end
end
end
end
function getHitBoxRadius(target)
return GetDistance(target.minBBox, target.maxBBox)/2
end
function PriorityOnLoad()
if heroManager.iCount < 10 or (TwistedTreeline and heroManager.iCount < 6) then
print("Evelynn - Widowmaker: Too few champions to arrange priority.")
elseif heroManager.iCount == 6 then
arrangePrioritysTT()
else
arrangePrioritys()
end
end
function GetJungleMob()
for _, Mob in pairs(JungleFocusMobs) do
if ValidTarget(Mob, SkillQ.range) then return Mob end
end
for _, Mob in pairs(JungleMobs) do
if ValidTarget(Mob, SkillQ.range) then return Mob end
end
end
function OnCreateObj(obj)
if obj.valid then
if FocusJungleNames[obj.name] then
JungleFocusMobs[#JungleFocusMobs+1] = obj
elseif JungleMobNames[obj.name] then
JungleMobs[#JungleMobs+1] = obj
end
end
end
function OnDeleteObj(obj)
for i, Mob in pairs(JungleMobs) do
if obj.name == Mob.name then
table.remove(JungleMobs, i)
end
end
for i, Mob in pairs(JungleFocusMobs) do
if obj.name == Mob.name then
table.remove(JungleFocusMobs, i)
end
end
end
-- Trees
function GetCustomTarget()
TargetSelector:update()
if _G.MMA_Target and _G.MMA_Target.type == myHero.type then return _G.MMA_Target end
if _G.AutoCarry and _G.AutoCarry.Crosshair and _G.AutoCarry.Attack_Crosshair and _G.AutoCarry.Attack_Crosshair.target and _G.AutoCarry.Attack_Crosshair.target.type == myHero.type then return _G.AutoCarry.Attack_Crosshair.target end
return TargetSelector.target
end
-- Barasia, vadash, viseversa
function DrawCircleNextLvl(x, y, z, radius, width, color, chordlength)
radius = radius or 300
quality = math.max(8,round(180/math.deg((math.asin((chordlength/(2*radius)))))))
quality = 2 * math.pi / quality
radius = radius*.92
local points = {}
for theta = 0, 2 * math.pi + quality, quality do
local c = WorldToScreen(D3DXVECTOR3(x + radius * math.cos(theta), y, z - radius * math.sin(theta)))
points[#points + 1] = D3DXVECTOR2(c.x, c.y)
end
DrawLines2(points, width or 1, color or 4294967295)
end
function round(num)
if num >= 0 then return math.floor(num+.5) else return math.ceil(num-.5) end
end
function DrawCircle2(x, y, z, radius, color)
local vPos1 = Vector(x, y, z)
local vPos2 = Vector(cameraPos.x, cameraPos.y, cameraPos.z)
local tPos = vPos1 - (vPos1 - vPos2):normalized() * radius
local sPos = WorldToScreen(D3DXVECTOR3(tPos.x, tPos.y, tPos.z))
if OnScreen({ x = sPos.x, y = sPos.y }, { x = sPos.x, y = sPos.y }) then
DrawCircleNextLvl(x, y, z, radius, Settings.drawing.lfc.Width, color, Settings.drawing.lfc.CL)
end
end
function OnGainBuff(unit, buff)
if unit ~= nil and unit == myHero and SkillW.ready and Settings.misc.slowsW then
if buff.type == BUFF_SLOW then
CastSpell(_W)
end
end
end
function OnSendPacket(p)
local packet = Packet(p)
if packet:get('name') == 'S_CAST' then
local SpellID = packet:get('spellId')
if packet:get('spellId') == _R then
local Targets = 0
for i, Target in pairs(GetEnemyHeroes()) do
if Target ~= nil and not Target.dead and Target.visible and GetDistance(mousePos, Target) < SkillR.width then Targets = Targets + 1 end
end
if Targets == 0 then p:Block() end
end
end
end