16HeX16

Auto Shield 1.8 Fixed Ranges

Oct 28th, 2013
498
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 24.86 KB | None | 0 0
  1. local typeshield
  2. local spellslot
  3. local typeheal
  4. local healslot
  5. local typeult
  6. local ultslot
  7. local range
  8. local ultrange
  9.  
  10. if myHero.charName == "Lulu" then
  11.     typeshield = 1
  12.     spellslot = _E
  13.     typeult = 1
  14.     ultslot = _R
  15.     range = 650
  16.     ultrange = 900
  17. elseif myHero.charName == "Janna" then
  18.     typeshield = 1
  19.     spellslot = _E
  20.     range = 800
  21. elseif myHero.charName == "Karma" then
  22.     typeshield = 1
  23.     spellslot = _E
  24.     range = 800
  25. elseif myHero.charName == "LeeSin" then
  26.     typeshield = 1
  27.     spellslot = _W
  28.     range = 700
  29. elseif myHero.charName == "Orianna" then
  30.     typeshield = 1
  31.     spellslot = _E
  32.     range = 1100
  33. elseif myHero.charName == "Lux" then
  34.     typeshield = 2
  35.     spellslot = _W
  36.     range = 1075
  37. elseif myHero.charName == "Thresh" then
  38.     typeshield = 2
  39.     spellslot = _W
  40.     range = 950
  41. elseif myHero.charName == "JarvanIV" then
  42.     typeshield = 3
  43.     spellslot = _W
  44.     range = 50
  45. elseif myHero.charName == "Nautilus" then
  46.     typeshield = 3
  47.     spellslot = _W
  48.     range = 50
  49. elseif myHero.charName == "Rumble" then
  50.     typeshield = 3
  51.     spellslot = _W
  52.     range = 50
  53. elseif myHero.charName == "Sion" then
  54.     typeshield = 3
  55.     spellslot = _W
  56.     range = 50
  57. elseif myHero.charName == "Shen" then
  58.     typeshield = 3
  59.     spellslot = _W
  60.     typeult = 3
  61.     ultslot = _R
  62.     range = 50
  63.     ultrange = 20000
  64. elseif myHero.charName == "Skarner" then
  65.     typeshield = 3
  66.     spellslot = _W
  67.     range = 50
  68. elseif myHero.charName == "Urgot" then
  69.     typeshield = 3
  70.     spellslot = _W
  71.     range = 50
  72. elseif myHero.charName == "Diana" then
  73.     typeshield = 3
  74.     spellslot = _W
  75.     range = 50
  76. elseif myHero.charName == "Riven" then
  77.     typeshield = 4
  78.     spellslot = _E
  79.     range = 50
  80. elseif myHero.charName == "Morgana" then
  81.     typeshield = 5
  82.     spellslot = _E
  83.     range = 750
  84. elseif myHero.charName == "Sivir" then
  85.     typeshield = 6
  86.     spellslot = _E
  87.     range = 50
  88. elseif myHero.charName == "Nocturne" then
  89.     typeshield = 6
  90.     spellslot = _W
  91.     range = 50
  92. elseif myHero.charName == "Alistar" then
  93.     typeheal = 2
  94.     healslot = _E
  95.     range = 287.5
  96. elseif myHero.charName == "Kayle" then
  97.     typeheal = 1
  98.     healslot = _W
  99.     typeult = 1
  100.     ultslot = _R
  101.     range = 900
  102.     ultrange = 900
  103. elseif myHero.charName == "Nami" then
  104.     typeheal = 1
  105.     healslot = _W
  106.     range = 725
  107. elseif myHero.charName == "Nidalee" then
  108.     typeheal = 1
  109.     healslot = _E
  110.     range = 600
  111. elseif myHero.charName == "Sona" then
  112.     typeheal = 2
  113.     healslot = _W
  114.     range = 1000
  115. elseif myHero.charName == "Soraka" then
  116.     typeheal = 1
  117.     healslot = _W
  118.     typeult = 2
  119.     ultslot = _R
  120.     range = 750
  121.     ultrange = 20000
  122. elseif myHero.charName == "Taric" then
  123.     typeheal = 1
  124.     healslot = _Q
  125.     range = 750
  126. elseif myHero.charName == "Gangplank" then
  127.     typeheal = 3
  128.     healslot = _W
  129.     range = 50
  130. elseif myHero.charName == "Zilean" then
  131.     typeult = 1
  132.     ultslot = _R
  133.     ultrange = 900
  134. elseif myHero.charName == "Tryndamere" then
  135.     typeult = 4
  136.     ultslot = _R
  137.     ultrange = 50
  138. end
  139.  
  140. local healrange = 0
  141. local shealrange = 300
  142. local lisrange = 700
  143. local sbarrier = nil
  144. local sheal = nil
  145. local useitems = true
  146. local spelltype = nil
  147. local casttype = nil
  148. local BShield,SShield,Shield,CC = false,false,false,false
  149. local shottype,radius,maxdistance = 0,0,0
  150. local hitchampion = false
  151. --[[        Code        ]]
  152.  
  153. function OnLoad()
  154.     if myHero:GetSpellData(SUMMONER_1).name:find("SummonerBarrier") then sbarrier = SUMMONER_1
  155.     elseif myHero:GetSpellData(SUMMONER_2).name:find("SummonerBarrier") then sbarrier = SUMMONER_2 end
  156.     if myHero:GetSpellData(SUMMONER_1).name:find("SummonerHeal") then sheal = SUMMONER_1
  157.     elseif myHero:GetSpellData(SUMMONER_2).name:find("SummonerHeal") then sheal = SUMMONER_2 end
  158.     if typeshield ~= nil then
  159.         ASConfig = scriptConfig("(AS) Auto Shield", "AutoShield")
  160.         for i=1, heroManager.iCount do
  161.             local teammate = heroManager:GetHero(i)
  162.             if teammate.team == myHero.team then ASConfig:addParam("teammateshield"..i, "Shield "..teammate.charName, SCRIPT_PARAM_ONOFF, true) end
  163.         end
  164.         ASConfig:addParam("maxhppercent", "Max percent of hp", SCRIPT_PARAM_SLICE, 100, 0, 100, 0) 
  165.         ASConfig:addParam("mindmgpercent", "Min dmg percent", SCRIPT_PARAM_SLICE, 20, 0, 100, 0)
  166.         ASConfig:addParam("mindmg", "Min dmg approx", SCRIPT_PARAM_INFO, 0)
  167.         ASConfig:addParam("skillshots", "Shield Skillshots", SCRIPT_PARAM_ONOFF, true)
  168.         ASConfig:addParam("shieldcc", "Auto Shield Hard CC", SCRIPT_PARAM_ONOFF, true)
  169.         ASConfig:addParam("shieldslow", "Auto Shield Slows", SCRIPT_PARAM_ONOFF, true)
  170.         ASConfig:addParam("drawcircles", "Draw Range", SCRIPT_PARAM_ONOFF, true)
  171.         ASConfig:permaShow("mindmg")
  172.     end
  173.     if typeheal ~= nil then
  174.         AHConfig = scriptConfig("(AS) Auto Heal", "AutoHeal")
  175.         for i=1, heroManager.iCount do
  176.             local teammate = heroManager:GetHero(i)
  177.             if teammate.team == myHero.team then AHConfig:addParam("teammateheal"..i, "Heal "..teammate.charName, SCRIPT_PARAM_ONOFF, true) end
  178.         end
  179.         AHConfig:addParam("maxhppercent", "Max percent of hp", SCRIPT_PARAM_SLICE, 100, 0, 100, 0) 
  180.         AHConfig:addParam("mindmgpercent", "Min dmg percent", SCRIPT_PARAM_SLICE, 35, 0, 100, 0)
  181.         AHConfig:addParam("mindmg", "Min dmg approx", SCRIPT_PARAM_INFO, 0)
  182.         AHConfig:addParam("skillshots", "Heal Skillshots", SCRIPT_PARAM_ONOFF, true)
  183.         AHConfig:addParam("drawcircles", "Draw Range", SCRIPT_PARAM_ONOFF, true)
  184.         AHConfig:permaShow("mindmg")
  185.     end
  186.     if typeult ~= nil then
  187.         AUConfig = scriptConfig("(AS) Auto Ultimate", "AutoUlt")
  188.         for i=1, heroManager.iCount do
  189.             local teammate = heroManager:GetHero(i)
  190.             if teammate.team == myHero.team then AUConfig:addParam("teammateult"..i, "Ult "..teammate.charName, SCRIPT_PARAM_ONOFF, false) end
  191.         end
  192.         AUConfig:addParam("maxhppercent", "Max percent of hp", SCRIPT_PARAM_SLICE, 100, 0, 100, 0) 
  193.         AUConfig:addParam("mindmgpercent", "Min dmg percent", SCRIPT_PARAM_SLICE, 100, 0, 100, 0)
  194.         AUConfig:addParam("mindmg", "Min dmg approx", SCRIPT_PARAM_INFO, 0)
  195.         AUConfig:addParam("skillshots", "Skillshots", SCRIPT_PARAM_ONOFF, true)
  196.         AUConfig:addParam("drawcircles", "Draw Range", SCRIPT_PARAM_ONOFF, true)
  197.         AUConfig:permaShow("mindmg")
  198.     end
  199.     if sbarrier ~= nil then
  200.         ASBConfig = scriptConfig("(AS) Auto Summoner Barrier", "AutoSummonerBarrier")
  201.         ASBConfig:addParam("barrieron", "Barrier", SCRIPT_PARAM_ONOFF, false)
  202.         ASBConfig:addParam("maxhppercent", "Max percent of hp", SCRIPT_PARAM_SLICE, 100, 0, 100, 0)
  203.         ASBConfig:addParam("mindmgpercent", "Min dmg percent", SCRIPT_PARAM_SLICE, 95, 0, 100, 0)
  204.         ASBConfig:addParam("mindmg", "Min dmg approx", SCRIPT_PARAM_INFO, 0)
  205.         ASBConfig:addParam("skillshots", "Shield Skillshots", SCRIPT_PARAM_ONOFF, true)
  206.     end
  207.     if sheal ~= nil then
  208.         ASHConfig = scriptConfig("(AS) Auto Summoner Heal", "AutoSummonerHeal")
  209.         for i=1, heroManager.iCount do
  210.             local teammate = heroManager:GetHero(i)
  211.             if teammate.team == myHero.team then ASHConfig:addParam("teammatesheal"..i, "Heal "..teammate.charName, SCRIPT_PARAM_ONOFF, false) end
  212.         end
  213.         ASHConfig:addParam("maxhppercent", "Max percent of hp", SCRIPT_PARAM_SLICE, 100, 0, 100, 0)
  214.         ASHConfig:addParam("mindmgpercent", "Min dmg percent", SCRIPT_PARAM_SLICE, 95, 0, 100, 0)
  215.         ASHConfig:addParam("mindmg", "Min dmg approx", SCRIPT_PARAM_INFO, 0)
  216.         ASHConfig:addParam("skillshots", "Heal Skillshots", SCRIPT_PARAM_ONOFF, true)
  217.     end
  218.     if useitems then
  219.         ASIConfig = scriptConfig("(AS) Auto Shield Items", "AutoShieldItems")
  220.         for i=1, heroManager.iCount do
  221.             local teammate = heroManager:GetHero(i)
  222.             if teammate.team == myHero.team then ASIConfig:addParam("teammateshieldi"..i, "Shield "..teammate.charName, SCRIPT_PARAM_ONOFF, false) end
  223.         end
  224.         ASIConfig:addParam("maxhppercent", "Max percent of hp", SCRIPT_PARAM_SLICE, 100, 0, 100, 0)
  225.         ASIConfig:addParam("mindmgpercent", "Min dmg percent", SCRIPT_PARAM_SLICE, 50, 0, 100, 0)
  226.         ASIConfig:addParam("mindmg", "Min dmg approx", SCRIPT_PARAM_INFO, 0)
  227.         ASIConfig:addParam("skillshots", "Shield Skillshots", SCRIPT_PARAM_ONOFF, true)
  228.     end
  229.     PrintChat(" >> Auto Shield 1.8 loaded!")
  230. end
  231.  
  232. function OnProcessSpell(object,spell)
  233.     if object.team ~= myHero.team and not myHero.dead and not (object.name:find("Minion_") or object.name:find("Odin")) then
  234.         if typeheal ~= nil then healrange = 300 end
  235.         local leesinW = myHero.charName ~= "LeeSin" or myHero:GetSpellData(_W).name == "BlindMonkWOne"
  236.         local nidaleeE = myHero.charName ~= "Nidalee" or myHero:GetSpellData(_E).name == "PrimalSurge"
  237.         local shieldREADY = typeshield ~= nil and myHero:CanUseSpell(spellslot) == READY and leesinW
  238.         local healREADY = typeheal ~= nil and myHero:CanUseSpell(healslot) == READY and nidaleeE
  239.         local ultREADY = typeult ~= nil and myHero:CanUseSpell(ultslot) == READY
  240.         local sbarrierREADY = sbarrier ~= nil and myHero:CanUseSpell(sbarrier) == READY
  241.         local shealREADY = sheal ~= nil and myHero:CanUseSpell(sheal) == READY
  242.         local lisslot = GetInventorySlotItem(3190)
  243.         local seslot = GetInventorySlotItem(3040)
  244.         local lisREADY = lisslot ~= nil and myHero:CanUseSpell(lisslot) == READY
  245.         local seREADY = seslot ~= nil and myHero:CanUseSpell(seslot) == READY
  246.         local HitFirst = false
  247.         local shieldtarget,SLastDistance,SLastDmgPercent = nil,nil,nil
  248.         local healtarget,HLastDistance,HLastDmgPercent = nil,nil,nil
  249.         local ulttarget,ULastDistance,ULastDmgPercent = nil,nil,nil
  250.         BShield,SShield,Shield,CC = false,false,false,false
  251.         shottype,radius,maxdistance = 0,0,0
  252.         if object.type == "obj_AI_Hero" then
  253.             spelltype, casttype = getSpellType(object, spell.name)
  254.             if casttype == 4 or casttype == 5 then return end
  255.             if spelltype == "BAttack" or spelltype == "CAttack" or spell.name:find("SummonerDot") then
  256.                 Shield = true
  257.             elseif spelltype == "Q" or spelltype == "W" or spelltype == "E" or spelltype == "R" or spelltype == "P" or spelltype == "QM" or spelltype == "WM" or spelltype == "EM" then
  258.                 HitFirst = skillShield[object.charName][spelltype]["HitFirst"]
  259.                 BShield = skillShield[object.charName][spelltype]["BShield"]
  260.                 SShield = skillShield[object.charName][spelltype]["SShield"]
  261.                 Shield = skillShield[object.charName][spelltype]["Shield"]
  262.                 CC = skillShield[object.charName][spelltype]["CC"]
  263.                 shottype = skillData[object.charName][spelltype]["type"]
  264.                 radius = skillData[object.charName][spelltype]["radius"]
  265.                 maxdistance = skillData[object.charName][spelltype]["maxdistance"]
  266.             end
  267.         else
  268.             Shield = true
  269.         end
  270.         for i=1, heroManager.iCount do
  271.             local allytarget = heroManager:GetHero(i)
  272.             if allytarget.team == myHero.team and not allytarget.dead and allytarget.health > 0 then
  273.                 hitchampion = false
  274.                 local allyHitBox = getHitBox(allytarget)
  275.                 if shottype == 0 then hitchampion = spell.target and spell.target.networkID == allytarget.networkID
  276.                 elseif shottype == 1 then hitchampion = checkhitlinepass(object, spell.endPos, radius, maxdistance, allytarget, allyHitBox)
  277.                 elseif shottype == 2 then hitchampion = checkhitlinepoint(object, spell.endPos, radius, maxdistance, allytarget, allyHitBox)
  278.                 elseif shottype == 3 then hitchampion = checkhitaoe(object, spell.endPos, radius, maxdistance, allytarget, allyHitBox)
  279.                 elseif shottype == 4 then hitchampion = checkhitcone(object, spell.endPos, radius, maxdistance, allytarget, allyHitBox)
  280.                 elseif shottype == 5 then hitchampion = checkhitwall(object, spell.endPos, radius, maxdistance, allytarget, allyHitBox)
  281.                 elseif shottype == 6 then hitchampion = checkhitlinepass(object, spell.endPos, radius, maxdistance, allytarget, allyHitBox) or checkhitlinepass(object, Vector(object)*2-spell.endPos, radius, maxdistance, allytarget, allyHitBox)
  282.                 elseif shottype == 7 then hitchampion = checkhitcone(spell.endPos, object, radius, maxdistance, allytarget, allyHitBox)
  283.                 end
  284.                 if hitchampion then
  285.                     if shieldREADY and ASConfig["teammateshield"..i] and ((typeshield<=4 and Shield) or (typeshield==5 and BShield) or (typeshield==6 and SShield)) then
  286.                         if (((typeshield==1 or typeshield==2 or typeshield==5) and GetDistance(allytarget)<=range) or allytarget.isMe) then
  287.                             local shieldflag, dmgpercent = shieldCheck(object,spell,allytarget,"shields")
  288.                             if shieldflag then
  289.                                 if HitFirst and (SLastDistance == nil or GetDistance(allytarget,object) <= SLastDistance) then
  290.                                     shieldtarget,SLastDistance = allytarget,GetDistance(allytarget,object)
  291.                                 elseif not HitFirst and (SLastDmgPercent == nil or dmgpercent >= SLastDmgPercent) then
  292.                                     shieldtarget,SLastDmgPercent = allytarget,dmgpercent
  293.                                 end
  294.                             end
  295.                         end
  296.                     end
  297.                     if healREADY and AHConfig["teammateheal"..i] and Shield then
  298.                         if ((typeheal==1 or typeheal==2) and GetDistance(allytarget)<=healrange) or allytarget.isMe then
  299.                             local healflag, dmgpercent = shieldCheck(object,spell,allytarget,"heals")
  300.                             if healflag then
  301.                                 if HitFirst and (HLastDistance == nil or GetDistance(allytarget,object) <= HLastDistance) then
  302.                                     healtarget,HLastDistance = allytarget,GetDistance(allytarget,object)
  303.                                 elseif not HitFirst and (HLastDmgPercent == nil or dmgpercent >= HLastDmgPercent) then
  304.                                     healtarget,HLastDmgPercent = allytarget,dmgpercent
  305.                                 end
  306.                             end    
  307.                         end
  308.                     end
  309.                     if ultREADY and AUConfig["teammateult"..i] and Shield then
  310.                         if typeult==2 or (typeult==1 and GetDistance(allytarget)<=ultrange) or (typeult==4 and allytarget.isMe) or (typeult==3 and not allytarget.isMe) then
  311.                             local ultflag, dmgpercent = shieldCheck(object,spell,allytarget,"ult")
  312.                             if ultflag then
  313.                                 if HitFirst and (ULastDistance == nil or GetDistance(allytarget,object) <= ULastDistance) then
  314.                                     ulttarget,ULastDistance = allytarget,GetDistance(allytarget,object)
  315.                                 elseif not HitFirst and (ULastDmgPercent == nil or dmgpercent >= ULastDmgPercent) then
  316.                                     ulttarget,ULastDmgPercent = allytarget,dmgpercent
  317.                                 end
  318.                             end
  319.                         end
  320.                     end
  321.                     if sbarrierREADY and ASBConfig.barrieron and allytarget.isMe and Shield then
  322.                         local barrierflag, dmgpercent = shieldCheck(object,spell,allytarget,"barrier")
  323.                         if barrierflag then
  324.                             CastSpell(sbarrier)
  325.                         end
  326.                     end
  327.                     if shealREADY and ASHConfig["teammatesheal"..i] and Shield then
  328.                         if GetDistance(allytarget)<=shealrange then
  329.                             local shealflag, dmgpercent = shieldCheck(object,spell,allytarget,"sheals")
  330.                             if shealflag then
  331.                                 CastSpell(sheal)
  332.                             end
  333.                         end
  334.                     end
  335.                     if lisREADY and ASIConfig["teammateshieldi"..i] and Shield then
  336.                         if GetDistance(allytarget)<=lisrange then
  337.                             local lisflag, dmgpercent = shieldCheck(object,spell,allytarget,"items")
  338.                             if lisflag then
  339.                                 CastSpell(lisslot)
  340.                             end
  341.                         end
  342.                     end
  343.                     if seREADY and ASIConfig["teammateshieldi"..i] and allytarget.isMe and Shield then
  344.                         local seflag, dmgpercent = shieldCheck(object,spell,allytarget,"items")
  345.                         if seflag then
  346.                             CastSpell(seslot)
  347.                         end
  348.                     end
  349.                 end
  350.             end
  351.         end
  352.         if shieldtarget ~= nil then
  353.             if typeshield==1 or typeshield==5 then CastSpell(spellslot,shieldtarget)
  354.             elseif typeshield==2 or typeshield==4 then CastSpell(spellslot,shieldtarget.x,shieldtarget.z)
  355.             elseif typeshield==3 or typeshield==6 then CastSpell(spellslot) end
  356.         end
  357.         if healtarget ~= nil then
  358.             if typeheal==1 then CastSpell(healslot,healtarget)
  359.             elseif typeheal==2 or typeheal==3 then CastSpell(healslot) end
  360.         end
  361.         if ulttarget ~= nil then
  362.             if typeult==1 or typeult==3 then CastSpell(ultslot,ulttarget)
  363.             elseif typeult==2 or typeult==4 then CastSpell(ultslot) end    
  364.         end
  365.     end
  366. end
  367.  
  368. function shieldCheck(object,spell,target,typeused)
  369.     local configused
  370.     if typeused == "shields" then configused = ASConfig
  371.     elseif typeused == "heals" then configused = AHConfig
  372.     elseif typeused == "ult" then configused = AUConfig
  373.     elseif typeused == "barrier" then configused = ASBConfig
  374.     elseif typeused == "sheals" then configused = ASHConfig
  375.     elseif typeused == "items" then configused = ASIConfig end
  376.     local shieldflag = false
  377.     if (not configused.skillshots and shottype ~= 0) then return false, 0 end
  378.     local adamage = object:CalcDamage(target,object.totalDamage)
  379.     local InfinityEdge,onhitdmg,onhittdmg,onhitspelldmg,onhitspelltdmg,muramanadmg,skilldamage,skillTypeDmg = 0,0,0,0,0,0,0,0
  380.  
  381.     if object.type ~= "obj_AI_Hero" then
  382.         if spell.name:find("BasicAttack") then skilldamage = adamage
  383.         elseif spell.name:find("CritAttack") then skilldamage = adamage*2 end
  384.     else
  385.         if GetInventoryHaveItem(3186,object) then onhitdmg = getDmg("KITAES",target,object) end
  386.         if GetInventoryHaveItem(3114,object) then onhitdmg = onhitdmg+getDmg("MALADY",target,object) end
  387.         if GetInventoryHaveItem(3091,object) then onhitdmg = onhitdmg+getDmg("WITSEND",target,object) end
  388.         if GetInventoryHaveItem(3057,object) then onhitdmg = onhitdmg+getDmg("SHEEN",target,object) end
  389.         if GetInventoryHaveItem(3078,object) then onhitdmg = onhitdmg+getDmg("TRINITY",target,object) end
  390.         if GetInventoryHaveItem(3100,object) then onhitdmg = onhitdmg+getDmg("LICHBANE",target,object) end
  391.         if GetInventoryHaveItem(3025,object) then onhitdmg = onhitdmg+getDmg("ICEBORN",target,object) end
  392.         if GetInventoryHaveItem(3087,object) then onhitdmg = onhitdmg+getDmg("STATIKK",target,object) end
  393.         if GetInventoryHaveItem(3153,object) then onhitdmg = onhitdmg+getDmg("RUINEDKING",target,object) end
  394.         if GetInventoryHaveItem(3209,object) then onhittdmg = getDmg("SPIRITLIZARD",target,object) end
  395.         if GetInventoryHaveItem(3184,object) then onhittdmg = onhittdmg+80 end
  396.         if GetInventoryHaveItem(3042,object) then muramanadmg = getDmg("MURAMANA",target,object) end
  397.         if spelltype == "BAttack" then
  398.             skilldamage = (adamage+onhitdmg+muramanadmg)*1.07+onhittdmg
  399.         elseif spelltype == "CAttack" then
  400.             if GetInventoryHaveItem(3031,object) then InfinityEdge = .5 end
  401.             skilldamage = (adamage*(2.1+InfinityEdge)+onhitdmg+muramanadmg)*1.07+onhittdmg --fix Lethality
  402.         elseif spelltype == "Q" or spelltype == "W" or spelltype == "E" or spelltype == "R" or spelltype == "P" or spelltype == "QM" or spelltype == "WM" or spelltype == "EM" then
  403.             if GetInventoryHaveItem(3151,object) then onhitspelldmg = getDmg("LIANDRYS",target,object) end
  404.             if GetInventoryHaveItem(3188,object) then onhitspelldmg = getDmg("BLACKFIRE",target,object) end
  405.             if GetInventoryHaveItem(3209,object) then onhitspelltdmg = getDmg("SPIRITLIZARD",target,object) end
  406.             muramanadmg = skillShield[object.charName][spelltype]["Muramana"] and muramanadmg or 0
  407.             if casttype == 1 then
  408.                 skilldamage, skillTypeDmg = getDmg(spelltype,target,object,1,spell.level)
  409.             elseif casttype == 2 then
  410.                 skilldamage, skillTypeDmg = getDmg(spelltype,target,object,2,spell.level)
  411.             elseif casttype == 3 then
  412.                 skilldamage, skillTypeDmg = getDmg(spelltype,target,object,3,spell.level)
  413.             end
  414.             if skillTypeDmg == 2 then
  415.                 skilldamage = (skilldamage+adamage+onhitspelldmg+onhitdmg+muramanadmg)*1.07+onhittdmg+onhitspelltdmg
  416.             else
  417.                 if skilldamage > 0 then skilldamage = (skilldamage+onhitspelldmg+muramanadmg)*1.07+onhitspelltdmg end
  418.             end
  419.         elseif spell.name:find("SummonerDot") then
  420.             skilldamage = getDmg("IGNITE",target,object)
  421.         end
  422.     end
  423.     local dmgpercent = skilldamage*100/target.health
  424.     local dmgneeded = dmgpercent >= configused.mindmgpercent
  425.     local hpneeded = configused.maxhppercent >= (target.health-skilldamage)*100/target.maxHealth
  426.    
  427.     if dmgneeded and hpneeded then
  428.         shieldflag = true
  429.     elseif typeused == "shields" and ((CC == 2 and configused.shieldcc) or (CC == 1 and configused.shieldslow)) then
  430.         shieldflag = true
  431.     end
  432.     return shieldflag, dmgpercent
  433. end
  434. function getHitBox(hero)
  435.     local hitboxTable = { ['HeimerTGreen'] = 50.0, ['Darius'] = 80.0, ['ZyraGraspingPlant'] = 20.0, ['HeimerTRed'] = 50.0, ['ZyraThornPlant'] = 20.0, ['Nasus'] = 80.0, ['HeimerTBlue'] = 50.0, ['SightWard'] = 1, ['HeimerTYellow'] = 50.0, ['Kennen'] = 55.0, ['VisionWard'] = 1, ['ShacoBox'] = 10, ['HA_AP_Poro'] = 0, ['TempMovableChar'] = 48.0, ['TeemoMushroom'] = 50.0, ['OlafAxe'] = 50.0, ['OdinCenterRelic'] = 48.0, ['Blue_Minion_Healer'] = 48.0, ['AncientGolem'] = 100.0, ['AnnieTibbers'] = 80.0, ['OdinMinionGraveyardPortal'] = 1.0, ['OriannaBall'] = 48.0, ['LizardElder'] = 65.0, ['YoungLizard'] = 50.0, ['OdinMinionSpawnPortal'] = 1.0, ['MaokaiSproutling'] = 48.0, ['FizzShark'] = 0, ['Sejuani'] = 80.0, ['Sion'] = 80.0, ['OdinQuestIndicator'] = 1.0, ['Zac'] = 80.0, ['Red_Minion_Wizard'] = 48.0, ['DrMundo'] = 80.0, ['Blue_Minion_Wizard'] = 48.0, ['ShyvanaDragon'] = 80.0, ['HA_AP_OrderShrineTurret'] = 88.4, ['Heimerdinger'] = 55.0, ['Rumble'] = 80.0, ['Ziggs'] = 55.0, ['HA_AP_OrderTurret3'] = 88.4, ['HA_AP_OrderTurret2'] = 88.4, ['TT_Relic'] = 0, ['Veigar'] = 55.0, ['HA_AP_HealthRelic'] = 0, ['Teemo'] = 55.0, ['Amumu'] = 55.0, ['HA_AP_ChaosTurretShrine'] = 88.4, ['HA_AP_ChaosTurret'] = 88.4, ['HA_AP_ChaosTurretRubble'] = 88.4, ['Poppy'] = 55.0, ['Tristana'] = 55.0, ['HA_AP_PoroSpawner'] = 50.0, ['TT_NGolem'] = 80.0, ['HA_AP_ChaosTurretTutorial'] = 88.4, ['Volibear'] = 80.0, ['HA_AP_OrderTurretTutorial'] = 88.4, ['TT_NGolem2'] = 80.0, ['HA_AP_ChaosTurret3'] = 88.4, ['HA_AP_ChaosTurret2'] = 88.4, ['Shyvana'] = 50.0, ['HA_AP_OrderTurret'] = 88.4, ['Nautilus'] = 80.0, ['ARAMOrderTurretNexus'] = 88.4, ['TT_ChaosTurret2'] = 88.4, ['TT_ChaosTurret3'] = 88.4, ['TT_ChaosTurret1'] = 88.4, ['ChaosTurretGiant'] = 88.4, ['ARAMOrderTurretFront'] = 88.4, ['ChaosTurretWorm'] = 88.4, ['OdinChaosTurretShrine'] = 88.4, ['ChaosTurretNormal'] = 88.4, ['OrderTurretNormal2'] = 88.4, ['OdinOrderTurretShrine'] = 88.4, ['OrderTurretDragon'] = 88.4, ['OrderTurretNormal'] = 88.4, ['ARAMChaosTurretFront'] = 88.4, ['ARAMOrderTurretInhib'] = 88.4, ['ChaosTurretWorm2'] = 88.4, ['TT_OrderTurret1'] = 88.4, ['TT_OrderTurret2'] = 88.4, ['ARAMChaosTurretInhib'] = 88.4, ['TT_OrderTurret3'] = 88.4, ['ARAMChaosTurretNexus'] = 88.4, ['OrderTurretAngel'] = 88.4, ['Mordekaiser'] = 80.0, ['TT_Buffplat_R'] = 0, ['Lizard'] = 50.0, ['GolemOdin'] = 80.0, ['Renekton'] = 80.0, ['Maokai'] = 80.0, ['LuluLadybug'] = 50.0, ['Alistar'] = 80.0, ['Urgot'] = 80.0, ['LuluCupcake'] = 50.0, ['Gragas'] = 80.0, ['Skarner'] = 80.0, ['Yorick'] = 80.0, ['MalzaharVoidling'] = 10.0, ['LuluPig'] = 50.0, ['Blitzcrank'] = 80.0, ['Chogath'] = 80.0, ['Vi'] = 50, ['FizzBait'] = 0, ['Malphite'] = 80.0, ['EliseSpiderling'] = 1.0, ['Dragon'] = 100.0, ['LuluSquill'] = 50.0, ['Worm'] = 100.0, ['redDragon'] = 100.0, ['LuluKitty'] = 50.0, ['Galio'] = 80.0, ['Annie'] = 55.0, ['EliseSpider'] = 50.0, ['SyndraSphere'] = 48.0, ['LuluDragon'] = 50.0, ['Hecarim'] = 80.0, ['TT_Spiderboss'] = 200.0, ['Thresh'] = 55.0, ['ARAMChaosTurretShrine'] = 88.4, ['ARAMOrderTurretShrine'] = 88.4, ['Blue_Minion_MechMelee'] = 65.0, ['TT_NWolf'] = 65.0, ['Tutorial_Red_Minion_Wizard'] = 48.0, ['YorickRavenousGhoul'] = 1.0, ['SmallGolem'] = 80.0, ['OdinRedSuperminion'] = 55.0, ['Wraith'] = 50.0, ['Red_Minion_MechCannon'] = 65.0, ['Red_Minion_Melee'] = 48.0, ['OdinBlueSuperminion'] = 55.0, ['TT_NWolf2'] = 50.0, ['Tutorial_Red_Minion_Basic'] = 48.0, ['YorickSpectralGhoul'] = 1.0, ['Wolf'] = 50.0, ['Blue_Minion_MechCannon'] = 65.0, ['Golem'] = 80.0, ['Blue_Minion_Basic'] = 48.0, ['Blue_Minion_Melee'] = 48.0, ['Odin_Blue_Minion_caster'] = 48.0, ['TT_NWraith2'] = 50.0, ['Tutorial_Blue_Minion_Wizard'] = 48.0, ['GiantWolf'] = 65.0, ['Odin_Red_Minion_Caster'] = 48.0, ['Red_Minion_MechMelee'] = 65.0, ['LesserWraith'] = 50.0, ['Red_Minion_Basic'] = 48.0, ['Tutorial_Blue_Minion_Basic'] = 48.0, ['GhostWard'] = 1, ['TT_NWraith'] = 50.0, ['Red_Minion_MechRange'] = 65.0, ['YorickDecayedGhoul'] = 1.0, ['TT_Buffplat_L'] = 0, ['TT_ChaosTurret4'] = 88.4, ['TT_Buffplat_Chain'] = 0, ['TT_OrderTurret4'] = 88.4, ['OrderTurretShrine'] = 88.4, ['ChaosTurretShrine'] = 88.4, ['WriggleLantern'] = 1, ['ChaosTurretTutorial'] = 88.4, ['TwistedLizardElder'] = 65.0, ['RabidWolf'] = 65.0, ['OrderTurretTutorial'] = 88.4, ['OdinShieldRelic'] = 0, ['TwistedGolem'] = 80.0, ['TwistedSmallWolf'] = 50.0, ['TwistedGiantWolf'] = 65.0, ['TwistedTinyWraith'] = 50.0, ['TwistedBlueWraith'] = 50.0, ['TwistedYoungLizard'] = 50.0, ['Summoner_Rider_Order'] = 65.0, ['Summoner_Rider_Chaos'] = 65.0, ['Ghast'] = 60.0, ['blueDragon'] = 100.0, }
  436.     return (hitboxTable[hero.charName] ~= nil and hitboxTable[hero.charName] ~= 0) and hitboxTable[hero.charName] or 65
  437. end
  438. function OnDraw()
  439.     if typeshield ~= nil then
  440.         if ASConfig.drawcircles and not myHero.dead and (typeshield == 1 or typeshield == 2 or typeshield == 5) then
  441.             DrawCircle(myHero.x, myHero.y, myHero.z, range, 0x19A712)
  442.         end
  443.         ASConfig.mindmg = math.floor(myHero.health*ASConfig.mindmgpercent/100)
  444.     end
  445.     if typeheal ~= nil then
  446.         if AHConfig.drawcircles and not myHero.dead and (typeheal == 1 or typeheal == 2) then
  447.             DrawCircle(myHero.x, myHero.y, myHero.z, healrange, 0x19A712)
  448.         end
  449.         AHConfig.mindmg = math.floor(myHero.health*AHConfig.mindmgpercent/100)
  450.     end
  451.     if typeult ~= nil then
  452.         if AUConfig.drawcircles and not myHero.dead and typeult == 1 then
  453.             DrawCircle(myHero.x, myHero.y, myHero.z, ultrange, 0x19A712)
  454.         end
  455.         AUConfig.mindmg = math.floor(myHero.health*AUConfig.mindmgpercent/100)
  456.     end
  457.     if sbarrier ~= nil then ASBConfig.mindmg = math.floor(myHero.health*ASBConfig.mindmgpercent/100) end
  458.     if sheal ~= nil then ASHConfig.mindmg = math.floor(myHero.health*ASHConfig.mindmgpercent/100) end
  459.     if useitems then ASIConfig.mindmg = math.floor(myHero.health*ASIConfig.mindmgpercent/100) end
  460. end
Advertisement
Add Comment
Please, Sign In to add comment