Guest User

Rengar the Rapist v1.6

a guest
Mar 11th, 2013
4,152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --[[
  2.     Rengar The Rapist v1.6 by jbman
  3. ]]
  4. if myHero.charName ~= "Rengar" then return end
  5. --[[        Code        ]]
  6.  
  7. local mousemoving = true
  8. local waitDelay = 400
  9. local scanAdditionalRange = 750
  10. local nextTick = 0
  11.  
  12. local AAmove = true
  13.  
  14. local wrange = 450
  15. local range = 750
  16. local erange = 570
  17. local rrange = 0
  18. local canQ = false
  19. local lastQ = 0
  20.  
  21. local Qactive = false
  22. local lastQActive = 0
  23.  
  24. local AArange = (myHero.range + (GetDistance(myHero.minBBox, myHero.maxBBox)/2))
  25.  
  26. local lastBasicAttack = 0
  27. local swingDelay = (0.3 - (GetLatency()/1000))
  28. local swing = 0
  29. local tick = nil
  30.  
  31. local targetSelected = true
  32.  
  33. local ts
  34.  
  35. local ignite = nil
  36.  
  37. local YMGBSlot, TMATSlot, SotDSlot, BRKSlot, DFGSlot, HXGSlot, BWCSlot, SheenSlot, TrinitySlot, LichBaneSlot, ROSlot, ENTSlot, LOCKSlot = nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil
  38. local QREADY, WREADY, EREADY, RREADY, YMGBREADY, TMATREADY, SotDREADY, BRKREADY, DFGREADY, HXGREADY, BWCREADY, ROREADY, ENTREADY, LOCKREADY = false, false, false, false, false, false, false, false, false, false, false, false, false, false
  39.  
  40. function OnLoad()
  41.  
  42.     RCConfig = scriptConfig("Rengar the Rapist", "rengartherapist v1.6")
  43.     RCConfig:addParam("scriptActive", "Combo", SCRIPT_PARAM_ONKEYDOWN, false, 88)
  44.     RCConfig:addParam("scriptActive1", "Combo", SCRIPT_PARAM_ONKEYDOWN, false, 67)
  45.     RCConfig:addParam("scriptActive2", "Combo", SCRIPT_PARAM_ONKEYDOWN, false, 90)
  46.   RCConfig:addParam("tripleQ", "Tiple Q", SCRIPT_PARAM_ONKEYDOWN, false, 89)
  47.     RCConfig:addParam("harass", "Harass", SCRIPT_PARAM_ONKEYDOWN, false, 84)
  48.     RCConfig:addParam("drawcircles", "Draw Circles", SCRIPT_PARAM_ONOFF, true)
  49.     RCConfig:addParam("drawtext", "Draw Text", SCRIPT_PARAM_ONOFF, true)
  50.   RCConfig:addParam("autoEKS", "E Kill Steal", SCRIPT_PARAM_ONOFF, true)
  51.   RCConfig:addParam("autoEharass", "Auto E Harass", SCRIPT_PARAM_ONOFF, false)
  52.     RCConfig:addParam("autoAAFarm", "Auto AA Farm", SCRIPT_PARAM_ONKEYDOWN, false, 192) -- `~
  53.   RCConfig:addParam("autoEFarm", "Auto E Farm", SCRIPT_PARAM_ONKEYDOWN, false, 112) -- F1
  54.     RCConfig:addParam("autoignite", "Auto Ignite", SCRIPT_PARAM_ONOFF, true)
  55.   RCConfig:addParam("autoW", "Auto W", SCRIPT_PARAM_ONOFF, false)
  56.     RCConfig:permaShow("autoEharass")
  57.   RCConfig:permaShow("autoAAFarm")
  58.   RCConfig:permaShow("autoEFarm")
  59.   RCConfig:permaShow("autoW")
  60.   RCConfig:permaShow("autoEKS")
  61.     ts = TargetSelector(TARGET_LOW_HP,range+250,DAMAGE_PHYSICAL,true)  
  62.     ts.name = "Rengar"
  63.     RCConfig:addTS(ts)
  64.   enemyMinions = minionManager(MINION_ENEMY, range+150, player, MINION_SORT_HEALTH_ASC)
  65.     if myHero:GetSpellData(SUMMONER_1).name:find("SummonerDot") then ignite = SUMMONER_1
  66.     elseif myHero:GetSpellData(SUMMONER_2).name:find("SummonerDot") then ignite = SUMMONER_2
  67.   end
  68.  
  69. end
  70.  
  71.     function OnProcessSpell(unit, spell)
  72.         if unit.isMe then
  73.             if spell and spell.name:find("RengarBasicAttack" or "RengarCritAttack") then
  74.                 swing = 1
  75.                 lastBasicAttack = os.clock()
  76.             end      
  77.         end
  78.     end
  79.    
  80.     function OnCreateObj(obj)
  81.     if canQ == true and obj and obj.name:find("Rengar_Q_Attack_Hunter.troy") then
  82.       canQ = false
  83.       lastQ = os.clock()
  84.       swing = 0
  85.     end
  86.         if obj and (obj.name == "Rengar_LeapEnd.troy") and GetDistance(obj) < 150 then         
  87.       swing = 1
  88.       lastBasicAttack = os.clock()
  89.     end
  90.     end
  91.  
  92. function OnTick()
  93.  
  94.     if myHero.dead then
  95.         return
  96.     end
  97.  
  98.     ts:update()
  99.  
  100.   if (myHero:CanUseSpell(_R) == READY) and myHero:GetSpellData(_R).level == 1 then
  101.     rrange = (myHero.ms*1.2) * 7
  102.   elseif (myHero:CanUseSpell(_R) == READY) and myHero:GetSpellData(_R).level == 2 then
  103.     rrange = (myHero.ms*1.25) * 7
  104.   elseif (myHero:CanUseSpell(_R) == READY) and myHero:GetSpellData(_R).level == 3 then
  105.     rrange = (myHero.ms*1.3) * 7
  106.   end
  107.    
  108.     if swing == 1 and os.clock() > lastBasicAttack + 0.5 then
  109.         swing = 0
  110.     end
  111.  
  112.   if canQ == false and os.clock() > lastQ + 0.8 then
  113.         canQ = true
  114.     end
  115.  
  116.    
  117.  
  118.     QREADY = (myHero:CanUseSpell(_Q) == READY)
  119.     WREADY = (myHero:CanUseSpell(_W) == READY)
  120.     EREADY = (myHero:CanUseSpell(_E) == READY)
  121.     RREADY = (myHero:CanUseSpell(_R) == READY)
  122.     IREADY = (ignite ~= nil and myHero:CanUseSpell(ignite) == READY)
  123.  
  124.   YMGBSlot, TMATSlot, SotDSlot, BRKSlot, DFGSlot, HXGSlot, BWCSlot, SheenSlot, TrinitySlot, LichBaneSlot, ROSlot, ENTSlot, LOCKSlot = GetInventorySlotItem(3142), GetInventorySlotItem(3077) or GetInventorySlotItem(3074) , GetInventorySlotItem(3131), GetInventorySlotItem(3153), GetInventorySlotItem(3128), GetInventorySlotItem(3146), GetInventorySlotItem(3144), GetInventorySlotItem(3057), GetInventorySlotItem(3078), GetInventorySlotItem(3100), GetInventorySlotItem(3143), GetInventorySlotItem(3184), GetInventorySlotItem(3190)
  125.    
  126.   DFGREADY = (DFGSlot ~= nil and myHero:CanUseSpell(DFGSlot) == READY)
  127.     HXGREADY = (HXGSlot ~= nil and myHero:CanUseSpell(HXGSlot) == READY)
  128.     BWCREADY = (BWCSlot ~= nil and myHero:CanUseSpell(BWCSlot) == READY)
  129.   BRKREADY = (BRKSlot ~= nil and myHero:CanUseSpell(BRKSlot) == READY)
  130.     TMATREADY = (TMATSlot ~= nil and myHero:CanUseSpell(TMATSlot) == READY)
  131.   SotDREADY = (SotDSlot ~= nil and myHero:CanUseSpell(SotDSlot) == READY)
  132.   YMGBREADY = (YMGBSlot ~= nil and myHero:CanUseSpell(YMGBSlot) == READY)
  133.   ROREADY = (ROSlot ~= nil and myHero:CanUseSpell(ROSlot) == READY)
  134.   ENTREADY = (ENTSlot ~= nil and myHero:CanUseSpell(ENTSlot) == READY)
  135.   LOCKREADY = (LOCKSlot ~= nil and myHero:CanUseSpell(LOCKSlot) == READY)
  136.    
  137.    
  138.   if RCConfig.harass and ts.target ~= nil then
  139.         if EREADY and GetDistance(ts.target) < erange then
  140.             CastSpell(_E, ts.target)
  141.         end
  142.     end
  143.  
  144.    
  145.   if RCConfig.autoW or RCConfig.autoEKS then
  146.         for i = 1, heroManager.iCount, 1 do
  147.       local hero = heroManager:getHero(i)
  148.       if RCConfig.autoW and WREADY and hero.team ~= myHero.team then
  149.         if myHero.mana < 5 and  ValidTarget(hero) and GetDistance(myHero, hero) < wrange then
  150.           CastSpell(_W)
  151.         end
  152.       end
  153.       if RCConfig.autoEKS and EREADY and hero.team ~= myHero.team then
  154.         local edamage = getDmg("E",hero,myHero)
  155.         if myHero.mana < 5 and ValidTarget(hero) and GetDistance(myHero, hero) < 560 and hero.health < edamage then          
  156.           CastSpell(_E,hero)                              
  157.         end
  158.       end
  159.     end    
  160.     end
  161.  
  162.   if (RCConfig.scriptActive or RCConfig.scriptActive1 or RCConfig.scriptActive2 or RCConfig.scriptActive3) and ts.target ~= nil and RCConfig.autoignite and IREADY then    
  163.         local QWEDmg = RENIgniteCalculation(ts.target)
  164.         local IDmg = getDmg("IGNITE",ts.target,myHero)    
  165.         if GetDistance(ts.target) < 600 and ts.target.health > QWEDmg and ts.target.health <= IDmg+QWEDmg then CastSpell(ignite, ts.target) end
  166.     end
  167.  
  168.     if RCConfig.scriptActive then
  169.    
  170.     if myHero.mana < 5 and WREADY then
  171.       for i = 1, heroManager.iCount, 1 do
  172.         local hero = heroManager:getHero(i)
  173.         if ValidTarget(hero) and GetDistance(hero) < wrange and hero.team ~= myHero.team then
  174.           CastSpell(_W)        
  175.         end
  176.       end
  177.     end
  178.    
  179.     if ts.target ~= nil then
  180.      
  181.       if DFGREADY then CastSpell(DFGSlot, ts.target) end
  182.       if HXGREADY then CastSpell(HXGSlot, ts.target) end
  183.       if BWCREADY then CastSpell(BWCSlot, ts.target) end
  184.       if BRKREADY then CastSpell(BRKSlot, ts.target) end
  185.       if ROREADY and GetDistance(ts.target) <= 485 and ts.target.type == "obj_AI_Hero" then CastSpell(ROSlot) end
  186.       if LOCKREADY and GetDistance(ts.target) <= 485 and ts.target.type == "obj_AI_Hero" then CastSpell(LOCKSlot) end
  187.    
  188.       if myHero.mana < 5 and GetDistance(ts.target) < wrange and WREADY then           
  189.           CastSpell(_W)
  190.       end
  191.    
  192.       if (GetDistance(ts.target) < erange and GetDistance(ts.target) > AArange) and EREADY then        
  193.         CastSpell(_E, ts.target)
  194.       end
  195.       if swing == 0 then
  196.      
  197.         if GetDistance(ts.target) < AArange + 250 then
  198.           myHero:Attack(ts.target)
  199.           if YMGBREADY and GetDistance(ts.target) > AArange + 250 then -- YMGB
  200.             if ts.target.type == "obj_AI_Hero" then
  201.               CastSpell(YMGBSlot)
  202.             end
  203.           end
  204.         end
  205.       elseif swing == 1 then
  206.         if QREADY == false and EREADY == false and TMATREADY == false and os.clock() - lastBasicAttack > swingDelay then
  207.           if ts.target ~= nil then
  208.             swing = 0
  209.             if AAmove == true then
  210.               player:MoveTo(ts.target.x, ts.target.z)
  211.             end
  212.             myHero:Attack(ts.target)        
  213.           elseif ts.target == nil then
  214.             swing = 0
  215.           end
  216.         end      
  217.         if YMGBREADY then -- YMGB
  218.           if ts.target.type == "obj_AI_Hero" and GetDistance(ts.target) < 400 then
  219.             CastSpell(YMGBSlot)
  220.           end
  221.         end
  222.         if TMATREADY and GetDistance(ts.target) < 375 and  QREADY == false and os.clock() - lastBasicAttack > swingDelay then
  223.           CastSpell(TMATSlot)
  224.           swing = 0
  225.         end
  226.         if SotDREADY then
  227.           if ts.target.type == "obj_AI_Hero" and GetDistance(ts.target) < 400 then
  228.             CastSpell(SotDSlot)
  229.           end
  230.         end
  231.         if ENTREADY then -- YMGB
  232.           if ts.target.type == "obj_AI_Hero" and GetDistance(ts.target) < 400 then
  233.             CastSpell(ENTSlot)
  234.           end
  235.         end      
  236.         if EREADY and os.clock() - lastBasicAttack > swingDelay then
  237.           CastSpell(_E, ts.target)
  238.           swing = 0
  239.         elseif myHero.mana < 5 and QREADY and EREADY == false and os.clock() - lastBasicAttack > swingDelay then
  240.           CastSpell(_Q)
  241.           myHero:Attack(ts.target)
  242.           swing = 0
  243.         end
  244.       end                  
  245.     end
  246.   end
  247.  
  248.  
  249.  
  250.     if RCConfig.scriptActive1 then
  251.    
  252.     if myHero.mana < 5 and WREADY then
  253.       for i = 1, heroManager.iCount, 1 do
  254.         local hero = heroManager:getHero(i)
  255.         if ValidTarget(hero) and GetDistance(hero) < wrange and hero.team ~= myHero.team then
  256.           CastSpell(_W)        
  257.         end
  258.       end
  259.     end
  260.    
  261.     if ts.target ~= nil then
  262.       if canQ == false then
  263.         if ts.target ~= nil then
  264.           if AAmove == true then
  265.             player:MoveTo(ts.target.x, ts.target.z)
  266.             myHero:Attack(ts.target)
  267.           end        
  268.           if os.clock() - lastQ > 0.01  then
  269.             myHero:Attack(ts.target)
  270.             canQ = true
  271.           end
  272.         elseif ts.target == nil then
  273.           canQ = true        
  274.         end
  275.       end
  276.       if DFGREADY then CastSpell(DFGSlot, ts.target) end
  277.       if HXGREADY then CastSpell(HXGSlot, ts.target) end
  278.       if BWCREADY then CastSpell(BWCSlot, ts.target) end
  279.       if BRKREADY then CastSpell(BRKSlot, ts.target) end
  280.       if ROREADY and GetDistance(ts.target) <= 485 and ts.target.type == "obj_AI_Hero" then CastSpell(ROSlot) end
  281.       if LOCKREADY and GetDistance(ts.target) <= 485 and ts.target.type == "obj_AI_Hero" then CastSpell(LOCKSlot) end
  282.    
  283.       if myHero.mana < 5 and GetDistance(ts.target) < wrange and WREADY then           
  284.         CastSpell(_W)
  285.       end
  286.       if myHero.mana == 4 and WREADY == false and QREADY == false and (GetDistance(ts.target) > AArange and GetDistance(ts.target) < erange) and EREADY then           
  287.         CastSpell(_E, ts.target)
  288.       end
  289.       if swing == 0 then      
  290.         if GetDistance(ts.target) < AArange + 250 then
  291.           myHero:Attack(ts.target)
  292.           if YMGBREADY and GetDistance(ts.target) > AArange + 250 then -- YMGB
  293.             if ts.target.type == "obj_AI_Hero" then
  294.               CastSpell(YMGBSlot)
  295.             end
  296.           end
  297.         end
  298.       elseif swing == 1 then      
  299.         if QREADY and os.clock() - lastBasicAttack > swingDelay and canQ == true then
  300.           canQ = false
  301.           swing = 0
  302.           CastSpell(_Q)        
  303.           myHero:Attack(ts.target)
  304.           swing = 0
  305.         elseif myHero.mana == 4 and not (WREADY or QREADY) and os.clock() - lastBasicAttack > swingDelay then
  306.           CastSpell(_E, ts.target)
  307.           swing = 0        
  308.         end
  309.         if QREADY == false and TMATREADY == false and os.clock() - lastBasicAttack > swingDelay then
  310.           if ts.target ~= nil then
  311.             swing = 0
  312.             if AAmove == true then
  313.               player:MoveTo(ts.target.x, ts.target.z)
  314.             end
  315.             myHero:Attack(ts.target)        
  316.           elseif ts.target == nil then
  317.             swing = 0
  318.           end
  319.         end      
  320.         if YMGBREADY then -- YMGB
  321.           if ts.target.type == "obj_AI_Hero" and GetDistance(ts.target) < 400 then
  322.             CastSpell(YMGBSlot)
  323.           end
  324.         end
  325.         if TMATREADY and GetDistance(ts.target) < 375 and  QREADY == false and os.clock() - lastBasicAttack > swingDelay then
  326.           CastSpell(TMATSlot)
  327.           swing = 0
  328.         end      
  329.         if SotDREADY then
  330.           if ts.target.type == "obj_AI_Hero" and GetDistance(ts.target) < 400 then
  331.             CastSpell(SotDSlot)
  332.           end
  333.         end
  334.         if ENTREADY then -- YMGB
  335.           if ts.target.type == "obj_AI_Hero" and GetDistance(ts.target) < 400 then
  336.             CastSpell(ENTSlot)
  337.           end
  338.         end      
  339.       end                          
  340.     end
  341.   end
  342.    
  343.  
  344.  
  345.     if RCConfig.scriptActive2 then
  346.    
  347.     if myHero.mana < 5 and WREADY then
  348.       for i = 1, heroManager.iCount, 1 do
  349.         local hero = heroManager:getHero(i)
  350.         if ValidTarget(hero) and GetDistance(hero) < wrange and hero.team ~= myHero.team then
  351.           CastSpell(_W)        
  352.         end
  353.       end
  354.     end
  355.    
  356.     if ts.target ~= nil then
  357.       if DFGREADY then CastSpell(DFGSlot, ts.target) end
  358.       if HXGREADY then CastSpell(HXGSlot, ts.target) end
  359.       if BWCREADY then CastSpell(BWCSlot, ts.target) end
  360.       if BRKREADY then CastSpell(BRKSlot, ts.target) end
  361.       if ROREADY and GetDistance(ts.target) <= 485 and ts.target.type == "obj_AI_Hero" then CastSpell(ROSlot) end
  362.       if LOCKREADY and GetDistance(ts.target) <= 485 and ts.target.type == "obj_AI_Hero" then CastSpell(LOCKSlot) end
  363.    
  364.       if GetDistance(ts.target) < wrange and WREADY then           
  365.         CastSpell(_W)
  366.       end
  367.       if myHero.mana == 4 and WREADY == false and QREADY == false and (GetDistance(ts.target) > AArange and GetDistance(ts.target) < erange) and EREADY then           
  368.         CastSpell(_E, ts.target)
  369.       end
  370.       if swing == 0 then
  371.         if GetDistance(ts.target) < AArange + 250 then
  372.           myHero:Attack(ts.target)
  373.           if YMGBREADY and GetDistance(ts.target) > AArange + 250 then -- YMGB
  374.             if ts.target.type == "obj_AI_Hero" then
  375.               CastSpell(YMGBSlot)
  376.             end
  377.           end
  378.         end
  379.       elseif swing == 1 then
  380.         if QREADY == false and TMATREADY == false and os.clock() - lastBasicAttack > swingDelay then
  381.           if ts.target ~= nil then
  382.             swing = 0
  383.             if AAmove == true then
  384.               player:MoveTo(ts.target.x, ts.target.z)
  385.             end
  386.             myHero:Attack(ts.target)        
  387.           elseif ts.target == nil then
  388.             swing = 0
  389.           end
  390.         end      
  391.         if YMGBREADY then -- YMGB
  392.           if ts.target.type == "obj_AI_Hero" and GetDistance(ts.target) < 400 then
  393.             CastSpell(YMGBSlot)
  394.           end
  395.         end
  396.         if TMATREADY and GetDistance(ts.target) < 375 and  QREADY == false and os.clock() - lastBasicAttack > swingDelay then
  397.           CastSpell(TMATSlot)
  398.           swing = 0
  399.         end
  400.         if SotDREADY then
  401.           if ts.target.type == "obj_AI_Hero" and GetDistance(ts.target) < 400 then
  402.             CastSpell(SotDSlot)
  403.           end
  404.         end
  405.         if ENTREADY then -- YMGB
  406.           if ts.target.type == "obj_AI_Hero" and GetDistance(ts.target) < 400 then
  407.             CastSpell(ENTSlot)
  408.           end
  409.         end
  410.         if myHero.mana < 5 and QREADY and os.clock() - lastBasicAttack > swingDelay then
  411.           CastSpell(_Q)
  412.           myHero:Attack(ts.target)
  413.           swing = 0
  414.         elseif myHero.mana == 4 and not (WREADY or QREADY) and os.clock() - lastBasicAttack > swingDelay then
  415.           CastSpell(_E, ts.target)
  416.           swing = 0
  417.         end
  418.       end                          
  419.     end
  420.   end
  421.  
  422.  
  423.     if RCConfig.tripleQ then    
  424.    
  425.     --if ts.target ~= nil then
  426.        
  427.      
  428.    
  429.       if myHero.mana == 4 and RREADY then
  430.        
  431.         --if QREADY and RREADY and GetDistance(ts.target) < range +200 then
  432.         if QREADY and RREADY then
  433.           canQ = false
  434.           CastSpell(_Q)
  435.           CastSpell(_R)
  436.           TQactive = true
  437.           lastQActive = os.clock()
  438.           canQ = false          
  439.         end
  440.        
  441.       elseif myHero.mana == 5 and RREADY then        
  442.         --if QREADY and RREADY and GetDistance(ts.target) < range + 200 then
  443.         if QREADY and RREADY then
  444.           canQ = false
  445.           CastSpell(_Q)
  446.           CastSpell(_R)
  447.           TQactive = true
  448.           lastQActive = os.clock()
  449.           canQ = false
  450.           myHero:HoldPosition()
  451.         end
  452.       end
  453.       if TQactive == true then
  454.         player:MoveTo(mousePos.x, mousePos.z)
  455.       end
  456.       --if RREADY == false and os.clock() - lastQActive > 3.75 then
  457.         if RREADY == false and os.clock() - lastQActive > 3.75 and ts.target ~= nil then
  458.        
  459.         TQactive = false
  460.         myHero:Attack(ts.target)
  461.        
  462.         if canQ == false then
  463.           if ts.target ~= nil then
  464.             if AAmove == true then
  465.               player:MoveTo(ts.target.x, ts.target.z)
  466.               myHero:Attack(ts.target)
  467.             end        
  468.             if os.clock() - lastQ > 0.01  then
  469.               myHero:Attack(ts.target)
  470.               canQ = true
  471.             end
  472.           elseif ts.target == nil then
  473.             canQ = true        
  474.           end
  475.         end
  476.        
  477.         if myHero.mana < 4 and (GetDistance(ts.target) < erange and GetDistance(ts.target) > AArange) and EREADY then          
  478.           CastSpell(_E, ts.target)
  479.         end
  480.        
  481.         if myHero.mana < 4 and GetDistance(ts.target) < wrange and WREADY then         
  482.           CastSpell(_W)
  483.         end
  484.        
  485.         if swing == 0 then      
  486.           if GetDistance(ts.target) < AArange + 250 then
  487.             myHero:Attack(ts.target)            
  488.           end
  489.         elseif swing == 1 then
  490.          
  491.           if QREADY and os.clock() - lastBasicAttack > swingDelay and canQ == true then
  492.             canQ = false
  493.             swing = 0
  494.             CastSpell(_Q)        
  495.             myHero:Attack(ts.target)
  496.             swing = 0              
  497.           end
  498.           if myHero.mana < 4 and EREADY and QREADY == false and os.clock() - lastBasicAttack > swingDelay then
  499.             CastSpell(_E, ts.target)
  500.             swing = 0
  501.           end
  502.           if QREADY == false and TMATREADY == false and os.clock() - lastBasicAttack > swingDelay then
  503.             if ts.target ~= nil then
  504.               swing = 0
  505.               if AAmove == true then
  506.                 player:MoveTo(ts.target.x, ts.target.z)
  507.               end
  508.               myHero:Attack(ts.target)        
  509.             elseif ts.target == nil then
  510.               swing = 0
  511.             end
  512.           end  
  513.           if SotDREADY then
  514.             if ts.target.type == "obj_AI_Hero" and GetDistance(ts.target) < 400 then
  515.               CastSpell(SotDSlot)
  516.             end
  517.           end    
  518.         end                        
  519.       end
  520.     --end
  521.   end
  522.  
  523.  
  524.  
  525.   if RCConfig.escape then  
  526.     enemyMinions:update()
  527.     if mousemoving and GetTickCount() > nextTick then
  528.             player:MoveTo(mousePos.x, mousePos.z)
  529.         end    
  530.     for index, minion in pairs(enemyMinions.objects) do
  531.         if minion and minion.dead == false then
  532.         local myE = getDmg("E",minion,myHero)
  533.         local myAA = getDmg("AD",minion,myHero)
  534.         if EREADY then
  535.           if player:GetDistance(minion) < range and minion.health <= myE and EREADY then   
  536.             CastSpell(_E, minion)
  537.           end
  538.         elseif EREADY == false then
  539.           if minion and minion.health <= myAA and GetDistance(minion) <= (player.range + scanAdditionalRange) and GetTickCount() > nextTick then
  540.             player:Attack(minion) ---PrintChat("ATTACKING")
  541.             nextTick = GetTickCount() + waitDelay
  542.           end
  543.                 end
  544.       end
  545.     end
  546.   end
  547.  
  548.  
  549.     if RCConfig.autoAAFarm then
  550.     enemyMinions:update()
  551.         if mousemoving and GetTickCount() > nextTick then
  552.             player:MoveTo(mousePos.x, mousePos.z)
  553.         end                    
  554.         local tick = GetTickCount()
  555.         for index, minion in pairs(enemyMinions.objects) do
  556.       if minion and minion.dead == false then
  557.         local myAA = getDmg("AD",minion,myHero)
  558.         if minion and minion.health <= myAA and GetDistance(minion) <= (player.range + scanAdditionalRange) and GetTickCount() > nextTick then
  559.           player:Attack(minion)
  560.           nextTick = GetTickCount() + waitDelay          
  561.                 end
  562.             end    
  563.         end
  564.     end
  565.   if RCConfig.autoAAFarm and RCConfig.autoEharass and EREADY then
  566.     for i = 1, heroManager.iCount, 1 do
  567.       local hero = heroManager:getHero(i)
  568.       if ValidTarget(hero) and GetDistance(hero) < erange and hero.team ~= myHero.team then
  569.         CastSpell(_E,hero)
  570.       end
  571.     end
  572.   end
  573. end
  574.  
  575. function RENIgniteCalculation(enemy)
  576.   local hitdamage = getDmg("AD",enemy,myHero)
  577.     local qdamage = getDmg("Q",enemy,myHero)
  578.   local qdamage2 = getDmg("Q",enemy,myHero,2) --to Isolated Target
  579.     local wdamage = getDmg("W",enemy,myHero)
  580.     local edamage = getDmg("E",enemy,myHero)
  581.     local combo5 = 0
  582.  
  583.   if GetDistance(enemy) < 350 then
  584.       combo5 = hitdamage
  585.     if QREADY and myHero.mana < 5 then
  586.       combo5 = combo5 + qdamage + hitdamage
  587.     elseif QREADY and myHero.mana == 5 then
  588.       combo5 = combo5 + qdamage2 + hitdamage
  589.     end    
  590.   end
  591.     if WREADY and GetDistance(enemy) < wrange then
  592.         combo5 = combo5 + wdamage
  593.     end
  594.     if EREADY and GetDistance(enemy) < erange then
  595.         combo5 = combo5 + edamage
  596.     end
  597.     return combo5
  598. end
  599.  
  600. function OnDraw()
  601.     if RCConfig.drawcircles and not myHero.dead then       
  602.     --DrawCircle(myHero.x, myHero.y, myHero.z, AArange, 0x00FF00)
  603.         if WREADY then DrawCircle(myHero.x, myHero.y, myHero.z, wrange, 0x992D3D) end
  604.         if EREADY then DrawCircle(myHero.x, myHero.y, myHero.z, erange, 0xFFFFFF) end
  605.     if RREADY then DrawCircle(myHero.x, myHero.y, myHero.z, rrange, 0x992D3D) end
  606.         if ts.target ~= nil then
  607.             for j=0, 10 do DrawCircle(ts.target.x, ts.target.y, ts.target.z, (GetDistance(ts.target.minBBox, ts.target.maxBBox)/2) + j*1.5, 0x00FF00) end
  608.         end
  609.     end
  610. end
  611. function OnSendChat(msg)
  612.     ts:OnSendChat(msg, "pri")
  613. end
  614. PrintChat(" >> Rengar the Rapist v1.6 by jbman loaded!")
Advertisement
Add Comment
Please, Sign In to add comment