Advertisement
Guest User

Untitled

a guest
Nov 11th, 2012
291
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --[[ Rapey Renekton v1.1 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: 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. do
  15.                
  16. local player = GetMyHero()
  17. if player.charName ~= "Renekton" then return end
  18.        
  19.         --[[                    Code                    ]]
  20.     require "AllClass"
  21.     require "spellDmg"
  22.     local swingDelay = 0.15
  23.     local range = 550
  24.     local Qrange = 429
  25.     local kill = {}
  26.     local ts
  27.     local tp
  28.  
  29.     local dice = 0
  30.        
  31.     local tp = TargetPrediction(550, 2, 10)
  32.     local ts = TargetSelector(TARGET_LOW_HP,range,DAMAGE_MAGIC,false)
  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.1 Loaded")
  45.     end
  46.  
  47.     function OnTick()
  48.     ts:update()
  49.     TargetPrediction__OnTick()
  50.     DamageReport()
  51.    
  52.     if rkConfig.scriptActive and ts.target ~= nil and player:GetDistance(ts.target) < range then
  53.        
  54.         local pp = tp:GetPrediction(ts.target)
  55.             if pp ~= nil then
  56.                 if player:CanUseSpell(_E) == READY then
  57.                     CastSpell(_E,pp.x, pp.z)
  58.                     dice = 1
  59.                 end
  60.             end
  61.             if player:CanUseSpell(_W) == READY then
  62.                 CastSpell(_W, ts.target)
  63.             end
  64.             if player:CanUseSpell(_Q) == READY and GetDistance(ts.target) <= Qrange then
  65.                 CastSpell(_Q)
  66.             end
  67.             if player:CanUseSpell(_E) == READY and dice == 1 then
  68.              if pp ~= nil then
  69.                 CastSpell(_E,pp.x, pp.z)
  70.                 dice = 0
  71.             end
  72.         end
  73.    
  74.         if ValidTarget(ts.target, range) then
  75.             player:Attack(ts.target)
  76.         end
  77.        
  78.             if rkConfig.useUlt then
  79.                 if player:CanUseSpell(_R) == READY then
  80.                     CastSpell(_R)
  81.                     player:Attack(ts.target)
  82.                 end
  83.             end
  84.         end
  85.     end
  86.    
  87.     function DamageReport()
  88.     ts:update()
  89.         for i=1, heroManager.iCount do
  90.         local enemy = heroManager:GetHero(i)
  91.         local ADdmg = getDmg("AD",enemy,player)
  92.         local qdmg = getDmg("Q",enemy,player)
  93.         local wdmg = getDmg("W",enemy,player)
  94.         local edmg = getDmg("E",enemy,player)
  95.         local rdmg = getDmg("R",enemy,player)
  96.    
  97.         local possible = edmg*2 + wdmg + qdmg + rdmg + ADdmg
  98.         local thatkill = 0
  99.        
  100.         if player:CanUseSpell(_Q) == READY then
  101.             thatkill = thatkill + qdmg
  102.             if player:CanUseSpell(_E) == READY  then
  103.             thatkill = thatkill + edmg
  104.             end
  105.         end
  106.        
  107.         if player:CanUseSpell(_W) == READY then
  108.             thatkill = thatkill + wdmg
  109.         end
  110.    
  111.         if player:CanUseSpell(_E) == READY  then
  112.             thatkill = thatkill + edmg*2
  113.         end
  114.                
  115.         if player:CanUseSpell(_R) == READY then
  116.             thatkill = thatkill + rdmg
  117.         end
  118.        
  119.    
  120.         if thatkill >= enemy.health then
  121.             kill[i] = 2
  122.         elseif possible>= enemy.health then
  123.             kill[i] = 1
  124.         else
  125.             kill[i] = 0
  126.         end
  127.         end
  128.     end
  129.  
  130.    
  131.     function OnDraw()
  132.     if rkConfig.drawcircles then
  133.         if player.dead ~= true then
  134.         DrawCircle(player.x, player.y, player.z, 550, 0xFFFF0000)
  135.         DrawCircle(player.x, player.y, player.z, 429, 0xFFFF0000)
  136.         if ts.target ~= nil then
  137.             DrawText("Target: " .. ts.target.charName, 18,100,100, 0xFF00FF00)
  138.             DrawCircle(ts.target.x,ts.target.y,ts.target.z, 100, 0xFF80FF00)
  139.         end
  140.         for i=1, heroManager.iCount do
  141.             local enemydraw = heroManager:GetHero(i)
  142.                 if ValidTarget(enemydraw) then
  143.                     if kill[i] == 1 then
  144.                         PrintFloatText(enemydraw,0,"Cooldown")
  145.                         DrawCircle(enemydraw.x,enemydraw.y,enemydraw.z, 100, 0xFF80FF00)
  146.                         DrawCircle(enemydraw.x,enemydraw.y,enemydraw.z, 150, 0xFF80FF00)
  147.                     elseif kill[i] == 2 then
  148.                         PrintFloatText(enemydraw,0,"RAPEY TIME!!")
  149.                         DrawCircle(enemydraw.x,enemydraw.y,enemydraw.z, 100, 0xFF80FF00)
  150.                         DrawCircle(enemydraw.x,enemydraw.y,enemydraw.z, 150, 0xFF80FF00)
  151.                         DrawCircle(enemydraw.x,enemydraw.y,enemydraw.z, 200, 0xFF80FF00)
  152.                     end
  153.                 end
  154.             end
  155.         end
  156.     end
  157.         SC__OnDraw()
  158.     end
  159.    
  160.     function OnWndMsg(msg,key)
  161.         SC__OnWndMsg(msg,key)
  162.     end
  163.        
  164.     function OnSendChat(msg)
  165.         TargetSelector__OnSendChat(msg)
  166.         ts:OnSendChat(msg, "pri")
  167.     end
  168. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement