Advertisement
H3stia

Urgot.lua

Feb 13th, 2013
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.31 KB | None | 0 0
  1. --[[    Hestia's Urgot 1.0
  2.  
  3. Credits: Hestia, PwnNinja, HeX
  4.  
  5. Hot Keys:
  6.     -Basic Combo: Spacebar
  7.  
  8. Features:
  9.     -Basic Combo: Spam Q on target
  10.     -Manual E in combo ON/OFF option in ingame menu.
  11.     -Target configuration, Press shift to configure.
  12.     -Auto ignite and/or Ulti killable enemy ON/OFF option in ingame menu.
  13.     -Q range on toggle.
  14. ]]--
  15. if myHero.charName ~= "Urgot" then return end
  16. --[[ Ranges ]]--
  17. local qRange = 1000
  18. local eRange = 900
  19.  
  20. --[[    Prediction  ]]--
  21. local ep = TargetPrediction(900, 1.44, 250)
  22.  
  23. local poisonedtimets = 0
  24. local poisonedtime = {}
  25. local poisontime = 0
  26.  
  27. --[[    Ignite  ]]--
  28. local ignite = nil
  29. local QREADY, EREADY = false, false
  30.  
  31.  
  32. function OnLoad()
  33.     PrintChat("<font color='#CCCCCC'> >> Hestia's Urgot 1.0 loaded! <<</font>")
  34.     UrgotConfig = scriptConfig("Urgot Settings", "Q Spammer")
  35.     UrgotConfig:addParam("scriptActive", "Combo", SCRIPT_PARAM_ONKEYDOWN, false, 32)
  36.     UrgotConfig:addParam("toggleE", "Manual E", SCRIPT_PARAM_ONOFF, true, 85)
  37.     UrgotConfig:addParam("autoignite", "Ignite when Killable", SCRIPT_PARAM_ONOFF, true)
  38.     UrgotConfig:addParam("drawcirclesSelf", "Draw Circles - Self", SCRIPT_PARAM_ONOFF, false)
  39.     UrgotConfig:permaShow("scriptActive")
  40.     UrgotConfig:permaShow("toggleE")
  41.     ts = TargetSelector(TARGET_LOW_HP,eRange,DAMAGE_PHYSICAL)
  42.     ts.name = "Urgot"
  43.     UrgotConfig:addTS(ts)
  44.     for i=1, heroManager.iCount do
  45.         poisonedtime[i] = 0
  46.     end
  47.     if myHero:GetSpellData(SUMMONER_1).name:find("SummonerDot") then ignite = SUMMONER_1
  48.         elseif myHero:GetSpellData(SUMMONER_2).name:find("SummonerDot") then ignite = SUMMONER_2
  49.     end
  50. end
  51.  
  52. function OnCreateObj(obj)
  53.     if obj ~= nil and string.find(obj.name, "UrgotCorrosiveDebuff_buf") then
  54.         for i=1, heroManager.iCount do
  55.             local enemy = heroManager:GetHero(i)
  56.             if enemy.team ~= myHero.team and GetDistance(obj,enemy) < 80 then
  57.             poisonedtime[i] = GetTickCount()
  58.             end
  59.         end
  60.     end
  61. end
  62.  
  63. function OnTick()
  64.     ts:update()
  65.    
  66.     if ts.target ~= nil then
  67.         ePred = ep:GetPrediction(ts.target)
  68.     end
  69.    
  70.     IREADY = (ignite ~= nil and myHero:CanUseSpell(ignite) == READY)
  71.     QREADY = (myHero:CanUseSpell(_Q) == READY)
  72.     EREADY = (myHero:CanUseSpell(_E) == READY)
  73.    
  74.     if ts.target ~= nil then
  75.         for i=1, heroManager.iCount do
  76.             local enemy = heroManager:GetHero(i)
  77.             if enemy.team ~= player.team and enemy.charName == ts.target.charName then
  78.                 poisonedtimets = poisonedtime[i]
  79.             end
  80.         end
  81.     end
  82.    
  83.     --[[    Auto Ignite ]]--
  84.     if UrgotConfig.autoignite then    
  85.         if IREADY then
  86.             local ignitedmg = 0    
  87.             for i = 1, heroManager.iCount, 1 do
  88.                 local enemyhero = heroManager:getHero(i)
  89.                 if ValidTarget(enemyhero,600) then
  90.                     ignitedmg = 50 + 20 * myHero.level
  91.                     if enemyhero.health <= ignitedmg then
  92.                         CastSpell(ignite, enemyhero)
  93.                     end
  94.                 end
  95.             end
  96.         end
  97.     end
  98.    
  99.     --[[    Combo   ]]--
  100.     if ts.target ~= nil and UrgotConfig.scriptActive then
  101.     if EREADY and not UrgotConfig.toggleE and ePred ~= nil and GetDistance(ts.target) < eRange then
  102.         CastSpell(_E, ePred.x, ePred.z)
  103.     end
  104.     if UrgotConfig.scriptActive and ts.target ~= nil and myHero:GetDistance(ts.target) < qRange and GetTickCount()-poisonedtimets < 5000 then
  105.         CastSpell(_Q, ts.target.x, ts.target.z)
  106.     end
  107.     end
  108. end
  109.  
  110. function OnDraw()
  111.     if UrgotConfig.drawcirclesSelf and not myHero.dead then
  112.         DrawCircle(myHero.x,myHero.y,myHero.z, qRange, 0x00FF00)
  113.     end
  114. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement