bodaelnegm
Audience Engagement Expert
LEVEL 1
300 XP
Code:
local ts
require "SxOrbWalk"
require "VPrediction"
ts = TargetSelector(TARGET_LOW_HP_PRIORITY,650)
VP = VPrediction()
function OnLoad()
Menu()
SpellID()
end
function SpellID()
SpellQ = {id = "Q", delay = 0.25, width = -1, speed = 1400, range = 625, ready = false}
SpellW = {id = "W", delay = 0.25, width = 50*math.pi/180, speed = math.huge, range = 610, ready = false}
SpellR = {id = "R", delay = 0.25, width = 250, speed = math.huge, range = 600, ready = false}
end
function Menu()
Settings = scriptConfig("Annie - Little Terrorist", "combo")
Settings:addSubMenu("Combo", "Combo")
Settings.Combo:addParam("CastQ", "Cast Q", SCRIPT_PARAM_ONOFF, true)
Settings.Combo:addParam("CastW", "Cast W", SCRIPT_PARAM_ONOFF, true)
Settings.Combo:addParam("CastE", "Cast E", SCRIPT_PARAM_ONOFF, true)
Settings.Combo:addParam("CastR", "Cast R", SCRIPT_PARAM_ONOFF, true)
Settings:addSubMenu("Last Hit", "LastHit")
Settings.LastHit:addParam("UseQLastHit", "Use Q in Last Hit", SCRIPT_PARAM_ONOFF, true)
Settings.LastHit:addParam("UseWLastHit", "Use W in Last Hit", SCRIPT_PARAM_ONOFF, true)
Settings.LastHit:addParam("UseELastHit", "Use E in Last Hit", SCRIPT_PARAM_ONOFF, true)
Settings.LastHit:addParam("UseRLastHit", "Use R in Last Hit", SCRIPT_PARAM_ONOFF, true)
Settings:addParam("Combo1", "Combo1", SCRIPT_PARAM_ONKEYDOWN, false, 32)
end
function OnTick()
CastQ()
CastW()
CastE()
CastR()
end
function CastQ()
ts:update()
if ts.target ~= nil then
if Settings.Combo1 then
if Settings.Combo.CastQ then
if myHero:CanUseSpell(_Q) == READY then
CastSpell(_Q, ts.target)
end
end
end
end
end
function CastW()
ts:update()
if ts.target ~= nil then
if Settings.Combo1 then
if Settings.Combo.CastW then
if myHero:CanUseSpell(_W) == READY then
local CastPosition, HitChance, Position = VP:GetLineCastPosition(ts.target, SpellW.delay, SpellW.width, SpellW.range, SpellW.speed, myHero, true)
if HitChance >= 2 then
CastSpell(_W, CastPosition.x, CastPosition.z)
end
end
end
end
end
end
function CastE1()
if myHero:CanUseSpell(_E) == READY then
CastSpell(_E)
end
end
function CastE()
if myHero.health > 200 then
if Settings.Combo1 then
if Settings.Combo.CastE then
CastE1()
end
end
end
end
function CastR()
ts:update()
if ts.target ~= nil and GetDistance(ts.target) <= SpellR.range and SpellR.ready then
if Settings.Combo1 then
if Settings.Combo.CastR then
if myHero:CanUseSpell(_R) == READY then
local AOECastPosition, MainTargetHitChance, nTargets = VP:GetCircularAOECastPosition(ts.target, SpellR.delay, SpellR.width, SpellR.range, SpellR.speed, myHero)
if MainTargetHitChance >= 2 then
if nTargets >= 1 then
CastSpell(_R, AOECastPosition.x, AOECastPosition.z)
end
end
end
end
end
end
end
function OnDraw()
RangeQDraw()
RangeWDraw()
RangeRDraw()
end
function RangeQDraw()
DrawCircle(myHero.x, myHero.y, myHero.z, 1000, 0xFF00FF00)
end
function RangeWDraw()
DrawCircle(myHero.x, myHero.y, myHero.z, 625, 0x00FF00FF)
end
function RangeRDraw()
DrawCircle(myHero.x, myHero.y, myHero.z, 600, 0xF0F0F0F0)
end
dat shit cant cast R