16HeX16

Plugin - Kennen

Jun 29th, 2013
4,571
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.58 KB | None | 0 0
  1. ------------------------########################################-------------------------------
  2. ------------------------##                              Kennen                      ##-------------------------------
  3. ------------------------##                     Lightning Ninja              ##-------------------------------
  4. ------------------------########################################-------------------------------
  5. if myHero.charName ~= "Kennen" then return end
  6.  
  7. function PluginOnLoad()
  8.     AutoCarry.SkillsCrosshair.range = 1150
  9.     --> Main Load
  10.     mainLoad()
  11.     --> Main Menu
  12.     mainMenu()
  13. end
  14.  
  15. function PluginOnTick()
  16.     Checks()
  17.     if Target then
  18.         if (AutoCarry.MainMenu.AutoCarry or AutoCarry.MainMenu.MixedMode) then
  19.             if QREADY and Menu.useQ and not Col(SkillQ, myHero, Target) then Cast(SkillQ, Target) end
  20.             if WREADY and Menu.useW and GetDistance(Target) < wRange and (enemyhaveMOS1 or enemyhaveMOS2) then
  21.                 CastSpell(_W)
  22.             end
  23.             if RREADY and Menu.useR and CountEnemyHeroInRange(rRange) >= Menu.rCount then
  24.                 CastSpell(_R)
  25.             end
  26.         end
  27.         if WREADY and Menu.autoW and GetDistance(Target) < wRange and enemyhaveMOS2 then
  28.             CastSpell(_W)
  29.         end
  30.     end
  31. end
  32.  
  33. function PluginOnDraw()
  34.     --> Ranges
  35.     if not Menu.drawMaster and not myHero.dead then
  36.         if QREADY and Menu.drawQ then
  37.             DrawCircle(myHero.x, myHero.y, myHero.z, qRange, 0x00FFFF)
  38.         end
  39.         if RREADY and Menu.drawR then
  40.             DrawCircle(myHero.x, myHero.y, myHero.z, rRange, 0x00FF00)
  41.         end
  42.     end
  43. end
  44.  
  45. --> Main Load
  46. function mainLoad()
  47.     MOS1Time, MOS2Time = 0, 0
  48.     enemyhaveMOS1, enemyhaveMOS2 = false, false
  49.     qRange, wRange, rRange = 1050, 900, 550
  50.     QREADY, WREADY, RREADY = false, false, false
  51.     SkillQ = {spellKey = _Q, range = qRange, speed = 1.65, delay = 190, width = 75}
  52.     Cast = AutoCarry.CastSkillshot
  53.     Menu = AutoCarry.PluginMenu
  54.     Col = AutoCarry.GetCollision
  55. end
  56.  
  57. --> Main Menu
  58. function mainMenu()
  59.     Menu:addParam("sep", "-- Cast Options --", SCRIPT_PARAM_INFO, "")
  60.     Menu:addParam("autoW", "Electrical Surge - Auto Stun", SCRIPT_PARAM_ONOFF, true)
  61.     Menu:addParam("rCount", "Slicing Maelstrom - Min Enemies: ", SCRIPT_PARAM_SLICE, 2, 0, 5, 0)
  62.     Menu:addParam("sep1", "-- Full Combo Options --", SCRIPT_PARAM_INFO, "")
  63.     Menu:addParam("useQ", "Use Thundering Shuriken", SCRIPT_PARAM_ONOFF, true)
  64.     Menu:addParam("useW", "Use Electrical Surge", SCRIPT_PARAM_ONOFF, true)
  65.     Menu:addParam("useR", "Use Slicing Maelstrom", SCRIPT_PARAM_ONOFF, true)
  66.     Menu:addParam("sep3", "-- Draw Options --", SCRIPT_PARAM_INFO, "")
  67.     Menu:addParam("drawMaster", "Disable Draw", SCRIPT_PARAM_ONOFF, false)
  68.     Menu:addParam("drawQ", "Draw - Thundering Shuriken", SCRIPT_PARAM_ONOFF, false)
  69.     Menu:addParam("drawR", "Draw - Slicing Maelstrom", SCRIPT_PARAM_ONOFF, false)
  70. end
  71.  
  72.  
  73. function PluginOnCreateObj(object)
  74.     if object and object.name == "kennen_mos1.troy" and Target and GetDistance(Target, object) <= 70 then
  75.         enemyhaveMOS1 = true
  76.         MOS1Time = GetTickCount()
  77.     end
  78.     if object and object.name == "kennen_mos2.troy" and Target and GetDistance(Target, object) <= 70 then
  79.         enemyhaveMOS2 = true
  80.         MOS2Time = GetTickCount()
  81.     end
  82. end
  83.  
  84. function PluginOnDeleteObj(object)
  85.     if object and object.name == "kennen_mos1.troy" then enemyhaveMOS1 = false end
  86.     if object and object.name == "kennen_mos2.troy" then enemyhaveMOS2 = false end
  87. end
  88.  
  89. --> Checks
  90. function Checks()
  91.     Target = AutoCarry.GetAttackTarget()
  92.     QREADY = (myHero:CanUseSpell(_Q) == READY)
  93.     WREADY = (myHero:CanUseSpell(_W) == READY)
  94.     RREADY = (myHero:CanUseSpell(_R) == READY)
  95.     if GetTickCount() - MOS1Time > 8000 then
  96.         enemyhaveMOS1 = false
  97.     end
  98.     if GetTickCount() - MOS2Time > 8000 then
  99.         enemyhaveMOS2 = false
  100.     end
  101. end
Advertisement
Add Comment
Please, Sign In to add comment