16HeX16

Fiora - Dance of Death 1.2.2

Mar 30th, 2013
9,160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 13.93 KB | None | 0 0
  1. --[[    Fiora Combo 1.2.2 by HeX
  2. Thanks to kevinkev as i did use some of his Fiora code in here.
  3.  
  4. Hotkeys:
  5.     -Combo: Spacebar
  6.     -Auto Parry: Z
  7.     -Auto KS: X
  8.     -Auto Farm: A
  9.    
  10. Features:
  11.     -Basic Combo: Items-> Q-> AA-> E-> AA-> Q
  12.     -Full Combo(With Use Ulti in combo activated): Items-> Q-> AA-> E-> AA-> Q-> R(If killable)
  13.     -Auto killsteal with Q ON/OFF option in ingame menu.
  14.     -Automatic creep farming.
  15.     -Auto Parry ON/OFF option in ingame menu.
  16.     -Use ultimate in combo ON/OFF option in ingame menu.
  17.     -Auto Ignite in combo ON/OFF option in ingame menu.
  18.     -Item Support: Blade of the Ruined King, Bligewater Cutlass, Deathfire Grasp, Hextech Gunblade, Tiamat, Ravenous Hydra, Randuins Omen.
  19.  
  20. Explanation of the marks:
  21.     -Green circle: Marks the current target to which you will do the combo
  22.     -Blue circle: Killed with a combo, if all the skills were available
  23.     -3 Red circles: Killed using Items + 1 Attack + Q*2 + R
  24. ]]
  25.  
  26.  
  27. if myHero.charName ~= "Fiora" then return end
  28. --[[    Ranges  ]]--
  29. local qRange = 600
  30. local rRange = 400
  31. local eBuffer = 300
  32. --[[    Farm    ]]--
  33. local nextTick = 0
  34. local waitDelay = 400
  35. --[[    Damage Calculation  ]]--
  36. local calculationenemy = 1
  37. local killable = {}
  38. local waittxt = {}
  39. local floattext = {"Skills on cooldown.","Full Combo!"}
  40. --[[    Attacks ]]--
  41. local lastBasicAttack = 0
  42. local swingDelay = 0.25
  43. local startAttackSpeed = 0.625
  44. local swing = 0
  45. local LastQ = 0
  46. --[[    Items   ]]--
  47. local ignite = nil
  48. local QREADY, WREADY, EREADY, RREADY  = false, false, false, false
  49. local BRKSlot, DFGSlot, HXGSlot, BWCSlot, TMTSlot, RAHSlot, RNDSlot, YGBSlot = nil, nil, nil, nil, nil, nil, nil, nil
  50. local BRKREADY, DFGREADY, HXGREADY, BWCREADY, TMTREADY, RAHREADY, RNDREADY, YGBREADY = false, false, false, false, false, false, false, false
  51.  
  52. function OnLoad()
  53.     PrintChat("<font color='#CCCCCC'> >> Fiora Combo 1.2.2 loaded! <<</font>")
  54.     FCConfig = scriptConfig("Fiora Combo", "FioraCombo")
  55.     FCConfig:addParam("scriptActive", "Combo", SCRIPT_PARAM_ONKEYDOWN, false, 32)
  56.     FCConfig:addParam("autoParry", "Auto Parry", SCRIPT_PARAM_ONKEYTOGGLE, true, 90)
  57.     FCConfig:addParam("autoks", "Auto kill with Lunge", SCRIPT_PARAM_ONKEYTOGGLE, true, 88)
  58.     FCConfig:addParam("lasthit", "Last Hit", SCRIPT_PARAM_ONKEYDOWN, false, 65)
  59.     FCConfig:addParam("doubleLunge", "Use Double Lunge to Kill", SCRIPT_PARAM_ONOFF, false)
  60.     FCConfig:addParam("useR", "Use ultimate", SCRIPT_PARAM_ONOFF, true)
  61.     FCConfig:addParam("alwaysParry", "Parry all Attacks", SCRIPT_PARAM_ONOFF, false)
  62.     FCConfig:addParam("autoignite", "Ignite when Killable", SCRIPT_PARAM_ONOFF, true)
  63.     FCConfig:addParam("mousemoving", "Move to mouse - Last hitting", SCRIPT_PARAM_ONOFF, true)
  64.     FCConfig:addParam("drawcirclesSelf", "Draw Circles - Self", SCRIPT_PARAM_ONOFF, false)
  65.     FCConfig:addParam("drawcirclesEnemy", "Draw Circles - Enemy", SCRIPT_PARAM_ONOFF, false)
  66.     FCConfig:addParam("drawtextEnemy", "Draw Text - Enemy", SCRIPT_PARAM_ONOFF, false)
  67.     FCConfig:addParam("qBuffer", "Min Q distance",SCRIPT_PARAM_SLICE, 250, 0, 600, 2)
  68.     FCConfig:addParam("waitDelay", "Delay before 2nd Q(ms)",SCRIPT_PARAM_SLICE, 400, 0, 800, 2)
  69.     FCConfig:permaShow("scriptActive")
  70.     FCConfig:permaShow("autoParry")
  71.     FCConfig:permaShow("autoks")
  72.     ts = TargetSelector(TARGET_LOW_HP, qRange+50, DAMAGE_PHYSICAL)
  73.     ts.name = "Fiora"
  74.     FCConfig:addTS(ts)
  75.     LastBasicAttack = os.clock()
  76.     LastQ = 0
  77.    
  78.     enemyMinions = minionManager(MINION_ENEMY, 600, player, MINION_SORT_HEALTH_ASC)
  79.  
  80.     if myHero:GetSpellData(SUMMONER_1).name:find("SummonerDot") then ignite = SUMMONER_1
  81.         elseif myHero:GetSpellData(SUMMONER_2).name:find("SummonerDot") then ignite = SUMMONER_2
  82.     end
  83.    
  84.     for i=1, heroManager.iCount do waittxt[i] = i*3 end
  85. end
  86.  
  87. function OnTick()
  88.     ts:update()
  89.     enemyMinions:update()
  90.    
  91.     if tick == nil or GetTickCount()-tick>=100 then
  92.         tick = GetTickCount()
  93.         DmgCalculation()
  94.     end
  95.    
  96.     AttackDelay = 1/(myHero.attackSpeed*startAttackSpeed)
  97.     if swing == 1 and os.clock() > lastBasicAttack + AttackDelay then
  98.         swing = 0
  99.     end
  100.    
  101.     BRKSlot, DFGSlot, HXGSlot, BWCSlot, TMTSlot, RAHSlot, RNDSlot, YGBSlot = GetInventorySlotItem(3153), GetInventorySlotItem(3128), GetInventorySlotItem(3146), GetInventorySlotItem(3144), GetInventorySlotItem(3077), GetInventorySlotItem(3074),  GetInventorySlotItem(3143), GetInventorySlotItem(3142)
  102.     QREADY = (myHero:CanUseSpell(_Q) == READY)
  103.     WREADY = (myHero:CanUseSpell(_W) == READY)
  104.     EREADY = (myHero:CanUseSpell(_E) == READY)
  105.     RREADY = (myHero:CanUseSpell(_R) == READY)
  106.     DFGREADY = (DFGSlot ~= nil and myHero:CanUseSpell(DFGSlot) == READY)
  107.     HXGREADY = (HXGSlot ~= nil and myHero:CanUseSpell(HXGSlot) == READY)
  108.     BWCREADY = (BWCSlot ~= nil and myHero:CanUseSpell(BWCSlot) == READY)
  109.     BRKREADY = (BRKSlot ~= nil and myHero:CanUseSpell(BRKSlot) == READY)
  110.     TMTREADY = (TMTSlot ~= nil and myHero:CanUseSpell(TMTSlot) == READY)
  111.     RAHREADY = (RAHSlot ~= nil and myHero:CanUseSpell(RAHSlot) == READY)
  112.     RNDREADY = (RNDSlot ~= nil and myHero:CanUseSpell(RNDSlot) == READY)
  113.     YGBREADY = (YGBSlot ~= nil and myHero:CanUseSpell(YGBSlot) == READY)
  114.     IREADY = (ignite ~= nil and myHero:CanUseSpell(ignite) == READY)
  115.  
  116.     --[[    Auto Ignite ]]--
  117.     if FCConfig.autoignite then    
  118.         if IREADY then
  119.             local ignitedmg = 0    
  120.             for i = 1, heroManager.iCount, 1 do
  121.                 local enemyhero = heroManager:getHero(i)
  122.                 if ValidTarget(enemyhero,600) then
  123.                     ignitedmg = 50 + 20 * myHero.level
  124.                     if enemyhero.health <= ignitedmg then
  125.                         CastSpell(ignite, enemyhero)
  126.                     end
  127.                 end
  128.             end
  129.         end
  130.     end
  131.    
  132.     --[[    Auto Q  ]]--
  133.     if FCConfig.autoks then
  134.         if QREADY then
  135.             local dmgQ = 0
  136.             for i = 1, heroManager.iCount, 1 do
  137.                 local qTarget = heroManager:getHero(i)
  138.                 if ValidTarget(qTarget, qRange) then
  139.                     if FCConfig.doubleLunge then
  140.                         dmgQ = getDmg("Q", qTarget, myHero)*2
  141.                         else dmgQ = getDmg("Q", qTarget, myHero)
  142.                     end
  143.                     if qTarget.health <= dmgQ then
  144.                         CastSpell(_Q, qTarget)
  145.                     end
  146.                 end
  147.             end
  148.         end
  149.     end
  150.    
  151.     --[[    Basic Combo ]]--
  152.     if ts.target ~= nil and FCConfig.scriptActive then
  153.         --[[    Items   ]]--
  154.         if GetDistance(ts.target) < 550 then
  155.             if DFGREADY then CastSpell(DFGSlot, ts.target) end
  156.             if HXGREADY then CastSpell(HXGSlot, ts.target) end
  157.             if BWCREADY then CastSpell(BWCSlot, ts.target) end
  158.             if BRKREADY then CastSpell(BRKSlot, ts.target) end
  159.             if YGBREADY then CastSpell(YGBSlot, ts.target) end
  160.             if TMTREADY and GetDistance(ts.target) < 275 then CastSpell(TMTSlot) end
  161.             if RAHREADY and GetDistance(ts.target) < 275 then CastSpell(RAHSlot) end
  162.             if RNDREADY and GetDistance(ts.target) < 275 then CastSpell(RNDSlot) end
  163.         end
  164.         local QDMG = getDmg("Q", ts.target, myHero)
  165.         --[[    Abilities   ]]--
  166.         if swing == 0 then
  167.             if QREADY and GetTickCount() > nextTick and GetDistance(ts.target) <= qRange and (GetDistance(ts.target) >= FCConfig.qBuffer or os.clock() - LastQ > 3.5) then
  168.                 CastSpell(_Q, ts.target)
  169.                 nextTick = GetTickCount() + FCConfig.waitDelay
  170.                 myHero:Attack(ts.target)
  171.                 elseif ts.target.health < QDMG then
  172.                     CastSpell(_Q, ts.target)
  173.             end
  174.             if GetDistance(ts.target) <= 400 then
  175.                 myHero:Attack(ts.target)
  176.             end
  177.             if moreThanOne() then
  178.                 RDamage =  getDmg("R",ts.target,myHero,1)
  179.                 else RDamage =  getDmg("R", ts.target,myHero,3)
  180.             end
  181.             if RREADY and FCConfig.useR and RDamage >= ts.target.health and GetDistance(ts.target) <= rRange then
  182.                 CastSpell(_R, ts.target)
  183.             end
  184.             elseif swing == 1 then
  185.             if EREADY and GetDistance(ts.target) <= eBuffer and os.clock() - lastBasicAttack > swingDelay then
  186.                 CastSpell(_E)
  187.                 swing = 0
  188.             end
  189.             if QREADY and GetTickCount() > (nextTick+150) and GetDistance(ts.target) <= qRange and (GetDistance(ts.target) >= FCConfig.qBuffer or os.clock() - LastQ > 3.5) then
  190.                 CastSpell(_Q, ts.target)
  191.                 nextTick = GetTickCount() + FCConfig.waitDelay
  192.             end
  193.         end
  194.     end
  195.  
  196.     --[[    Last Hit    ]]--
  197.     if FCConfig.lasthit then  
  198.         if FCConfig.mousemoving and GetTickCount() > nextTick then
  199.             myHero:MoveTo(mousePos.x, mousePos.z)
  200.         end
  201.    
  202.         for index, minion in pairs(enemyMinions.objects) do
  203.             local aDmg = getDmg("AD", minion, myHero)
  204.             if minion.health <= aDmg  and GetDistance(minion) <= (myHero.range+75) and GetTickCount() > nextTick then
  205.                 myHero:Attack(minion)
  206.                 nextTick = GetTickCount() + waitDelay
  207.             end
  208.         end
  209.     end
  210. end
  211.  
  212. function OnDraw()  
  213.     if FCConfig.drawcirclesSelf and not myHero.dead then
  214.         DrawCircle(myHero.x, myHero.y, myHero.z, qRange, 0x00FF00)
  215.         DrawCircle(myHero.x, myHero.y, myHero.z, rRange, 0xFF0000)
  216.         DrawCircle(myHero.x, myHero.y, myHero.z, FCConfig.qBuffer, 0x00FFFF)
  217.     end
  218.     if ts.target ~= nil and FCConfig.drawcirclesEnemy then
  219.         for j=0, 10 do
  220.             DrawCircle(ts.target.x, ts.target.y, ts.target.z, 40 + j*1.5, 0x00FF00)
  221.         end
  222.     end
  223.     for i=1, heroManager.iCount do
  224.         local enemydraw = heroManager:GetHero(i)
  225.         if ValidTarget(enemydraw) then
  226.             if FCConfig.drawcirclesEnemy then
  227.                 if killable[i] == 1 then
  228.                     for e=0, 15 do
  229.                         DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 80 + e*1.5, 0x0000FF)
  230.                     end
  231.                     elseif killable[i] == 2 then
  232.                     for e=0, 10 do
  233.                         DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 80 + e*1.5, 0xFF0000)
  234.                         DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 110 + e*1.5, 0xFF0000)
  235.                         DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 140 + e*1.5, 0xFF0000)
  236.                     end
  237.                 end
  238.             end
  239.             if FCConfig.drawtextEnemy and waittxt[i] == 1 and killable[i] ~= 0 then
  240.                 PrintFloatText(enemydraw,0,floattext[killable[i]])
  241.             end
  242.         end
  243.         if waittxt[i] == 1 then waittxt[i] = 30
  244.             else waittxt[i] = waittxt[i]-1
  245.         end
  246.     end
  247. end
  248.  
  249. --[[
  250. Explanation of the marks:
  251.     -Green circle: Marks the current target to which you will do the combo
  252.     -Blue circle: Killed with a combo, if all the skills were available
  253.     -3 Red circles: Killed using Items + 1 Attack + Q*2 + R(if all strikes hit)
  254. ]]
  255. function DmgCalculation()
  256.     local enemy = heroManager:GetHero(calculationenemy)
  257.     if ValidTarget(enemy) then
  258.         local ignitedamage, dfgdamage, hxgdamage, bwcdamage, brkdamage = 0, 0, 0, 0, 0
  259.         local qdamage = getDmg("Q",enemy,myHero)
  260.         local rdamage =  getDmg("R", enemy, myHero,3)
  261.         local hitdamage = getDmg("AD", enemy, myHero)
  262.         local ignitedamage = (ignite and getDmg("IGNITE",enemy,myHero) or 0)
  263.         local dfgdamage = (DFGSlot and getDmg("DFG",enemy,myHero) or 0)
  264.         local hxgdamage = (HXGSlot and getDmg("HXG",enemy,myHero) or 0)
  265.         local bwcdamage = (BWCSlot and getDmg("BWC",enemy,myHero) or 0)
  266.         local brkdamage = (BRKSlot and getDmg("RUINEDKING",enemy,myHero) or 0)
  267.         local tmtdamage = (TMTSlot and getDmg("TIAMAT",enemy,myHero) or 0)
  268.         local rahdamage = (RAHSlot and getDmg("HYDRA",enemy,myHero) or 0)
  269.         local combo1 = hitdamage*1 + (qdamage*2) + rdamage
  270.         local combo2 = hitdamage*1
  271.     if QREADY then
  272.         combo2 = combo2 + (qdamage*2)
  273.     end
  274.     if RREADY then
  275.         combo2 = combo2 + rdamage
  276.     end
  277.     if DFGREADY then
  278.         combo1 = combo1 + dfgdamage
  279.         combo2 = combo2 + dfgdamage
  280.     end
  281.     if HXGREADY then
  282.         combo1 = combo1 + hxgdamage
  283.         combo2 = combo2 + hxgdamage
  284.     end
  285.     if BWCREADY then
  286.         combo1 = combo1 + bwcdamage
  287.         combo2 = combo2 + bwcdamage
  288.     end
  289.     if BRKREADY then
  290.         combo1 = combo1 + brkdamage
  291.         combo2 = combo2 + brkdamage
  292.     end
  293.     if TMTREADY then
  294.         combo1 = combo1 + tmtdamage
  295.         combo2 = combo2 + tmtdamage
  296.     end
  297.     if RAHREADY then
  298.         combo1 = combo1 + rahdamage
  299.         combo2 = combo2 + rahdamage
  300.     end
  301.     if IREADY then
  302.         combo1 = combo1 + ignitedamage
  303.         combo2 = combo2 + ignitedamage
  304.     end
  305.     if combo2 >= enemy.health then killable[calculationenemy] = 2
  306.         elseif combo1 >= enemy.health then killable[calculationenemy] = 1
  307.         else killable[calculationenemy] = 0 end
  308.     end
  309.         if calculationenemy == 1 then calculationenemy = heroManager.iCount
  310.             else calculationenemy = calculationenemy-1
  311.         end
  312. end
  313.  
  314. --[[     Ultimate   ]]--
  315. function moreThanOne()
  316.     local boolean = false
  317.     for j = 1, heroManager.iCount, 1 do
  318.         local enemyhero = heroManager:getHero(j)
  319.         if myHero.team ~= enemyhero.team and ValidTarget(enemyhero) then
  320.             if ValidTargetNear(enemyhero,400,ts.target) then
  321.                 boolean = true
  322.                 else boolean = (false or boolean)
  323.             end
  324.         end
  325.     end    
  326.     return boolean
  327. end
  328.  
  329. --[[function GetMostAD()
  330.     local MostAD = nil
  331.     local CurrentAD = nil
  332.     for i=1, heroManager.iCount do
  333.         CurrentAD = heroManager:GetHero(i)
  334.         if CurrentAD.team ~= myHero.team and not CurrentAD.dead and CurrentAD.visible then
  335.             if MostAD == nil then
  336.                 MostAD = CurrentAD
  337.                 elseif getDmg("AD", myHero, CurrentAD) <  getDmg("AD", myHero, MostAD) then
  338.                     MostAD = CurrentAD
  339.             end
  340.         end
  341.     end
  342. return MostAD
  343. end]]
  344.  
  345.  
  346. --[[    Parry   ]]--
  347. function OnProcessSpell(unit, spell)
  348.     if unit.isMe and (spell.name:find("Attack") ~= nil) then
  349.         swing = 1
  350.         lastBasicAttack = os.clock()
  351.     end
  352.    
  353.     if unit.isMe and spell.name == ("FioraQ")  then
  354.         LastQ = os.clock()
  355.     end
  356.    
  357.     if FCConfig.autoParry then
  358.         if unit ~= nil and unit.type == "obj_AI_Hero" and GetDistance(spell.endPos) <= 50 and unit.team ~= myHero.team and not unit.isMe then
  359.             for i=1, #Abilities do
  360.                 if (spell.name == Abilities[i] or spell.name:find(Abilities[i]) ~= nil) then
  361.                     if myHero:CanUseSpell(_W) == READY and (getDmg("AD", myHero, unit) >= (myHero.maxHealth*0.06) or getDmg("AD", myHero, unit) >= (myHero.health*0.04)) then
  362.                         CastSpell(_W)
  363.                     --  PrintChat("Parrying HP: "..spell.name)
  364.                         elseif FCConfig.alwaysParry and myHero:CanUseSpell(_W) == READY then
  365.                         CastSpell(_W)
  366.                     --  PrintChat("Parrying PA: "..spell.name)
  367.                     end
  368.                 end
  369.             end
  370.         end
  371.     end
  372. end
  373.  
  374. Abilities = {
  375. "GarenSlash2", "SiphoningStrikeAttack", "LeonaShieldOfDaybreakAttack", "RenektonExecute", "ShyvanaDoubleAttackHit", "DariusNoxianTacticsONHAttack", "TalonNoxianDiplomacyAttack", "Parley", "MissFortuneRicochetShot", "RicochetAttack", "jaxrelentlessattack", "Attack"
  376. }
  377.  
  378. --[[CharNames = {
  379. "Garen", "Nasus", "Leona", "Renekton", "Shyvana", "Darius", "Talon", "MissFortune", "Ezreal", "Gangplank"
  380. }]]
  381.  
  382. --[[ To checkout:
  383. Caitlyn Headshot
  384. Diana Passive
  385. Draven Axes
  386. Evelynn Double Strike
  387. Fizz Passive
  388. Jarvan Passive
  389. Kennen Passive
  390. Kha'Zix Attack
  391. Yi Passive
  392. Shen Passive
  393. Sona Chords
  394. Wukong Smash
  395. Xin 3 Talon Strike
  396. ]]
Advertisement
Add Comment
Please, Sign In to add comment