16HeX16

Graves - Running Riot

Jun 9th, 2013
2,846
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 6.66 KB | None | 0 0
  1. --########################################--
  2. --##                                Graves                          ##--
  3. --##                            Running Riot                    ##--
  4. --########################################--
  5. if myHero.charName ~= "Graves" then return end
  6.  
  7. local qRange, wRange, eRange, rRange = 750, 700, 580, 1000
  8. local QREADY, WREADY, EREADY, RREADY, IREADY = false, false, false, false, false
  9. local igniteSlot = nil
  10.  
  11. if VIP_USER then
  12.     qp = TargetPredictionVIP(750, 2000, 0.25)
  13.     wp = TargetPredictionVIP(950, 1650, 0.30)
  14.     rp = TargetPredictionVIP(1000, 2000, 0.25)
  15.     PrintChat("<font color='#CCCCCC'> >> VIP Graves - Running Riot loaded! <<</font>")
  16. else
  17.     qp = TargetPrediction(750, 2.0, 250)
  18.     wp = TargetPrediction(950, 1.65, 300)
  19.     rp = TargetPrediction(1000, 2.0, 250)
  20.     PrintChat("<font color='#CCCCCC'> >> Basic Graves - Running Riot loaded! <<</font>")
  21. end
  22.  
  23. function OnLoad()
  24.     --> Combo Menu
  25.     comboMenu()
  26.     --> Main Menu
  27.     mainMenu()
  28.     --> Item Menu
  29.     itemMenu()
  30.     --> Target Selector
  31.     ts = TargetSelector(TARGET_LOW_HP_PRIORITY, rRange+50, DAMAGE_PHYSICAL)
  32.     ts.name = "Graves Target"
  33.     GravesCombo:addTS(ts)
  34.     --> Ignite
  35.     igniteSlot = ((myHero:GetSpellData(SUMMONER_1).name:find("SummonerDot") and SUMMONER_1) or (myHero:GetSpellData(SUMMONER_2).name:find("SummonerDot") and SUMMONER_2) or nil)
  36. end
  37.  
  38. function OnTick()
  39.     Checks()
  40.     if GravesCombo.scriptActive then
  41.         if ts.target then
  42.             itemTick(ts.target)
  43.             if QREADY and GravesConfig.useQ then castQ(ts.target) end
  44.             if WREADY and GravesConfig.useW then castW(ts.target) end
  45.             if EREADY and GravesConfig.useE then castE() end
  46.             if RREADY and GravesConfig.useR then castR(ts.target) end
  47.         end
  48.     end
  49.     if GravesCombo.harassActive and ts.target and QREADY then castQ(ts.target) end
  50.     if GravesCombo.autoIgnite and IREADY then autoIgnite() end
  51.     if GravesCombo.ultKS and RREADY then ultKS() end
  52.     if GravesCombo.buckshotKS and QREADY then buckshotKS() end
  53. end
  54.  
  55. function OnDraw()
  56.     --> Ranges
  57.     if not myHero.dead then
  58.         if QREADY and GravesConfig.drawQ then
  59.             DrawCircle(myHero.x, myHero.y, myHero.z, qRange, 0x00FFFF)
  60.         end
  61.         if RREADY and GravesConfig.drawR then
  62.             DrawCircle(myHero.x, myHero.y, myHero.z, rRange, 0x00FF00)
  63.         end
  64.     end
  65. end
  66.  
  67. --> Buckshot Cast
  68. function castQ(target)
  69.     local qPred = qp:GetPrediction(target)
  70.     if qPred and GetDistance(qPred) <= qRange then
  71.         CastSpell(_Q, qPred.x, qPred.z)
  72.     end
  73. end
  74.  
  75. --> Smoke Screen Cast
  76. function castW(target)
  77.     local wPred = wp:GetPrediction(target)
  78.     if wPred and GetDistance(wPred) <= wRange then
  79.         CastSpell(_W, wPred.x, wPred.z)
  80.     end
  81. end
  82.  
  83. --> Quickdraw Cast
  84. function castE()
  85.     --local dashSqr = math.sqrt((mousePos.x - myHero.x)^2+(mousePos.z - myHero.z)^2)
  86.     --local dashX = myHero.x + eRange*((mousePos.x - myHero.x)/dashSqr)
  87.     --local dashZ = myHero.z + eRange*((mousePos.z - myHero.z)/dashSqr)
  88.     CastSpell(_E, mousePos.x, mousePos.z)  
  89. end
  90.  
  91. --> Collateral Damage Cast
  92. function castR(target)
  93.     local rPred = rp:GetPrediction(target)
  94.     if rPred and GetDistance(rPred) <= rRange then
  95.         if VIP_USER then
  96.             if rp:GetHitChance(target) >= GravesConfig.hitChance/100 then
  97.                 CastSpell(_R, rPred.x, rPred.z)
  98.             end
  99.         else CastSpell(_R, rPred.x, rPred.z) end
  100.     end
  101. end
  102.  
  103. --> Ult KS
  104. function ultKS()
  105.     for i, enemy in ipairs(GetEnemyHeroes()) do
  106.         local rDmg = getDmg("R", enemy, myHero)
  107.         if enemy and not enemy.dead and enemy.health < rDmg then
  108.             castR(enemy)
  109.         end
  110.     end
  111. end
  112.  
  113. --> buckshot KS
  114. function buckshotKS()
  115.     for i, enemy in ipairs(GetEnemyHeroes()) do
  116.         local qDmg = getDmg("Q", enemy, myHero)
  117.         if enemy and not enemy.dead and enemy.health < qDmg then
  118.             castQ(enemy)
  119.         end
  120.     end
  121. end
  122.  
  123. --> Auto Ignite
  124. function autoIgnite()
  125.     for i, enemy in ipairs(GetEnemyHeroes()) do
  126.         local igniteDmg = getDmg("IGNITE", enemy, myHero)
  127.         if GetDistance(enemy) <= 600 and enemy.health < igniteDmg then
  128.             CastSpell(igniteSlot, enemy)
  129.         end
  130.     end
  131. end
  132.  
  133. --> Checks
  134. function Checks()
  135.     ts:update()
  136.     QREADY = (myHero:CanUseSpell(_Q) == READY)
  137.     WREADY = (myHero:CanUseSpell(_E) == READY)
  138.     EREADY = (myHero:CanUseSpell(_E) == READY)
  139.     RREADY = (myHero:CanUseSpell(_R) == READY)
  140.     IREADY = (igniteSlot and myHero:CanUseSpell(igniteSlot))
  141. end
  142.  
  143. --> Items Adapted from Sida's Auto Carry
  144. --> Item Table
  145. local items =
  146.     {
  147.         {name = "Blade of the Ruined King", menu = "BRK", id=3153, range = 500, reqTarget = true, slot = nil },
  148.         {name = "Bilgewater Cutlass", menu = "BWC", id=3144, range = 400, reqTarget = true, slot = nil },
  149.         {name = "Deathfire Grasp", menu = "DFG", id=3128, range = 750, reqTarget = true, slot = nil },
  150.         {name = "Hextech Gunblade", menu = "HGB", id=3146, range = 400, reqTarget = true, slot = nil },
  151.     }
  152.    
  153. function itemTick(target)
  154.     for _,item in pairs(items) do
  155.         item.slot = GetInventorySlotItem(item.id)
  156.         if item.slot ~= nil then
  157.             if item.reqTarget and GetDistance(target) <= item.range then
  158.                 CastSpell(item.slot, target)
  159.             elseif not item.reqTarget then
  160.                 CastSpell(item.slot)
  161.             end
  162.         end
  163.     end
  164. end
  165.  
  166. --> Item Menu
  167. function itemMenu()
  168.     GravesItemMenu = scriptConfig("Graves - Item Loadout", "GravesItemMenu")
  169.     for _, item in ipairs(items) do
  170.         GravesItemMenu:addParam(item.menu, "Use "..item.name, SCRIPT_PARAM_ONOFF, true)
  171.     end
  172. end
  173.  
  174. --> Combo Menu
  175. function comboMenu()
  176.     GravesCombo = scriptConfig("Graves - Combo Menu", "GravesComboMenu")
  177.     GravesCombo:addParam("sep", "-- Combo Options --", SCRIPT_PARAM_INFO, "")
  178.     GravesCombo:addParam("scriptActive", "Full Loadout", SCRIPT_PARAM_ONKEYDOWN, false, 32)
  179.     GravesCombo:addParam("harassActive", "Buckshot Harass", SCRIPT_PARAM_ONKEYDOWN, false, 71)
  180.     GravesCombo:addParam("autoIgnite", "Auto Ignite Killable", SCRIPT_PARAM_ONOFF, true)
  181.     GravesCombo:addParam("ultKS", "Kill with Collateral Damage", SCRIPT_PARAM_ONOFF, true)
  182.     GravesCombo:addParam("buckshotKS", "Kill with Buckshot", SCRIPT_PARAM_ONOFF, true)
  183. end
  184.  
  185. --> Main Menu
  186. function mainMenu()
  187.     GravesConfig = scriptConfig("Graves - Options Menu", "GravesMainMenu")
  188.     GravesConfig:addParam("sep1", "-- Weapon Options --", SCRIPT_PARAM_INFO, "")
  189.     GravesConfig:addParam("useQ", "Load Buckshot", SCRIPT_PARAM_ONOFF, true)
  190.     GravesConfig:addParam("useW", "Deploy Smoke Screen", SCRIPT_PARAM_ONOFF, true)
  191.     GravesConfig:addParam("useE", "Quickdraw Gun", SCRIPT_PARAM_ONOFF, true)
  192.     GravesConfig:addParam("useR", "Prep Collateral Damage", SCRIPT_PARAM_ONOFF, true)
  193.     GravesConfig:addParam("sep2", "-- Cast Options --", SCRIPT_PARAM_INFO, "")
  194.     if VIP_USER then
  195.         GravesConfig:addParam("hitChance", "Skill Hitchance", SCRIPT_PARAM_SLICE, 60, 0, 100, 0)
  196.     end
  197.     GravesConfig:addParam("sep3", "-- Draw Options --", SCRIPT_PARAM_INFO, "")
  198.     GravesConfig:addParam("drawQ", "Draw - Buckshot", SCRIPT_PARAM_ONOFF, false)
  199.     GravesConfig:addParam("drawR", "Draw - Collateral Damage", SCRIPT_PARAM_ONOFF, false)
  200. end
Advertisement
Add Comment
Please, Sign In to add comment