Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --########################################--
- --## Graves ##--
- --## Running Riot ##--
- --########################################--
- if myHero.charName ~= "Graves" then return end
- local qRange, wRange, eRange, rRange = 750, 700, 580, 1000
- local QREADY, WREADY, EREADY, RREADY, IREADY = false, false, false, false, false
- local igniteSlot = nil
- if VIP_USER then
- qp = TargetPredictionVIP(750, 2000, 0.25)
- wp = TargetPredictionVIP(950, 1650, 0.30)
- rp = TargetPredictionVIP(1000, 2000, 0.25)
- PrintChat("<font color='#CCCCCC'> >> VIP Graves - Running Riot loaded! <<</font>")
- else
- qp = TargetPrediction(750, 2.0, 250)
- wp = TargetPrediction(950, 1.65, 300)
- rp = TargetPrediction(1000, 2.0, 250)
- PrintChat("<font color='#CCCCCC'> >> Basic Graves - Running Riot loaded! <<</font>")
- end
- function OnLoad()
- --> Combo Menu
- comboMenu()
- --> Main Menu
- mainMenu()
- --> Item Menu
- itemMenu()
- --> Target Selector
- ts = TargetSelector(TARGET_LOW_HP_PRIORITY, rRange+50, DAMAGE_PHYSICAL)
- ts.name = "Graves Target"
- GravesCombo:addTS(ts)
- --> Ignite
- igniteSlot = ((myHero:GetSpellData(SUMMONER_1).name:find("SummonerDot") and SUMMONER_1) or (myHero:GetSpellData(SUMMONER_2).name:find("SummonerDot") and SUMMONER_2) or nil)
- end
- function OnTick()
- Checks()
- if GravesCombo.scriptActive then
- if ts.target then
- itemTick(ts.target)
- if QREADY and GravesConfig.useQ then castQ(ts.target) end
- if WREADY and GravesConfig.useW then castW(ts.target) end
- if EREADY and GravesConfig.useE then castE() end
- if RREADY and GravesConfig.useR then castR(ts.target) end
- end
- end
- if GravesCombo.harassActive and ts.target and QREADY then castQ(ts.target) end
- if GravesCombo.autoIgnite and IREADY then autoIgnite() end
- if GravesCombo.ultKS and RREADY then ultKS() end
- if GravesCombo.buckshotKS and QREADY then buckshotKS() end
- end
- function OnDraw()
- --> Ranges
- if not myHero.dead then
- if QREADY and GravesConfig.drawQ then
- DrawCircle(myHero.x, myHero.y, myHero.z, qRange, 0x00FFFF)
- end
- if RREADY and GravesConfig.drawR then
- DrawCircle(myHero.x, myHero.y, myHero.z, rRange, 0x00FF00)
- end
- end
- end
- --> Buckshot Cast
- function castQ(target)
- local qPred = qp:GetPrediction(target)
- if qPred and GetDistance(qPred) <= qRange then
- CastSpell(_Q, qPred.x, qPred.z)
- end
- end
- --> Smoke Screen Cast
- function castW(target)
- local wPred = wp:GetPrediction(target)
- if wPred and GetDistance(wPred) <= wRange then
- CastSpell(_W, wPred.x, wPred.z)
- end
- end
- --> Quickdraw Cast
- function castE()
- --local dashSqr = math.sqrt((mousePos.x - myHero.x)^2+(mousePos.z - myHero.z)^2)
- --local dashX = myHero.x + eRange*((mousePos.x - myHero.x)/dashSqr)
- --local dashZ = myHero.z + eRange*((mousePos.z - myHero.z)/dashSqr)
- CastSpell(_E, mousePos.x, mousePos.z)
- end
- --> Collateral Damage Cast
- function castR(target)
- local rPred = rp:GetPrediction(target)
- if rPred and GetDistance(rPred) <= rRange then
- if VIP_USER then
- if rp:GetHitChance(target) >= GravesConfig.hitChance/100 then
- CastSpell(_R, rPred.x, rPred.z)
- end
- else CastSpell(_R, rPred.x, rPred.z) end
- end
- end
- --> Ult KS
- function ultKS()
- for i, enemy in ipairs(GetEnemyHeroes()) do
- local rDmg = getDmg("R", enemy, myHero)
- if enemy and not enemy.dead and enemy.health < rDmg then
- castR(enemy)
- end
- end
- end
- --> buckshot KS
- function buckshotKS()
- for i, enemy in ipairs(GetEnemyHeroes()) do
- local qDmg = getDmg("Q", enemy, myHero)
- if enemy and not enemy.dead and enemy.health < qDmg then
- castQ(enemy)
- end
- end
- end
- --> Auto Ignite
- function autoIgnite()
- for i, enemy in ipairs(GetEnemyHeroes()) do
- local igniteDmg = getDmg("IGNITE", enemy, myHero)
- if GetDistance(enemy) <= 600 and enemy.health < igniteDmg then
- CastSpell(igniteSlot, enemy)
- end
- end
- end
- --> Checks
- function Checks()
- ts:update()
- QREADY = (myHero:CanUseSpell(_Q) == READY)
- WREADY = (myHero:CanUseSpell(_E) == READY)
- EREADY = (myHero:CanUseSpell(_E) == READY)
- RREADY = (myHero:CanUseSpell(_R) == READY)
- IREADY = (igniteSlot and myHero:CanUseSpell(igniteSlot))
- end
- --> Items Adapted from Sida's Auto Carry
- --> Item Table
- local items =
- {
- {name = "Blade of the Ruined King", menu = "BRK", id=3153, range = 500, reqTarget = true, slot = nil },
- {name = "Bilgewater Cutlass", menu = "BWC", id=3144, range = 400, reqTarget = true, slot = nil },
- {name = "Deathfire Grasp", menu = "DFG", id=3128, range = 750, reqTarget = true, slot = nil },
- {name = "Hextech Gunblade", menu = "HGB", id=3146, range = 400, reqTarget = true, slot = nil },
- }
- function itemTick(target)
- for _,item in pairs(items) do
- item.slot = GetInventorySlotItem(item.id)
- if item.slot ~= nil then
- if item.reqTarget and GetDistance(target) <= item.range then
- CastSpell(item.slot, target)
- elseif not item.reqTarget then
- CastSpell(item.slot)
- end
- end
- end
- end
- --> Item Menu
- function itemMenu()
- GravesItemMenu = scriptConfig("Graves - Item Loadout", "GravesItemMenu")
- for _, item in ipairs(items) do
- GravesItemMenu:addParam(item.menu, "Use "..item.name, SCRIPT_PARAM_ONOFF, true)
- end
- end
- --> Combo Menu
- function comboMenu()
- GravesCombo = scriptConfig("Graves - Combo Menu", "GravesComboMenu")
- GravesCombo:addParam("sep", "-- Combo Options --", SCRIPT_PARAM_INFO, "")
- GravesCombo:addParam("scriptActive", "Full Loadout", SCRIPT_PARAM_ONKEYDOWN, false, 32)
- GravesCombo:addParam("harassActive", "Buckshot Harass", SCRIPT_PARAM_ONKEYDOWN, false, 71)
- GravesCombo:addParam("autoIgnite", "Auto Ignite Killable", SCRIPT_PARAM_ONOFF, true)
- GravesCombo:addParam("ultKS", "Kill with Collateral Damage", SCRIPT_PARAM_ONOFF, true)
- GravesCombo:addParam("buckshotKS", "Kill with Buckshot", SCRIPT_PARAM_ONOFF, true)
- end
- --> Main Menu
- function mainMenu()
- GravesConfig = scriptConfig("Graves - Options Menu", "GravesMainMenu")
- GravesConfig:addParam("sep1", "-- Weapon Options --", SCRIPT_PARAM_INFO, "")
- GravesConfig:addParam("useQ", "Load Buckshot", SCRIPT_PARAM_ONOFF, true)
- GravesConfig:addParam("useW", "Deploy Smoke Screen", SCRIPT_PARAM_ONOFF, true)
- GravesConfig:addParam("useE", "Quickdraw Gun", SCRIPT_PARAM_ONOFF, true)
- GravesConfig:addParam("useR", "Prep Collateral Damage", SCRIPT_PARAM_ONOFF, true)
- GravesConfig:addParam("sep2", "-- Cast Options --", SCRIPT_PARAM_INFO, "")
- if VIP_USER then
- GravesConfig:addParam("hitChance", "Skill Hitchance", SCRIPT_PARAM_SLICE, 60, 0, 100, 0)
- end
- GravesConfig:addParam("sep3", "-- Draw Options --", SCRIPT_PARAM_INFO, "")
- GravesConfig:addParam("drawQ", "Draw - Buckshot", SCRIPT_PARAM_ONOFF, false)
- GravesConfig:addParam("drawR", "Draw - Collateral Damage", SCRIPT_PARAM_ONOFF, false)
- end
Advertisement
Add Comment
Please, Sign In to add comment