FukDaPolice

FukDaCaitlyn 1.8

Apr 26th, 2015
4,237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 29.29 KB | None | 0 0
  1. if myHero.charName ~= 'Caitlyn' then return end
  2.  
  3. assert(load(Base64Decode("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"), nil, "bt", _ENV))() ScriptStatus("OBEDAAGHEEJ")
  4.  
  5. --Changelog 1.0 Release
  6. --Changelog 1.1 Added Auto E Gapclosers
  7. --              Cleaned code  
  8. --Changelog 1.2 added w ON ESCAPE vs gapclosers              
  9. --              added e to mouse
  10. --Changelog 1.3 Draws HP Bar Q+E+R  
  11. --              Added fast eq with logic in misc
  12. --Changelog 1.4 Added logic for Q in farm
  13. --Changelog 1.5 Fixed Target lock with SxOrb
  14. --Changelog 1.6 Added HPred and
  15. --Changelog 1.7 now released open source
  16. --Changelog 1.8 fixed spamming
  17.  
  18. require "SxOrbWalk"
  19. require "VPrediction"
  20. require "HPrediction"
  21.  
  22.  
  23. local Q = {range = 1250, delay = 0.65, speed = 2225, width = 80,IsReady = function() return myHero:CanUseSpell(_Q) == READY end}
  24. local W = {range = 800, delay = 0.25, speed = 1200, width = 67,IsReady = function() return myHero:CanUseSpell(_W) == READY end}
  25. local E = {range = 950, delay = 0.25, speed = 1800, width = 100,IsReady = function() return myHero:CanUseSpell(_E) == READY end}
  26. local R = {range = math.huge,IsReady = function() return myHero:CanUseSpell(_R) == READY end}
  27. local ignite = nil
  28. local iDmg = 0
  29. local informationTable = {}
  30. local spellExpired = true
  31. local HPred = HPrediction()
  32. local ts
  33. local ts = TargetSelector(TARGET_LESS_CAST_PRIORITY, 2000, DAMAGE_PHYSICAL, true)
  34. local myTarget = nil
  35. local Killable = false
  36.  
  37.  
  38. local immuneEffects = {
  39.     {'zhonyas_ring_activate.troy', 2.5},
  40.     {'Aatrox_Passive_Death_Activate.troy', 3},
  41.     {'LifeAura.troy', 4},
  42.     {'nickoftime_tar.troy', 7},
  43.     {'eyeforaneye_self.troy', 2},
  44.     {'UndyingRage_buf.troy', 5},
  45.     {'EggTimer.troy', 6},
  46. }
  47. local ToInterrupt = {}
  48. local InterruptList = {
  49.     { charName = "Caitlyn", spellName = "CaitlynAceintheHole"},
  50.     { charName = "FiddleSticks", spellName = "Crowstorm"},
  51.     { charName = "FiddleSticks", spellName = "DrainChannel"},
  52.     { charName = "Galio", spellName = "GalioIdolOfDurand"},
  53.     { charName = "Karthus", spellName = "FallenOne"},
  54.     { charName = "Katarina", spellName = "KatarinaR"},
  55.     { charName = "Lucian", spellName = "LucianR"},
  56.     { charName = "Malzahar", spellName = "AlZaharNetherGrasp"},
  57.     { charName = "MissFortune", spellName = "MissFortuneBulletTime"},
  58.     { charName = "Nunu", spellName = "AbsoluteZero"},                            
  59.     { charName = "Pantheon", spellName = "Pantheon_GrandSkyfall_Jump"},
  60.     { charName = "Shen", spellName = "ShenStandUnited"},
  61.     { charName = "Urgot", spellName = "UrgotSwap2"},
  62.     { charName = "Varus", spellName = "VarusQ"},
  63.     { charName = "Warwick", spellName = "InfiniteDuress"},
  64.     { charName = "Velkoz", spellName = "VelkozR"}
  65. }
  66.  
  67.  
  68.  
  69. TextList = {"Poke", " Killable Ult!"}
  70. KillText = {}
  71. colorText = ARGB(255,255,204,0)
  72.  
  73.  
  74. function GetCustomTarget()
  75.     ts:update()
  76.     if _G.AutoCarry and ValidTarget(_G.AutoCarry.Crosshair:GetTarget()) then return _G.AutoCarry.Crosshair:GetTarget() end
  77.     if not _G.Reborn_Loaded then return ts.target end
  78.     return ts.target
  79. end
  80.  
  81. function OnLoad()
  82.     PrintChat("<font color=\"#00FF00\">Caitlyn by Fukdapolice.</font>")
  83.    
  84.     --HPred:AddSpell("Q", 'Caitlyn', {collisionM = false, collisionH = false, delay = 0.65, range = 1250, speed = 2225, type = "DelayLine", width = 40, IsVeryLowAccuracy = true})
  85.     HP_Q = HPSkillshot({collisionM = false, collisionH = false, delay = 0.65, range = 1250, speed = 2225, type = "DelayLine", width = 40})
  86.     immuneTable = {}
  87.     checkDistance = 3000 * 3000
  88.     IgniteCheck()
  89.     FLoadLib()
  90.     VP = VPrediction(true)  
  91.     _G.oldDrawCircle = rawget(_G, 'DrawCircle')
  92.     _G.DrawCircle = DrawCircle2
  93.     if myHero:GetSpellData(_R).level == 3 then R.Range = R.Ranget[3] end
  94.     Minions = minionManager(MINION_ENEMY, Q.range, myHero, MINION_SORT_MAXHEALTH_ASC)
  95.     JungleMinions = minionManager(MINION_JUNGLE, Q.range, myHero, MINION_SORT_MAXHEALTH_DEC)
  96. end
  97.  
  98. function OnTick()
  99.     target = GetCustomTarget()
  100.     Checks()
  101.    
  102.    
  103.     ClearImmuneTable()  
  104. end
  105.  
  106. function OnDraw()
  107.     if HazMenu.Draw.drawq then
  108.         DrawCircle(myHero.x,myHero.y,myHero.z,1250,0xFFFF0000)
  109.     end            
  110.     if HazMenu.Draw.draww then
  111.         DrawCircle(myHero.x,myHero.y,myHero.z,800,0xFFFF0000)
  112.     end
  113.     if HazMenu.Draw.drawe then
  114.         DrawCircle(myHero.x,myHero.y,myHero.z,950,0xFFFF0000)
  115.     end
  116.    
  117.     if  HazMenu.Draw.drawHP then
  118.             for i, enemy in ipairs(GetEnemyHeroes()) do
  119.                 if ValidTarget(enemy) then
  120.                    DrawIndicator(enemy)
  121.                 end
  122.             end
  123.     end    
  124.    
  125.     if HazMenu.Misc.killtext then
  126.         for i = 1, heroManager.iCount do
  127.             local target = heroManager:GetHero(i)
  128.             if ValidTarget(target) and target ~= nil then
  129.                 local barPos = WorldToScreen(D3DXVECTOR3(target.x, target.y, target.z))
  130.                 local PosX = barPos.x - 35
  131.                 local PosY = barPos.y - 10
  132.                
  133.                 DrawText(TextList[KillText[i]], 16, PosX, PosY, colorText)
  134.             end
  135.         end
  136.     end
  137.     for networkID, time in pairs(immuneTable) do
  138.         local unit = objManager:GetObjectByNetworkId(networkID)
  139.         if unit and unit.valid and not unit.dead and GetDistanceSqr(myHero, unit) <= checkDistance then
  140.             DrawText3D(tostring(math.round(time - os.clock())), unit.x, unit.y, unit.z, 70, RGB(255, 255, 255), true)
  141.         end
  142.     end
  143. end
  144.  
  145.  
  146. function Checks()
  147.     IREADY = (ignite ~= nil and myHero:CanUseSpell(ignite) == READY)
  148.     QREADY = (myHero:CanUseSpell(_Q) == READY)
  149.     WREADY = (myHero:CanUseSpell(_W) == READY)
  150.     EREADY = (myHero:CanUseSpell(_E) == READY)
  151.     RREADY = (myHero:CanUseSpell(_R) == READY)
  152.     calcDmg()
  153.     LFCfunc()
  154.     SpellExpired()
  155.    
  156.     if ValidTarget(target) then
  157.         if HazMenu.Misc.KS then KS(target) end
  158.         if HazMenu.Misc.Ignite then AutoIgnite(target) end
  159.         if HazMenu.Combo.comboR then KS(target) end
  160.        
  161.     end
  162.        
  163.    
  164.     if HazMenu.combokey then
  165.         Combo()
  166.     end
  167.    
  168.    if HazMenu.harasskey and myHero.mana / myHero.maxMana > HazMenu.Harass.Mana /100 then
  169.         Poke()
  170.    end
  171.    if HazMenu.farmkey and myHero.mana / myHero.maxMana > HazMenu.Farm.Mana /100 then
  172.         Farm()
  173.    end
  174.     if HazMenu.moveto and HazMenu.Misc.Emouse then
  175.        moveto(mousePos.x,mousePos.z)
  176.     end  
  177.     if HazMenu.fastqe and HazMenu.Misc.QEorEQ then
  178.      fastqe()
  179.      elseif HazMenu.fastqe and not HazMenu.Misc.QEorEQ then
  180.         fasteq()
  181.     end
  182.    
  183. end
  184.  
  185. function IgniteCheck()
  186.     if myHero:GetSpellData(SUMMONER_1).name:find("summonerdot") then
  187.         ignite = SUMMONER_1
  188.     elseif myHero:GetSpellData(SUMMONER_2).name:find("summonerdot") then
  189.         ignite = SUMMONER_2
  190.     end
  191. end
  192.  
  193. function FLoadLib()
  194.     FMenu()
  195. end
  196.  
  197. function FMenu()
  198.     HazMenu = scriptConfig("Caitlyn", "Caitlyn")
  199.         HazMenu:addParam("combokey", "Combo key(Space)", SCRIPT_PARAM_ONKEYDOWN, false, 32)
  200.         HazMenu:addParam("harasskey", "Harass key(C)", SCRIPT_PARAM_ONKEYDOWN, false, string.byte("C"))
  201.         HazMenu:addParam("farmkey", "Farm key(V)", SCRIPT_PARAM_ONKEYDOWN, false, string.byte("V"))
  202.         HazMenu:addParam("moveto", "E to Mouse(Z)", SCRIPT_PARAM_ONKEYDOWN, false, string.byte("Z"))
  203.         HazMenu:addParam("fastqe", "Fast Q E anim.canc.(X)", SCRIPT_PARAM_ONKEYDOWN, false, string.byte("X"))
  204.    
  205.     HazMenu:addTS(ts)
  206.        
  207.     HazMenu:addSubMenu("Combo", "Combo")
  208.         HazMenu.Combo:addParam("comboQ", "Use Q", SCRIPT_PARAM_ONOFF, true)
  209.         HazMenu.Combo:addParam("comboW", "Use W", SCRIPT_PARAM_ONOFF, true)
  210.         HazMenu.Combo:addParam("comboE", "Use E", SCRIPT_PARAM_ONOFF, true)
  211.         HazMenu.Combo:addParam("comboR", "Use R", SCRIPT_PARAM_ONKEYDOWN, false, string.byte("R"))
  212.        
  213.        
  214.     HazMenu:addSubMenu("Harass", "Harass")
  215.         HazMenu.Harass:addParam("harassQ", "Use Q", SCRIPT_PARAM_ONOFF, true)      
  216.         HazMenu.Harass:addParam("harassE", "Use E", SCRIPT_PARAM_ONOFF, true)
  217.         HazMenu.Harass:addParam("Mana", "Mana Manager %", SCRIPT_PARAM_SLICE, 50, 1, 100, 0)
  218.    
  219.     HazMenu:addSubMenu("Farm", "Farm")
  220.         HazMenu.Farm:addParam("farmQ", "Use Q", SCRIPT_PARAM_ONOFF, true)
  221.         HazMenu.Farm:addParam("farmE", "Use E", SCRIPT_PARAM_ONOFF, true)
  222.         HazMenu.Farm:addParam("Mana", "Mana Manager %", SCRIPT_PARAM_SLICE, 50, 1, 100, 0)
  223.    
  224.     HazMenu:addSubMenu("Misc", "Misc")
  225.         HazMenu.Misc:addParam("KS", "KillSteal with Q", SCRIPT_PARAM_ONOFF, true)
  226.         HazMenu.Misc:addParam("Ignite", "Use Auto Ignite", SCRIPT_PARAM_ONOFF, true)
  227.         HazMenu.Misc:addParam("killtext", "Draw if Killable with combo", SCRIPT_PARAM_ONOFF, true)
  228.         HazMenu.Misc:addParam("Emouse", "E to Mouse", SCRIPT_PARAM_ONOFF, false)
  229.         HazMenu.Misc:addParam("QEorEQ", "ON QE / Off EQ", SCRIPT_PARAM_ONOFF, true)
  230.         HazMenu.Misc:addParam("Pred", "Use HPred", SCRIPT_PARAM_ONOFF, true)
  231.        
  232.     HazMenu:addSubMenu("Draw","Draw")
  233.       HazMenu.Draw:addParam("drawq", "Draw Q", SCRIPT_PARAM_ONOFF, true)
  234.       HazMenu.Draw:addParam("draww", "Draw W", SCRIPT_PARAM_ONOFF, true)
  235.       HazMenu.Draw:addParam("drawe", "Draw E", SCRIPT_PARAM_ONOFF, true)
  236.       HazMenu.Draw:addParam("drawHP", "Draw Dmg on HPBar", SCRIPT_PARAM_ONOFF, true)
  237.      
  238.      
  239.     HazMenu:addParam("AGP", "Auto E gapclosers", SCRIPT_PARAM_ONOFF, true)
  240.     HazMenu:addParam("useW", "Auto W gapclosers", SCRIPT_PARAM_ONOFF, true)
  241.     HazMenu:addParam("Interrupt", "interrupt with W", SCRIPT_PARAM_ONOFF, true)
  242.    
  243.    
  244.     HazMenu:addSubMenu("LagFreeCircles", "LFC")
  245.       HazMenu.LFC:addParam("LagFree", "Activate Lag Free Circles", SCRIPT_PARAM_ONOFF, false)
  246.       HazMenu.LFC:addParam("CL", "Length before Snapping", SCRIPT_PARAM_SLICE, 350, 75, 2000, 0)
  247.       HazMenu.LFC:addParam("CLinfo", "Higher length = Lower FPS Drops", SCRIPT_PARAM_INFO, "")
  248.    
  249.     for i = 1, heroManager.iCount, 1 do
  250.         local enemy = heroManager:getHero(i)
  251.         if enemy.team ~= myHero.team then
  252.             for _, champ in pairs(InterruptList) do
  253.                 if enemy.charName == champ.charName then
  254.                     table.insert(ToInterrupt, champ.spellName)
  255.                 end
  256.             end
  257.         end
  258.     end
  259.    
  260.     if _G.Reborn_Loaded then
  261.     DelayAction(function()
  262.         PrintChat("<font color = \"#FFFFFF\">[Caitlyn] </font><font color = \"#FF0000\">SAC Status:</font> <font color = \"#FFFFFF\">Successfully integrated.</font> </font>")
  263.         HazMenu:addParam("SACON","[Caitlyn] SAC:R support is active.", 5, "")
  264.         isSAC = true
  265.     end, 10)
  266.     elseif not _G.Reborn_Loaded then
  267.         PrintChat("<font color = \"#FFFFFF\">[Caitlyn] </font><font color = \"#FF0000\">Orbwalker not found:</font> <font color = \"#FFFFFF\">SxOrbWalk integrated.</font> </font>")
  268.         HazMenu:addSubMenu("Orbwalker", "SxOrb")
  269.         SxOrb:LoadToMenu(HazMenu.SxOrb)
  270.         isSX = true
  271.     end
  272.     HazMenu:permaShow("combokey")
  273.     HazMenu:permaShow("harasskey")
  274.     HazMenu:permaShow("farmkey")
  275. end
  276.  
  277.  
  278.  
  279. function KS(enemy)  
  280.     if Q.IsReady() and getDmg("Q", enemy, myHero) > enemy.health then
  281.         if GetDistance(enemy) <= Q.range and HazMenu.Misc.KS then
  282.             local CastPosition, HitChance, CastPos = VP:GetLineCastPosition(target, Q.delay, Q.width, Q.range, Q.speed, myHero, false)
  283.             if HitChance >= 2 and GetDistance(CastPosition) <= Q.range and GetDistance(CastPosition) >= 700 and Q.IsReady() then
  284.                 CastSpell(_Q, CastPosition.x, CastPosition.z)
  285.             end
  286.         end
  287.     end
  288.     if R.IsReady() and getDmg("R", enemy, myHero) > enemy.health then
  289.         if GetDistance(enemy) <= R.range and GetDistance(enemy) > 900 and HazMenu.Combo.comboR then
  290.           CastSpell(_R, enemy)
  291.         end
  292.     end
  293. end
  294.  
  295. function AutoIgnite(enemy)
  296.     iDmg = ((IREADY and getDmg("IGNITE", enemy, myHero)) or 0)
  297.     if enemy.health <= iDmg and GetDistance(enemy) <= 600 and ignite ~= nil
  298.         then
  299.             if IREADY then CastSpell(ignite, enemy) end
  300.     end
  301. end
  302.  
  303.  
  304. --Big TNX to Manciuzz for this part
  305.  
  306.  
  307. function OnProcessSpell(unit, spell)
  308.     if HazMenu.Interrupt and W.IsReady() and #ToInterrupt > 0 then
  309.         for _, ability in pairs(ToInterrupt) do
  310.             if spell.name == ability and unit.team ~= myHero.team then
  311.                 if GetDistance(unit) <= 800 then CastSpell(_W, unit.x, unit.z) end
  312.             end
  313.         end
  314.     end
  315.     if HazMenu.AGP and E.IsReady() then
  316.             local jarvanAddition = unit.charName == "JarvanIV" and unit:CanUseSpell(_Q) ~= READY and _R or _Q
  317.             local isAGapcloserUnit = {
  318.                 ['Aatrox']      = {true, spell = _Q,                  range = 1000,  projSpeed = 1200, },
  319.                 ['Akali']       = {true, spell = _R,                  range = 800,   projSpeed = 2200, },
  320.                 ['Alistar']     = {true, spell = _W,                  range = 650,   projSpeed = 2000, },
  321.                 ['Diana']       = {true, spell = _R,                  range = 825,   projSpeed = 2000, },
  322.                 ['Gragas']      = {true, spell = _E,                  range = 600,   projSpeed = 2000, },
  323.                 ['Hecarim']     = {true, spell = _R,                  range = 1000,  projSpeed = 1200, },
  324.                 ['Irelia']      = {true, spell = _Q,                  range = 650,   projSpeed = 2200, },
  325.                 ['JarvanIV']    = {true, spell = jarvanAddition,      range = 770,   projSpeed = 2000, },
  326.                 ['Jax']         = {true, spell = _Q,                  range = 700,   projSpeed = 2000, },
  327.                 ['Jayce']       = {true, spell = 'JayceToTheSkies',   range = 600,   projSpeed = 2000, },
  328.                 ['Khazix']      = {true, spell = _E,                  range = 900,   projSpeed = 2000, },
  329.                 ['Leblanc']     = {true, spell = _W,                  range = 600,   projSpeed = 2000, },
  330.                 ['LeeSin']      = {true, spell = 'blindmonkqtwo',     range = 1300,  projSpeed = 1800, },
  331.                 ['Leona']       = {true, spell = _E,                  range = 900,   projSpeed = 2000, },
  332.                 ['Malphite']    = {true, spell = _R,                  range = 1000,  projSpeed = 1500 + unit.ms},
  333.                 ['Maokai']      = {true, spell = _Q,                  range = 600,   projSpeed = 1200, },
  334.                 ['MonkeyKing']  = {true, spell = _E,                  range = 650,   projSpeed = 2200, },
  335.                 ['Pantheon']    = {true, spell = _W,                  range = 600,   projSpeed = 2000, },
  336.                 ['Poppy']       = {true, spell = _E,                  range = 525,   projSpeed = 2000, },
  337.                 ['Renekton']    = {true, spell = _E,                  range = 450,   projSpeed = 2000, },
  338.                 ['Sejuani']     = {true, spell = _Q,                  range = 650,   projSpeed = 2000, },
  339.                 ['Shen']        = {true, spell = _E,                  range = 575,   projSpeed = 2000, },
  340.                 ['Tristana']    = {true, spell = _W,                  range = 900,   projSpeed = 2000, },
  341.                 ['Tryndamere']  = {true, spell = 'Slash',             range = 650,   projSpeed = 1450, },
  342.                 ['XinZhao']     = {true, spell = _E,                  range = 650,   projSpeed = 2000, },
  343.             }
  344.             if unit.type == myHero.type and unit.team ~= myHero.team and isAGapcloserUnit[unit.charName] and GetDistance(unit) < 2000 and spell ~= nil then
  345.                 if spell.name == (type(isAGapcloserUnit[unit.charName].spell) == 'number' and unit:GetSpellData(isAGapcloserUnit[unit.charName].spell).name or isAGapcloserUnit[unit.charName].spell) then
  346.                     if spell.target ~= nil and spell.target.isMe or isAGapcloserUnit[unit.charName].spell == 'blindmonkqtwo' then
  347.                         if E.IsReady() then
  348.                             E.target = unit
  349.                             CastSpell(_E, unit.x, unit.z)
  350.                         end
  351.                     else
  352.                         spellExpired = false
  353.                         informationTable = {
  354.                             spellSource = unit,
  355.                             spellCastedTick = GetTickCount(),
  356.                             spellStartPos = Point(spell.startPos.x, spell.startPos.z),
  357.                             spellEndPos = Point(spell.endPos.x, spell.endPos.z),
  358.                             spellRange = isAGapcloserUnit[unit.charName].range,
  359.                             spellSpeed = isAGapcloserUnit[unit.charName].projSpeed
  360.                         }
  361.                     end
  362.                 end
  363.             end
  364.        
  365.     end
  366. end        
  367.  
  368.  
  369.  
  370. function SpellExpired()
  371.     if ValidTarget(target) then
  372.     if HazMenu.AGP and not spellExpired and (GetTickCount() - informationTable.spellCastedTick) <= (informationTable.spellRange / informationTable.spellSpeed) * 1000 then
  373.         local spellDirection     = (informationTable.spellEndPos - informationTable.spellStartPos):normalized()
  374.         local spellStartPosition = informationTable.spellStartPos + spellDirection
  375.         local spellEndPosition   = informationTable.spellStartPos + spellDirection * informationTable.spellRange
  376.         local heroPosition = Point(myHero.x, myHero.z)
  377.         local lineSegment = LineSegment(Point(spellStartPosition.x, spellStartPosition.y), Point(spellEndPosition.x, spellEndPosition.y))
  378.    
  379.             local lineSegment = LineSegment(Point(spellStartPosition.x, spellStartPosition.y), Point(spellEndPosition.x, spellEndPosition.y))
  380.            
  381.  
  382.             if lineSegment:distance(heroPosition) <= 300 and E.IsReady() then
  383.                
  384.                 CastSpell(_E, target.x, target.z)
  385.             end
  386.  
  387.         else
  388.             spellExpired = true
  389.             informationTable = {}
  390.         end
  391.         if W.IsReady() and HazMenu.useW then  
  392.             if HazMenu.AGP and not spellExpired and (GetTickCount() - informationTable.spellCastedTick) <= (informationTable.spellRange / informationTable.spellSpeed) * 1000 then
  393.         local spellDirection     = (informationTable.spellEndPos - informationTable.spellStartPos):normalized()
  394.         local spellStartPosition = informationTable.spellStartPos + spellDirection
  395.         local spellEndPosition   = informationTable.spellStartPos + spellDirection * informationTable.spellRange
  396.         local heroPosition = Point(myHero.x, myHero.z)
  397.         local lineSegment = LineSegment(Point(spellStartPosition.x, spellStartPosition.y), Point(spellEndPosition.x, spellEndPosition.y))
  398.    
  399.             local lineSegment = LineSegment(Point(spellStartPosition.x, spellStartPosition.y), Point(spellEndPosition.x, spellEndPosition.y))
  400.            
  401.  
  402.             if lineSegment:distance(heroPosition) <= 400 then
  403.                    CastSpell(_W,myHero.x,myHero.z)
  404.             end
  405.            
  406.  
  407.         else
  408.             spellExpired = true
  409.             informationTable = {}
  410.         end
  411.                
  412.                
  413.         end
  414.     end
  415. end
  416.  
  417. function fasteq()
  418.         if ValidTarget(target) and not HazMenu.Misc.QEorEQ then
  419.        
  420.         if E.IsReady() and HazMenu.fastqe and Q.IsReady() then
  421.             local CastPosition, HitChance, CastPos = VP:GetLineCastPosition(target, E.delay, E.width, E.range, E.speed, myHero, false)
  422.             if HitChance >= 2 and GetDistance(CastPosition) <= W.range and E.IsReady() then
  423.                 --if HazMenu.Misc.Pak and VIP_USER then
  424.                    
  425.                     --else
  426.                     CastSpell(_E, CastPosition.x, CastPosition.z)
  427.                 --end
  428.             end
  429.         end
  430.         if Q.IsReady() and HazMenu.fastqe then
  431.             local CastPosition, HitChance, CastPos = VP:GetLineCastPosition(target, Q.delay, Q.width, Q.range, Q.speed, myHero, false)
  432.             if HitChance >= 2 and GetDistance(CastPosition) <= Q.range and Q.IsReady() then
  433.                  --if HazMenu.Misc.Pak and VIP_USER then
  434.                      
  435.                     --else
  436.                     CastSpell(_Q, CastPosition.x, CastPosition.z)
  437.                 --end
  438.             end
  439.         end
  440.     end
  441. end
  442.  
  443.  
  444. function fastqe()
  445.         if ValidTarget(target) and HazMenu.Misc.QEorEQ then
  446.         if Q.IsReady() and HazMenu.fastqe and E.IsReady() then
  447.             local CastPosition, HitChance, CastPos = VP:GetLineCastPosition(target, Q.delay, Q.width, Q.range, Q.speed, myHero, false)
  448.             if HitChance >= 2 and GetDistance(CastPosition) <= 950 and Q.IsReady() then
  449.                  --if HazMenu.Misc.Pak and VIP_USER then
  450.                      
  451.                     --else
  452.                     CastSpell(_Q, CastPosition.x, CastPosition.z)
  453.                 --end
  454.             end
  455.         end
  456.         if E.IsReady() and HazMenu.fastqe then
  457.             local CastPosition, HitChance, CastPos = VP:GetLineCastPosition(target, E.delay, E.width, E.range, E.speed, myHero, false)
  458.             if HitChance >= 2 and GetDistance(CastPosition) <= E.range and E.IsReady() then
  459.                 --if HazMenu.Misc.Pak and VIP_USER then
  460.                    
  461.                     --else
  462.                     CastSpell(_E, CastPosition.x, CastPosition.z)
  463.                 --end
  464.             end
  465.         end
  466.        
  467.     end
  468. end
  469.  
  470. function Combo()
  471.     if ValidTarget(target) then
  472.             if W.IsReady() and HazMenu.Combo.comboW and HazMenu.useW then            
  473.             local AOECastPosition, MainTargetHitChance, nTargets = VP:GetCircularAOECastPosition(target, W.delay, W.width, W.range, W.speed, myHero, false)
  474.             if MainTargetHitChance >= 3 and GetDistance(AOECastPosition) <= W.range and W.IsReady() then
  475.                 CastSpell(_W, AOECastPosition.x, AOECastPosition.z)
  476.             end
  477.            
  478.         end    
  479.         if E.IsReady() and HazMenu.Combo.comboE then
  480.             local CastPosition, HitChance, CastPos = VP:GetLineCastPosition(target, E.delay, E.width, E.range, E.speed, myHero, true)
  481.             if HitChance >= 2 and GetDistance(CastPosition) <= E.range and E.IsReady() then
  482.                 --if HazMenu.Misc.Pak and VIP_USER then
  483.                    
  484.                     --else
  485.                     CastSpell(_E, CastPosition.x, CastPosition.z)
  486.                 --end  
  487.             end
  488.         end
  489.        
  490.         if Q.IsReady() and HazMenu.Combo.comboQ then
  491.             if HazMenu.Misc.Pred and GetDistance(myHero, target) > 60 then                   
  492.                         HPredQ()
  493.         elseif not HazMenu.Misc.Pred then
  494.             local CastPosition, HitChance, CastPos = VP:GetLineCastPosition(target, Q.delay, Q.width, Q.range, Q.speed, myHero, false)
  495.             if HitChance >= 2 and GetDistance(CastPosition) <= Q.range and GetDistance(CastPosition) >= 660 and Q.IsReady() then
  496.                  --if HazMenu.Misc.Pak and VIP_USER then
  497.                      
  498.                     --else
  499.                      CastSpell(_Q, CastPosition.x, CastPosition.z)
  500.                 --end    
  501.             end
  502.             end
  503.         end            
  504.     end
  505. end
  506.  
  507.  
  508.                    
  509.  
  510.  
  511. function Poke()
  512.     if ValidTarget(target) then
  513.         if Q.IsReady() and HazMenu.Harass.harassQ then
  514.             if HazMenu.Misc.Pred and GetDistance(myHero, target) > 640 then                  
  515.                         HPredQ()
  516.         elseif not HazMenu.Misc.Pred then
  517.             local CastPosition, HitChance, CastPos = VP:GetLineCastPosition(target, Q.delay, Q.width, Q.range, Q.speed, myHero, false)
  518.             if HitChance >= 2 and GetDistance(CastPosition) <= Q.range and GetDistance(CastPosition) >= 640 and Q.IsReady() then
  519.                  --if HazMenu.Misc.Pak and VIP_USER then
  520.                      --packetCast(_Q, CastPosition.x, CastPosition.z)
  521.                     --else
  522.                     CastSpell(_Q, CastPosition.x, CastPosition.z)
  523.                 --end
  524.             end
  525.         end
  526.         end
  527.         if E.IsReady() and HazMenu.Harass.harassE then
  528.             local CastPosition, HitChance, CastPos = VP:GetLineCastPosition(target, E.delay, E.width, E.range, E.speed, myHero, true)
  529.             if HitChance >= 2 and GetDistance(CastPosition) <= E.range and E.IsReady() then
  530.                 --if HazMenu.Misc.Pak and VIP_USER then
  531.                     --packetCast(_E, CastPosition.x, CastPosition.z)
  532.                     --else
  533.                     CastSpell(_E, CastPosition.x, CastPosition.z)
  534.                 --end
  535.             end
  536.         end
  537.     end
  538. end
  539.  
  540. function Farm()
  541.     Minions:update()
  542.    
  543.     for i, Minion in pairs(Minions.objects) do
  544.         if Q.IsReady() and HazMenu.Farm.farmQ and #Minions.objects > 2 then
  545.            if myHero.mana / myHero.maxMana > HazMenu.Farm.Mana /100 then
  546.            if ValidTarget(Minion) and GetDistance(myHero, Minion) > 400 then
  547.            local AOECastPosition, MainTargetHitChance, nTargets = VP:GetLineAOECastPosition(Minion, Q.delay, Q.width, 750, Q.speed, myHero)
  548.             if nTargets >= 1 and Q.IsReady() then
  549.              CastSpell(_Q, AOECastPosition.x, AOECastPosition.z)
  550.              end
  551.         end
  552.         end
  553.      end
  554.      end
  555.     JungleMinions:update()
  556.     for i, Minion in pairs(JungleMinions.objects) do
  557.         if  Q.IsReady() and HazMenu.Farm.farmQ then
  558.             CastSpell(_Q, Minion.x, Minion.z)
  559.         end
  560.         if  E.IsReady() and HazMenu.Farm.farmE then
  561.             CastSpell(_E, Minion.x, Minion.z)
  562.         end
  563.     end
  564. end
  565.  
  566. function moveto()
  567.     if E.IsReady() and HazMenu.moveto and HazMenu.Misc.Emouse then
  568.       MPos = Vector(mousePos.x, mousePos.y, mousePos.z)
  569.         HeroPos = Vector(myHero.x, myHero.y, myHero.z)
  570.         DashPos = HeroPos + ( HeroPos - MPos )*(500/GetDistance(mousePos))
  571.         myHero:MoveTo(mousePos.x, mousePos.z)
  572.         CastSpell(_E,DashPos.x, DashPos.z)
  573.         myHero:MoveTo(mousePos.x, mousePos.z)
  574.     end
  575. end
  576.  
  577.  
  578.        
  579.  
  580.  
  581.  
  582. function HPredQ(unit)
  583.     local unit = target
  584.     local QPos, QHitChance = HPred:GetPredict(HP_Q, unit, myHero)
  585.     if QHitChance >= 1 then
  586.         CastSpell(_Q, QPos.x, QPos.z)
  587.     end
  588.    
  589. end
  590.  
  591.  
  592. function calcDmg()
  593.     for i=1, heroManager.iCount do
  594.         local Target = heroManager:GetHero(i)
  595.         if ValidTarget(Target) and Target ~= nil then
  596.             qDmg = ((QREADY and getDmg("Q", Target, myHero)) or 0)
  597.             wDmg = ((WREADY and getDmg("W", Target, myHero)) or 0)
  598.             eDmg = ((EREADY and getDmg("E", Target, myHero)) or 0)
  599.             rDmg = ((RREADY and getDmg("R", Target, myHero)) or 0)
  600.             allDmg = (rDmg)
  601.            
  602.             if Target.health > allDmg then
  603.                 KillText[i] = 1
  604.             elseif Target.health <= allDmg then
  605.                 KillText[i] = 2
  606.             end
  607.         end
  608.     end
  609. end
  610.  
  611. function LFCfunc()
  612.     if not HazMenu.LFC.LagFree then _G.DrawCircle = _G.oldDrawCircle end
  613.     if HazMenu.LFC.LagFree then _G.DrawCircle = DrawCircle2 end
  614. end
  615.  
  616. -- Barasia, vadash, viseversa
  617.  
  618. function DrawCircleNextLvl(x, y, z, radius, width, color, chordlength)
  619.     radius = radius or 300
  620.     quality = math.max(8,round(180/math.deg((math.asin((chordlength/(2*radius)))))))
  621.     quality = 2 * math.pi / quality
  622.     radius = radius*.92
  623.     local points = {}
  624.     for theta = 0, 2 * math.pi + quality, quality do
  625.         local c = WorldToScreen(D3DXVECTOR3(x + radius * math.cos(theta), y, z - radius * math.sin(theta)))
  626.         points[#points + 1] = D3DXVECTOR2(c.x, c.y)
  627.     end
  628.     DrawLines2(points, width or 1, color or 4294967295)
  629. end
  630.  
  631. function round(num)
  632.     if num >= 0 then return math.floor(num+.5) else return math.ceil(num-.5) end
  633. end
  634.  
  635. function DrawCircle2(x, y, z, radius, color)
  636.     local vPos1 = Vector(x, y, z)
  637.     local vPos2 = Vector(cameraPos.x, cameraPos.y, cameraPos.z)
  638.     local tPos = vPos1 - (vPos1 - vPos2):normalized() * radius
  639.     local sPos = WorldToScreen(D3DXVECTOR3(tPos.x, tPos.y, tPos.z))
  640.     if OnScreen({ x = sPos.x, y = sPos.y }, { x = sPos.x, y = sPos.y }) then
  641.         DrawCircleNextLvl(x, y, z, radius, 1, color, HazMenu.LFC.CL)
  642.     end
  643. end
  644.  
  645. function OnCreateObj(object)
  646.     if object and object.valid then
  647.         for _, effect in pairs(immuneEffects) do
  648.             if effect[1] == object.name then
  649.                 local nearestHero = nil
  650.                 for i = 1, heroManager.iCount do
  651.                     local hero = heroManager:GetHero(i)
  652.                     if nearestHero and nearestHero.valid and hero and hero.valid then
  653.                         if GetDistanceSqr(hero, object) < GetDistanceSqr(nearestHero, object) then
  654.                             nearestHero = hero
  655.                         end
  656.                     else
  657.                         nearestHero = hero
  658.                     end
  659.                 end
  660.                 immuneTable[nearestHero.networkID] = os.clock() + effect[2]
  661.             end
  662.         end
  663.     end
  664. end
  665.  
  666.  
  667.  
  668. function ClearImmuneTable()
  669.     for networkID, time in pairs(immuneTable) do
  670.         if os.clock() > time then
  671.             immuneTable[networkID] = nil
  672.         end
  673.     end
  674. end
  675.  
  676.  
  677.  
  678. for i, enemy in ipairs(GetEnemyHeroes()) do
  679.     enemy.barData = {PercentageOffset = {x = 0, y = 0} }
  680. end
  681.  
  682. function GetEnemyHPBarPos(enemy)
  683.  
  684.     if not enemy.barData then
  685.         return
  686.     end
  687.  
  688.     local barPos = GetUnitHPBarPos(enemy)
  689.     local barPosOffset = GetUnitHPBarOffset(enemy)
  690.     local barOffset = Point(enemy.barData.PercentageOffset.x, enemy.barData.PercentageOffset.y)
  691.     local barPosPercentageOffset = Point(enemy.barData.PercentageOffset.x, enemy.barData.PercentageOffset.y)
  692.  
  693.     local BarPosOffsetX = 169
  694.     local BarPosOffsetY = 47
  695.     local CorrectionX = 16
  696.     local CorrectionY = 4
  697.  
  698.     barPos.x = barPos.x + (barPosOffset.x - 0.5 + barPosPercentageOffset.x) * BarPosOffsetX + CorrectionX
  699.     barPos.y = barPos.y + (barPosOffset.y - 0.5 + barPosPercentageOffset.y) * BarPosOffsetY + CorrectionY
  700.  
  701.     local StartPos = Point(barPos.x, barPos.y)
  702.     local EndPos = Point(barPos.x + 103, barPos.y)
  703.  
  704.     return Point(StartPos.x, StartPos.y), Point(EndPos.x, EndPos.y)
  705.  
  706. end
  707.  
  708.  
  709. function DrawIndicator(enemy)
  710.     local Qdmg, Wdmg, Edmg, AAdmg = getDmg("Q", enemy, myHero), getDmg("W", enemy, myHero), getDmg("E", enemy, myHero), getDmg("AD", enemy, myHero)
  711.    
  712.     Qdmg = ((Q.IsReady and Qdmg) or 0)
  713.     Edmg = ((E.IsReady and Edmg) or 0)
  714.     Rdmg = ((R.IsReady and Rdmg) or 0)
  715.     AAdmg = ((Aadmg) or 0)
  716.  
  717.     local damage = Qdmg + Edmg + Rdmg
  718.  
  719.     local SPos, EPos = GetEnemyHPBarPos(enemy)
  720.  
  721.     if not SPos then return end
  722.  
  723.     local barwidth = EPos.x - SPos.x
  724.     local Position = SPos.x + math.max(0, (enemy.health - damage) / enemy.maxHealth) * barwidth
  725.  
  726.     DrawText("|", 16, math.floor(Position), math.floor(SPos.y + 8), ARGB(255,0,255,0))
  727.     DrawText("HP: "..math.floor(enemy.health - damage), 12, math.floor(SPos.x + 25), math.floor(SPos.y - 15), (enemy.health - damage) > 0 and ARGB(255, 0, 255, 0) or  ARGB(255, 255, 0, 0))
  728. end
Advertisement
Add Comment
Please, Sign In to add comment