16HeX16

Jarvan Helper 1.1.5

Mar 30th, 2013
3,527
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 5.82 KB | None | 0 0
  1. --[[    Jarvan Helper by HeX 1.1.5  ]]--
  2.  
  3.  
  4.  
  5. if myHero.charName ~= "JarvanIV" then return end
  6.  
  7. --[[    Ranges  ]]--
  8.  
  9. local Range = 800
  10.  
  11. local wRange = 600
  12.  
  13. local eDelay = 200
  14.  
  15. local eBuffer = 50
  16.  
  17. --[[    Code    ]]--
  18.  
  19. local Dstandard
  20.  
  21. local ignite = nil
  22.  
  23. local QREADY, WREADY, EREADY = false, false, false
  24.  
  25. local BRKSlot, DFGSlot, HXGSlot, BWCSlot, TMTSlot, RAHSlot, RNDSlot = nil, nil, nil, nil, nil, nil, nil
  26.  
  27. local BRKREADY, DFGREADY, HXGREADY, BWCREADY, TMTREADY, RAHREADY, RNDREADY = false, false, false, false, false, false, false
  28.  
  29.  
  30.  
  31. function OnLoad()
  32.  
  33.     PrintChat("<font color='#CCCCCC'> >> Jarvan Helper 1.1.5 loaded! <<</font>")
  34.  
  35.     JHConfig = scriptConfig("Jarvan Helper", "JarvanHelper")
  36.  
  37.     JHConfig:addParam("scriptActive", "Combo", SCRIPT_PARAM_ONKEYDOWN, false, 32)
  38.  
  39.     JHConfig:addParam("escape", "Escape Mode", SCRIPT_PARAM_ONKEYDOWN, false, 71)
  40.  
  41.     JHConfig:addParam("Harass", "Harass", SCRIPT_PARAM_ONKEYTOGGLE, false, 90)
  42.  
  43.     JHConfig:addParam("mouseCombo", "Aim at mouse in Combo", SCRIPT_PARAM_ONOFF, false)
  44.  
  45.     JHConfig:addParam("autoignite", "Auto Ignite Killable", SCRIPT_PARAM_ONOFF, true)
  46.  
  47.     JHConfig:addParam("drawcirclesSelf", "Draw Circles - Self", SCRIPT_PARAM_ONOFF, false)
  48.  
  49.     JHConfig:addParam("drawcirclesEnemy", "Draw Circles - Enemy", SCRIPT_PARAM_ONOFF, false)
  50.  
  51.     JHConfig:permaShow("scriptActive")
  52.  
  53.     JHConfig:permaShow("Harass")
  54.  
  55.     ts = TargetSelector(TARGET_LOW_HP, Range+50, DAMAGE_PHYSICAL)
  56.  
  57.     ts.name = "JarvanIV"
  58.  
  59.     JHConfig:addTS(ts)
  60.  
  61.    
  62.  
  63.     if myHero:GetSpellData(SUMMONER_1).name:find("SummonerDot") then ignite = SUMMONER_1
  64.  
  65.         elseif myHero:GetSpellData(SUMMONER_2).name:find("SummonerDot") then ignite = SUMMONER_2
  66.  
  67.     end
  68.  
  69. end
  70.  
  71.  
  72.  
  73. function OnTick()
  74.  
  75.     ts:update()
  76.  
  77.     BRKSlot, DFGSlot, HXGSlot, BWCSlot, TMTSlot, RAHSlot, RNDSlot = GetInventorySlotItem(3153), GetInventorySlotItem(3128), GetInventorySlotItem(3146), GetInventorySlotItem(3144), GetInventorySlotItem(3077), GetInventorySlotItem(3074),  GetInventorySlotItem(3143)
  78.  
  79.     DFGREADY = (DFGSlot ~= nil and myHero:CanUseSpell(DFGSlot) == READY)
  80.  
  81.     HXGREADY = (HXGSlot ~= nil and myHero:CanUseSpell(HXGSlot) == READY)
  82.  
  83.     BWCREADY = (BWCSlot ~= nil and myHero:CanUseSpell(BWCSlot) == READY)
  84.  
  85.     BRKREADY = (BRKSlot ~= nil and myHero:CanUseSpell(BRKSlot) == READY)
  86.  
  87.     TMTREADY = (TMTSlot ~= nil and myHero:CanUseSpell(TMTSlot) == READY)
  88.  
  89.     RAHREADY = (RAHSlot ~= nil and myHero:CanUseSpell(RAHSlot) == READY)
  90.  
  91.     RNDREADY = (RNDSlot ~= nil and myHero:CanUseSpell(RNDSlot) == READY)
  92.  
  93.     IREADY = (ignite ~= nil and myHero:CanUseSpell(ignite) == READY)
  94.  
  95.     QREADY = (myHero:CanUseSpell(_Q) == READY)
  96.  
  97.     WREADY = (myHero:CanUseSpell(_W) == READY)
  98.  
  99.     EREADY = (myHero:CanUseSpell(_E) == READY)
  100.  
  101.  
  102.  
  103.     --[[    Auto Ignite ]]--
  104.  
  105.     if JHConfig.autoignite then    
  106.  
  107.         if IREADY then
  108.  
  109.             local ignitedmg = 0    
  110.  
  111.             for i = 1, heroManager.iCount, 1 do
  112.  
  113.                 local enemyhero = heroManager:getHero(i)
  114.  
  115.                 if ValidTarget(enemyhero,600) then
  116.  
  117.                     ignitedmg = 50 + 20 * myHero.level
  118.  
  119.                     if enemyhero.health <= ignitedmg then
  120.  
  121.                         CastSpell(ignite, enemyhero)
  122.  
  123.                     end
  124.  
  125.                 end
  126.  
  127.             end
  128.  
  129.         end
  130.  
  131.     end
  132.  
  133.    
  134.  
  135.     --[[    Prediction  ]]--
  136.  
  137.     if ts.target ~= nil then
  138.  
  139.         predic = GetPredictionPos(ts.target, eDelay)
  140.  
  141.     end
  142.  
  143.     if predic ~= nil and not myHero.dead and ts.target ~= nil then
  144.  
  145.         TargetPos = Vector(predic.x, predic.y, predic.z)
  146.  
  147.         MyPos = Vector(myHero.x, myHero.y, myHero.z)
  148.  
  149.         TruePos = TargetPos + (TargetPos-MyPos)*((eBuffer/GetDistance(ts.target)))
  150.  
  151.     end
  152.  
  153.    
  154.  
  155.     --[[    Harass  ]]--
  156.  
  157.     if JHConfig.Harass then
  158.  
  159.         if ts.target ~= nil and GetDistance(ts.target) < Range then
  160.  
  161.             CastSpell(_Q, ts.target.x, ts.target.z)
  162.  
  163.         end
  164.  
  165.     end
  166.  
  167.    
  168.  
  169.     --[[    Combo   ]]--
  170.  
  171.     if ts.target ~= nil and JHConfig.scriptActive then
  172.  
  173.     --[[    Items   ]]--
  174.  
  175.         if GetDistance(ts.target) < wRange then
  176.  
  177.             if DFGREADY then CastSpell(DFGSlot, ts.target) end
  178.  
  179.             if HXGREADY then CastSpell(HXGSlot, ts.target) end
  180.  
  181.             if BWCREADY then CastSpell(BWCSlot, ts.target) end
  182.  
  183.             if BRKREADY then CastSpell(BRKSlot, ts.target) end
  184.  
  185.             if TMTREADY and GetDistance(ts.target) < 275 then CastSpell(TMTSlot) end
  186.  
  187.             if RAHREADY and GetDistance(ts.target) < 275 then CastSpell(RAHSlot) end
  188.  
  189.             if RNDREADY and GetDistance(ts.target) < 275 then CastSpell(RNDSlot) end
  190.  
  191.         end
  192.  
  193.         --[[    Abilities   ]]--
  194.  
  195.         if TruePos ~= nil and EREADY and GetDistance(TruePos) < Range and not JHConfig.mouseCombo then
  196.  
  197.             CastSpell(_E,TruePos.x,TruePos.z)
  198.  
  199.             elseif EREADY and GetDistance(mousePos) < Range and JHConfig.mouseCombo then
  200.  
  201.                 CastSpell(_E, mousePos.x, mousePos.z)
  202.  
  203.         end
  204.  
  205.         if Dstandard ~= nil then
  206.  
  207.             if QREADY and GetDistance(Dstandard) < Range then
  208.  
  209.                 CastSpell(_Q, Dstandard.x, Dstandard.z)
  210.  
  211.                 Dstandard = nil
  212.  
  213.             end
  214.  
  215.         end
  216.  
  217.         if WREADY and GetDistance(ts.target) < wRange then
  218.  
  219.             CastSpell(_W)
  220.  
  221.         end
  222.  
  223.     end
  224.  
  225.  
  226.  
  227.     --[[    Escape  ]]--
  228.  
  229.     if JHConfig.escape then
  230.  
  231.         if EREADY and QREADY and GetDistance(mousePos) < Range then
  232.  
  233.             CastSpell(_E, mousePos.x, mousePos.z)
  234.  
  235.         end
  236.  
  237.         if Dstandard ~= nil then
  238.  
  239.             if QREADY and GetDistance(Dstandard) < Range then
  240.  
  241.                 CastSpell(_Q, Dstandard.x, Dstandard.z)
  242.  
  243.                 Dstandard = nil
  244.  
  245.             end
  246.  
  247.         end
  248.  
  249.     end
  250.  
  251. end
  252.  
  253.  
  254.  
  255. function OnCreateObj(obj)
  256.  
  257.     if obj ~= nil and string.find(obj.name, "JarvanDemacianStandard_buf") then
  258.  
  259.         Dstandard = obj
  260.  
  261.     end
  262.  
  263. end
  264.  
  265.  
  266.  
  267. function OnDeleteObj(obj)
  268.  
  269.     if obj ~= nil and string.find(obj.name, "JarvanDemacianStandard_buf") then
  270.  
  271.         Dstandard = nil
  272.  
  273.     end
  274.  
  275. end
  276.  
  277.  
  278.  
  279. function OnDraw()  
  280.  
  281.     if JHConfig.drawcirclesSelf and not myHero.dead then
  282.  
  283.         DrawCircle(myHero.x, myHero.y, myHero.z, Range, 0x00FF00)
  284.  
  285.         DrawCircle(myHero.x, myHero.y, myHero.z, wRange, 0x00FFFF)
  286.  
  287.     end
  288.  
  289.     if ts.target ~= nil and JHConfig.drawcirclesEnemy then
  290.  
  291.         for j=0, 10 do
  292.  
  293.             DrawCircle(ts.target.x, ts.target.y, ts.target.z, 40 + j*1.5, 0x00FF00)
  294.  
  295.         end
  296.  
  297.     end
  298.  
  299. end
Advertisement
Add Comment
Please, Sign In to add comment