Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Version Check 2.9 Fixes for Brand logic (now checks for blaze(passive)) before shooting Q to unit location.
- --Fixed nidalee logic (no more tansform to cougar after Q is hit)
- -- Yasuo
- if GetObjectName(GetMyHero()) == "Yasuo" then
- --Menu
- Config = scriptConfig("Yasuo", "Yasuo")
- Config.addParam("Q", "Use Q", SCRIPT_PARAM_ONOFF, true)
- Config.addParam("W", "Use W", SCRIPT_PARAM_ONOFF, true)
- Config.addParam("E", "Use E", SCRIPT_PARAM_ONOFF, true)
- Config.addParam("R", "Use R", SCRIPT_PARAM_ONOFF, true)
- Config.addParam("F", "E to Minion (Combo)", SCRIPT_PARAM_ONOFF, true)
- Config.addParam("Combo", "Combo", SCRIPT_PARAM_KEYDOWN, string.byte(" "))
- --Start
- OnLoop(function(myHero)
- local unit = GetCurrentTarget()
- AutoIgnite()
- if Config.Combo then
- if ValidTarget(unit, 1550) then
- -- Gang Q
- if Config.Q then
- local QPred = GetPredictionForPlayer(GetMyHeroPos(),unit,GetMoveSpeed(unit),1700,250,GetCastRange(myHero, _Q),50,false,true)
- if CanUseSpell(myHero, _Q) == READY and IsInDistance(unit, 1200) and QPred.HitChance == 1 then
- CastSkillShot(_Q,QPred.PredPos.x,QPred.PredPos.y,QPred.PredPos.z)
- end
- end
- -- Yasuo E
- if GetCastName(myHero, _E) == "YasuoDashWrapper" then
- if Config.E then
- if CanUseSpell(myHero, _E) == READY and IsInDistance(unit, 475) then
- CastTargetSpell(unit,_E)
- end
- end
- end
- -- Yasuo R
- if Config.R then
- if (GetCurrentHP(unit)/GetMaxHP(unit))<0.6 and
- CanUseSpell(myHero, _R) == READY and IsObjectAlive(unit) and IsInDistance(unit, 1200) then
- CastTargetSpell(unit, _R)
- end
- end
- end
- end
- end)
- OnLoop(function(myHero)
- if Config.Combo then
- if Config.F then
- for _,Q in pairs(GetAllMinions(MINION_ENEMY)) do
- local targetPos = GetOrigin(Q)
- local drawPos = WorldToScreen(1,targetPos.x,targetPos.y,targetPos.z)
- local hp = GetCurrentHP(Q)
- local dmg = CalcDamage(myHero, Q, GetBonusDmg(myHero)+GetBaseDamage(myHero))
- local unit = GetCurrentTarget()
- if dmg < hp or dmg > hp then
- if unit == nil then return end
- elseif GotBuff(unit, "YasuoDashWrapper") > 1 then return end
- if GetCastName(myHero, _E) == "YasuoDashWrapper" then
- if CanUseSpell(myHero, _E) == READY and IsInDistance(Q, 475) then
- CastTargetSpell(Q,_E)
- end
- end
- end
- end
- end
- end)
- OnProcessSpell(function(unit, spell) -- All of this is from ispired
- myHero = GetMyHero()
- if Config.W and unit and GetTeam(unit) ~= GetTeam(myHero) and GetObjectType(unit) == GetObjectType(myHero) and GetDistance(unit) < 1500 then
- if myHero == spell.target and spell.name:lower():find("attack") and GetRange(unit) >= 450 and CalcDamage(unit, myHero, GetBonusDmg(unit)+GetBaseDamage(unit))/GetCurrentHP(myHero) > 0.1337 then
- local wPos = GenerateWallPos(GetOrigin(unit))
- CastSkillShot(_W, wPos.x, wPos.y, wPos.z)
- elseif spell.endPos then
- local makeUpPos = GenerateSpellPos(GetOrigin(unit), spell.endPos, GetDistance(unit, myHero))
- if GetDistanceSqr(makeUpPos) < (GetHitBox(myHero)*3)^2 or GetDistanceSqr(spell.endPos) < (GetHitBox(myHero)*3)^2 then
- local wPos = GenerateWallPos(GetOrigin(unit))
- CastSkillShot(_W, wPos.x, wPos.y, wPos.z)
- end
- end
- end
- end)
- function GenerateWallPos(unitPos)
- local tV = {x = (unitPos.x-GetMyHeroPos().x), z = (unitPos.z-GetMyHeroPos().z)}
- local len = math.sqrt(tV.x * tV.x + tV.z * tV.z)
- return {x = GetMyHeroPos().x + 400 * tV.x / len, y = 0, z = GetMyHeroPos().z + 400 * tV.z / len}
- end
- function GenerateSpellPos(unitPos, spellPos, range)
- local tV = {x = (spellPos.x-unitPos.x), z = (spellPos.z-unitPos.z)}
- local len = math.sqrt(tV.x * tV.x + tV.z * tV.z)
- return {x = unitPos.x + range * tV.x / len, y = 0, z = unitPos.z + range * tV.z / len}
- end -- Inspireds END
- PrintChat(string.format("<font color='#1244EA'>[CloudAIO]</font> <font color='#FFFFFF'>Yasuo Loaded</font>"))
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement