Skip to content

Instantly share code, notes, and snippets.

@nasseroth
Forked from SuperUserRoot/Ashe
Created May 24, 2020 21:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nasseroth/41356c9ce1089cd8c991038c34c09cb8 to your computer and use it in GitHub Desktop.
Save nasseroth/41356c9ce1089cd8c991038c34c09cb8 to your computer and use it in GitHub Desktop.
Ashe Script
if (myHero.charName ~= "Ashe") then return end
if FileExist(LIB_PATH .. "/VPrediction.lua") then
require "VPrediction"
else
PrintChat("Please download VPrediction and put it in the common folder.")
return
end
if FileExist(LIB_PATH .. "/FHPrediction.lua") then
require "FHPrediction"
else
PrintChat("Please download FHPrediction and put it in the common folder.")
return
end
spells = {}
spells.r = {name = myHero:GetSpellData(_R).name, ready = false, range = math.huge, width = 130, speed = 1600, delay = 0.25}
function readyCheck()
spells.r.ready = (myHero:CanUseSpell(_R) == READY)
end
local ts = TargetSelector(TARGET_LOW_HP_PRIORITY, 1500)
function OnLoad()
load()
-- menue
config = scriptConfig ("KatnissEverdeen", "KatnissEverdeen")
--menue Inhalt
config:addSubMenu("Draw", "Draw")
config.Draw:addParam("DrawW", "Draw W Range", SCRIPT_PARAM_ONOFF, true)
--Leertaste/Combo menue
config:addSubMenu("Combo", "Combo")
config.Combo:addParam("Combo", "Spacebar Modus", SCRIPT_PARAM_ONKEYDOWN, false, string.byte(" "))
config:addSubMenu("[" .. myHero.charName.. "] - interrupt dangerous spells", "interrupt")
config.interrupt:addParam("interruptRange", "Interrupt Range", SCRIPT_PARAM_SLICE, 1000, 1, 1500, 0)
config.interrupt:addParam("r", "Interrupt with R", SCRIPT_PARAM_ONOFF, true)
for i, a in pairs(GetEnemyHeroes()) do
if Interrupt[a.charName] ~= nil then
for i, spell in pairs(Interrupt[a.charName].stop) do
config.interrupt:addParam(spell.spellName, a.charName.." - "..spell.name, SCRIPT_PARAM_ONOFF, true)
end
end
end
end
Interrupt = {
["Katarina"] = {charName = "Katarina", stop = {["KatarinaR"] = {name = "Death lotus", spellName = "KatarinaR", ult = true }}},
["Nunu"] = {charName = "Nunu", stop = {["AbsoluteZero"] = {name = "Absolute Zero", spellName = "AbsoluteZero", ult = true }}},
["Malzahar"] = {charName = "Malzahar", stop = {["AlZaharNetherGrasp"] = {name = "Nether Grasp", spellName = "AlZaharNetherGrasp", ult = true}}},
["Caitlyn"] = {charName = "Caitlyn", stop = {["CaitlynAceintheHole"] = {name = "Ace in the hole", spellName = "CaitlynAceintheHole", ult = true, projectileName = "caitlyn_ult_mis.troy"}}},
["FiddleSticks"] = {charName = "FiddleSticks", stop = {["Crowstorm"] = {name = "Crowstorm", spellName = "Crowstorm", ult = true}}},
["Galio"] = {charName = "Galio", stop = {["GalioIdolOfDurand"] = {name = "Idole of Durand", spellName = "GalioIdolOfDurand", ult = true}}},
["Janna"] = {charName = "Janna", stop = {["ReapTheWhirlwind"] = {name = "Monsoon", spellName = "ReapTheWhirlwind", ult = true}}},
["MissFortune"] = {charName = "MissFortune", stop = {["MissFortune"] = {name = "Bullet time", spellName = "MissFortuneBulletTime", ult = true}}},
["Pantheon"] = {charName = "Pantheon", stop = {["PantheonRJump"] = {name = "Skyfall", spellName = "PantheonRJump", ult = true}}},
["Shen"] = {charName = "Shen", stop = {["ShenStandUnited"] = {name = "Stand united", spellName = "ShenStandUnited", ult = true}}},
["Urgot"] = {charName = "Urgot", stop = {["UrgotSwap2"] = {name = "Position Reverser", spellName = "UrgotSwap2", ult = true}}},
["Warwick"] = {charName = "Warwick", stop = {["InfiniteDuress"] = {name = "Infinite Duress", spellName = "InfiniteDuress", ult = true}}},
}
function OnProcessSpell(object, spellProc)
if myHero.dead then return end
if object.team == myHero.team then return end
if Interrupt[object.charName] ~= nil then
spell = Interrupt[object.charName].stop[spellProc.name]
if spell ~= nil then
if config.interrupt[spellProc.name] then
if GetDistance(object) < config.interrupt.interruptRange and spells.r.ready and settings.interrupt.r then
CastSpell(_R, object.x, object.z)
end
end
end
end
end
function load()
PrintChat("<font color=\"#800000\">KatnissEverdeen Script Successfully loaded!!! StayAlive")
end
function OnTick()
ts:update()
Combo()
end
function OnDraw( ... )
if (myHero.dead) then return end
if (config.Draw.DrawW) then
if (myHero:CanUseSpell(_W) == READY) then
DrawCircle(myHero.x, myHero.y, myHero.z, 650, 0xFF6633)
end
end
function Combo()
if (ts.target ~= nil) and not (ts.target.dead) and (ts.target.visible) then
if (config.Combo.Combo) then
local collision, amount, objects = FHPrediction.Collision(myHero, ts.target, "W", ts.target.team)
if not collision then
CastSpell(_W, ts.target.x, ts.target.z)
end
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment