--[[ iSyndra by Apple ]]-- --require "Collision" if myHero.charName ~= "Syndra" then return end --[[ Config ]]-- local HK1 = string.byte("A") local HK2 = string.byte("T") local HK3 = string.byte("C") local HK4 = string.byte("X") local HK5 = string.byte("G") local SafeBet = 20 -- % --[[ Constants ]]-- local QRange = 800 + ((myHero:GetSpellData(_R).level == 3 and 75) or 0) local WRange = 950 + ((myHero:GetSpellData(_R).level == 3 and 75) or 0) local ERange = 650 local RRange = 675 + ((myHero:GetSpellData(_R).level == 3 and 75) or 0) local igniteRange = 600 local defaultItemRange = 700 local QDelay = 0.500 local WDelay = 0.500 local EDelay = 0.010 --[[ Script Variables ]]-- local ts = TargetSelector(TARGET_LESS_CAST,WRange,DAMAGE_MAGIC,false) local tpQ = TargetPredictionVIP(QRange,math.huge,QDelay,80) local tpW = TargetPredictionVIP(WRange,3000,WDelay,100) local tpE = TargetPredictionVIP(ERange*2,2500,EDelay,60) --local tpECollision = Collision(ERange*2, 2500, EDelay, 60) local igniteSlot = nil local pickedW = nil local enemyMinions = {} local Spheres = {} local updateTextTimers = {} local items = { ZHONYAS = {id = 3157, slot = nil, ready = false}, WOOGLETS = {id = 3090, slot = nil, ready = false}, itemsList = { ["BRK"] = {id = 3153, slot = nil, ready = false, useOnKill = false}, ["EXEC"] = {id = 3123, slot = nil, ready = false, useOnKill = false}, ["YOGH"] = {id = 3142, slot = nil, ready = false, useOnKill = false}, ["RANO"] = {id = 3143, slot = nil, ready = false, useOnKill = false}, ["MARU"] = {id = 3042, slot = nil, ready = false, useOnKill = false}, ["DFG"] = {id = 3128, slot = nil, ready = false, useOnKill = true}, ["HXG"] = {id = 3146, slot = nil, ready = false, useOnKill = true}, ["BWC"] = {id = 3144, slot = nil, ready = false, useOnKill = true}, }, passiveItemsList = { ["LIANDRYS"] = {id = 3151, slot = nil}, ["BLACKFIRE"] = {id = 3188, slot = nil}, }, } function OnLoad() iSynConfig = scriptConfig("iSyndra v2.0","iSyndra") iSynConfig:addParam("pewpew","PewPew!", SCRIPT_PARAM_ONKEYDOWN, false, HK1) iSynConfig:addParam("harass", "Poke!", SCRIPT_PARAM_ONKEYDOWN, false, HK3) iSynConfig:addParam("P7B", "Play with 7 balls", SCRIPT_PARAM_ONKEYDOWN, false, HK4) iSynConfig:addParam("AutoFarm", "Auto Farm", SCRIPT_PARAM_ONKEYDOWN, false, HK2) iSynConfig:addParam("manualStun","Stun Combo", SCRIPT_PARAM_ONKEYDOWN, false, HK5) iSynConfig:addParam("AutoUlt", "Auto Ultimate", SCRIPT_PARAM_ONOFF, true) iSynConfig:addParam("AutoStun", "Auto Stun", SCRIPT_PARAM_ONOFF, true) --iSynConfig:addParam("AutoStunCollision", "Auto Stun: Use Collision Lib?", SCRIPT_PARAM_ONOFF, false) iSynConfig:addParam("SmartSave", "Smart Save Items", SCRIPT_PARAM_ONOFF, true) iSynConfig:addParam("SafeBet", "Smart Save Health %", SCRIPT_PARAM_SLICE, SafeBet or 20, 1, 100, 0) iSynConfig:addParam("drawcircles", "Draw Circles", SCRIPT_PARAM_ONOFF, true) iSynConfig:addParam("damageText", "Kill Text", SCRIPT_PARAM_ONOFF, true) iSynConfig:permaShow("pewpew") iSynConfig:permaShow("harass") iSynConfig:permaShow("P7B") ts.name = "Syndra" iSynConfig:addTS(ts) enemyMinions = minionManager(MINION_ENEMY, WRange, myHero, MINION_SORT_HEALTH_ASC) igniteSlot = ((myHero:GetSpellData(SUMMONER_1).name:find("SummonerDot") and SUMMONER_1) or (myHero:GetSpellData(SUMMONER_2).name:find("SummonerDot") and SUMMONER_2) or nil) end function OnTick() ts:update() enemyMinions:update() updateItems() QRange = 800 + ((myHero:GetSpellData(_R).level == 3 and 75) or 0) WRange = 950 + ((myHero:GetSpellData(_R).level == 3 and 75) or 0) RRange = 675 + ((myHero:GetSpellData(_R).level == 3 and 75) or 0) for i, sphere in ipairs(Spheres) do if sphere and not sphere.valid then table.remove(Spheres, i) end end if not myHero.dead then AutoIgnite() if iSynConfig.pewpew then PewPew() end if iSynConfig.harass then Poke() end if iSynConfig.P7B then WomboCombo() end if iSynConfig.AutoUlt then AutoUlt() end if iSynConfig.AutoStun and not iSynConfig.pewpew then if iSynConfig.AutoStunCollision then autoStunCollision() else autoStun() end end if iSynConfig.AutoFarm then AutoFarm() end if iSynConfig.manualStun and myHero:CanUseSpell(_Q) == READY and GetDistance(mousePos) < ERange then CastSpell(_Q, mousePos.x, mousePos.z) end if iSynConfig.damageText then damageText() end end end function PewPew() if ValidTarget(ts.target) then for item, itemInfo in pairs(items.itemsList) do if itemInfo.slot and myHero:CanUseSpell(itemInfo.slot) and not itemInfo.useOnKill then CastSpell(itemInfo.slot, ts.target) end end local _,_,QPos = tpQ:GetPrediction(ts.target) local _,_,WPos = tpW:GetPrediction(ts.target) local calcDmg = calculateDamage(ts.target, true, true) if calcDmg.QWE > ts.target.health then if calcDmg.Q > ts.target.health and QPos then if QPos then CastSpell(_Q, QPos.x, QPos.z) end elseif calcDmg.W > ts.target.health and WPos then CastW(ts.target) elseif calcDmg.Q + calcDmg.W > ts.target.health and QPos and WPos then if QPos then CastSpell(_Q, QPos.x, QPos.z) end CastW(ts.target) else if QPos then CastSpell(_Q, QPos.x, QPos.z) end if WPos then CastW(ts.target) end end elseif (calcDmg.DFG > 0 and ( 1.2 * (calcDmg.Q + calcDmg.W)) or calcDmg.Q + calcDmg.W) + calcDmg.items + calcDmg.ignite > ts.target.health then for item, itemInfo in pairs(items.itemsList) do if itemInfo.ready then CastSpell(itemInfo.slot, ts.target) end end if QPos then CastSpell(_Q, QPos.x, QPos.z) end CastW(ts.target) CastSpell(igniteSlot, ts.target) elseif calcDmg.total > ts.target.health then for item, itemInfo in pairs(items.itemsList) do if itemInfo.ready then CastSpell(itemInfo.slot, ts.target) end end if QPos then CastSpell(_Q, QPos.x, QPos.z) end CastW(ts.target) if igniteSlot then CastSpell(igniteSlot, ts.target) end CastSpell(_R, ts.target) else if QPos then CastSpell(_Q, QPos.x, QPos.z) end if WPos then CastW(ts.target) end end end if myHero:CanUseSpell(_W) ~= READY then autoStun() end end function Poke() if ValidTarget(ts.target) then local _,_,QPos = tpQ:GetPrediction(ts.target) local _,_,WPos = tpW:GetPrediction(ts.target) if QPos then CastSpell(_Q, QPos.x, QPos.z) end if WPos then CastW(ts.target) end end end function CastW(enemy) local _,_,WPos = tpW:GetPrediction(ts.target) if WPos and tpW:GetHitChance(enemy) > 0.5 then if pickedW ~= nil then CastSpell(_W, WPos.x, WPos.z) else for i, minion in ipairs(enemyMinions.objects) do if ValidTarget(minion, WRange) then CastSpell(_W, minion.x, minion.z) CastSpell(_W, WPos.x, WPos.z) pickedW = true return end end for i, sphere in ipairs(Spheres) do if sphere ~= nil and sphere.valid and GetDistance(sphere) < WRange then CastSpell(_W, sphere.x, sphere.z) CastSpell(_W, WPos.x, WPos.z) pickedW = true return end end end end end function autoStun() if myHero:CanUseSpell(_E) == READY and SphereCount() > 0 and pickedW == nil then for i, enemy in ipairs(GetEnemyHeroes()) do if ValidTarget(enemy, 2 * ERange) then local _,_,EPos = tpE:GetPrediction(enemy) if EPos then for j, sphere in ipairs(Spheres) do if sphere and GetDistance(sphere) < GetDistance(enemy) and GetDistance(sphere) < ERange and GetDistance(sphere, EPos) < ERange then local MyX = myHero.x local MyZ = myHero.z local EPosX = EPos.x local EPosZ = EPos.z local SphX = sphere.x local SphZ = sphere.z local DeltaX = MyX - EPosX local DeltaZ = MyZ - EPosZ local Slope = DeltaX ~= 0 and DeltaZ/DeltaX or 0 local CC = dx ~= 0 and MyZ - Slope * MyX or 0 local tempDist = math.abs(SphZ - Slope * SphX - CC) / math.sqrt(Slope^2 + 1) local tempA = math.sqrt((EPosX - MyX)^2 + (EPosX - MyX)^2) local tempB = math.sqrt((EPosX - SphX)^2 + (EPosZ - SphZ)^2) if tempDist < 20 and tempA > tempB then CastSpell(_E, sphere.x, sphere.z) return end end end end end end end end function autoStunCollision() if myHero:CanUseSpell(_E) == READY and SphereCount() > 0 and pickedW == nil then for i, enemy in ipairs(GetEnemyHeroes()) do if ValidTarget(enemy, 2 * ERange) then for j, sphere in ipairs(Spheres) do if sphere and GetDistance(sphere) < GetDistance(enemy) and GetDistance(sphere) < ERange and GetDistance(sphere, EPos) < ERange then local tempSpherePos = { x = sphere.x + (sphere.x - myHero.x) / GetDistance(sphere) * 650, y = sphere.y, z = sphere.z + (sphere.z - myHero.z) / GetDistance(sphere) * 650 } local doesCollide,_ = tpECollision:GetHeroCollision(sphere, tempSpherePos, HERO_ENEMY) if doesCollide then CastSpell(_E, sphere.x, sphere.z) return end end end end end end end function OldDeprecatedAutoStun() --Dekaron's calculations proved to be much better. *-* if myHero:CanUseSpell(_E) == READY and SphereCount() > 0 and not pickedW then for i, enemy in ipairs(GetEnemyHeroes()) do if ValidTarget(enemy,2*ERange) then local _,_,EPos = tpE:GetPrediction(enemy) if EPos then local EPosAngle = math.atan2((EPos.x-myHero.x),(EPos.z-myHero.z)) if EPosAngle < 0 then EPosAngle = EPosAngle + 2*math.pi end for i, sphere in ipairs(Spheres) do if sphere and GetDistance(sphere) < GetDistance(enemy) and GetDistance(sphere) < ERange and GetDistance(sphere,EPos) < ERange then local sphereAngle = math.atan2((sphere.x-myHero.x),(sphere.z-myHero.z)) if sphereAngle < 0 then sphereAngle = sphereAngle + 2*math.pi end if math.abs(EPosAngle-sphereAngle) < 0.5*(GetDistance(sphere,EPos)/ERange) then CastSpell(_E,sphere.x,sphere.z) end end end end end end end end function WomboCombo() if SphereCount() ~= 4 and myHero:CanUseSpell(_Q) == READY then local _,_,QPos = ValidTarget(ts.target) and tpQ:GetPrediction(ts.target) CastSpell(_Q, QPos and QPos.x or mousePos.x, QPos and QPos.z or mousePos.z) end if pickedW == nil and myHero:CanUseSpell(_W) == READY then for i, sphere in ipairs(Spheres) do if sphere and sphere.startTick < GetTickCount() - 5800 then CastSpell(_W, sphere.x, sphere.z) return end end end if SphereCount() == 4 and ValidTarget(ts.target, RRange) and myHero:CanUseSpell(_R) == READY then CastSpell(_R, ts.target) end end function AutoUlt() if myHero:CanUseSpell(_R) == READY then for i, enemy in ipairs(GetEnemyHeroes()) do if ValidTarget(enemy, RRange) then local calcDmg = calculateDamage(enemy, true, true) if calcDmg.R > enemy.health then CastSpell(_R, enemy) elseif (calcDmg.DFG > 0 and 1.2 * calcDmg.R + calcDmg.items or calcDmg.R + calcDmg.items) > enemy.health then for item, itemInfo in pairs(items.itemsList) do if itemInfo.ready then CastSpell(itemInfo.slot, enemy) end end CastSpell(_R, enemy) end end end end end function AutoFarm() for i, minion in ipairs(enemyMinions.objects) do if minion and ValidTarget(minion, QRange) then if minion.health < getDmg("AD", minion, myHero) * 1.1 then myHero:Attack(minion) elseif minion.health < getDmg("Q", minion, myHero) then CastSpell(_Q, minion.x, minion.z) end end end end function SphereCount() local count = 0 for i, sphere in ipairs(Spheres) do if sphere then count = count + 1 end end return count end function OnCreateObj(object) if object.name:find("Syndra_W_tar") then pickedW = object end if object.name:find("Syndra_DarkSphere_idle") or object.name:find("Syndra_DarkSphere5_idle") then local tempObj = object tempObj.startTick = GetTickCount() table.insert(Spheres, tempObj) if iSynConfig.manualStun and GetDistance(object) < ERange then CastSpell(_E, object.x, object.z) end end end function OnDeleteObj(object) if object.name:find("Syndra_W_tar") then pickedW = nil end if object.name:find("Syndra_DarkSphere_idle") or object.name:find("Syndra_DarkSphere5_idle") then for i, sphere in ipairs(Spheres) do if sphere and sphere.rawHash == object.rawHash then table.remove(Spheres, i) end end end end function updateItems() for item, itemInfo in pairs(items.itemsList) do itemInfo.slot = GetInventorySlotItem(itemInfo.id) itemInfo.ready = (itemInfo.slot and myHero:CanUseSpell(itemInfo.slot) == READY or false) end for item, itemInfo in pairs(items.passiveItemsList) do itemInfo.slot = GetInventorySlotItem(itemInfo.id) end items["ZHONYAS"].slot = GetInventorySlotItem(items["ZHONYAS"].id) items["ZHONYAS"].ready = (items["ZHONYAS"].slot and myHero:CanUseSpell(items["ZHONYAS"].slot) == READY or false) items["WOOGLETS"].slot = GetInventorySlotItem(items["WOOGLETS"].id) items["WOOGLETS"].ready = (items["WOOGLETS"].slot and myHero:CanUseSpell(items["WOOGLETS"].slot) == READY or false) end function getUltDamage(enemy) return myHero:CalcMagicDamage(enemy, ((SphereCount()+3)*(45+45*myHero:GetSpellData(_R).level+0.2*myHero.ap))) end function calculateDamage(enemy, checkRange, readyCheck) local _,_,QPos = tpQ:GetPrediction(enemy) local _,_,WPos = tpW:GetPrediction(enemy) --local EPos,_,_ = tpE:GetPrediction(enemy) local returnDamage = {} returnDamage.Qbase = (( (myHero:CanUseSpell(_Q) == READY or not readyCheck) and (QPos and GetDistance({x = QPos.x, z = QPos.z}) < QRange or not checkRange) and getDmg("Q", enemy, myHero)) or 0 ) returnDamage.Wbase = (( (myHero:CanUseSpell(_W) == READY or not readyCheck) and (WPos and GetDistance({x = WPos.x, z = WPos.z}) < WRange or not checkRange) and getDmg("W", enemy, myHero)) or 0 ) --returnDamage.Ebase = (( (myHero:CanUseSpell(_E) == READY or not readyCheck) and (EPos and GetDistance({x = EPos.x, z = EPos.z}) < ERange or not checkRange) and getDmg("E", enemy, myHero)) or 0 ) returnDamage.Rbase = (( (myHero:CanUseSpell(_R) == READY or not readyCheck) and (GetDistance(enemy) < RRange or not checkRange) and getUltDamage(enemy)) or 0 ) returnDamage.DFG = (( (items.itemsList["DFG"].ready or (items.itemsList["DFG"].slot and not readyCheck)) and (GetDistance(enemy) < defaultItemRange or not checkRange) and getDmg("DFG", enemy, myHero)) or 0 ) returnDamage.HXG = (( (items.itemsList["HXG"].ready or (items.itemsList["HXG"].slot and not readyCheck)) and (GetDistance(enemy) < defaultItemRange or not checkRange) and getDmg("HXG", enemy, myHero)) or 0 ) returnDamage.BWC = (( (items.itemsList["BWC"].ready or (items.itemsList["BWC"].slot and not readyCheck)) and (GetDistance(enemy) < defaultItemRange or not checkRange) and getDmg("BWC", enemy, myHero)) or 0 ) returnDamage.LIANDRYS = (( items.passiveItemsList["LIANDRYS"].slot and getDmg("LIANDRYS", enemy, myHero)) or 0) returnDamage.BLACKFIRE = (( items.passiveItemsList["BLACKFIRE"].slot and getDmg("BLACKFIRE", enemy, myHero)) or 0) returnDamage.ignite = (( igniteSlot and (myHero:CanUseSpell(igniteSlot) == READY or not readyCheck) and (GetDistance(enemy) < igniteRange or not checkRange) and getDmg("IGNITE", enemy, myHero)) or 0) returnDamage.onSpell = returnDamage.LIANDRYS + returnDamage.BLACKFIRE returnDamage.Q = returnDamage.Qbase + returnDamage.onSpell returnDamage.W = returnDamage.Wbase + returnDamage.onSpell -- returnDamage.E = returnDamage.Ebase + returnDamage.onSpell returnDamage.R = returnDamage.Rbase + returnDamage.onSpell returnDamage.QWE = returnDamage.Q + returnDamage.W --+ returnDamage.E returnDamage.QWER = returnDamage.QWE + returnDamage.R returnDamage.items = returnDamage.DFG + returnDamage.HXG + returnDamage.BWC returnDamage.total = (returnDamage.DFG > 0 and 1.2 * returnDamage.QWER or returnDamage.QWER) + returnDamage.items + returnDamage.ignite return returnDamage end function damageText() local damageTextList = {"Poor Enemy", "Ultimate!", "Nuke!", "Risky"} for i, enemy in ipairs(GetEnemyHeroes()) do if ValidTarget(enemy) then local calcDmg = calculateDamage(enemy, false, true) local killMode = (calcDmg.QWE > enemy.health and 1) or (calcDmg.R > enemy.health and 2) or (calcDmg.QWER > enemy.health and 3) or (calcDmg.total > enemy.health and 4) or 0 if updateTextTimers[enemy.charName] == nil then updateTextTimers[enemy.charName] = 30 elseif updateTextTimers[enemy.charName] > 1 then updateTextTimers[enemy.charName] = updateTextTimers[enemy.charName] - 1 elseif killMode > 0 and updateTextTimers[enemy.charName] == 1 then PrintFloatText(enemy, 0, damageTextList[killMode]) updateTextTimers[enemy.charName] = 30 end end end end function OnDraw() if not myHero.dead and iSynConfig.drawcircles then DrawCircle(myHero.x, myHero.y, myHero.z, QRange, 0xFF80FF00) DrawText("Spheres: ".. SphereCount(), 18, 100, 120, 0xFFFF0000) if ValidTarget(ts.target) then for i = 1, 10 do DrawCircle(ts.target.x, ts.target.y, ts.target.z, 90+i, 0xFFFF0000) end end for i, minion in ipairs(enemyMinions.objects) do if minion and ValidTarget(minion, QRange) then if minion.health < getDmg("AD", minion, myHero) then for j = 1, 10 do DrawCircle(minion.x, minion.y, minion.z, 50+j, 0xFF80FF00) end elseif minion.health < getDmg("Q", minion, myHero) then for j = 1, 10 do DrawCircle(minion.x, minion.y, minion.z, 50+j, 0xFFFF0000) end end end end --[[for i, sphere in ipairs(Spheres) do if GetDistance(sphere) < ERange then local tempSpherePos = { x = sphere.x + (sphere.x - myHero.x) / GetDistance(sphere) * 650, y = sphere.y, z = sphere.z + (sphere.z - myHero.z) / GetDistance(sphere) * 650 } tpECollision:DrawCollision(sphere, tempSpherePos) end end]] end end function AutoIgnite() if igniteSlot and myHero:CanUseSpell(igniteSlot) then for i, enemy in ipairs(GetEnemyHeroes()) do local igniteDmg = getDmg("IGNITE", enemy, myHero) if ValidTarget(enemy, igniteRange) and enemy.health < igniteDmg then CastSpell(igniteSlot, enemy) end end end end function OnProcessSpell(object, spell) if object == nil or spell == nil or not object.valid then return end if ((items["WOOGLETS"].ready or items["ZHONYAS"].ready) and iSynConfig.SmartSave) then if ValidTarget(object) and not myHero.dead and not (object.name:find("Minion_") or object.name:find("Odin")) then if object.type == "obj_AI_Hero" then local spellType = getSpellType(object, spell.name) if spellType ~= nil then -- Basic Attacks if spellType == "BAttack" or spellType == "CAttack" then local baseADmg = getDmg("AD", myHero, object) local onHitDmg = 0 + ((GetInventoryHaveItem(3078, object) and getDmg("TRINITY", myHero, object)) or 0) + ((GetInventoryHaveItem(3186, object) and getDmg("KITAES", myHero, object)) or 0) + ((GetInventoryHaveItem(3087, object) and getDmg("STATIKK", myHero, object)) or 0) + ((GetInventoryHaveItem(3100, object) and getDmg("LICHBANE", myHero, object)) or 0) + ((GetInventoryHaveItem(3114, object) and getDmg("MALADY", myHero, object)) or 0) + ((GetInventoryHaveItem(3153, object) and getDmg("RUINEDKING", myHero, object)) or 0) + ((GetInventoryHaveItem(3042, object) and getDmg("MURAMANA", myHero, object)) or 0) + ((GetInventoryHaveItem(3091, object) and getDmg("WITSEND", myHero, object)) or 0) + ((GetInventoryHaveItem(3057, object) and getDmg("SHEEN", myHero, object)) or 0) + ((GetInventoryHaveItem(3025, object) and getDmg("ICEBORN", myHero, object)) or 0) + ((GetInventoryHaveItem(3184, object) and 80) or 0) local PhysDamage = (spellType == "BAttack" and (baseADmg + onHitDmg) * 1.07 + ((GetInventoryHaveItem(3209, object) and getDmg("SPIRITLIZARD", myHero, object)) or 0)) or (spellType == "CAttack" and (GetInventoryHaveItem(3031, object) and (baseADmg * 2.5 + onHitDmg) * 1.07 + ((GetInventoryHaveItem(3209, object) and getDmg("SPIRITLIZARD", myHero, object)) or 0)) or (baseADmg * 1.5 + onHitDmg) * 1.07 + ((GetInventoryHaveItem(3209, object) and getDmg("SPIRITLIZARD", myHero, object)) or 0)) if spell.endPos ~= nil and GetDistance(spell.endPos) < 50 then if myHero.health - PhysDamage < myHero.maxHealth * (iSynConfig.SafeBet / 100) then if items["WOOGLETS"].ready then CastSpell(items["WOOGLETS"].slot) elseif items["ZHONYAS"].ready then CastSpell(items["ZHONYAS"].slot) end end end -- QWER Attacks elseif string.find("QWER", spellType) then local onHitSpellDmg = 0 + ((GetInventoryHaveItem(3151, object) and getDmg("LIANDRYS", myHero, object)) or 0) + ((GetInventoryHaveItem(3042, object) and getDmg("MURAMANA",myHero, object)) or 0) + ((GetInventoryHaveItem(3188, object) and getDmg("BLACKFIRE", myHero, object)) or 0) local spellDamage = (getDmg(spellType, myHero, object) + onHitSpellDmg) * 1.07 + (GetInventoryHaveItem(3209) and getDmg("SPIRITLIZARD", myHero, object) or 0) local skillType, skillRadius, skillMaxDistance = skillData[object.charName][spellType]["type"], skillData[object.charName][spellType]["radius"], skillData[object.charName][spellType]["maxdistance"] if (skillType == 0 and checkhitaoe(object, spell.endPos, 80, myHero, 0)) or (skillType == 1 and checkhitlinepass(object, spell.endPos, skillRadius, skillMaxDistance, myHero, 50)) or (skillType == 2 and checkhitlinepoint(object, spell.endPos, skillRadius, myHero, 50)) or (skillType == 3 and checkhitaoe(object, spell.endPos, skillRadius, myHero, 50)) or (skillType == 4 and checkhitcone(object, spell.endPos, skillRadius, skillMaxDistance, myHero, 50)) or (skillType == 5 and checkhitwall(object, spell.endPos, skillRadius, skillMaxDistance, myHero, 50)) or (skillType == 6 and (checkhitlinepass(object, spell.endPos, skillRadius, skillMaxDistance, myHero, 50) or checkhitlinepass(object, Vector(object)*2-spell.endPos, skillRadius, skillMaxDistance, myHero, 50))) then if myHero.health - spellDamage < myHero.maxHealth * (iSynConfig.SafeBet / 100) then if items["WOOGLETS"].ready then CastSpell(items["WOOGLETS"].slot) elseif items["ZHONYAS"].ready then CastSpell(items["ZHONYAS"].slot) end end end end end end end end end function CastSpellP(spell, target) local spellP = (spell == _Q) end