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

Untitled

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