Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Darius Wurf v1.0.3 --
- -- Edited 22/11/2014 --
- -- Created By: Laggona --
- if myHero.charName ~= "Darius" then return end
- ----- Declaring variables
- local tsE
- local tsQ
- local tsR
- local tsAA
- local target = heroManager:getHero(2)
- myHero = GetMyHero()
- local lastAttack, lastWindUpTime, lastAttackCD = 0, 0, 0
- local myTrueRange = 0
- PrintChat(" >> Darius - Wurf v1.0.3")
- -- OnLoad Functions
- function OnLoad()
- -- Creating Config Menu -- In-Game Menu --
- Config = scriptConfig("Darius - Wurf", "Darius Combo")
- Config:addSubMenu("drawing", "drawing")
- Config:addSubMenu("combo" , "combo")
- Config.drawing:addParam("drawCircle", "Draw Circle", SCRIPT_PARAM_ONOFF, true)
- Config.drawing:addParam("checkKillable", "Draw Killable", SCRIPT_PARAM_ONOFF, true)
- Config.combo:addParam("Combo", "E > W > Q > R", SCRIPT_PARAM_ONKEYDOWN, false, string.byte(" "))
- Config.combo:addParam("Harass", "Perfect Q- Harass", SCRIPT_PARAM_ONKEYTOGGLE, false, string.byte("T"))
- Config.combo:addParam("Yolo", "Cast Ult Low HP", SCRIPT_PARAM_ONOFF, false)
- Config.combo:permaShow("Combo")
- Config.combo:permaShow("Harass")
- myTrueRange = myHero.range + GetDistance(myHero.minBBox)
- -- Updating Target Finder/Target Selector
- tsE = TargetSelector(TARGET_LOW_HP_PRIORITY,540)
- tsQ = TargetSelector(TARGET_LOW_HP_PRIORITY,420)
- tsR = TargetSelector(TARGET_LOW_HP_PRIORITY,460)
- tsAA = TargetSelector(TARGET_LOW_HP_PRIORITY,325)
- end
- -- On Draw Functions
- function OnDraw()
- -- If DrawCircle config is true then display Circles
- if(Config.drawing.drawCircle) then
- DrawCircle(myHero.x, myHero.y, myHero.z, 420, 0xFF1919)
- DrawCircle(myHero.x, myHero.y, myHero.z, 540, 0xFF1919)
- DrawCircle(myHero.x, myHero.y, myHero.z, 460, 0xFF1919)
- end
- if not myHero.dead then
- if Config.drawing.checkKillable then checkKillable() end
- end
- end
- function checkKillable()
- for _, enemy in ipairs(GetEnemyHeroes()) do
- if ValidTarget(enemy) and enemy.visible then
- local qDmg = getDmg("Q", target, myHero,3)
- local rDmg = getDmg("R", target, myHero,3)
- if enemy.health <= (rDmg + qDmg) then
- DrawText3D(tostring("KILL HIM!!"), enemy.x, enemy.y, enemy.z, 20, ARGB(255, 225, 0, 00), true)
- elseif enemy.health >= (qDmg * 4) then
- DrawText3D(tostring("Just Wait"), enemy.x, enemy.y, enemy.z, 20, ARGB(255, 225, 0, 00), true)
- end
- end
- end
- end
- -- On tick Functions
- function OnTick()
- -- Update Target Finder/Target Selector
- tsE:update()
- tsQ:update()
- tsR:update()
- tsAA:update()
- -- If TargetSelected"R" is not equal to false then Get rDmg
- if (tsR ~= nil) then
- local rDmg = getDmg("R", target, myHero,3)
- end
- -- If Config for auto harass is true then if target in range and spell ready use spell
- if (Config.combo.Harass) then
- for _, enemy in ipairs(GetEnemyHeroes()) do
- if ValidTarget(enemy) and enemy.visible then
- if (tsQ.target ~= nil) and GetDistance(enemy) >= 271 and GetDistance(enemy) < 419 then
- if (myHero:CanUseSpell(_Q) == READY) then
- CastSpell(_Q, tsQ.target.x,tsQ.target.z)
- end
- end
- end
- end
- end
- -- if Config for Combo is true then perform functions
- if (Config.combo.Combo) then
- if (tsE.target ~= nil) then -- If target is not equal to false
- if (myHero:CanUseSpell(_E) == READY) then -- If my heros spell is available
- CastSpell(_E, tsE.target.x,tsE.target.z) -- Cast spell "E"
- if (myHero:CanUseSpell(_W) == READY) then -- If my heros spell is avaiable
- CastSpell(_W) -- Cast spell "W"
- end
- end
- if (myHero:CanUseSpell(_W) == READY) then CastSpell (_W) end
- end
- if (tsQ.target ~= nil) then -- If target is not equal to false
- if(myHero:CanUseSpell(_Q) == READY) then -- Can my hero use "Q"?
- CastSpell(_Q, tsQ.target.x,tsQ.target.z) -- Cast spell "Q"
- end
- end
- for _, enemy in ipairs(GetEnemyHeroes()) do
- if ValidTarget(enemy) and enemy.visible then -- If valid target enemy and the enemy visible
- local rDmg = getDmg("R", enemy, myHero, 3) -- Get damage for R, and apply to rDmg
- if enemy.health <= rDmg and GetDistance(enemy) <= 460 then -- If enemys health is less than R's Dmg
- if (tsR ~= nil) then
- if(myHero:CanUseSpell(_R) == READY) then -- If my hero can use R
- CastSpell(_R, tsR.target) -- Cast spell "R" on target.
- end
- end
- end
- end
- end
- end
- if (Config.combo.Combo) then
- _OrbWalk()
- end
- if (Config.combo.Yolo) then
- if (myHero.health <= myHero.maxHealth * 0.20) then
- for _, enemy in ipairs(GetEnemyHeroes()) do
- if ValidTarget(enemy) and enemy.visible then
- if GetDistance(enemy) < 460 then
- if (tsR ~= nil) then
- if(myHero:CanUseSpell(_R) == READY) then -- If my hero can use R
- CastSpell(_R, tsR.target) -- Cast spell "R" on target.
- end
- end
- end
- end
- end
- end
- end
- end
- function OnProcessSpell(object, spell)
- if object == myHero then
- if spell.name:lower():find("attack") then
- lastAttack = GetTickCount() - GetLatency()/2
- lastWindUpTime = spell.windUpTime*1000
- lastAttackCD = spell.animationTime*1000
- end
- end
- end
- function _OrbWalk()
- myTarget = GetTarget()
- if myTarget ~=nil and GetDistance(myTarget ) <= myTrueRange then
- if timeToShoot() then
- myHero:Attack(myTarget )
- elseif heroCanMove() then
- moveToCursor()
- end
- else
- moveToCursor()
- end
- end
- function heroCanMove()
- return (GetTickCount() + GetLatency()/2 > lastAttack + lastWindUpTime + 20)
- end
- function timeToShoot()
- return (GetTickCount() + GetLatency()/2 > lastAttack + lastAttackCD)
- end
- function moveToCursor()
- if GetDistance(mousePos) > 1 then
- local moveToPos = myHero + (Vector(mousePos) - myHero):normalized()*300
- myHero:MoveTo(moveToPos.x, moveToPos.z)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement