Advertisement
Guest User

Untitled

a guest
Feb 6th, 2013
2,516
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --[[ Rapey Renekton v1.2 by DeniCevap
  2.     Used Ulimited's Damage and Draw functions ( edited of course for Renekton. )
  3.  
  4.     Spacebar to unleash his powers.
  5.     Z to disable Ultimate or use the shift menu
  6.    
  7.     Feautures:
  8.     Combo: AA when possible then abilites -> E -> W -> Q -> E -> R
  9.     Draws a cricle and a floating text on the enemy if it is killable.
  10. --]]
  11.        
  12.        
  13.         --[[                    Config            ]]
  14.                
  15. local player = GetMyHero()
  16. if player.charName ~= "Renekton" then return end
  17.        
  18.         --[[                    Code                    ]]
  19.     local swingDelay = 0.15
  20.     local range = 550
  21.     local Qrange = 429
  22.     local kill = {}
  23.     local ts
  24.     local tp
  25.  
  26.     local dice = nil
  27.     local swing = nil
  28.     local lastBasicAttack = nil
  29.        
  30.     local tp
  31.     local ts
  32.  
  33. function OnLoad()
  34.     rkConfig = scriptConfig("Rapeyton", "rape")
  35.     rkConfig:addParam("scriptActive", "Combo", SCRIPT_PARAM_ONKEYDOWN, false, 32) --Spacebar
  36.     rkConfig:addParam("useUlt", "Ultimate", SCRIPT_PARAM_ONKEYTOGGLE, true, 90) --Z
  37.     rkConfig:addParam("drawcircles", "Draw Circles", SCRIPT_PARAM_ONOFF, true)
  38.     rkConfig:permaShow("scriptActive")
  39.     rkConfig:permaShow("useUlt")
  40.     ts.name = "Renekton"
  41.     tp = TargetPrediction(550, 2, 10)
  42.     ts = TargetSelector(TARGET_LOW_HP,550,DAMAGE_PHYSICAL,false)
  43.     rkConfig:addTS(ts)
  44.     PrintChat("Rapey Renekton v1.2 Loaded")
  45. end
  46.  
  47.  
  48. function OnProcessSpell(unit, spell)
  49.     if unit.isMe and (spell.name:find("Attack") ~= nil) then
  50.         swing = 1
  51.         lastBasicAttack = os.clock()
  52.     end
  53. end
  54.    
  55. function OnTick()
  56. ts:update()
  57. DamageReport()
  58.  
  59.     if swing == 1 and os.clock() > lastBasicAttack + 0.2 then
  60.         swing = 0
  61.     end
  62.  
  63.     if rkConfig.scriptActive and ts.target ~= nil and player:GetDistance(ts.target) < range then
  64.         local pp = tp:GetPrediction(ts.target)
  65.             if pp ~= nil then
  66.                 if player:CanUseSpell(_E) == READY then
  67.                     CastSpell(_E,pp.x, pp.z)
  68.                     dice = 1
  69.                 end
  70.             end
  71.             if player:CanUseSpell(_W) == READY and swing == 1 then
  72.                 CastSpell(_W, ts.target)
  73.                 swing = 0
  74.             end
  75.             if player:CanUseSpell(_Q) == READY and GetDistance(ts.target) <= Qrange then
  76.                 CastSpell(_Q)
  77.             end
  78.             if player:CanUseSpell(_E) == READY and dice == 1 then
  79.                 if pp ~= nil then
  80.                     CastSpell(_E,pp.x, pp.z)
  81.                     dice = 0
  82.                 end
  83.             end
  84.    
  85.         if ValidTarget(ts.target, range) then
  86.             player:Attack(ts.target)
  87.         end
  88.        
  89.         if rkConfig.useUlt then
  90.             if player:CanUseSpell(_R) == READY then
  91.                 CastSpell(_R)
  92.                 player:Attack(ts.target)
  93.             end
  94.         end
  95.     end
  96. end
  97.    
  98. function DamageReport()
  99. ts:update()
  100.     for i=1, heroManager.iCount do
  101.         local enemy = heroManager:GetHero(i)
  102.         local ADdmg = getDmg("AD",enemy,player)
  103.         local qdmg = getDmg("Q",enemy,player)
  104.         local wdmg = getDmg("W",enemy,player)
  105.         local edmg = getDmg("E",enemy,player)
  106.         local rdmg = getDmg("R",enemy,player)
  107.    
  108.         local possible = edmg*2 + wdmg + qdmg + rdmg + ADdmg
  109.         local thatkill = 0
  110.        
  111.         if player:CanUseSpell(_Q) == READY then
  112.             thatkill = thatkill + qdmg
  113.             if player:CanUseSpell(_E) == READY  then
  114.             thatkill = thatkill + edmg
  115.             end
  116.         end
  117.        
  118.         if player:CanUseSpell(_W) == READY then
  119.             thatkill = thatkill + wdmg
  120.         end
  121.    
  122.         if player:CanUseSpell(_E) == READY  then
  123.             thatkill = thatkill + edmg*2
  124.         end
  125.                
  126.         if player:CanUseSpell(_R) == READY then
  127.             thatkill = thatkill + rdmg
  128.         end
  129.        
  130.    
  131.         if thatkill >= enemy.health then
  132.             kill[i] = 2
  133.         elseif possible>= enemy.health then
  134.             kill[i] = 1
  135.         else
  136.             kill[i] = 0
  137.         end
  138.     end
  139. end
  140.  
  141.    
  142. function OnDraw()
  143.     if rkConfig.drawcircles then
  144.         if player.dead ~= true then
  145.         DrawCircle(player.x, player.y, player.z, 550, 0xFFFF0000)
  146.         DrawCircle(player.x, player.y, player.z, 429, 0xFFFF0000)
  147.         if ts.target ~= nil then
  148.             DrawText("Target: " .. ts.target.charName, 18,100,100, 0xFF00FF00)
  149.             DrawCircle(ts.target.x,ts.target.y,ts.target.z, 100, 0xFF80FF00)
  150.         end
  151.         for i=1, heroManager.iCount do
  152.             local enemydraw = heroManager:GetHero(i)
  153.                 if ValidTarget(enemydraw) then
  154.                     if kill[i] == 1 then
  155.                         PrintFloatText(enemydraw,0,"Cooldown")
  156.                         DrawCircle(enemydraw.x,enemydraw.y,enemydraw.z, 100, 0xFF80FF00)
  157.                         DrawCircle(enemydraw.x,enemydraw.y,enemydraw.z, 150, 0xFF80FF00)
  158.                     elseif kill[i] == 2 then
  159.                         PrintFloatText(enemydraw,0,"RAPEY TIME!!")
  160.                         DrawCircle(enemydraw.x,enemydraw.y,enemydraw.z, 100, 0xFF80FF00)
  161.                         DrawCircle(enemydraw.x,enemydraw.y,enemydraw.z, 150, 0xFF80FF00)
  162.                         DrawCircle(enemydraw.x,enemydraw.y,enemydraw.z, 200, 0xFF80FF00)
  163.                     end
  164.                 end
  165.             end
  166.         end
  167.     end
  168. end
  169.        
  170. function OnSendChat(msg)
  171.     ts:OnSendChat(msg, "pri")
  172. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement