Illprotectjew

Draven Axe Catcher (IPJ Edition) v 1.3

Jun 4th, 2013
661
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.16 KB | None | 0 0
  1. local key = 90
  2. local script_loaded=1
  3.  
  4. local active = false
  5. local myHero = GetSelf()
  6. require "utils"
  7.     DravenConfig = scriptConfig('Draven Config', 'dravenconfig')
  8.     DravenConfig:addParam('catchaxe', 'CatchAxe', SCRIPT_PARAM_ONKEYTOGGLE, true, key)
  9.     DravenConfig:permaShow('catchaxe')
  10.  
  11. function OnCreateObj(obj)
  12.     if obj ~= nil and DravenConfig.catchaxe then
  13.         if string.find(obj.charName, "Draven_Q_reticle") then
  14.             if GetDistance(obj,myHero)<200 then
  15.                 MoveToXYZ(obj.x,obj.y,obj.z)
  16.             end
  17.             if GetDistance(obj,myHero)>200 and GetDistance(obj,myHero)<700 then
  18.                 --CastSpellTarget('W',myHero)
  19.                 MoveToXYZ(obj.x,obj.y,obj.z)
  20.             end
  21.             if GetDistance(obj) < 40 then StopMove() end
  22.         end
  23.         if string.find(obj.charName, "Draven_Q_ReticleCatchSuccess") then
  24.             local target = GetWeakEnemy('PHYS',600,'NEARMOUSE')
  25.             if (target~=nil) then
  26.                 AttackTarget(target)
  27.             else
  28.                 target = GetWeakEnemy('PHYS',900,'NEARMOUSE')
  29.                 if (target~=nil) and GetDistance(target,myHero)>400 then
  30.                     --CastSpellTarget('W',myHero)
  31.                     AttackTarget(target)
  32.                 end
  33.             end
  34.         end
  35.     end
  36. end
  37. function sample_CallBackDraven()
  38. end
  39.  
  40. SetTimerCallback("sample_CallBackDraven")
Advertisement
Add Comment
Please, Sign In to add comment