Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 20th, 2012  |  syntax: None  |  size: 3.43 KB  |  hits: 16  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. if player == nil then player = GetMyHero() end
  2. if player.charName ~= "Twitch" then return end
  3.  
  4. targetFindRange = 1200
  5. eRange = 1200
  6. poisonTimeOut = 600
  7. enemies = {}
  8.  
  9.         poisonTable =
  10. {
  11.                 [1] = "Data\\Particles\\twitch_poison_counter_01.troy",
  12.                 [2] = "Data\\Particles\\twitch_poison_counter_02.troy",
  13.                 [3] = "Data\\Particles\\twitch_poison_counter_03.troy",
  14.                 [4] = "Data\\Particles\\twitch_poison_counter_04.troy",
  15.                 [5] = "Data\\Particles\\twitch_poison_counter_05.troy",
  16. }
  17.  
  18.         damageTable =
  19. {
  20.                 E = { base = 20, baseScale = 15 },
  21. }
  22.                
  23.  
  24.                                 --[[    local function hasShield(enemy)
  25. for i =1, enemy:buffCount, 1 do
  26.  
  27. local buff = enemy:GetBuff(i)
  28.         if buff and (buff == "SpellShield" or buff == "bansheesveil" or buff == "UndyingRage or buff == "JudicatorIntervention" or buff  = "NocturneShroudofDarkness") then
  29.        
  30.         PrintChat(enemy.charName .. " has " .. buff .. ", let's not cast E right now .. "\
  31.        
  32.         return true
  33.        
  34.         end
  35. end
  36.  
  37. return false
  38.                                         end ]]
  39.  
  40.                                         function tickHandler(tick)
  41.  
  42. local eDmg = (damageTable.E.base + (damageTable.E.baseScale * player:GetSpellLevel(_E)))
  43.                
  44.         for i, enemy in pairs(enemies) do
  45.                                
  46.                 if (GetTick() - enemy.poison.tick > poisonTimeOut) or (enemy and enemy.dead) then enemy.poison.count = 0
  47.         end
  48.        
  49.                                
  50.                 if enemy and not enemy.dead and enemy.visible then
  51.                         if eDmg + (enemy.poison.count * 15)  + (enemy.poison.count * .2 * player.ap) + (enemy.poison.count * .25 * player.addDamage) > (enemy.health) and CanUseSpell (Slots._E) == SpellState.READY and player:GetDistanceTo(enemy) < eRange then
  52.                                 CastSpell(_E)
  53.                                 enemy.pauseTickE = GetTick()
  54.                        
  55.                 --[[       if  rDmg * ( 1.0 + rDmgRatioPerHemo * enemy.hemo.count ) > (enemy.health+33) and CanUseSpell(Slots._R) == SpellState.READY and player:GetDistanceTo(enemy) < rRange and not hasShield(enemy) then
  56.                                         CastSpell(Slots._R,enemy)
  57.                                         enemy.pauseTickR = GetTick()
  58.                                 end]]
  59.                         end
  60.                 end
  61.  
  62.  
  63. end                                     end    
  64.  
  65.                                 function objectHandler( object )
  66.         if object and string.find(string.lower(object.name),"twitch_poison_counter") then
  67.                 for i, enemy in pairs(enemies) do
  68.                         if enemy and not enemy.dead and enemy.visible and object:GetDistanceTo(enemy) <= targetFindRange then
  69.                                 for k, poison in pairs(poisonTable) do
  70.                                         if object.name == poison then enemy.poison.tick = GetTick() enemy.poison.count = k end
  71.                                 end
  72.                         end
  73.                 end
  74.         end
  75.         end
  76.  
  77.                                 function doE()
  78.          
  79.                 local playerObj = nil
  80.                                 for i = 1, heroManager.iCount-1, 1 do
  81.                                                 playerObj = heroManager:getHero(i)
  82.                                                 if playerObj ~= nil and playerObj.visible and playerObj:GetDistance(myHero) < eRange and obj.team ==    1200 then
  83.                                                                 table.insert(enemies, playerObj)
  84.                                  playerObj.poison = { tick = 0, count = 0, }                
  85.                                   playerObj.pauseTickE = 0
  86.                                                 end
  87.                                 end
  88.  
  89. end
  90. BoL:addCreateObjHandler(objectHandler)
  91. BoL:addTickHandler(tickhandler)
  92.  
  93. PrintChat(" >> Expunge GG")