16HeX16

Plugin - Gangplank

Jul 17th, 2013
1,440
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.33 KB | None | 0 0
  1. if myHero.charName ~= "Gangplank" then return end
  2.  
  3. local SheenSlot, TrinitySlot, IcebornSlot = nil, nil, nil
  4.  
  5. function PluginOnLoad()
  6.     mainLoad()
  7.     mainMenu()
  8. end
  9.  
  10. function PluginOnTick()
  11.     farmMinions:update()
  12.     jungleMinions:update()
  13.     Target = AutoCarry.GetAttackTarget()
  14.     QREADY = (myHero:CanUseSpell(_Q) == READY)
  15.     EREADY = (myHero:CanUseSpell(_E) == READY)
  16. SheenSlot, TrinitySlot, IcebornSlot = GetInventorySlotItem(3025), GetInventorySlotItem(3057), GetInventorySlotItem(3078)
  17.  
  18.     if Menu.autoks and QREADY then
  19.         for i = 1, heroManager.iCount, 1 do
  20.             local qTarget = heroManager:getHero(i)
  21.             if ValidTarget(qTarget, qRange) then
  22.                 if qTarget.health <= qDamage(qTarget) then
  23.                     CastSpell(_Q, qTarget)
  24.                 end
  25.             end
  26.         end
  27.     end
  28.    
  29.     if Target and Menu2.AutoCarry then
  30.         if EREADY and Menu.useE and GetDistance(Target) <= eRange then
  31.             CastSpell(_E)
  32.         end
  33.         if QREADY and Menu.useQ then
  34.             if Menu.qChase and GetDistance(Target) > Menu.qDistance then
  35.                 CastSpell(_Q, Target)
  36.             elseif Target.health <  qDamage(Target) then
  37.                 CastSpell(_Q, Target)
  38.             end
  39.         end
  40.     end
  41.     if Menu.qFarm and Menu2.LastHit or Menu2.LaneClear then
  42.         for _, minion in pairs(farmMinions.objects) do
  43.             if minion and ValidTarget(minion) and QREADY and GetDistance(minion) <= qRange then
  44.                 if minion.health < qDamage(minion) then
  45.                     CastSpell(_Q, minion)
  46.                 end
  47.             end
  48.         end
  49.         for _, jMinion in pairs(jungleMinions.objects) do
  50.             if jMinion and ValidTarget(jMinion) and QREADY and GetDistance(jMinion) <= qRange then
  51.                 if jMinion.health < qDamage(jMinion) then
  52.                     CastSpell(_Q, jMinion)
  53.                 end
  54.             end
  55.         end
  56.     end
  57. end
  58.  
  59. function OnAttacked()
  60.     if Target and Menu2.AutoCarry then
  61.         if QREADY and Menu.useQ and GetDistance(Target) <= qRange then CastSpell(_Q, Target) end
  62.     end
  63. end
  64.  
  65. function PluginOnDraw()
  66.     if Menu.drawQ and not myHero.dead then
  67.         DrawCircle(myHero.x, myHero.y, myHero.z, qRange, 0x00FF00)
  68.     end
  69. end
  70.  
  71. function qDamage(target)
  72.     local qDmg = myHero:CalcDamage(target, (20+(15*myHero:GetSpellData(_Q).level)+myHero.totalDamage))
  73.     local bDmg = ((SheenSlot and getDmg("SHEEN", target, myHero) or 0)+(TrinitySlot and getDmg("TRINITY", target, myHero) or 0)+(IcebornSlot and getDmg("ICEBORN", target, myHero) or 0))-15
  74.     return qDmg + bDmg
  75. end
  76.  
  77. function mainLoad()
  78.     AutoCarry.SkillsCrosshair.range = 700
  79.     Menu = AutoCarry.PluginMenu
  80.     Menu2 = AutoCarry.MainMenu
  81.     qRange, eRange = 625, 600
  82.     QREADY, EREADY  = false, false
  83.     farmMinions = minionManager(MINION_ENEMY, qRange+200, player)
  84.     jungleMinions = minionManager(MINION_JUNGLE, qRange+200, player)
  85. end
  86.  
  87. function mainMenu()
  88.     Menu:addParam("sep", "-- Cast Options --", SCRIPT_PARAM_INFO, "")
  89.     Menu:addParam("autoks", "Auto Kill with Parrrley!", SCRIPT_PARAM_ONOFF, true)
  90.     Menu:addParam("qDistance", "Parrrley! buffer range",SCRIPT_PARAM_SLICE, 400, 0, 625, 0)
  91.     Menu:addParam("qChase", "Parrrley! target when out of range", SCRIPT_PARAM_ONOFF, true)
  92.     Menu:addParam("qFarm", "Farm with Parrrley!", SCRIPT_PARAM_ONOFF, false)
  93.     Menu:addParam("sep", "-- Ability Options --", SCRIPT_PARAM_INFO, "")
  94.     Menu:addParam("useQ", "Use - Parrrley!", SCRIPT_PARAM_ONOFF, true)
  95.     Menu:addParam("useE", "Use - Raise Morale", SCRIPT_PARAM_ONOFF, true)
  96.     Menu:addParam("sep2", "-- Draw Options --", SCRIPT_PARAM_INFO, "")
  97.     Menu:addParam("drawQ", "Draw - Parrrley!", SCRIPT_PARAM_ONOFF, false)
  98. end
Advertisement
Add Comment
Please, Sign In to add comment