FukDaPolice

Ezreal by FukDaPolice 1.35

Jun 30th, 2015
1,830
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 27.86 KB | None | 0 0
  1. --[[It Belong in a Museum Ezreal by FukDaPolice]]
  2.  
  3.  
  4. if myHero.charName ~= 'Ezreal' then return end
  5.  
  6. assert(load(Base64Decode("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"), nil, "bt", _ENV))() ScriptStatus("WJMLNOQIMNI")  
  7.  
  8. require "SxOrbWalk"
  9. require "VPrediction"
  10. --require "SPrediction"
  11. require "HPrediction"
  12. if VIP_USER then
  13. require "Collision"
  14. end
  15.  
  16.  
  17. local Q = {range = 1150, delay = 0.25, speed = 2000, width = 60,IsReady = function() return myHero:CanUseSpell(_Q) == READY end}
  18. local W = {range = 1000, delay = 0, speed = 1600, width = 80,IsReady = function() return myHero:CanUseSpell(_W) == READY end}
  19. local E = {range = 475, IsReady = function() return myHero:CanUseSpell(_E) == READY end}
  20. local R = {range = 20000, delay = 1.0, speed = 2000, width = 160,IsReady = function() return myHero:CanUseSpell(_R) == READY end}
  21. local ignite = nil
  22. local smite = nil
  23. local iDmg = 0
  24. local sDmg = 0
  25. local ts
  26. local ts = TargetSelector(TARGET_LESS_CAST_PRIORITY, 2000, DAMAGE_PHYSICAL, true)
  27. local myTarget = nil
  28. local Killable = false
  29. local VP = VPrediction(true)
  30. --local SP = SPrediction() 
  31. local HPred = HPrediction()
  32.  
  33.  
  34.  
  35.  
  36. TextList = {"", " Killable Ult!"}
  37. KillText = {}
  38. colorText = ARGB(255,255,204,0)
  39.  
  40.  
  41. function GetCustomTarget()
  42.     ts:update()
  43.     if _G.AutoCarry and ValidTarget(_G.AutoCarry.Crosshair:GetTarget()) then return _G.AutoCarry.Crosshair:GetTarget() end
  44.     if not _G.Reborn_Loaded then return ts.target end
  45.     return ts.target
  46. end
  47.  
  48. function OnLoad()
  49.     PrintChat("<font color=\"#00FF00\">Ezreal by Fukdapolice.</font>")
  50.     ItemNames               = {
  51.         [3303]              = "ArchAngelsDummySpell",
  52.         [3007]              = "ArchAngelsDummySpell",
  53.         [3144]              = "BilgewaterCutlass",
  54.         [3188]              = "ItemBlackfireTorch",
  55.         [3153]              = "ItemSwordOfFeastAndFamine",
  56.         [3405]              = "TrinketSweeperLvl1",
  57.         [3411]              = "TrinketOrbLvl1",
  58.         [3166]              = "TrinketTotemLvl1",
  59.         [3450]              = "OdinTrinketRevive",
  60.         [2041]              = "ItemCrystalFlask",
  61.         [2054]              = "ItemKingPoroSnack",
  62.         [2138]              = "ElixirOfIron",
  63.         [2137]              = "ElixirOfRuin",
  64.         [2139]              = "ElixirOfSorcery",
  65.         [2140]              = "ElixirOfWrath",
  66.         [3184]              = "OdinEntropicClaymore",
  67.         [2050]              = "ItemMiniWard",
  68.         [3401]              = "HealthBomb",
  69.         [3363]              = "TrinketOrbLvl3",
  70.         [3092]              = "ItemGlacialSpikeCast",
  71.         [3460]              = "AscWarp",
  72.         [3361]              = "TrinketTotemLvl3",
  73.         [3362]              = "TrinketTotemLvl4",
  74.         [3159]              = "HextechSweeper",
  75.         [2051]              = "ItemHorn",
  76.         --[2003]            = "RegenerationPotion",
  77.         [3146]              = "HextechGunblade",
  78.         [3187]              = "HextechSweeper",
  79.         [3190]              = "IronStylus",
  80.         [2004]              = "FlaskOfCrystalWater",
  81.         [3139]              = "ItemMercurial",
  82.         [3222]              = "ItemMorellosBane",
  83.         [3042]              = "Muramana",
  84.         [3043]              = "Muramana",
  85.         [3180]              = "OdynsVeil",
  86.         [3056]              = "ItemFaithShaker",
  87.         [2047]              = "OracleExtractSight",
  88.         [3364]              = "TrinketSweeperLvl3",
  89.         [2052]              = "ItemPoroSnack",
  90.         [3140]              = "QuicksilverSash",
  91.         [3143]              = "RanduinsOmen",
  92.         [3074]              = "ItemTiamatCleave",
  93.         [3800]              = "ItemRighteousGlory",
  94.         [2045]              = "ItemGhostWard",
  95.         [3342]              = "TrinketOrbLvl1",
  96.         [3040]              = "ItemSeraphsEmbrace",
  97.         [3048]              = "ItemSeraphsEmbrace",
  98.         [2049]              = "ItemGhostWard",
  99.         [3345]              = "OdinTrinketRevive",
  100.         [2044]              = "SightWard",
  101.         [3341]              = "TrinketSweeperLvl1",
  102.         [3069]              = "shurelyascrest",
  103.         [3599]              = "KalistaPSpellCast",
  104.         [3185]              = "HextechSweeper",
  105.         [3077]              = "ItemTiamatCleave",
  106.         [2009]              = "ItemMiniRegenPotion",
  107.         [2010]              = "ItemMiniRegenPotion",
  108.         [3023]              = "ItemWraithCollar",
  109.         [3290]              = "ItemWraithCollar",
  110.         [2043]              = "VisionWard",
  111.         [3340]              = "TrinketTotemLvl1",
  112.         [3090]              = "ZhonyasHourglass",
  113.         [3154]              = "wrigglelantern",
  114.         [3142]              = "YoumusBlade",
  115.         [3157]              = "ZhonyasHourglass",
  116.         [3512]              = "ItemVoidGate",
  117.         [3131]              = "ItemSoTD",
  118.         [3137]              = "ItemDervishBlade",
  119.         [3352]              = "RelicSpotter",
  120.         [3350]              = "TrinketTotemLvl2",
  121.     }
  122.     _G.ITEM_1               = 06
  123.     _G.ITEM_2               = 07
  124.     _G.ITEM_3               = 08
  125.     _G.ITEM_4               = 09
  126.     _G.ITEM_5               = 10
  127.     _G.ITEM_6               = 11
  128.     _G.ITEM_7               = 12
  129.    
  130.     ___GetInventorySlotItem = rawget(_G, "GetInventorySlotItem")
  131.     _G.GetInventorySlotItem = GetSlotItem
  132.     myHero = GetMyHero()
  133.    
  134.    
  135.    
  136.    
  137.     SmiteCheck()
  138.     IgniteCheck()
  139.     FLoadLib()
  140.    
  141.     _G.oldDrawCircle = rawget(_G, 'DrawCircle')
  142.     _G.DrawCircle = DrawCircle2
  143.    
  144.     Minions = minionManager(MINION_ENEMY, Q.range, myHero, MINION_SORT_MAXHEALTH_ASC)
  145.     JungleMinions = minionManager(MINION_JUNGLE, Q.range, myHero, MINION_SORT_MAXHEALTH_DEC)
  146.    
  147.     --SP.SpellData[_Q] = { speed = 2000, delay = 0.25, range = 1150, width = 60, collision = true, aoe = false, type = "linear"}
  148.     --SP.SpellData[_E] = { speed = 1600, delay = 0.25, range = 1000, width = 80, collision = false, aoe = false, type = "linear"}
  149.     --SP.SpellData[_R] = { speed = 1600, delay = 1.0, range = 20000, width = 160, collision = false, aoe = true, type = "linear"}
  150.    
  151.     HP_Q = HPSkillshot({collisionM = true, collisionH = true, delay = 0.25, range = 1150, speed = 2000, type = "DelayLine", width = 120})
  152.     HP_W = HPSkillshot({collisionM = false, collisionH = false, delay = 0, range = 1000, speed = 1600, type = "DelayLine", width = 160})
  153.     HP_R = HPSkillshot({collisionM = false, collisionH = false, delay = 0.25, range = 20000, speed = 2000, type = "DelayLine", width = 320})
  154. end
  155.  
  156. function OnTick()
  157.     target = GetCustomTarget()
  158.     Checks()
  159.    
  160.    
  161.    
  162. end
  163.  
  164. function OnDraw()
  165.     if HazMenu.Draw.drawq then
  166.         DrawCircle(myHero.x,myHero.y,myHero.z,1150,0x3300CC)
  167.     end            
  168.     if HazMenu.Draw.draww then
  169.         DrawCircle(myHero.x,myHero.y,myHero.z,1000,0xCCFF33)
  170.     end
  171.     if HazMenu.Draw.drawe then
  172.         DrawCircle(myHero.x,myHero.y,myHero.z,450,0xFFFF0000)
  173.     end
  174.    
  175.     if  HazMenu.Draw.drawHP then
  176.             for i, enemy in ipairs(GetEnemyHeroes()) do
  177.                 if ValidTarget(enemy) then
  178.                    DrawIndicator(enemy)
  179.                 end
  180.             end
  181.     end    
  182.    
  183.     if HazMenu.Misc.killtext then
  184.         for i = 1, heroManager.iCount do
  185.             local target = heroManager:GetHero(i)
  186.             if ValidTarget(target) and target ~= nil then
  187.                 local barPos = WorldToScreen(D3DXVECTOR3(target.x, target.y, target.z))
  188.                 local PosX = barPos.x - 35
  189.                 local PosY = barPos.y - 10
  190.                
  191.                 DrawText(TextList[KillText[i]], 16, PosX, PosY, colorText)
  192.             end
  193.         end
  194.     end
  195.    
  196. end
  197.  
  198.  
  199. function Checks()
  200.     SREADY = (smite ~= nil and myHero:CanUseSpell(smite) == READY)
  201.     IREADY = (ignite ~= nil and myHero:CanUseSpell(ignite) == READY)
  202.     QREADY = (myHero:CanUseSpell(_Q) == READY)
  203.     WREADY = (myHero:CanUseSpell(_W) == READY)
  204.     EREADY = (myHero:CanUseSpell(_E) == READY)
  205.     RREADY = (myHero:CanUseSpell(_R) == READY)
  206.     calcDmg()
  207.     LFCfunc()
  208.    
  209.    
  210.     if ValidTarget(target) then
  211.         if HazMenu.Misc.KS then KS(target) end
  212.         if HazMenu.Misc.Ignite then AutoIgnite(target) end
  213.         if HazMenu.Combo.comboR then KS(target) end
  214.        
  215.     end
  216.        
  217.    
  218.     if HazMenu.combokey then
  219.         if HazMenu.Misc.smiteQ and VIP_USER then
  220.         SmiteQ()
  221.         Combo()
  222.        
  223.         elseif not HazMenu.Misc.smiteQ or not VIP_USER then
  224.         Combo()
  225.         end
  226.     end
  227.    
  228.    if HazMenu.harasskey and myHero.mana / myHero.maxMana > HazMenu.Harass.Mana /100 then
  229.         Poke()
  230.    end
  231.    if HazMenu.farmkey and myHero.mana / myHero.maxMana > HazMenu.Farm.Mana /100 then
  232.         Farm()
  233.    end
  234.     if HazMenu.Misc.Bork and HazMenu.combokey then
  235.      Bork()
  236.     end
  237.     if HazMenu.Misc.Bilge and HazMenu.combokey then
  238.      Bilge()
  239.     end
  240.    
  241. end
  242.  
  243. function IgniteCheck()
  244.     if myHero:GetSpellData(SUMMONER_1).name:find("summonerdot") then
  245.         ignite = SUMMONER_1
  246.     elseif myHero:GetSpellData(SUMMONER_2).name:find("summonerdot") then
  247.         ignite = SUMMONER_2
  248.     end
  249. end
  250.  
  251. function SmiteCheck()
  252.     if myHero:GetSpellData(SUMMONER_1).name:find("summonersmite") or myHero:GetSpellData(SUMMONER_1).name:find("s5_summonersmiteplayerganker") or myHero:GetSpellData(SUMMONER_1).name:find("s5_summonersmiteduel") then
  253.         smite = SUMMONER_1
  254.     elseif myHero:GetSpellData(SUMMONER_2).name:find("summonersmite") or myHero:GetSpellData(SUMMONER_1).name:find("s5_summonersmiteplayerganker") or myHero:GetSpellData(SUMMONER_1).name:find("s5_summonersmiteduel")then
  255.         smite = SUMMONER_2 
  256.     end
  257. end
  258.  
  259. function FLoadLib()
  260.     FMenu()
  261. end
  262.  
  263. function FMenu()
  264.     HazMenu = scriptConfig("Ezreal", "Ezreal")
  265.         HazMenu:addParam("combokey", "Combo key(Space)", SCRIPT_PARAM_ONKEYDOWN, false, 32)
  266.         HazMenu:addParam("harasskey", "Harass key(C)", SCRIPT_PARAM_ONKEYDOWN, false, string.byte("C"))
  267.         HazMenu:addParam("farmkey", "Farm key(V)", SCRIPT_PARAM_ONKEYDOWN, false, string.byte("V"))
  268.        
  269.     HazMenu:addTS(ts)
  270.        
  271.     HazMenu:addSubMenu("Combo", "Combo")
  272.         HazMenu.Combo:addParam("comboQ", "Use Q", SCRIPT_PARAM_ONOFF, true)
  273.         HazMenu.Combo:addParam("comboW", "Use W", SCRIPT_PARAM_ONOFF, true)
  274.         HazMenu.Combo:addParam("comboE", "Use E", SCRIPT_PARAM_ONOFF, false)
  275.         HazMenu.Combo:addParam("comboR", "Use R", SCRIPT_PARAM_ONOFF, false)
  276.        
  277.        
  278.     HazMenu:addSubMenu("Harass", "Harass")
  279.         HazMenu.Harass:addParam("harassQ", "Use Q", SCRIPT_PARAM_ONOFF, true)      
  280.         HazMenu.Harass:addParam("harassW", "Use W", SCRIPT_PARAM_ONOFF, true)
  281.         HazMenu.Harass:addParam("Mana", "Mana Manager %", SCRIPT_PARAM_SLICE, 50, 1, 100, 0)
  282.    
  283.     HazMenu:addSubMenu("Farm", "Farm")
  284.         HazMenu.Farm:addParam("farmQ", "Use Q", SCRIPT_PARAM_ONOFF, true)      
  285.         HazMenu.Farm:addParam("Mana", "Mana Manager %", SCRIPT_PARAM_SLICE, 50, 1, 100, 0)
  286.    
  287.     HazMenu:addSubMenu("Misc", "Misc")
  288.         HazMenu.Misc:addParam("KS", "KillSteal with Q", SCRIPT_PARAM_ONOFF, true)
  289.         HazMenu.Misc:addParam("Ignite", "Use Auto Ignite", SCRIPT_PARAM_ONOFF, true)
  290.         HazMenu.Misc:addParam("killtext", "Draw if Killable with combo", SCRIPT_PARAM_ONOFF, true)     
  291.         HazMenu.Misc:addParam("Pred", "VPred ON/ HPred Off", SCRIPT_PARAM_ONOFF, false)
  292.         HazMenu.Misc:addParam("Bork", "Use Botrk max Heal", SCRIPT_PARAM_ONOFF, true)
  293.         HazMenu.Misc:addParam("Bilge", "Use Bilgewater", SCRIPT_PARAM_ONOFF, true)
  294.     if VIP_USER then
  295.         HazMenu.Misc:addParam("smiteQ", "Use Smite Q", SCRIPT_PARAM_ONKEYTOGGLE, false, string.byte("Z"))
  296.     end
  297.        
  298.     HazMenu:addSubMenu("Draw","Draw")
  299.       HazMenu.Draw:addParam("drawq", "Draw Q", SCRIPT_PARAM_ONOFF, true)
  300.       HazMenu.Draw:addParam("draww", "Draw W", SCRIPT_PARAM_ONOFF, true)
  301.       HazMenu.Draw:addParam("drawe", "Draw E", SCRIPT_PARAM_ONOFF, false)
  302.       HazMenu.Draw:addParam("drawHP", "Draw Dmg on HPBar", SCRIPT_PARAM_ONOFF, true)
  303.      
  304.    
  305.    
  306.     HazMenu:addSubMenu("LagFreeCircles", "LFC")
  307.       HazMenu.LFC:addParam("LagFree", "Activate Lag Free Circles", SCRIPT_PARAM_ONOFF, false)
  308.       HazMenu.LFC:addParam("CL", "Length before Snapping", SCRIPT_PARAM_SLICE, 350, 75, 2000, 0)
  309.       HazMenu.LFC:addParam("CLinfo", "Higher length = Lower FPS Drops", SCRIPT_PARAM_INFO, "")
  310.    
  311.    
  312.     if _G.Reborn_Loaded then
  313.     DelayAction(function()
  314.         PrintChat("<font color = \"#FFFFFF\">[Ezreal] </font><font color = \"#FF0000\">SAC Status:</font> <font color = \"#FFFFFF\">Successfully integrated.</font> </font>")
  315.         HazMenu:addParam("SACON","[Ezreal] SAC:R support is active.", 5, "")
  316.         isSAC = true
  317.     end, 10)
  318.     elseif not _G.Reborn_Loaded then
  319.         PrintChat("<font color = \"#FFFFFF\">[Ezreal] </font><font color = \"#FF0000\">Orbwalker not found:</font> <font color = \"#FFFFFF\">SxOrbWalk integrated.</font> </font>")
  320.         HazMenu:addSubMenu("Orbwalker", "SxOrb")
  321.         SxOrb:LoadToMenu(HazMenu.SxOrb)
  322.         isSX = true
  323.     end
  324.     HazMenu:permaShow("combokey")
  325.     HazMenu:permaShow("harasskey")
  326.     HazMenu:permaShow("farmkey")
  327.     if VIP_USER then
  328.     HazMenu.Misc:permaShow("smiteQ")
  329.     end
  330. end
  331.  
  332.  
  333.  
  334. function KS(enemy)  
  335.     if ValidTarget(target) then
  336.     if Q.IsReady() and getDmg("Q", enemy, myHero) > enemy.health then
  337.         if GetDistance(enemy) <= Q.range and HazMenu.Misc.KS then
  338.             local CastPosition, HitChance, CastPos = VP:GetLineCastPosition(target, Q.delay, Q.width, Q.range, Q.speed, myHero, true)
  339.             if HitChance >= 2 and GetDistance(CastPosition) <= Q.range then
  340.                 CastSpell(_Q, CastPosition.x, CastPosition.z)
  341.             end
  342.         end
  343.     end
  344.    
  345.     if W.IsReady() and getDmg("W", enemy, myHero) > enemy.health then
  346.         if GetDistance(enemy) <= W.range and HazMenu.Misc.KS then
  347.             local CastPosition, HitChance, CastPos = VP:GetLineCastPosition(target, W.delay, W.width, W.range, W.speed, myHero, false)
  348.             if HitChance >= 2 and GetDistance(CastPosition) <= W.range then
  349.                 CastSpell(_W, CastPosition.x, CastPosition.z)
  350.             end
  351.         end
  352.     end
  353.     if R.IsReady() and getDmg("R", enemy, myHero) > enemy.health then
  354.         if GetDistance(enemy) <= 3000 and GetDistance(enemy) > 900 then
  355.           local CastPosition, HitChance, CastPos = VP:GetLineCastPosition(target, R.delay, R.width, R.range, R.speed, myHero, false)
  356.           if HitChance >= 2 and GetDistance(CastPosition) <= 3000 then
  357.           CastSpell(_R, CastPosition.x, CastPosition.z)
  358.         end
  359.         end
  360.     end
  361.     end
  362. end
  363.  
  364.  
  365.  
  366. function AutoIgnite(enemy)
  367.     iDmg = ((IREADY and getDmg("IGNITE", enemy, myHero)) or 0)
  368.     if enemy.health <= iDmg and GetDistance(enemy) <= 600 and ignite ~= nil
  369.         then
  370.             if IREADY then CastSpell(ignite, enemy) end
  371.     end
  372. end
  373.  
  374. function OnProcessSpell(unit, spell)
  375.    if HazMenu.farmkey and Q.IsReady() then
  376.         Minions:update()
  377.             for i, Minion in pairs(Minions.objects) do
  378.                  
  379.                      if unit.isMe and spell.name:lower():find("attack") and HazMenu.farmkey and HazMenu.Farm.farmQ and myHero.mana / myHero.maxMana > HazMenu.Farm.Mana /100 and getDmg("Q", Minion, myHero) > Minion.health then
  380.                         SpellTarget = spell.target
  381.                        DelayAction(function() CastSpell(_Q, Minion.x, Minion.z) end, spell.windUpTime - GetLatency() / 2000)
  382.                       end
  383.                      
  384.             end
  385.         JungleMinions:update()
  386.             for i, Minion in pairs(JungleMinions.objects) do
  387.                 if unit.isMe and spell.name:lower():find("attack") and HazMenu.farmkey and HazMenu.Farm.farmQ and myHero.mana / myHero.maxMana > HazMenu.Farm.Mana /100 then
  388.                         SpellTarget = spell.target
  389.                        DelayAction(function() CastSpell(_Q, Minion.x, Minion.z) end, spell.windUpTime - GetLatency() / 2000)
  390.                 end
  391.             end
  392.     end
  393.  
  394.  
  395.  
  396. end
  397.  
  398.  
  399.  
  400.  
  401.  
  402. function EtoHell()
  403.   local EPos = myHero + (Vector(mousePos) - myHero):normalized() * 450
  404.             local PredictedE = GetDistanceSqr(EPos, target)
  405.             if  PredictedE < 630*630 and PredictedE > 350*350 and Q.IsReady() then
  406.                 local CastPosition = PredictedE
  407.                 local CastPosition, HitChance, CastPos = VP:GetLineCastPosition(target, Q.delay, Q.width, Q.range, Q.speed, myHero, true)
  408.                 if HitChance >= 2 then
  409.                 CastSpell(_E, mousePos.x, mousePos.z)              
  410.                 end
  411.            end
  412.             if GetDistanceSqr(target) > 630*630 and PredictedE < 630*630 and Q.IsReady() then
  413.                 local CastPosition = PredictedE
  414.                 local CastPosition, HitChance, CastPos = VP:GetLineCastPosition(target, Q.delay, Q.width, Q.range, Q.speed, myHero, true)
  415.                 if HitChance >= 2 then
  416.                 CastSpell(_E, mousePos.x, mousePos.z)
  417.                 end
  418.             end
  419.  
  420. end
  421.  
  422.  
  423.            
  424. function Combo()
  425.     if ValidTarget(target) then
  426.                
  427.         if Q.IsReady() and HazMenu.Combo.comboQ then
  428.             if HazMenu.Misc.Pred then                    
  429.                         VPredQ()
  430.         elseif not HazMenu.Misc.Pred then
  431.                         HPredQ()
  432.             end
  433.         end
  434.        
  435.        
  436.         if W.IsReady() and HazMenu.Combo.comboW then             
  437.             if HazMenu.Misc.Pred then                    
  438.                         VPredW()
  439.         elseif not HazMenu.Misc.Pred then
  440.                         HPredW()
  441.                
  442.             end
  443.        
  444.         end
  445.        
  446.         if E.IsReady() and HazMenu.Combo.comboE then
  447.             EtoHell()
  448.         end
  449.         if R.IsReady() and HazMenu.Combo.comboR and GetDistance(myHero, target) >= 900 then
  450.             if HazMenu.Misc.Pred and GetDistance(myHero, target) <= 3000 then                    
  451.                         VPredR()
  452.         elseif not HazMenu.Misc.Pred and GetDistance(myHero, target) <= 3000 then
  453.                         HPredR()
  454.             end
  455.         end
  456.     end
  457. end
  458.  
  459.  
  460.  
  461.  
  462.                    
  463.  
  464.  
  465. function Poke()
  466.     if ValidTarget(target) then
  467.         if Q.IsReady() and HazMenu.Harass.harassQ and myHero.mana / myHero.maxMana > HazMenu.Harass.Mana /100 then
  468.             if HazMenu.Misc.Pred then                    
  469.                         VPredQ()
  470.         elseif not HazMenu.Misc.Pred then
  471.                         HPredQ()
  472.             end
  473.         end
  474.         if W.IsReady() and HazMenu.Harass.harassW and myHero.mana / myHero.maxMana > HazMenu.Harass.Mana /100 then
  475.             if HazMenu.Misc.Pred then                    
  476.                         SPredW()
  477.         elseif not HazMenu.Misc.Pred then
  478.                         HPredW()
  479.             end
  480.         end
  481.        
  482.     end
  483. end
  484.  
  485. function Farm()
  486.    
  487.       Minions:update()
  488.     if myHero.mana / myHero.maxMana > HazMenu.Farm.Mana /100 then
  489.         for i, Minion in pairs(Minions.objects) do
  490.                 if Q.IsReady() and getDmg("Q", Minion, myHero) > Minion.health then
  491.                    local CastPosition, HitChance, CastPos = VP:GetLineCastPosition(Minion, Q.delay, Q.width, Q.range, Q.speed, myHero, true)
  492.                    if HitChance >= 2 and GetDistance(CastPosition) <= Q.range and GetDistance(CastPosition) >= 600 then
  493.                      CastSpell(_Q, CastPosition.x, CastPosition.z)
  494.                      end                                               
  495.                 end
  496.                 if Q.IsReady() then
  497.                    local CastPosition, HitChance, CastPos = VP:GetLineCastPosition(Minion, Q.delay, Q.width, Q.range, Q.speed, myHero, true)
  498.                    if HitChance >= 2 and GetDistance(CastPosition) < 600 then
  499.                      CastSpell(_Q, CastPosition.x, CastPosition.z)
  500.                      end                                               
  501.                 end
  502.                
  503.         end
  504.     end
  505.     JungleMinions:update()
  506.     for i, Minion in pairs(JungleMinions.objects) do
  507.         if  Q.IsReady() and HazMenu.Farm.farmQ then
  508.             CastSpell(_Q, Minion.x, Minion.z)
  509.         end
  510.        
  511.     end
  512. end
  513.  
  514.  
  515.    
  516.  
  517.  
  518.  
  519. function SPredQ(unit)
  520.    CastPosition, HitChance = SP:Predict(_Q, myHero, target)
  521.     if CastPosition and HitChance >= 2 then
  522.         CastSpell(_Q, CastPosition.x, CastPosition.z)
  523.     end
  524. end
  525.  
  526. function SPredW(unit)
  527.    CastPosition, HitChance = SP:Predict(_W, myHero, target)
  528.     if CastPosition and HitChance >= 2 then
  529.         CastSpell(_W, CastPosition.x, CastPosition.z)
  530.     end
  531. end
  532.  
  533.  
  534. function SPredR(unit)
  535.    CastPosition, HitChance = SP:Predict(_R, myHero, target)
  536.     if CastPosition and HitChance >= 2 then
  537.         CastSpell(_R, CastPosition.x, CastPosition.z)
  538.     end
  539. end
  540.  
  541.  
  542. function HPredQ(unit)
  543.     local unit = target
  544.     local QPos, QHitChance = HPred:GetPredict(HP_Q, unit, myHero)
  545.     if QHitChance >= 1 then
  546.         CastSpell(_Q, QPos.x, QPos.z)
  547.     end
  548.    
  549. end
  550.  
  551.  
  552. function HPredW(unit)
  553.     local unit = target
  554.     local WPos, WHitChance = HPred:GetPredict(HP_W, unit, myHero)
  555.     if WHitChance >= 1 then
  556.         CastSpell(_W, WPos.x, WPos.z)
  557.     end
  558.    
  559. end
  560.  
  561.  
  562. function HPredR(unit)
  563.     local unit = target
  564.     local RPos, RHitChance = HPred:GetPredict(HP_R, unit, myHero)
  565.     if RHitChance >= 1 then
  566.         CastSpell(_R, RPos.x, RPos.z)
  567.     end
  568.    
  569. end
  570.  
  571. function VPredR()
  572.    
  573.     local AOECastPosition, MainTargetHitChance, nTargets = VP:GetLineAOECastPosition(target, R.delay, R.width, 3000, R.speed, myHero)
  574.             if MainTargetHitChance >= 2 then
  575.              CastSpell(_R, AOECastPosition.x, AOECastPosition.z)
  576.              end
  577.    
  578. end
  579.  
  580.  
  581. function VPredQ()
  582.                
  583.         local CastPosition, HitChance, CastPos = VP:GetLineCastPosition(target, Q.delay, Q.width, Q.range, Q.speed, myHero, true)
  584.         if HitChance >= 2 and GetDistance(CastPosition) <= Q.range then
  585.          CastSpell(_Q, CastPosition.x, CastPosition.z)
  586.          end                                               
  587.                
  588. end
  589.  
  590. function VPredW()
  591.                
  592.         local CastPosition, HitChance, CastPos = VP:GetLineCastPosition(target, W.delay, W.width, W.range, W.speed, myHero, false)
  593.         if HitChance >= 2 and GetDistance(CastPosition) <= W.range then
  594.          CastSpell(_W, CastPosition.x, CastPosition.z)
  595.          end                                               
  596.                
  597. end
  598.  
  599.  
  600. function GetSlotItem(id, unit)
  601.    
  602.     unit        = unit or myHero
  603.  
  604.     if (not ItemNames[id]) then
  605.         return ___GetInventorySlotItem(id, unit)
  606.     end
  607.  
  608.     local name  = ItemNames[id]
  609.    
  610.     for slot = ITEM_1, ITEM_7 do
  611.         local item = unit:GetSpellData(slot).name
  612.         if ((#item > 0) and (item:lower() == name:lower())) then
  613.             return slot
  614.         end
  615.     end
  616.  
  617. end
  618.  
  619.  
  620.  
  621. function Bork()
  622.     if ValidTarget(target) then
  623.     local Slot = GetInventorySlotItem(3153)
  624.         if Slot ~= nil and myHero:CanUseSpell(Slot) == READY then
  625.             local Range = 630
  626.            
  627.             local health = myHero.health
  628.             local maxHealth = myHero.maxHealth
  629.                 if ((maxHealth)*0.7) >= health then
  630.             CastSpell(Slot, target)
  631.         end
  632.     end
  633.     end
  634. end
  635.  
  636.  
  637. function Bilge()
  638.     if ValidTarget(target) then
  639.     local Slot = GetInventorySlotItem(3144)
  640.         if Slot ~= nil and myHero:CanUseSpell(Slot) == READY then
  641.             local Range = 630
  642.            
  643.             local health = myHero.health
  644.             local maxHealth = myHero.maxHealth
  645.                 if ((maxHealth)*0.7) >= health then
  646.             CastSpell(Slot, target)
  647.         end
  648.     end
  649.     end
  650. end
  651.  
  652.  
  653. function SmiteCalc()
  654.   if myHero.level == 1 then
  655.     return 390
  656.   end
  657.   if myHero.level == 2 then
  658.     return 410
  659.   end
  660.   if myHero.level == 3 then
  661.     return 430
  662.   end
  663.   if myHero.level == 4 then
  664.     return 450
  665.   end
  666.   if myHero.level == 5 then
  667.     return 480
  668.   end
  669.   if myHero.level == 6 then
  670.     return 510
  671.   end
  672.   if myHero.level == 7 then
  673.     return 540
  674.   end
  675.   if myHero.level == 8 then
  676.     return 570
  677.   end
  678.   if myHero.level == 9 then
  679.     return 600
  680.   end
  681.   if myHero.level == 10 then
  682.     return 640
  683.   end
  684.   if myHero.level == 11 then
  685.     return 680
  686.   end
  687.   if myHero.level == 12 then
  688.     return 720
  689.   end
  690.   if myHero.level == 13 then
  691.     return 760
  692.   end
  693.   if myHero.level == 14 then
  694.     return 800
  695.   end
  696.   if myHero.level == 15 then
  697.     return 850
  698.   end
  699.   if myHero.level == 16 then
  700.     return 900
  701.   end
  702.   if myHero.level == 17 then
  703.     return 950
  704.   end
  705.   if myHero.level == 18 then
  706.     return 1000
  707.   end
  708. end
  709.  
  710.  
  711. function SmiteQ()
  712.   Minions:update()
  713.   ts:update()
  714.  
  715.   if ValidTarget(target) then
  716.     local CastPosition, HitChance, CastPos = VP:GetLineCastPosition(target, Q.delay, Q.width, Q.range, Q.speed, myHero, false)
  717.     if HitChance > 1 then
  718.       local Collision = Collision(Q.range, Q.speed, Q.delay, Q.width)
  719.       local pStart, pEnd = Collision:GetMinionCollision(myHero, CastPosition)
  720.       if #pEnd == 1 and GetDistance(pEnd[1]) < 750 and Q.IsReady() and SREADY and pEnd[1].health <= SmiteCalc() then
  721.         CastSpell(smite, pEnd[1])
  722.         CastSpell(_Q, CastPosition.x, CastPosition.z)
  723.       end
  724.     end
  725.   end
  726. end
  727.  
  728. -------------------------------------------------------------------------------------------------
  729.  
  730.  
  731. function LFCfunc()
  732.     if not HazMenu.LFC.LagFree then _G.DrawCircle = _G.oldDrawCircle end
  733.     if HazMenu.LFC.LagFree then _G.DrawCircle = DrawCircle2 end
  734. end
  735.  
  736. -- Barasia, vadash, viseversa
  737.  
  738. function DrawCircleNextLvl(x, y, z, radius, width, color, chordlength)
  739.     radius = radius or 300
  740.     quality = math.max(8,round(180/math.deg((math.asin((chordlength/(2*radius)))))))
  741.     quality = 2 * math.pi / quality
  742.     radius = radius*.92
  743.     local points = {}
  744.     for theta = 0, 2 * math.pi + quality, quality do
  745.         local c = WorldToScreen(D3DXVECTOR3(x + radius * math.cos(theta), y, z - radius * math.sin(theta)))
  746.         points[#points + 1] = D3DXVECTOR2(c.x, c.y)
  747.     end
  748.     DrawLines2(points, width or 1, color or 4294967295)
  749. end
  750.  
  751. function round(num)
  752.     if num >= 0 then return math.floor(num+.5) else return math.ceil(num-.5) end
  753. end
  754.  
  755. function DrawCircle2(x, y, z, radius, color)
  756.     local vPos1 = Vector(x, y, z)
  757.     local vPos2 = Vector(cameraPos.x, cameraPos.y, cameraPos.z)
  758.     local tPos = vPos1 - (vPos1 - vPos2):normalized() * radius
  759.     local sPos = WorldToScreen(D3DXVECTOR3(tPos.x, tPos.y, tPos.z))
  760.     if OnScreen({ x = sPos.x, y = sPos.y }, { x = sPos.x, y = sPos.y }) then
  761.         DrawCircleNextLvl(x, y, z, radius, 1, color, HazMenu.LFC.CL)
  762.     end
  763. end
  764.  
  765.  
  766.  
  767.  
  768.  
  769. for i, enemy in ipairs(GetEnemyHeroes()) do
  770.     enemy.barData = {PercentageOffset = {x = 0, y = 0} }
  771. end
  772.  
  773. function GetEnemyHPBarPos(enemy)
  774.  
  775.     if not enemy.barData then
  776.         return
  777.     end
  778.  
  779.     local barPos = GetUnitHPBarPos(enemy)
  780.     local barPosOffset = GetUnitHPBarOffset(enemy)
  781.     local barOffset = Point(enemy.barData.PercentageOffset.x, enemy.barData.PercentageOffset.y)
  782.     local barPosPercentageOffset = Point(enemy.barData.PercentageOffset.x, enemy.barData.PercentageOffset.y)
  783.  
  784.     local BarPosOffsetX = 169
  785.     local BarPosOffsetY = 47
  786.     local CorrectionX = 16
  787.     local CorrectionY = 4
  788.  
  789.     barPos.x = barPos.x + (barPosOffset.x - 0.5 + barPosPercentageOffset.x) * BarPosOffsetX + CorrectionX
  790.     barPos.y = barPos.y + (barPosOffset.y - 0.5 + barPosPercentageOffset.y) * BarPosOffsetY + CorrectionY
  791.  
  792.     local StartPos = Point(barPos.x, barPos.y)
  793.     local EndPos = Point(barPos.x + 103, barPos.y)
  794.  
  795.     return Point(StartPos.x, StartPos.y), Point(EndPos.x, EndPos.y)
  796.  
  797. end
  798.  
  799.  
  800. function DrawIndicator(enemy)
  801.     local Qdmg, Wdmg, Edmg, AAdmg = getDmg("Q", enemy, myHero), getDmg("W", enemy, myHero), getDmg("E", enemy, myHero), getDmg("R", enemy, myHero), getDmg("AD", enemy, myHero)
  802.    
  803.     Qdmg = ((Q.IsReady and Qdmg) or 0)
  804.     Wdmg = ((W.IsReady and Wdmg) or 0)
  805.     Edmg = ((E.IsReady and Edmg) or 0)
  806.     Rdmg = ((R.IsReady and Rdmg) or 0)
  807.     AAdmg = ((Aadmg) or 0)
  808.  
  809.     local damage = Qdmg + Edmg + Rdmg + Wdmg
  810.  
  811.     local SPos, EPos = GetEnemyHPBarPos(enemy)
  812.  
  813.     if not SPos then return end
  814.  
  815.     local barwidth = EPos.x - SPos.x
  816.     local Position = SPos.x + math.max(0, (enemy.health - damage) / enemy.maxHealth) * barwidth
  817.  
  818.     DrawText("|", 16, math.floor(Position), math.floor(SPos.y + 8), ARGB(255,0,255,0))
  819.     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))
  820. end
  821.  
  822. function calcDmg()
  823.     for i=1, heroManager.iCount do
  824.         local Target = heroManager:GetHero(i)
  825.         if ValidTarget(Target) and Target ~= nil then
  826.             qDmg = ((QREADY and getDmg("Q", Target, myHero)) or 0)
  827.             wDmg = ((WREADY and getDmg("W", Target, myHero)) or 0)
  828.             eDmg = ((EREADY and getDmg("E", Target, myHero)) or 0)
  829.             rDmg = ((RREADY and getDmg("R", Target, myHero)) or 0)
  830.             allDmg = (rDmg)
  831.            
  832.             if Target.health > allDmg then
  833.                 KillText[i] = 1
  834.             elseif Target.health <= allDmg then
  835.                 KillText[i] = 2
  836.             end
  837.         end
  838.     end
  839. end
Advertisement
Add Comment
Please, Sign In to add comment