Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local vayne = false
- if myHero.charName == "Vayne" then
- vayne = true
- end
- local lastmove = 0
- local menu = MenuElement({id = "ParaMenu", name = "ParaOrb", type = MENU})
- menu:MenuElement({id = "combo", name = "Combo Key", key = string.byte(" ")})
- function Orb()
- local et = myHero.attackData.endTime
- local wd = myHero.attackData.windDownTime
- if vayne then
- if Ready(_Q) and Game.Timer() > et - wd - 0.75 and Game.Timer() < et - (wd*0.25) then
- Control.CastSpell(HK_Q, mousePos)
- end
- end
- local t = GetAATarget(myHero.range + myHero.boundingRadius)
- if t == nil then
- if Game.Timer() > et - wd - 0.75 and GetTickCount() > lastmove + 175 then
- lastmove = GetTickCount()
- Control.Move()
- end
- return
- end
- if Game.Timer() > et then
- Control.Attack(t)
- return
- end
- if Game.Timer() > et - wd - 0.75 and GetTickCount() > lastmove + 175 then
- lastmove = GetTickCount()
- Control.Move()
- end
- end
- Callback.Add("Tick", function()
- if menu.combo:Value() then
- Orb()
- end
- end)
- function ValidTarget(range, enemy)
- if enemy.distance < range and enemy.valid and not enemy.dead and enemy.isTargetable and enemy.visible then
- return true
- end
- return false
- end
- function GetAATarget(range)
- local t = nil
- num = 10000
- for i = 1, Game.HeroCount() do
- local enemy = Game.Hero(i)
- if enemy.isEnemy then
- local armor = enemy.armor
- local hp = enemy.health * (armor/(armor+100))
- if ValidTarget(range+enemy.boundingRadius, enemy) then
- if hp < num then
- num = hp
- t = enemy
- end
- end
- end
- end
- return t
- end
- function HasQBuff(slot)
- for i = 0, myHero.buffCount do
- local buff = myHero:GetBuff(i)
- if buff.count > 0 and buff.name == "vaynetumblebonus" then
- return true
- end
- end
- return false
- end
- function Ready(slot)
- return (not HasQBuff(slot) and myHero:GetSpellData(slot).level >= 1 and myHero:GetSpellData(slot).currentCd == 0 and myHero.mana > myHero:GetSpellData(slot).mana)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement