16HeX16

Plugin - Fiora

Jul 7th, 2013
5,951
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.76 KB | None | 0 0
  1. if myHero.charName ~= "Fiora" then return end
  2.  
  3. function PluginOnLoad()
  4.     mainLoad()
  5.     mainMenu()
  6. end
  7.  
  8. function PluginOnTick()
  9.     Target = AutoCarry.GetAttackTarget()
  10.     QREADY = (myHero:CanUseSpell(_Q) == READY)
  11.     WREADY = (myHero:CanUseSpell(_W) == READY)
  12.     EREADY = (myHero:CanUseSpell(_E) == READY)
  13.     RREADY = (myHero:CanUseSpell(_R) == READY)
  14.    
  15.     --[[    Auto Q  ]]--
  16.     if Menu.autoks and QREADY then
  17.         for i = 1, heroManager.iCount, 1 do
  18.             local qTarget = heroManager:getHero(i)
  19.             if ValidTarget(qTarget, qRange) then
  20.                 if Menu.doubleLunge then dmgQ = getDmg("Q", qTarget, myHero)*2
  21.                     else dmgQ = getDmg("Q", qTarget, myHero)
  22.                 end
  23.                 if qTarget.health <= dmgQ then
  24.                     CastSpell(_Q, qTarget)
  25.                 end
  26.             end
  27.         end
  28.     end
  29.    
  30.     --[[    Basic Combo ]]--
  31.     if Target and Menu2.AutoCarry then
  32.         if QREADY and GetDistance(Target) <= qRange then
  33.             QDMG = getDmg("Q", Target, myHero)
  34.             if (GetDistance(Target) >= Menu.qBuffer and os.clock() - LastQ > Menu.waitDelay/100) or os.clock() - LastQ > 3.5 then
  35.                 CastSpell(_E)
  36.                 CastSpell(_Q, Target)
  37.             elseif Target.health < QDMG then
  38.                 CastSpell(_Q, Target)
  39.             end
  40.         end
  41.         if RREADY and Menu.useR then
  42.             if CountEnemyHeroInRange(600, Target) > 1 then RDMG = getDmg("R", Target,
  43. myHero, 3)
  44.                 else RDMG = getDmg("R", Target, myHero, 1)
  45.             end
  46.             if RDMG >= Target.health and GetDistance(Target) <= rRange then
  47.                 if (QREADY and Target.health > getDmg("Q", Target, myHero)*2) or not QREADY then
  48.                     CastSpell(_R, Target)
  49.                 end
  50.             end
  51.         end
  52.     end
  53. end
  54.  
  55. function OnAttacked()
  56.     if Target and Menu2.AutoCarry then
  57.         if EREADY and GetDistance(Target) <= eBuffer then
  58.             CastSpell(_E)
  59.         end
  60.     end
  61. end
  62.  
  63. function PluginOnDraw()
  64.     if Menu.drawcirclesSelf and not myHero.dead then
  65.         DrawCircle(myHero.x, myHero.y, myHero.z, qRange, 0x00FF00)
  66.     end
  67. end
  68.  
  69. --[[    Parry   ]]--
  70. function PluginOnProcessSpell(unit, spell)
  71.     if unit.isMe and spell.name == ("FioraQ")  then
  72.         LastQ = os.clock()
  73.     end
  74.    
  75.     if Menu.autoParry and WREADY then
  76.         if unit and unit.type == myHero.type and spell.target == myHero then
  77.             for i=1, #Abilities do
  78.                 if (spell.name == Abilities[i] or spell.name:find(Abilities[i]) ~=
  79. nil) then
  80.                     if getDmg("AD", myHero, unit) >= (myHero.maxHealth*0.06) or
  81. getDmg("AD", myHero, unit) >= (myHero.health*0.04) then
  82.                         CastSpell(_W)
  83.                     elseif Menu.alwaysParry then
  84.                         CastSpell(_W)
  85.                     end
  86.                 end
  87.             end
  88.         end
  89.     end
  90. end
  91.  
  92. Abilities = {
  93. "GarenSlash2", "SiphoningStrikeAttack", "LeonaShieldOfDaybreakAttack", "RenektonExecute",
  94. "ShyvanaDoubleAttackHit", "DariusNoxianTacticsONHAttack", "TalonNoxianDiplomacyAttack", "Parley", "MissFortuneRicochetShot", "RicochetAttack", "jaxrelentlessattack", "Attack"
  95. }
  96.  
  97. function mainLoad()
  98.     AutoCarry.SkillsCrosshair.range = 700
  99.     Menu = AutoCarry.PluginMenu
  100.     Menu2 = AutoCarry.MainMenu
  101.     --[[    Ranges  ]]--
  102.     qRange, rRange, eBuffer = 600, 400, 300
  103.     --[[    Other   ]]--
  104.     LastQ = 0
  105.     QREADY, WREADY, EREADY, RREADY  = false, false, false, false
  106. end
  107.  
  108. function mainMenu()
  109.     Menu:addParam("sep", "-- Cast Options --", SCRIPT_PARAM_INFO, "")
  110.     Menu:addParam("autoParry", "Auto Parry", SCRIPT_PARAM_ONOFF, true)
  111.     Menu:addParam("autoks", "Auto Kill with Lunge", SCRIPT_PARAM_ONOFF, true)
  112.     Menu:addParam("doubleLunge", "Use Double Lunge to Kill", SCRIPT_PARAM_ONOFF, false)
  113.     Menu:addParam("useR", "Use - Blade Waltz", SCRIPT_PARAM_ONOFF, true)
  114.     Menu:addParam("alwaysParry", "Parry All Attacks", SCRIPT_PARAM_ONOFF, true)
  115.     Menu:addParam("sep1", "-- Abilty Settings --", SCRIPT_PARAM_INFO, "")
  116.     Menu:addParam("qBuffer", "Min Q distance",SCRIPT_PARAM_SLICE, 350, 0, 600, 0)
  117.     Menu:addParam("waitDelay", "Delay before 2nd Q(ms)",SCRIPT_PARAM_SLICE, 500, 0, 800, 0)
  118.     Menu:addParam("sep2", "-- Draw Options --", SCRIPT_PARAM_INFO, "")
  119.     Menu:addParam("drawcirclesSelf", "Draw - Lunge", SCRIPT_PARAM_ONOFF, false)
  120. end
Advertisement
Add Comment
Please, Sign In to add comment