Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
114 lines (98 sloc) 3.49 KB
PrintChat(string.format("<font color='#fdfd24'> Not Jarvin VI </font>"))
if GetObjectName(GetMyHero()) ~= "JarvanIV" then return end
require 'DamageLib'
require 'OpenPredict'
j = Menu("j", "Jarvan IV")
j:Menu("Combo", "Combo")
j.Combo:KeyBinding("E", "use E", string.byte(" "));
j.Combo:KeyBinding("Q", "use Q", string.byte(" "));
j:Menu("Escape", "Hold T key Escape")
j.Escape:Key("EQ", "Hold T Escape", string.byte("T"));
j:Menu("Shield", "Shield")
j.Shield:Key("W", "use W SelfBarrier", string.byte(" "));
j.Shield:Slider("Barrier", "Barrier % under hp", 30, 0, 100, 1)
j:Menu("killsteal", "killsteal")
j.killsteal:Boolean("E", "Killsteal E", true)
j.killsteal:Boolean("Q", "Killsteal Q", true)
j.killsteal:Boolean("R", "Killsteal R", true)
local DragonStrike = { delay = 0.25, speed = 1400, width = 70, range = GetCastRange(myHero,_Q)}
local DemacianStandard = { delay = 0.25, speed = 1450, width = 75, range = GetCastRange(myHero,_E), radius = 75}
local target = GetCurrentTarget()
OnTick(function(myHero)
CastE()
CastQ()
CastW()
Escape()
KillStealE()
KillStealQ()
KillStealR()
end)
function CastE()
local target = GetCurrentTarget()
if IOW:Mode() == "Combo" and j.Combo.E:Value() then
if Ready(_E) and ValidTarget(target, GetCastRange(myHero,_E)) then
local E = GetCircularAOEPrediction(target, DemacianStandard)
if E and E.hitChance >= 0.20 then
CastSkillShot(_E, E.castPos)end
end
end
end
function CastQ()
local target = GetCurrentTarget()
if IOW:Mode() == "Combo" and j.Combo.Q:Value() then
if Ready(_Q) and ValidTarget(target, GetCastRange(myHero,_Q)) then
local Q = GetLinearAOEPrediction(target, DragonStrike)
if Q and Q.hitChance >= 0.20 then
CastSkillShot(_Q, Q.castPos)end
end
end
end
function CastW()
DelayAction(function()
if Ready(_W) and GetPercentHP(myHero) <= j.Shield.Barrier:Value() and j.Shield.W:Value() then
myHero:Cast(_W, myHero)
end
end, GetWindUp(myHero))
end
function Escape()
if not IsVisible(myHero) or not Ready(_E) then return end
if Ready(_Q) and j.Escape.EQ:Value() then
CastSkillShot(_E, GetMousePos()) end
if j.Escape.EQ:Value() then MoveToXYZ(GetMousePos())end
end
function KillStealE()
if j.killsteal.E:Value() then
for _, target in pairs(GetEnemyHeroes()) do
if ValidTarget(target, GetCastRange(myHero,_Q)) and GetCurrentHP(target) <= getdmg("E", target) then
local E = GetCircularAOEPrediction(target, DemacianStandard)
if E and E.hitChance >= 0.20 then
CastSkillShot(_E, E.castPos)end
end
end
end
end
function KillStealQ()
if j.killsteal.Q:Value() then
for _, target in pairs(GetEnemyHeroes()) do
if ValidTarget(target, GetCastRange(myHero,_Q)) and GetCurrentHP(target) <= getdmg("Q", target) then
local Q = GetLinearAOEPrediction(target, DragonStrike)
if Q and Q.hitChance >= 0.20 then
CastSkillShot(_Q, Q.castPos)end
end
end
end
end
function KillStealR()
for _, target in pairs(GetEnemyHeroes()) do
if Ready(_R) and ValidTarget(target, GetCastRange(myHero,_R)) and j.killsteal.R:Value() and GetCurrentHP(target) <= getdmg("R", target) then
if GotBuff(target, "jarvanivmartialcadencecheck") == 0 then
CastTargetSpell(target, _R)end
end
end
end
OnProcessSpell(function(unit, spell)
if Ready(_Q) and unit == myHero and spell.name == "JarvanIVDemacianStandard" and j.Combo.Q:Value() then
DelayAction(function() CastSkillShot(_Q, GetMousePos()) end, 0)end
if Ready(_Q) and unit == myHero and spell.name == "JarvanIVDemacianStandard" and j.Escape.EQ:Value() then
DelayAction(function() CastSkillShot(_Q, GetMousePos()) end, 0)end
end)