AnonymousBOL

aOrianna v1.0 ( REVAMPED )

Oct 30th, 2013
1,264
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.50 KB | None | 0 0
  1. if myHero.charName ~= "Orianna" then return end
  2.  
  3. local Target
  4. local Ball = myHero
  5. local BallMoving = false
  6. local LastQ = 0
  7. local Enemies = AutoCarry.EnemyTable
  8.  
  9. function PluginOnLoad()
  10.     SkillQ = {spellKey = _Q, range = 825, speed = 1.2, delay = 250, width = 80}
  11.     AutoCarry.SkillsCrosshair.range = 900
  12. end
  13.  
  14. function PluginBonusLastHitDamage(minion)
  15.     return getDmg("P", minion, myHero)
  16. end
  17.  
  18. function PluginOnTick()
  19.     Target = AutoCarry.GetAttackTarget()
  20.     if not BallMoving then
  21.         local CanW = (myHero:CanUseSpell(_W) == READY)
  22.         if AutoCarry.PluginMenu.autoHarras then
  23.             if Target ~= nil then
  24.                 if myHero.mana/myHero.maxMana*100 >= AutoCarry.PluginMenu.autoMinMana then
  25.                     AutoCarry.CastSkillshot(SkillQ, Target)
  26.                     if Ball ~= nil and Ball ~= myHero and GetDistance(Ball, Target) < 250 and LastQ < GetTickCount() + 100 and CanW then CastSpell(_W) end
  27.                 end
  28.             end
  29.         end
  30.         if AutoCarry.PluginMenu.comboHelper and AutoCarry.MainMenu.AutoCarry then
  31.             if Target ~= nil then
  32.                 AutoCarry.CastSkillshot(SkillQ, Target)
  33.                 if Ball ~= nil and GetDistance(Ball, Target) < 250 and LastQ < GetTickCount() + 100 and CanW then CastSpell(_W) end
  34.                 if Ball ~= nil and Ball ~= myHero then
  35.                     local CanHit = checkhitlinepass(Ball, myHero, 30, 1100, Target, GetDistance(Target, Target.minBBox)/2)
  36.                     local CanE = (myHero:CanUseSpell(_E) == READY)
  37.                     if CanHit and CanE then CastSpell(_E, myHero) end
  38.                 end
  39.             end
  40.         end
  41.         if AutoCarry.PluginMenu.autoUlt then
  42.             local ValidTargets = 0
  43.             for i, Enemy in pairs(Enemies) do
  44.                 if Enemy ~= nil and not Enemy.dead and Enemy.visible and GetDistance(Ball, Enemy) < 400 then ValidTargets = ValidTargets + 1 end
  45.             end
  46.             if ValidTargets >= AutoCarry.PluginMenu.autoMinEnemies and myHero.mana >= 100 then CastSpell(_R) end
  47.         end
  48.         if AutoCarry.PluginMenu.KillUlt then
  49.             local KillableTargets = 0
  50.             for i, Enemy in pairs(Enemies) do
  51.                 if Enemy ~= nil and not Enemy.dead and Enemy.visible and GetDistance(Ball, Enemy) < 400 and getDmg("R", Enemy, myHero) >= Enemy.health then KillableTargets = KillableTargets + 1 end
  52.             end
  53.             if KillableTargets >= AutoCarry.PluginMenu.KillMinEnemies and myHero.mana >= 100 then CastSpell(_R) end
  54.         end
  55.     end
  56. end
  57.  
  58. function PluginOnDraw()
  59.     if Ball ~= nil and not Ball.isMe and AutoCarry.PluginMenu.drawReturnRange then DrawCircle(Ball.x, Ball.y, Ball.z, 1325, 0xFF80FF00) end
  60. end
  61.  
  62. function PluginOnProcessSpell(unit, spell)
  63.     if unit.isMe and spell.name == "OrianaRedactCommand" then
  64.         Ball = spell.target
  65.         BallMoving = false
  66.     end
  67.     if unit.isMe and spell.name == "OrianaIzunaCommand" then
  68.         BallMoving = true
  69.         LastQ = GetTickCount()
  70.     end
  71. end
  72.  
  73. function PluginOnCreateObj(obj)
  74.     if obj == nil or obj.name == nil then return end
  75.     if (obj.name:find("yomu_ring_green")) then
  76.         Ball = obj
  77.         BallMoving = false
  78.     end
  79.     if (obj.name:find("Orianna_Ball_Flash_Reverse")) then
  80.         Ball = myHero
  81.         BallMoving = false
  82.     end
  83. end
  84.  
  85. function PluginOnSendPacket(p)
  86.     local packet = Packet(p)
  87.     if packet:get('name') == 'S_CAST' then
  88.         local SpellID = packet:get('spellId')
  89.         if SpellID == SPELL_4 then
  90.             local ValidTargets = 0
  91.             for i, Enemy in pairs(Enemies) do
  92.                 if Enemy ~= nil and not Enemy.dead and Enemy.visible and GetDistance(Ball, Enemy) < 400 then ValidTargets = ValidTargets + 1 end
  93.             end
  94.             if ValidTargets == 0 then p:Block() end
  95.         end
  96.     end
  97. end
  98.  
  99. AutoCarry.PluginMenu:addParam("Information1", "  aOrianna v1.0 by Anonymous", SCRIPT_PARAM_INFO, "")
  100. AutoCarry.PluginMenu:addParam("Information2", "== Auto-Settings: ==", SCRIPT_PARAM_INFO, "")
  101. AutoCarry.PluginMenu:addParam("autoHarras","Automaticly Harras", SCRIPT_PARAM_ONOFF, true)
  102. AutoCarry.PluginMenu:addParam("autoMinMana","Minimum % mana", SCRIPT_PARAM_SLICE, 35, 0, 100, 0)
  103. AutoCarry.PluginMenu:addParam("autoUlt","Automaticly ultimate", SCRIPT_PARAM_ONOFF, true)
  104. AutoCarry.PluginMenu:addParam("autoMinEnemies","if can catch X enemies:", SCRIPT_PARAM_SLICE, 3, 1, 5, 0)
  105. AutoCarry.PluginMenu:addParam("KillUlt","Automaticly kill with ultimate", SCRIPT_PARAM_ONOFF, true)
  106. AutoCarry.PluginMenu:addParam("KillMinEnemies","if can kill X enemies:", SCRIPT_PARAM_SLICE, 3, 1, 5, 0)
  107. AutoCarry.PluginMenu:addParam("Information2", "== Helper-Settings: ==", SCRIPT_PARAM_INFO, "")
  108. AutoCarry.PluginMenu:addParam("comboHelper","Combo in AutoCarry mode", SCRIPT_PARAM_ONOFF, true)
  109. AutoCarry.PluginMenu:addParam("shieldInCombo","Use shield to damage enemy", SCRIPT_PARAM_ONOFF, true)
  110. AutoCarry.PluginMenu:addParam("drawReturnRange","Draw return range of ball", SCRIPT_PARAM_ONOFF, true)
Advertisement
Add Comment
Please, Sign In to add comment