Advertisement
Cloudhax23

Untitled

Aug 12th, 2015
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.17 KB | None | 0 0
  1. -- Version Check 2.9 Fixes for Brand logic (now checks for blaze(passive)) before shooting Q to unit location.
  2. --Fixed nidalee logic (no more tansform to cougar after Q is hit)
  3.  
  4. -- Yasuo
  5. if GetObjectName(GetMyHero()) == "Yasuo" then
  6. --Menu
  7. Config = scriptConfig("Yasuo", "Yasuo")
  8. Config.addParam("Q", "Use Q", SCRIPT_PARAM_ONOFF, true)
  9. Config.addParam("W", "Use W", SCRIPT_PARAM_ONOFF, true)
  10. Config.addParam("E", "Use E", SCRIPT_PARAM_ONOFF, true)
  11. Config.addParam("R", "Use R", SCRIPT_PARAM_ONOFF, true)
  12. Config.addParam("F", "E to Minion (Combo)", SCRIPT_PARAM_ONOFF, true)
  13. Config.addParam("Combo", "Combo", SCRIPT_PARAM_KEYDOWN, string.byte(" "))
  14. --Start
  15. OnLoop(function(myHero)
  16. local unit = GetCurrentTarget()
  17. AutoIgnite()
  18. if Config.Combo then
  19. if ValidTarget(unit, 1550) then
  20. -- Gang Q
  21.  
  22. if Config.Q then
  23. local QPred = GetPredictionForPlayer(GetMyHeroPos(),unit,GetMoveSpeed(unit),1700,250,GetCastRange(myHero, _Q),50,false,true)
  24. if CanUseSpell(myHero, _Q) == READY and IsInDistance(unit, 1200) and QPred.HitChance == 1 then
  25. CastSkillShot(_Q,QPred.PredPos.x,QPred.PredPos.y,QPred.PredPos.z)
  26. end
  27. end
  28. -- Yasuo E
  29. if GetCastName(myHero, _E) == "YasuoDashWrapper" then
  30. if Config.E then
  31. if CanUseSpell(myHero, _E) == READY and IsInDistance(unit, 475) then
  32. CastTargetSpell(unit,_E)
  33. end
  34. end
  35. end
  36. -- Yasuo R
  37. if Config.R then
  38. if (GetCurrentHP(unit)/GetMaxHP(unit))<0.6 and
  39. CanUseSpell(myHero, _R) == READY and IsObjectAlive(unit) and IsInDistance(unit, 1200) then
  40. CastTargetSpell(unit, _R)
  41. end
  42. end
  43. end
  44. end
  45. end)
  46.  
  47. OnLoop(function(myHero)
  48. if Config.Combo then
  49. if Config.F then
  50. for _,Q in pairs(GetAllMinions(MINION_ENEMY)) do
  51. local targetPos = GetOrigin(Q)
  52. local drawPos = WorldToScreen(1,targetPos.x,targetPos.y,targetPos.z)
  53. local hp = GetCurrentHP(Q)
  54. local dmg = CalcDamage(myHero, Q, GetBonusDmg(myHero)+GetBaseDamage(myHero))
  55. local unit = GetCurrentTarget()
  56. if dmg < hp or dmg > hp then
  57. if unit == nil then return end
  58. elseif GotBuff(unit, "YasuoDashWrapper") > 1 then return end
  59. if GetCastName(myHero, _E) == "YasuoDashWrapper" then
  60. if CanUseSpell(myHero, _E) == READY and IsInDistance(Q, 475) then
  61. CastTargetSpell(Q,_E)
  62. end
  63.  
  64. end
  65. end
  66. end
  67.  
  68. end
  69. end)
  70. OnProcessSpell(function(unit, spell) -- All of this is from ispired
  71. myHero = GetMyHero()
  72. if Config.W and unit and GetTeam(unit) ~= GetTeam(myHero) and GetObjectType(unit) == GetObjectType(myHero) and GetDistance(unit) < 1500 then
  73. 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
  74. local wPos = GenerateWallPos(GetOrigin(unit))
  75. CastSkillShot(_W, wPos.x, wPos.y, wPos.z)
  76. elseif spell.endPos then
  77. local makeUpPos = GenerateSpellPos(GetOrigin(unit), spell.endPos, GetDistance(unit, myHero))
  78. if GetDistanceSqr(makeUpPos) < (GetHitBox(myHero)*3)^2 or GetDistanceSqr(spell.endPos) < (GetHitBox(myHero)*3)^2 then
  79. local wPos = GenerateWallPos(GetOrigin(unit))
  80. CastSkillShot(_W, wPos.x, wPos.y, wPos.z)
  81. end
  82. end
  83. end
  84. end)
  85. function GenerateWallPos(unitPos)
  86. local tV = {x = (unitPos.x-GetMyHeroPos().x), z = (unitPos.z-GetMyHeroPos().z)}
  87. local len = math.sqrt(tV.x * tV.x + tV.z * tV.z)
  88. return {x = GetMyHeroPos().x + 400 * tV.x / len, y = 0, z = GetMyHeroPos().z + 400 * tV.z / len}
  89. end
  90.  
  91. function GenerateSpellPos(unitPos, spellPos, range)
  92. local tV = {x = (spellPos.x-unitPos.x), z = (spellPos.z-unitPos.z)}
  93. local len = math.sqrt(tV.x * tV.x + tV.z * tV.z)
  94. return {x = unitPos.x + range * tV.x / len, y = 0, z = unitPos.z + range * tV.z / len}
  95. end -- Inspireds END
  96. PrintChat(string.format("<font color='#1244EA'>[CloudAIO]</font> <font color='#FFFFFF'>Yasuo Loaded</font>"))
  97. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement