Guest User

SidasAutoCarryPlugin - Fizz.lua

a guest
Jul 13th, 2013
1,110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.38 KB | None | 0 0
  1. --[[ Sida's Auto Carry Plugin: Fizz ]]--
  2. --[[ Version 1.2 ]]--
  3.  
  4. function PluginOnLoad()
  5.   AutoCarry.PluginMenu:addParam("autoW", "Seastone Trident - Auto Fire", SCRIPT_PARAM_ONOFF, true)
  6.   AutoCarry.PluginMenu:addParam("drawQ", "Draw - Urchin Strike", SCRIPT_PARAM_ONOFF, true)
  7.   AutoCarry.PluginMenu:addParam("drawE", "Draw - Playful/Trickster", SCRIPT_PARAM_ONOFF, false)
  8.   AutoCarry.PluginMenu:addParam("drawR", "Draw - Chum the Waters", SCRIPT_PARAM_ONOFF, true)
  9. end
  10.  
  11. function PluginOnTick()
  12.   Checks()
  13.   if not AutoCarry.PluginMenu.autoW then return end
  14.   local t = AutoCarry.GetAttackTarget()
  15.   if t and AutoCarry.MainMenu.AutoCarry and WREADY then
  16.     CastSpell(_W)
  17.   end
  18. end
  19.  
  20. local Wactive = false
  21.  
  22. function PluginOnCreateObj(obj)
  23.   if GetDistance(obj) < 100 and obj.name == "Fizz_SeastonePassive.troy" then
  24.     Wactive = true
  25.   end
  26. end
  27.  
  28. function PluginOnDeleteObj(obj)
  29.   if GetDistance(obj) < 100 and obj.name == "Fizz_SeastonePassive.troy" then
  30.     Wactive = false
  31.   end
  32. end
  33.  
  34. function PluginOnProcessSpell(unit, spell)
  35.   if not AutoCarry.PluginMenu.autoW and unit.isMe and spell.name == "FizzPiercingStrike" and AutoCarry.MainMenu.AutoCarry then
  36.     CastSpell(_W)
  37.   end
  38. end
  39.  
  40. function PluginBonusLastHitDamage(minion)
  41.   local w = myHero:getSpellData(_W).level
  42.   local wdamage = 0
  43.   if w > 0 then
  44.     if Wactive then
  45.       wdamage = (((w + 1) * 5) + (myHero.ap * 0.35))
  46.       -- 10/15/20/25/30 (+0.35 AP)
  47.     end
  48.     return myHero:CalcMagicDamage(minion, math.floor((((w * 10 + 20) + (myHero.ap * 0.35) + ((minion.maxHealth - minion.health) * (0.01 * w + 0.03))) / 6) + wdamage))
  49.     -- 30/40/50/60/70 (+0.35 AP) (+4/5/6/7/8% of target's missing HP) over 3 seconds
  50.     -- Ticks every 0.5 seconds (6 times) so divide by 6
  51.    end
  52. end
  53.  
  54. function PluginOnDraw()
  55.   if not myHero.dead then
  56.     if QREADY and AutoCarry.PluginMenu.drawQ then
  57.       DrawCircle(myHero.x, myHero.y, myHero.z, 550, 0x00FFFF)
  58.     end
  59.     if EREADY and AutoCarry.PluginMenu.drawE then
  60.       DrawCircle(myHero.x, myHero.y, myHero.z, 400, 0x00FFFF)
  61.     end
  62.     if RREADY and AutoCarry.PluginMenu.drawR then
  63.       DrawCircle(myHero.x, myHero.y, myHero.z, 1275, 0x00FF00)
  64.     end
  65.   end
  66. end
  67.  
  68. function Checks()
  69.   QREADY = (myHero:CanUseSpell(_Q) == READY)
  70.   WREADY = (myHero:CanUseSpell(_W) == READY)
  71.   EREADY = (myHero:CanUseSpell(_E) == READY)
  72.   RREADY = (myHero:CanUseSpell(_R) == READY)
  73. end
Advertisement
Add Comment
Please, Sign In to add comment