Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- ############################################################################################
- -- ## Diana - Scorn of the Moon 1.1.1 ##
- -- ## by HeX ##
- -- ############################################################################################
- -- ############################################################################################
- -- ## Killable Marks ##
- -- ############################################################################################
- -- ## Green circle: Marks the current target to which you will do the combo ##
- -- ## Blue circle: Killed with a combo, if all the skills were available ##
- -- ## Red circle: Killed using Items + 3 Attacks(Including Passive) + Q + W + R + Ignite ##
- -- ## 2 Red circles: Killed using Items + Q + W + R + Ignite ##
- -- ## 3 Red circles: Killed using Q + R ##
- -- ############################################################################################
- if myHero.charName ~= "Diana" then return end
- --[[ Ranges ]]--
- local aaRange = 400
- local qRange = 1100
- local wRange = 250
- local eRange = 400
- local eBuffer = 225
- local rRange = 825
- --[[ Moonlight ]]--
- local MoonLightEnemy = {}
- local MoonLightTS = 0
- local MoonLight = false
- --[[ Damage Calculation ]]--
- local waittxt = {}
- local calculationenemy = 1
- local floattext = {"Skills are not available","Able to fight","Killable","Murder him!"}
- local killable = {}
- --[[ Prediction ]]--
- local tp = TargetPrediction(qRange, 1800, 250)
- --[[ Ready ]]--
- local ignite = nil
- local QREADY, WREADY, EREADY, RREADY = false, false, false, false
- local BRKSlot, DFGSlot, HXGSlot, BWCSlot, TMTSlot, RAHSlot, RNDSlot, YGBSlot = nil, nil, nil, nil, nil, nil, nil, nil
- local BRKREADY, DFGREADY, HXGREADY, BWCREADY, TMTREADY, RAHREADY, RNDREADY, YGBREADY, IREADY = false, false, false, false, false, false, false, false, false
- function OnLoad()
- Menu()
- end
- function OnTick()
- ts:update()
- ReadyCheck()
- --[[ Prediction ]]--
- if ts.target ~= nil then
- qPred = tp:GetPrediction(ts.target)
- end
- --[[ Combos ]]--
- if ts.index ~= nil then MoonLightTS = MoonLightEnemy[ts.index] end
- if DCConfig.TeamFight and ts.target then
- UseItems(ts.target)
- TeamFight(ts.target)
- end
- if DCConfig.BurstCombo and ts.target then
- UseItems(ts.target)
- BurstCombo(ts.target)
- end
- --[[ Harass ]]--
- if DCConfig.Harass and ts.target then
- Harass(ts.target)
- end
- --[[ Ignite ]]--
- if DCConfig.autoignite then
- AutoIgnite()
- end
- end
- function OnDraw()
- Draw()
- end
- --[[ CODE ]]--
- --[[ Functions ]]--
- function Menu()
- PrintChat("<font color='#CCCCCC'> >> Diana - Scorn of the Moon 1.1.1 loaded! <<</font>")
- DCConfig = scriptConfig("Diana Combo", "DianaCombo")
- DCConfig:addParam("TeamFight", "Basic Combo", SCRIPT_PARAM_ONKEYDOWN, false, 32)
- DCConfig:addParam("BurstCombo", "Burst Combo", SCRIPT_PARAM_ONKEYDOWN, false, 90)
- DCConfig:addParam("Harass", "Harass", SCRIPT_PARAM_ONKEYDOWN, false, 84)
- DCConfig:addParam("autoignite", "Auto Ignite killable", SCRIPT_PARAM_ONOFF, true)
- DCConfig:addParam("ultKS", "Use ultimate to kill", SCRIPT_PARAM_ONOFF, false)
- DCConfig:addParam("useE", "Use E", SCRIPT_PARAM_ONOFF, true)
- DCConfig:addParam("drawcirclesSelf", "Draw Circles - Self", SCRIPT_PARAM_ONOFF, true)
- DCConfig:addParam("drawcirclesEnemy", "Draw Circles - Enemy", SCRIPT_PARAM_ONOFF, true)
- DCConfig:addParam("drawText", "Draw Text - Enemy", SCRIPT_PARAM_ONOFF, true)
- DCConfig:permaShow("TeamFight")
- DCConfig:permaShow("BurstCombo")
- DCConfig:permaShow("Harass")
- ts = TargetSelector(TARGET_LOW_HP,qRange+100,DAMAGE_MAGIC)
- ts.name = "Diana"
- DCConfig:addTS(ts)
- for i=1, heroManager.iCount do
- MoonLightEnemy[i] = 0
- waittxt[i] = i*3
- end
- if myHero:GetSpellData(SUMMONER_1).name:find("SummonerDot") then ignite = SUMMONER_1
- elseif myHero:GetSpellData(SUMMONER_2).name:find("SummonerDot") then ignite = SUMMONER_2
- end
- end
- --[[ Auto Ignite ]]--
- function AutoIgnite()
- if IREADY then
- local ignitedmg = 0
- for i = 1, heroManager.iCount, 1 do
- local enemyhero = heroManager:getHero(i)
- if ValidTarget(enemyhero, 600) then
- ignitedmg = 50 + 20 * myHero.level
- if enemyhero.health <= ignitedmg then
- CastSpell(ignite, enemyhero)
- end
- end
- end
- end
- end
- --[[ Ready and Items ]]--
- function ReadyCheck()
- BRKSlot, DFGSlot, HXGSlot, BWCSlot, TMTSlot, RAHSlot, RNDSlot, YGBSlot = GetInventorySlotItem(3153), GetInventorySlotItem(3128), GetInventorySlotItem(3146), GetInventorySlotItem(3144), GetInventorySlotItem(3077), GetInventorySlotItem(3074), GetInventorySlotItem(3143), GetInventorySlotItem(3142)
- QREADY = (myHero:CanUseSpell(_Q) == READY)
- WREADY = (myHero:CanUseSpell(_W) == READY)
- EREADY = (myHero:CanUseSpell(_E) == READY)
- RREADY = (myHero:CanUseSpell(_R) == READY)
- DFGREADY = (DFGSlot ~= nil and myHero:CanUseSpell(DFGSlot) == READY)
- HXGREADY = (HXGSlot ~= nil and myHero:CanUseSpell(HXGSlot) == READY)
- BWCREADY = (BWCSlot ~= nil and myHero:CanUseSpell(BWCSlot) == READY)
- BRKREADY = (BRKSlot ~= nil and myHero:CanUseSpell(BRKSlot) == READY)
- TMTREADY = (TMTSlot ~= nil and myHero:CanUseSpell(TMTSlot) == READY)
- RAHREADY = (RAHSlot ~= nil and myHero:CanUseSpell(RAHSlot) == READY)
- RNDREADY = (RNDSlot ~= nil and myHero:CanUseSpell(RNDSlot) == READY)
- YGBREADY = (YGBSlot ~= nil and myHero:CanUseSpell(YGBSlot) == READY)
- IREADY = (ignite ~= nil and myHero:CanUseSpell(ignite) == READY)
- end
- function UseItems(target)
- if GetDistance(target) < 550 then
- if DFGREADY then CastSpell(DFGSlot, target) end
- if HXGREADY then CastSpell(HXGSlot, target) end
- if BWCREADY then CastSpell(BWCSlot, target) end
- if BRKREADY then CastSpell(BRKSlot, target) end
- if YGBREADY then CastSpell(YGBSlot, target) end
- if TMTREADY and GetDistance(target) < 275 then CastSpell(TMTSlot) end
- if RAHREADY and GetDistance(target) < 275 then CastSpell(RAHSlot) end
- if RNDREADY and GetDistance(target) < 275 then CastSpell(RNDSlot) end
- end
- end
- --[[ Combos ]]--
- function TeamFight(target)
- RDMG = getDmg("R", target, myHero)
- if qPred ~= nil and QREADY and GetDistance(qPred) <= qRange then
- CastSpell(_Q, qPred.x, qPred.z)
- myHero:Attack(target)
- end
- if WREADY and GetDistance(target) <= wRange then
- CastSpell(_W)
- end
- if EREADY and GetDistance(target) > eBuffer and GetDistance(target) < eRange and DCConfig.useE then
- CastSpell(_E)
- end
- if RREADY and MoonLightEnemy[ts.index] == true and GetDistance(target) <= rRange then
- CastSpell(_R, target)
- CastSpell(_W)
- elseif DCConfig.ultKS and RREADY and ts.target.health < RDMG and GetDistance(target) <= rRange then
- CastSpell(_R, target)
- end
- if GetDistance(target) <= aaRange then
- myHero:Attack(target)
- end
- end
- function BurstCombo(target)
- if qPred ~= nil and QREADY and GetDistance(qPred) <= qRange then
- CastSpell(_Q, qPred.x, qPred.z)
- myHero:Attack(target)
- QTick = GetTickCount()
- RDelay = (250 + (GetDistance(qPred)/1.8))
- end
- if WREADY and GetDistance(target) <= wRange then
- CastSpell(_W)
- end
- if EREADY and GetDistance(target) > eBuffer and GetDistance(target) < eRange and DCConfig.useE then
- CastSpell(_E)
- end
- if RREADY and GetDistance(target) <= rRange and QTick ~= nil then
- if GetTickCount() - QTick >= RDelay-400 and MoonLight == false then
- CastSpell(_W)
- CastSpell(_R, target)
- MoonLight = true
- end
- end
- if GetDistance(target) <= aaRange then
- myHero:Attack(target)
- end
- end
- --[[ Harass ]]--
- function Harass(target)
- if qPred ~= nil and QREADY and GetDistance(qPred) <= qRange then
- CastSpell(_Q, qPred.x, qPred.z)
- end
- end
- --[[ OnDraw ]]--
- function Draw()
- if tick == nil or GetTickCount()-tick>=100 then
- tick = GetTickCount()
- DmgCalculation()
- end
- if DCConfig.drawcirclesSelf and not myHero.dead then
- DrawCircle(myHero.x, myHero.y, myHero.z, qRange, 0x19A712)
- DrawCircle(myHero.x, myHero.y, myHero.z, eRange, 0x00CCCC)
- end
- if DCConfig.drawcirclesEnemy and ts.target ~= nil then
- for j=0, 10 do
- DrawCircle(ts.target.x, ts.target.y, ts.target.z, 40 + j*1.5, 0x00FF00)
- end
- end
- for i=1, heroManager.iCount do
- local enemydraw = heroManager:GetHero(i)
- if ValidTarget(enemydraw) then
- if DCConfig.drawcirclesEnemy then
- if killable[i] == 1 then
- for j=0, 20 do
- DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 80 + j*1.5, 0x0000FF)
- end
- elseif killable[i] == 2 then
- for j=0, 10 do
- DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 80 + j*1.5, 0xFF0000)
- end
- elseif killable[i] == 3 then
- for j=0, 10 do
- DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 80 + j*1.5, 0xFF0000)
- DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 110 + j*1.5, 0xFF0000)
- end
- elseif killable[i] == 4 then
- for j=0, 10 do
- DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 80 + j*1.5, 0xFF0000)
- DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 110 + j*1.5, 0xFF0000)
- DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 140 + j*1.5, 0xFF0000)
- end
- end
- end
- if DCConfig.drawText and waittxt[i] == 1 and killable[i] ~= 0 then
- PrintFloatText(enemydraw,0,floattext[killable[i]])
- end
- end
- if waittxt[i] == 1 then waittxt[i] = 30
- else waittxt[i] = waittxt[i]-1
- end
- end
- end
- --[[ Ultimate Refresh ]]--
- function OnCreateObj(Object)
- if Object.name:find("Diana_Q_moonlight_champ.troy") then
- for i=1, heroManager.iCount do
- local enemy = heroManager:GetHero(i)
- if enemy.team ~= myHero.team and GetDistance(Object, enemy) < 50 then
- MoonLightEnemy[i] = true
- end
- end
- end
- end
- function OnProcessSpell(unit, spell)
- if unit.isMe and spell.name == "DianaArc" then MoonLight = false end
- end
- function OnDeleteObj(Object)
- if Object.name:find("Diana_Q_moonlight_champ.troy") then
- for i=1, heroManager.iCount do
- local enemy = heroManager:GetHero(i)
- if enemy.team ~= myHero.team and GetDistance(Object, enemy) < 50 then
- MoonLightEnemy[i] = false
- end
- end
- end
- end
- --[[ Damage Calculation ]]--
- function DmgCalculation()
- local enemy = heroManager:GetHero(calculationenemy)
- if ValidTarget(enemy) then
- local ignitedamage, dfgdamage, hxgdamage, bwcdamage, brkdamage, tmtdamage, rahdamage = 0, 0, 0, 0, 0, 0, 0
- local pdamage = getDmg("P",enemy,myHero)
- local qdamage = getDmg("Q",enemy,myHero)
- local wdamage = getDmg("W",enemy,myHero)
- local rdamage = getDmg("R",enemy,myHero,1)
- local hitdamage = getDmg("AD",enemy,myHero)
- local ignitedamage = (ignite and getDmg("IGNITE",enemy,myHero) or 0)
- local dfgdamage = (DFGSlot and getDmg("DFG",enemy,myHero) or 0)
- local hxgdamage = (HXGSlot and getDmg("HXG",enemy,myHero) or 0)
- local bwcdamage = (BWCSlot and getDmg("BWC",enemy,myHero) or 0)
- local brkdamage = (BRKSlot and getDmg("RUINEDKING",enemy,myHero) or 0)
- local tmtdamage = (TMTSlot and getDmg("TIAMAT",enemy,myHero) or 0)
- local rahdamage = (RAHSlot and getDmg("HYDRA",enemy,myHero) or 0)
- local combo1 = hitdamage*2 + pdamage + qdamage + wdamage + rdamage
- local combo2 = hitdamage*2 + pdamage
- local combo3 = 0
- local combo4 = 0
- if QREADY then
- combo2 = combo2 + qdamage
- combo3 = combo3 + qdamage
- combo4 = combo4 + qdamage
- end
- if WREADY then
- combo2 = combo2 + wdamage
- combo3 = combo3 + wdamage
- end
- if RREADY then
- combo2 = combo2 + rdamage
- combo3 = combo3 + rdamage
- combo4 = combo4 + rdamage
- end
- if DFGREADY then
- combo1 = combo1 + dfgdamage
- combo2 = combo2 + dfgdamage
- combo3 = combo3 + dfgdamage
- end
- if HXGREADY then
- combo1 = combo1 + hxgdamage
- combo2 = combo2 + hxgdamage
- combo3 = combo3 + hxgdamage
- end
- if BWCREADY then
- combo1 = combo1 + bwcdamage
- combo2 = combo2 + bwcdamage
- combo3 = combo3 + bwcdamage
- end
- if BRKREADY then
- combo1 = combo1 + brkdamage
- combo2 = combo2 + brkdamage
- combo3 = combo3 + brkdamage
- end
- if TMTREADY then
- combo1 = combo1 + tmtdamage
- combo2 = combo2 + tmtdamage
- combo3 = combo3 + tmtdamage
- end
- if RAHREADY then
- combo1 = combo1 + rahdamage
- combo2 = combo2 + rahdamage
- combo3 = combo3 + rahdamage
- end
- if IREADY then
- combo1 = combo1 + ignitedamage
- combo2 = combo2 + ignitedamage
- combo3 = combo3 + ignitedamage
- end
- if combo4 >= enemy.health then killable[calculationenemy] = 4
- elseif combo3 >= enemy.health then killable[calculationenemy] = 3
- elseif combo2 >= enemy.health then killable[calculationenemy] = 2
- elseif combo1 >= enemy.health then killable[calculationenemy] = 1
- else killable[calculationenemy] = 0 end
- end
- if calculationenemy == 1 then calculationenemy = heroManager.iCount
- else calculationenemy = calculationenemy-1
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment