naturus

vayne

Dec 23rd, 2014
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 22.18 KB | None | 0 0
  1. --[[
  2.  
  3.     No Vayne No Gain by Lillgoalie (Condemn based on Vayne's Mighty Assistant by Manciuszz)
  4.     Version: 1.4
  5.    
  6.     Features:
  7.         - Combo Mode:
  8.             - Uses Q in combo
  9.             - Uses R in combo
  10.         - Auto Condemn enemies
  11.         - Auto Condemn gapclosers
  12.         - Auto Condemn only the target enemy
  13.         - Auto-Level Spells
  14.         - Laneclear using Q with settings
  15.         - Uses BOTRK
  16.  
  17.    
  18.     Instructions on saving the file:
  19.     - Save the file in scripts folder
  20.    
  21. --]]
  22.  
  23. require 'VPrediction'
  24. require 'SOW'
  25.  
  26. if myHero.charName ~= "Vayne" then return end
  27.  
  28. local ts
  29. local Menu
  30. local enemyTable = GetEnemyHeroes()
  31. local informationTable = {}
  32. local spellExpired = true
  33. local eRange, eSpeed, eDelay, eRadius = 1000, 2200, 0.25, nil
  34. local VP = VPrediction()
  35. local AllClassMenu = 16
  36. local qOff, wOff, eOff, rOff = 0,0,0,0
  37. local abilitySequence = {1, 2, 3, 1, 1, 4, 1, 2, 1, 2, 4, 2, 2, 3, 3, 4, 3, 3}
  38.  
  39. HWID = Base64Encode(tostring(os.getenv("PROCESSOR_IDENTIFIER")..os.getenv("USERNAME")..os.getenv("COMPUTERNAME")..os.getenv("PROCESSOR_LEVEL")..os.getenv("PROCESSOR_REVISION")))
  40. id = 321
  41. ScriptName = "NoVayneNoGain"
  42. assert(load(Base64Decode("G0x1YVIAAQQEBAgAGZMNChoKAAAAAAAAAAAAAQIDAAAAJQAAAAgAAIAfAIAAAQAAAAQKAAAAVXBkYXRlV2ViAAEAAAACAAAADAAAAAQAETUAAAAGAUAAQUEAAB2BAAFGgUAAh8FAAp0BgABdgQAAjAHBAgFCAQBBggEAnUEAAhsAAAAXwAOAjMHBAgECAgBAAgABgUICAMACgAEBgwIARsNCAEcDwwaAA4AAwUMDAAGEAwBdgwACgcMDABaCAwSdQYABF4ADgIzBwQIBAgQAQAIAAYFCAgDAAoABAYMCAEbDQgBHA8MGgAOAAMFDAwABhAMAXYMAAoHDAwAWggMEnUGAAYwBxQIBQgUAnQGBAQgAgokIwAGJCICBiIyBxQKdQQABHwCAABcAAAAECAAAAHJlcXVpcmUABAcAAABzb2NrZXQABAcAAABhc3NlcnQABAQAAAB0Y3AABAgAAABjb25uZWN0AAQQAAAAYm9sLXRyYWNrZXIuY29tAAMAAAAAAABUQAQFAAAAc2VuZAAEGAAAAEdFVCAvcmVzdC9uZXdwbGF5ZXI/aWQ9AAQHAAAAJmh3aWQ9AAQNAAAAJnNjcmlwdE5hbWU9AAQHAAAAc3RyaW5nAAQFAAAAZ3N1YgAEDQAAAFteMC05QS1aYS16XQAEAQAAAAAEJQAAACBIVFRQLzEuMA0KSG9zdDogYm9sLXRyYWNrZXIuY29tDQoNCgAEGwAAAEdFVCAvcmVzdC9kZWxldGVwbGF5ZXI/aWQ9AAQCAAAAcwAEBwAAAHN0YXR1cwAECAAAAHBhcnRpYWwABAgAAAByZWNlaXZlAAQDAAAAKmEABAYAAABjbG9zZQAAAAAAAQAAAAAAEAAAAEBvYmZ1c2NhdGVkLmx1YQA1AAAAAgAAAAIAAAACAAAAAgAAAAIAAAACAAAAAgAAAAMAAAADAAAAAwAAAAMAAAAEAAAABAAAAAUAAAAFAAAABQAAAAYAAAAGAAAABwAAAAcAAAAHAAAABwAAAAcAAAAHAAAABwAAAAgAAAAHAAAABQAAAAgAAAAJAAAACQAAAAkAAAAKAAAACgAAAAsAAAALAAAACwAAAAsAAAALAAAACwAAAAsAAAAMAAAACwAAAAkAAAAMAAAADAAAAAwAAAAMAAAADAAAAAwAAAAMAAAADAAAAAwAAAAGAAAAAgAAAGEAAAAAADUAAAACAAAAYgAAAAAANQAAAAIAAABjAAAAAAA1AAAAAgAAAGQAAAAAADUAAAADAAAAX2EAAwAAADUAAAADAAAAYWEABwAAADUAAAABAAAABQAAAF9FTlYAAQAAAAEAEAAAAEBvYmZ1c2NhdGVkLmx1YQADAAAADAAAAAIAAAAMAAAAAAAAAAEAAAAFAAAAX0VOVgA="), nil, "bt", _ENV))()
  43.  
  44. function OnLoad()
  45.     Orbwalker = SOW(VP)
  46.     ts = TargetSelector(TARGET_NEAR_MOUSE,1000)
  47.  
  48.     Menu = scriptConfig("No Vayne No Gain", "VayneBL")
  49.  
  50.     Menu:addSubMenu("["..myHero.charName.." - Orbwalker]", "SOWorb")
  51.     Orbwalker:LoadToMenu(Menu.SOWorb)
  52.  
  53.     Menu:addSubMenu("["..myHero.charName.." - Combo]", "VayneCombo")
  54.     Menu.VayneCombo:addParam("combo", "Combo key", SCRIPT_PARAM_ONKEYDOWN, false, 32)
  55.     Menu.VayneCombo:addParam("comboQ", "Use Q in combo", SCRIPT_PARAM_ONOFF, true)
  56.     Menu.VayneCombo:addParam("comboR", "Use R in combo", SCRIPT_PARAM_ONOFF, true)
  57.     Menu.VayneCombo:addParam("comboRRange", "Enemies in range for R", SCRIPT_PARAM_SLICE, 2, 0, 5, 0)
  58.     Menu.VayneCombo:addSubMenu("Item usage", "itemUse")
  59.     Menu.VayneCombo.itemUse:addParam("BOTRK", "Use BOTRK in combo", SCRIPT_PARAM_ONOFF, true)
  60.  
  61.     Menu:addSubMenu("["..myHero.charName.." - Laneclear]", "LaneC")
  62.     Menu.LaneC:addParam("laneclr", "Laneclear key", SCRIPT_PARAM_ONKEYDOWN, false, string.byte("V"))
  63.     Menu.LaneC:addParam("clearQ", "Use Q in laneclear", SCRIPT_PARAM_ONOFF, true)
  64.     Menu.LaneC:addParam("laneclearMana", "Min mana % to use Q in laneclear", SCRIPT_PARAM_SLICE, 20, 0, 100, 0)
  65.  
  66.     Menu:addSubMenu("["..myHero.charName.." - Additionals]", "Ads")
  67.     Menu.Ads:addParam("AutoLevelspells", "Auto-Level Spells", SCRIPT_PARAM_ONOFF, false)
  68.  
  69.     Menu:addSubMenu("["..myHero.charName.." - Wall Tumble]", "WallT") -- Credits Jire
  70.     Menu.WallT:addParam("midwall", "Mid Wall Key", SCRIPT_PARAM_ONKEYDOWN, false, 56)
  71.     Menu.WallT:addParam("drakewall", "Drake Wall Key", SCRIPT_PARAM_ONKEYDOWN, false, 57)
  72.  
  73.     Menu:addSubMenu("["..myHero.charName.." - Condemn]", "Condemn")
  74.  
  75.     Menu.Condemn:addSubMenu("Features & Settings", "settingsSubMenu")
  76.     Menu.Condemn:addSubMenu("Disable Auto-Condemn on", "condemnSubMenu")
  77.  
  78.     Menu.Condemn:addParam("autoCondemn", "Auto-Condemn Toggle:", SCRIPT_PARAM_ONKEYTOGGLE, false, 32)
  79.     Menu.Condemn:addParam("switchKey", "Switch key mode:", SCRIPT_PARAM_ONOFF, false)
  80.  
  81.     Menu.Condemn:addSubMenu("Only Condemn current target", "OnlyCurrentTarget")
  82.     Menu.Condemn.OnlyCurrentTarget:addParam("Condemntarget", "Only condemn current target", SCRIPT_PARAM_ONOFF, false)
  83.     Menu.Condemn.OnlyCurrentTarget:addTS(ts)
  84.     ts.name = "Condemn"
  85.  
  86.     Menu.Condemn.settingsSubMenu:addParam("PushAwayGapclosers", "Push Gapclosers Away", SCRIPT_PARAM_ONOFF, true)
  87.     Menu.Condemn.settingsSubMenu:addParam("CondemnAssistant", "Condemn Visual Assistant:", SCRIPT_PARAM_ONOFF, true)
  88.     Menu.Condemn.settingsSubMenu:addParam("pushDistance", "Push Distance", SCRIPT_PARAM_SLICE, 440, 0, 450, 0) -- Reducing this value means that the enemy has to be closer to the wall, so you could cast condemn.
  89.     Menu.Condemn.settingsSubMenu:addParam("eyeCandy", "After-Condemn Circle:", SCRIPT_PARAM_ONOFF, true)
  90.     if not VIP_USER then
  91.         Menu.Condemn.settingsSubMenu:addParam("shootingMode", "Currently: No prediction", SCRIPT_PARAM_INFO, "NOT VIP")
  92.     else
  93.         Menu.Condemn.settingsSubMenu:addParam("shootingMode", "Prediction/No prediction:", SCRIPT_PARAM_ONOFF, true)
  94.     end
  95.  
  96.     Menu.Condemn:permaShow("autoCondemn")
  97.     -- Override in case it's stuck.
  98. --    Menu.Condemn.pushDistance = 300
  99.     Menu.Condemn.autoCondemn = true
  100.     Menu.Condemn.switchKey = false
  101.  
  102.     for i, enemy in ipairs(enemyTable) do
  103.         Menu.Condemn.condemnSubMenu:addParam("disableCondemn"..i, " >> "..enemy.charName, SCRIPT_PARAM_ONOFF, false)
  104.         Menu.Condemn["disableCondemn"..i] = false -- Override
  105.     end
  106.  
  107.     Menu:addSubMenu("["..myHero.charName.." - Drawings]", "drawings")
  108.     Menu.drawings:addParam("drawCircleAA", "Draw AA Range", SCRIPT_PARAM_ONOFF, true)
  109.  
  110.     UpdateWeb(true, ScriptName, id, HWID)
  111.  
  112.     PrintChat("<font color = \"#33CCCC\">No Vayne No Gain by</font> <font color = \"#fff8e7\">Lillgoalie</font>")
  113. end
  114.  
  115. function OnBugsplat()
  116.     UpdateWeb(false, ScriptName, id, HWID)
  117. end
  118.  
  119. function OnUnload()
  120.     UpdateWeb(false, ScriptName, id, HWID)
  121. end
  122.  
  123. function OnTick()
  124.     ts:update()
  125.  
  126.     if CountEnemyHeroInRange(600) >= Menu.VayneCombo.comboRRange then
  127.         if (Menu.VayneCombo.comboR) then
  128.             if (Menu.VayneCombo.combo) then
  129.                 if (myHero:CanUseSpell(_R) == READY) then
  130.                     CastSpell(_R)
  131.                 end
  132.             end
  133.         end
  134.     end
  135.  
  136.     if (Menu.VayneCombo.combo) then
  137.         UseBotrk()
  138.     end
  139.  
  140.     if Menu.Ads.AutoLevelspells then
  141.         AutoLevel()
  142.     end
  143.  
  144.     if Menu.WallT.drakewall then
  145.         DrakeWall()
  146.     end
  147.  
  148.     if Menu.WallT.midwall then
  149.         MidWall()
  150.     end
  151.    
  152.     if GetGame().isOver then
  153.         UpdateWeb(false, ScriptName, id, HWID)
  154.         startUp = false;
  155.     end
  156. end
  157.  
  158. function DrakeWall()
  159.      if Menu.WallT.drakewall and myHero.x < 11540 or myHero.x > 11600 or myHero.z < 4638 or myHero.z > 4712 then
  160.       myHero:MoveTo(11590.95, 4656.26)
  161.     else
  162.       myHero:MoveTo(11590.95, 4656.26)
  163.       CastSpell(_Q, 11334.74, 4517.47)
  164.     end
  165. end
  166.  
  167. function MidWall()
  168.     if Menu.WallT.midwall and myHero.x < 6600 or myHero.x > 6660 or myHero.z < 8630 or myHero.z > 8680 then
  169.       myHero:MoveTo(6623, 8649)
  170.     else
  171.       myHero:MoveTo(6623, 8649)
  172.       CastSpell(_Q, 6010.5869140625, 8508.8740234375)
  173.     end
  174. end
  175.  
  176. function AutoLevel()
  177.     local qL, wL, eL, rL = player:GetSpellData(_Q).level + qOff, player:GetSpellData(_W).level + wOff, player:GetSpellData(_E).level + eOff, player:GetSpellData(_R).level + rOff
  178.     if qL + wL + eL + rL < player.level then
  179.         local spellSlot = { SPELL_1, SPELL_2, SPELL_3, SPELL_4, }
  180.         local level = { 0, 0, 0, 0 }
  181.         for i = 1, player.level, 1 do
  182.             level[abilitySequence[i]] = level[abilitySequence[i]] + 1
  183.         end
  184.         for i, v in ipairs({ qL, wL, eL, rL }) do
  185.         if v < level[i] then LevelSpell(spellSlot[i]) end
  186.         end
  187.     end
  188. end
  189.  
  190. function UseBotrk()
  191.     if ts.target ~= nil and Menu.VayneCombo.combo and GetDistance(ts.target) < 450 and not ts.target.dead and ts.target.visible and GetInventorySlotItem(3153) ~= nil and myHero:CanUseSpell(GetInventorySlotItem(3153)) == READY then
  192.         if (Menu.VayneCombo.itemUse.BOTRK) then
  193.             CastSpell(GetInventorySlotItem(3153), ts.target)
  194.         end
  195.     end
  196. end
  197.  
  198. function OnDraw()
  199.     if myHero.dead then return end
  200.  
  201.     DrawCircle(6623, 100, 8649, 100, ARGB(0, 102, 0, 0))
  202.     DrawCircle(11590.95, 100, 4656.26, 100, ARGB(0, 102, 0, 0))
  203.  
  204.     if (Menu.drawings.drawCircleAA) then
  205.         DrawCircle(myHero.x, myHero.y, myHero.z, 655, ARGB(255, 0, 255, 0))
  206.     end
  207.  
  208.     if Menu.Condemn.autoCondemn then
  209.         if not Menu.Condemn.OnlyCurrentTarget.Condemntarget then
  210.             CondemnAll()
  211.         elseif Menu.Condemn.OnlyCurrentTarget.Condemntarget then
  212.             CondemnNearMouse()
  213.         end
  214.     end
  215. end
  216.  
  217. function CondemnAll()
  218.         if IsKeyDown(AllClassMenu) then
  219.         Menu.Condemn._param[1].pType = Menu.Condemn.switchKey and 2 or 3
  220.         Menu.Condemn._param[1].text  = Menu.Condemn.switchKey and "Auto-Condemn OnHold:" or "Auto-Condemn Toggle:"
  221.         if Menu.Condemn.switchKey and Menu.Condemn.autoCondemn then
  222.             Menu.Condemn.autoCondemn = false
  223.         end
  224.  
  225.         Menu.Condemn.settingsSubMenu._param[5].text  = Menu.Condemn.settingsSubMenu.shootingMode and VIP_USER and "Currently: VP" or "Currently: No prediction"
  226.         if not VIP_USER then Menu.Condemn.settingsSubMenu.shootingMode = "NOT VIP" end
  227.     end
  228.  
  229.     if myHero:CanUseSpell(_E) == READY then
  230.         if Menu.Condemn.settingsSubMenu.PushAwayGapclosers then
  231.             if not spellExpired and (GetTickCount() - informationTable.spellCastedTick) <= (informationTable.spellRange/informationTable.spellSpeed)*1000 then
  232.                 local spellDirection     = (informationTable.spellEndPos - informationTable.spellStartPos):normalized()
  233.                 local spellStartPosition = informationTable.spellStartPos + spellDirection
  234.                 local spellEndPosition   = informationTable.spellStartPos + spellDirection * informationTable.spellRange
  235.                 local heroPosition = Point(myHero.x, myHero.z)
  236.  
  237.                 local lineSegment = LineSegment(Point(spellStartPosition.x, spellStartPosition.y), Point(spellEndPosition.x, spellEndPosition.y))
  238.                 --lineSegment:draw(ARGB(255, 0, 255, 0), 70)
  239.  
  240.                 if lineSegment:distance(heroPosition) <= (not informationTable.spellIsAnExpetion and 65 or 200) then
  241.                     CastSpell(_E, informationTable.spellSource)
  242.                 end
  243.             else
  244.                 spellExpired = true
  245.                 informationTable = {}
  246.             end
  247.         end
  248.  
  249.         if not Menu.Condemn.OnlyCurrentTarget.Condemntarget and Menu.Condemn.autoCondemn then
  250.             for i, enemyHero in ipairs(enemyTable) do
  251.                 if not Menu.Condemn.condemnSubMenu["disableCondemn"..i] then
  252.                     if enemyHero ~= nil and enemyHero.valid and not enemyHero.dead and enemyHero.visible and GetDistance(enemyHero) <= 715 and GetDistance(enemyHero) > 0 then
  253.                         local enemyPosition = Menu.Condemn.settingsSubMenu.shootingMode and VIP_USER and VP:GetPredictedPos(enemyHero, eDelay, eSpeed) or enemyHero
  254.                         local PushPos = enemyPosition + (Vector(enemyPosition) - myHero):normalized()*Menu.Condemn.settingsSubMenu.pushDistance
  255.  
  256.                         if enemyHero.x > 0 and enemyHero.z > 0 then
  257.                             local checks = math.ceil((Menu.Condemn.settingsSubMenu.pushDistance)/65)
  258.                             local checkDistance = (Menu.Condemn.settingsSubMenu.pushDistance)/checks
  259.                             local InsideTheWall = false
  260.                             for k=1, checks, 1 do
  261.                                 local checksPos = enemyPosition + (Vector(enemyPosition) - myHero):normalized()*(checkDistance*k)
  262.                                 local WallContainsPosition = IsWall(D3DXVECTOR3(checksPos.x, checksPos.y, checksPos.z))
  263.                                 if WallContainsPosition then
  264.                                     InsideTheWall = true
  265.                                     break
  266.                                 end
  267.                             end
  268.  
  269.                             if InsideTheWall then CastSpell(_E, enemyHero) end
  270.  
  271.                             if Menu.Condemn.settingsSubMenu.eyeCandy and PushPos.x > 0 and PushPos.z > 0 then
  272.                                 DrawCircle(PushPos.x, PushPos.y, PushPos.z, 65, ARGB(255, 0, 255, 0))
  273.                             end
  274.  
  275.  
  276.                         end
  277.                     end
  278.                 end
  279.             end
  280.         end
  281.     end
  282. end
  283.  
  284. function CondemnNearMouse()
  285.         if IsKeyDown(AllClassMenu) then
  286.         Menu.Condemn._param[1].pType = Menu.Condemn.switchKey and 2 or 3
  287.         Menu.Condemn._param[1].text  = Menu.Condemn.switchKey and "Auto-Condemn OnHold:" or "Auto-Condemn Toggle:"
  288.         if Menu.Condemn.switchKey and Menu.Condemn.autoCondemn then
  289.             Menu.Condemn.autoCondemn = false
  290.         end
  291.  
  292.         Menu.Condemn.settingsSubMenu._param[5].text  = Menu.Condemn.settingsSubMenu.shootingMode and VIP_USER and "Currently: VP" or "Currently: No prediction"
  293.         if not VIP_USER then Menu.Condemn.settingsSubMenu.shootingMode = "NOT VIP" end
  294.     end
  295.  
  296.     if myHero:CanUseSpell(_E) == READY then
  297.         if Menu.Condemn.settingsSubMenu.PushAwayGapclosers then
  298.             if not spellExpired and (GetTickCount() - informationTable.spellCastedTick) <= (informationTable.spellRange/informationTable.spellSpeed)*1000 then
  299.                 local spellDirection     = (informationTable.spellEndPos - informationTable.spellStartPos):normalized()
  300.                 local spellStartPosition = informationTable.spellStartPos + spellDirection
  301.                 local spellEndPosition   = informationTable.spellStartPos + spellDirection * informationTable.spellRange
  302.                 local heroPosition = Point(myHero.x, myHero.z)
  303.  
  304.                 local lineSegment = LineSegment(Point(spellStartPosition.x, spellStartPosition.y), Point(spellEndPosition.x, spellEndPosition.y))
  305.                 --lineSegment:draw(ARGB(255, 0, 255, 0), 70)
  306.  
  307.                 if lineSegment:distance(heroPosition) <= (not informationTable.spellIsAnExpetion and 65 or 200) then
  308.                     CastSpell(_E, informationTable.spellSource)
  309.                 end
  310.             else
  311.                 spellExpired = true
  312.                 informationTable = {}
  313.             end
  314.         end
  315.  
  316.         if Menu.Condemn.autoCondemn and Menu.Condemn.OnlyCurrentTarget.Condemntarget then
  317.             for i, enemy in ipairs(enemyTable) do
  318.                 if not Menu.Condemn.condemnSubMenu["disableCondemn"..i] then
  319.                     if ts.target ~= nil and ts.target.valid and not ts.target.dead and ts.target.visible and GetDistance(ts.target) <= 715 and GetDistance(ts.target) > 0 then
  320.                         local enemyPosition = Menu.Condemn.settingsSubMenu.shootingMode and VIP_USER and VP:GetPredictedPos(ts.target, eDelay, eSpeed) or ts.target
  321.                         local PushPos = enemyPosition + (Vector(enemyPosition) - myHero):normalized()*Menu.Condemn.settingsSubMenu.pushDistance
  322.  
  323.                         if ts.target.x > 0 and ts.target.z > 0 then
  324.                             local checks = math.ceil((Menu.Condemn.settingsSubMenu.pushDistance)/65)
  325.                             local checkDistance = (Menu.Condemn.settingsSubMenu.pushDistance)/checks
  326.                             local InsideTheWall = false
  327.                             for k=1, checks, 1 do
  328.                                 local checksPos = enemyPosition + (Vector(enemyPosition) - myHero):normalized()*(checkDistance*k)
  329.                                 local WallContainsPosition = IsWall(D3DXVECTOR3(checksPos.x, checksPos.y, checksPos.z))
  330.                                 if WallContainsPosition then
  331.                                     InsideTheWall = true
  332.                                     break
  333.                                 end
  334.                             end
  335.  
  336.                             if InsideTheWall then CastSpell(_E, ts.target) end
  337.  
  338.                             if Menu.Condemn.settingsSubMenu.eyeCandy and PushPos.x > 0 and PushPos.z > 0 then
  339.                                 DrawCircle(PushPos.x, PushPos.y, PushPos.z, 65, ARGB(255, 0, 255, 0))
  340.                             end
  341.  
  342.  
  343.                         end
  344.                     end
  345.                 end
  346.             end
  347.         end
  348.     end
  349. end
  350.  
  351. function OnProcessSpell(unit, spell)
  352.     if unit.isMe and spell.name:lower():find("attack") and Menu.VayneCombo.combo and Menu.VayneCombo.comboQ then
  353.         SpellTarget = spell.target
  354.         if SpellTarget.type == myHero.type then
  355.             DelayAction(function() CastSpell(_Q, mousePos.x, mousePos.z) end, spell.windUpTime - GetLatency() / 2000)
  356.         end
  357.     end
  358.  
  359.     if unit.isMe and spell.name:lower():find("attack") and Menu.LaneC.clearQ and Menu.LaneC.laneclr and myHero.mana >= (myHero.maxMana*(Menu.LaneC.laneclearMana*0.01)) then
  360.         SpellTarget = spell.target
  361.             DelayAction(function() CastSpell(_Q, mousePos.x, mousePos.z) end, spell.windUpTime - GetLatency() / 2000)
  362.     end
  363.  
  364.     if not Menu.Condemn.settingsSubMenu.PushAwayGapclosers then return end
  365.  
  366.     local jarvanAddition = unit.charName == "JarvanIV" and unit:CanUseSpell(_Q) ~= READY and _R or _Q -- Did not want to break the table below.
  367.     local isAGapcloserUnit = {
  368. --        ['Ahri']        = {true, spell = _R, range = 450,   projSpeed = 2200},
  369.         ['Aatrox']      = {true, spell = _Q,                  range = 1000,  projSpeed = 1200, },
  370.         ['Akali']       = {true, spell = _R,                  range = 800,   projSpeed = 2200, }, -- Targeted ability
  371.         ['Alistar']     = {true, spell = _W,                  range = 650,   projSpeed = 2000, }, -- Targeted ability
  372.         ['Diana']       = {true, spell = _R,                  range = 825,   projSpeed = 2000, }, -- Targeted ability
  373.         ['Gragas']      = {true, spell = _E,                  range = 600,   projSpeed = 2000, },
  374.         ['Graves']      = {true, spell = _E,                  range = 425,   projSpeed = 2000, exeption = true },
  375.         ['Hecarim']     = {true, spell = _R,                  range = 1000,  projSpeed = 1200, },
  376.         ['Irelia']      = {true, spell = _Q,                  range = 650,   projSpeed = 2200, }, -- Targeted ability
  377.         ['JarvanIV']    = {true, spell = jarvanAddition,      range = 770,   projSpeed = 2000, }, -- Skillshot/Targeted ability
  378.         ['Jax']         = {true, spell = _Q,                  range = 700,   projSpeed = 2000, }, -- Targeted ability
  379.         ['Jayce']       = {true, spell = 'JayceToTheSkies',   range = 600,   projSpeed = 2000, }, -- Targeted ability
  380.         ['Khazix']      = {true, spell = _E,                  range = 900,   projSpeed = 2000, },
  381.         ['Leblanc']     = {true, spell = _W,                  range = 600,   projSpeed = 2000, },
  382.         ['LeeSin']      = {true, spell = 'blindmonkqtwo',     range = 1300,  projSpeed = 1800, },
  383.         ['Leona']       = {true, spell = _E,                  range = 900,   projSpeed = 2000, },
  384.         ['Malphite']    = {true, spell = _R,                  range = 1000,  projSpeed = 1500 + unit.ms},
  385.         ['Maokai']      = {true, spell = _Q,                  range = 600,   projSpeed = 1200, }, -- Targeted ability
  386.         ['MonkeyKing']  = {true, spell = _E,                  range = 650,   projSpeed = 2200, }, -- Targeted ability
  387.         ['Pantheon']    = {true, spell = _W,                  range = 600,   projSpeed = 2000, }, -- Targeted ability
  388.         ['Poppy']       = {true, spell = _E,                  range = 525,   projSpeed = 2000, }, -- Targeted ability
  389.         --['Quinn']       = {true, spell = _E,                  range = 725,   projSpeed = 2000, }, -- Targeted ability
  390.         ['Renekton']    = {true, spell = _E,                  range = 450,   projSpeed = 2000, },
  391.         ['Sejuani']     = {true, spell = _Q,                  range = 650,   projSpeed = 2000, },
  392.         ['Shen']        = {true, spell = _E,                  range = 575,   projSpeed = 2000, },
  393.         ['Tristana']    = {true, spell = _W,                  range = 900,   projSpeed = 2000, },
  394.         ['Tryndamere']  = {true, spell = 'Slash',             range = 650,   projSpeed = 1450, },
  395.         ['XinZhao']     = {true, spell = _E,                  range = 650,   projSpeed = 2000, }, -- Targeted ability
  396.     }
  397.     if unit.type == 'obj_AI_Hero' and unit.team == TEAM_ENEMY and isAGapcloserUnit[unit.charName] and GetDistance(unit) < 2000 and spell ~= nil then
  398.         if spell.name == (type(isAGapcloserUnit[unit.charName].spell) == 'number' and unit:GetSpellData(isAGapcloserUnit[unit.charName].spell).name or isAGapcloserUnit[unit.charName].spell) then
  399.             if spell.target ~= nil and spell.target.name == myHero.name or isAGapcloserUnit[unit.charName].spell == 'blindmonkqtwo' then
  400. --                print('Gapcloser: ',unit.charName, ' Target: ', (spell.target ~= nil and spell.target.name or 'NONE'), " ", spell.name, " ", spell.projectileID)
  401.                 CastSpell(_E, unit)
  402.             else
  403.                 spellExpired = false
  404.                 informationTable = {
  405.                     spellSource = unit,
  406.                     spellCastedTick = GetTickCount(),
  407.                     spellStartPos = Point(spell.startPos.x, spell.startPos.z),
  408.                     spellEndPos = Point(spell.endPos.x, spell.endPos.z),
  409.                     spellRange = isAGapcloserUnit[unit.charName].range,
  410.                     spellSpeed = isAGapcloserUnit[unit.charName].projSpeed,
  411.                     spellIsAnExpetion = isAGapcloserUnit[unit.charName].exeption or false,
  412.                 }
  413.             end
  414.         end
  415.     end
  416.  
  417.  
  418. end
Advertisement
Add Comment
Please, Sign In to add comment