Guest User

Rengar the Rapist v1.5

a guest
Mar 4th, 2013
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --[[
  2.     Rengar The Rapist v1.5 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.5")
  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.     if ts.target ~= nil then
  425.    
  426.       if myHero.mana == 4 and RREADY then
  427.        
  428.         if QREADY and RREADY and GetDistance(ts.target) < range then
  429.           canQ = false
  430.           CastSpell(_Q)
  431.           CastSpell(_R)
  432.           lastQActive = os.clock()
  433.           canQ = false
  434.           --myHero:HoldPosition()
  435.         end
  436.       elseif myHero.mana == 5 and RREADY then
  437.         if QREADY and RREADY and GetDistance(ts.target) < range + 250 then
  438.           canQ = false
  439.           CastSpell(_Q)
  440.           CastSpell(_R)
  441.           lastQActive = os.clock()
  442.           canQ = false
  443.           --myHero:HoldPosition()
  444.         end
  445.       end
  446.      
  447.       if RREADY == false and os.clock() - lastQActive > 3.75 then
  448.        
  449.         myHero:Attack(ts.target)        
  450.      
  451.         if canQ == false then
  452.           if ts.target ~= nil then
  453.             if AAmove == true then
  454.               player:MoveTo(ts.target.x, ts.target.z)
  455.               myHero:Attack(ts.target)
  456.             end        
  457.             if os.clock() - lastQ > 0.01  then
  458.               myHero:Attack(ts.target)
  459.               canQ = true
  460.             end
  461.           elseif ts.target == nil then
  462.             canQ = true        
  463.           end
  464.         end
  465.        
  466.         if myHero.mana < 4 and (GetDistance(ts.target) < erange and GetDistance(ts.target) > AArange) and EREADY then          
  467.           CastSpell(_E, ts.target)
  468.         end
  469.        
  470.         if myHero.mana < 4 and GetDistance(ts.target) < wrange and WREADY then         
  471.           CastSpell(_W)
  472.         end
  473.        
  474.         if swing == 0 then      
  475.           if GetDistance(ts.target) < AArange + 250 then
  476.             myHero:Attack(ts.target)            
  477.           end
  478.         elseif swing == 1 then
  479.          
  480.           if QREADY and os.clock() - lastBasicAttack > swingDelay and canQ == true then
  481.             canQ = false
  482.             swing = 0
  483.             CastSpell(_Q)        
  484.             myHero:Attack(ts.target)
  485.             swing = 0              
  486.           end
  487.           if EREADY and myHero.mana < 4 and QREADY == false and os.clock() - lastBasicAttack > swingDelay then
  488.             CastSpell(_E, ts.target)
  489.             swing = 0
  490.           end
  491.           if myHero.mana < 4 and EREADY and QREADY == false and os.clock() - lastBasicAttack > swingDelay then
  492.             CastSpell(_E, ts.target)
  493.             swing = 0
  494.           end
  495.           if QREADY == false and TMATREADY == false and os.clock() - lastBasicAttack > swingDelay then
  496.             if ts.target ~= nil then
  497.               swing = 0
  498.               if AAmove == true then
  499.                 player:MoveTo(ts.target.x, ts.target.z)
  500.               end
  501.               myHero:Attack(ts.target)        
  502.             elseif ts.target == nil then
  503.               swing = 0
  504.             end
  505.           end  
  506.           if YMGBREADY then -- YMGB
  507.             if ts.target.type == "obj_AI_Hero" and GetDistance(ts.target) < 400 then
  508.               CastSpell(YMGBSlot)
  509.             end
  510.           end
  511.           if TMATREADY and GetDistance(ts.target) < 375 and  QREADY == false and os.clock() - lastBasicAttack > swingDelay then
  512.             CastSpell(TMATSlot)
  513.             swing = 0
  514.           end
  515.           if SotDREADY then
  516.             if ts.target.type == "obj_AI_Hero" and GetDistance(ts.target) < 400 then
  517.               CastSpell(SotDSlot)
  518.             end
  519.           end
  520.           if ENTREADY then -- YMGB
  521.             if ts.target.type == "obj_AI_Hero" and GetDistance(ts.target) < 400 then
  522.               CastSpell(ENTSlot)
  523.             end
  524.           end    
  525.         end                        
  526.       end
  527.     end
  528.   end
  529.  
  530.   if RCConfig.autoEFarm then
  531.     enemyMinions:update()
  532.     if mousemoving and GetTickCount() > nextTick then
  533.             player:MoveTo(mousePos.x, mousePos.z)
  534.         end    
  535.     for index, minion in pairs(enemyMinions.objects) do
  536.         if minion and minion.dead == false then
  537.         local myE = getDmg("E",minion,myHero)
  538.         local myAA = getDmg("AD",minion,myHero)
  539.         if EREADY then
  540.           if player:GetDistance(minion) < range and minion.health <= myE and EREADY then   
  541.             CastSpell(_E, minion)
  542.           end
  543.         elseif EREADY == false then
  544.           if minion and minion.health <= myAA and GetDistance(minion) <= (player.range + scanAdditionalRange) and GetTickCount() > nextTick then
  545.             player:Attack(minion) ---PrintChat("ATTACKING")
  546.             nextTick = GetTickCount() + waitDelay
  547.           end
  548.                 end
  549.       end
  550.     end
  551.   end
  552.  
  553.  
  554.     if RCConfig.autoAAFarm then
  555.     enemyMinions:update()
  556.         if mousemoving and GetTickCount() > nextTick then
  557.             player:MoveTo(mousePos.x, mousePos.z)
  558.         end                    
  559.         local tick = GetTickCount()
  560.         for index, minion in pairs(enemyMinions.objects) do
  561.       if minion and minion.dead == false then
  562.         local myAA = getDmg("AD",minion,myHero)
  563.         if minion and minion.health <= myAA and GetDistance(minion) <= (player.range + scanAdditionalRange) and GetTickCount() > nextTick then
  564.           player:Attack(minion)
  565.           nextTick = GetTickCount() + waitDelay          
  566.                 end
  567.             end    
  568.         end
  569.     end
  570.   if RCConfig.autoAAFarm and RCConfig.autoEharass and EREADY then
  571.     for i = 1, heroManager.iCount, 1 do
  572.       local hero = heroManager:getHero(i)
  573.       if ValidTarget(hero) and GetDistance(hero) < erange and hero.team ~= myHero.team then
  574.         CastSpell(_E,hero)
  575.       end
  576.     end
  577.   end
  578. end
  579.  
  580. function RENIgniteCalculation(enemy)
  581.   local hitdamage = getDmg("AD",enemy,myHero)
  582.     local qdamage = getDmg("Q",enemy,myHero)
  583.   local qdamage2 = getDmg("Q",enemy,myHero,2) --to Isolated Target
  584.     local wdamage = getDmg("W",enemy,myHero)
  585.     local edamage = getDmg("E",enemy,myHero)
  586.     local combo5 = 0
  587.  
  588.   if GetDistance(enemy) < 350 then
  589.       combo5 = hitdamage
  590.     if QREADY and myHero.mana < 5 then
  591.       combo5 = combo5 + qdamage + hitdamage
  592.     elseif QREADY and myHero.mana == 5 then
  593.       combo5 = combo5 + qdamage2 + hitdamage
  594.     end    
  595.   end
  596.     if WREADY and GetDistance(enemy) < wrange then
  597.         combo5 = combo5 + wdamage
  598.     end
  599.     if EREADY and GetDistance(enemy) < erange then
  600.         combo5 = combo5 + edamage
  601.     end
  602.     return combo5
  603. end
  604.  
  605. function OnDraw()
  606.     if RCConfig.drawcircles and not myHero.dead then       
  607.     --DrawCircle(myHero.x, myHero.y, myHero.z, AArange, 0x00FF00)
  608.         if WREADY then DrawCircle(myHero.x, myHero.y, myHero.z, wrange, 0x992D3D) end
  609.         if EREADY then DrawCircle(myHero.x, myHero.y, myHero.z, erange, 0xFFFFFF) end
  610.     if RREADY then DrawCircle(myHero.x, myHero.y, myHero.z, rrange, 0x992D3D) end
  611.         if ts.target ~= nil then
  612.             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
  613.         end
  614.     end
  615. end
  616. function OnSendChat(msg)
  617.     ts:OnSendChat(msg, "pri")
  618. end
  619. PrintChat(" >> Rengar the Rapist v1.4 loaded!")
Advertisement
Add Comment
Please, Sign In to add comment