AnonymousBOL

aOrianna v1.0 ( REBORN )

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