Advertisement
Guest User

Ryze-xkjtx-AA-In-Combos--R-Toggle.lua

a guest
Mar 4th, 2013
302
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --[[       
  2.         Ryze Combo/Burst(cd) combo made by TRUS v1.7(c-xkjtx), ('AA and cast W/R combo' made by xkjtx)     
  3.             Combo hot-key = letter 'V'
  4.             Burst hot-key = Space bar
  5.             'W' combo with R(toggle) = letter 'S'
  6.             With moving to target(AA the target) while holding Spacebar or X only!...
  7.             Move To Mouse (will not AA while moving, but will cast all spells) Harass/W combo only!...
  8.             Ult Hot-key to turn it off and on without going into the menu. Default key is letter X now...
  9.             'W' Combo (R-W-Q-E) if any spell is on CD it will cast after that combo.
  10.  
  11. ]]--
  12.  
  13. if myHero.charName ~= "Ryze" then return end
  14.     local player = GetMyHero()
  15.     local qRange = 650
  16.     local wRange = 625
  17.     local eRange = 649 -- Real range is 675 -- lowered so E will cast after Q
  18.     local rRange = 675-- Higher if you want it on earlyer
  19.     local lastcast = _E -- Less ugly now
  20.  
  21.     local startAttackSpeed = 0.625
  22.     local lastBasicAttack = 0
  23.     local swingDelay = 0.15
  24.     local swing = 0
  25.  
  26.     local ts
  27.  
  28. --[[        Hot - keys      ]]
  29.     local hotRotate = string.byte("V") -- 86 -- V
  30.     local hotBurst = 32 -- Space Bar
  31.     local hotWonly = string.byte("S") -- 83 -- S
  32.     local hotUlt = string.byte("X") -- 88 -- X
  33.  
  34.     function OnLoad()
  35.         PrintFloatText(myHero,12,"Ryze Spammer v1.7(c-xkjtx) By TRUS")
  36.         PrintChat(">> Ryze Help Loaded! <<Oh Billy!>>")
  37.         DCConfig = scriptConfig("Ryze Combo v1.7c", "ryze-xkjtx-aa-in-combos-w-with-r")
  38.         DCConfig:addParam("scriptActive", "Rotation", SCRIPT_PARAM_ONKEYDOWN, false, hotRotate) -- V
  39.         DCConfig:addParam("burstActive", "Burst", SCRIPT_PARAM_ONKEYDOWN, false, hotBurst) --  Space
  40.         DCConfig:addParam("WonlyActive", "W combo", SCRIPT_PARAM_ONKEYDOWN, false, hotWonly) -- S
  41.         DCConfig:addParam("drawcircles", "Draw Circles", SCRIPT_PARAM_ONOFF, true)
  42.         DCConfig:addParam("AllClass", "All class library", SCRIPT_PARAM_ONOFF, false)
  43.         DCConfig:addParam("MoveToMouse", "Move to Mouse: 'W' combo only", SCRIPT_PARAM_ONOFF, true) -- On by default( So you can harass early game :) )
  44.         DCConfig:addParam("UltActive", "Ult In W combo", SCRIPT_PARAM_ONKEYTOGGLE, false, hotUlt) -- Off by default( So you can harass early game :) )
  45.         DCConfig:permaShow("scriptActive")
  46.         DCConfig:permaShow("burstActive")
  47.         DCConfig:permaShow("WonlyActive")
  48.         DCConfig:permaShow("MoveToMouse")
  49.         DCConfig:permaShow("UltActive")
  50.         ts = TargetSelector(TARGET_LOW_HP,qRange+150,DAMAGE_MAGIC,true) -- so you can select target and focus(good for targeting minions you want to cast on)
  51.         ts.name = "Ryze"
  52.         DCConfig:addTS(ts)
  53.         lastBasicAttack = os.clock()
  54.     end
  55.  
  56.     function doSpell(ts, spell, range)
  57.         if ts.target ~= nil and GetMyHero():CanUseSpell(spell) == READY then
  58.             CastSpell(spell, ts.target)
  59.         end
  60.     end
  61.  
  62.     function OnWndMsg(msg,key)
  63.         if not DCConfig.scriptActive and not DCConfig.burstActive and not DCConfig.WonlyActive then lastcast = _E end
  64.     end
  65.  
  66.     function OnProcessSpell(unit, spell)
  67.         if unit.isMe and spell and spell.name and spell.name:lower():find("attack") then
  68.             swing = 1
  69.             lastBasicAttack = os.clock()
  70.         end
  71.     end
  72.  
  73.     function OnTick()
  74.         if myHero.dead then
  75.             return
  76.         end
  77.         ts:update()
  78.         if ts.target ~= nil then
  79.             AttackDelay = 1/(myHero.attackSpeed*startAttackSpeed) -- 1/(myHero.attackSpeed*startAttackSpeed) -- Trying something new -- (1000/(myHero.attackSpeed/(1/startAttackSpeed)))/1000
  80.             if swing == 1 and os.clock() > lastBasicAttack + AttackDelay then
  81.                 swing = 0
  82.             end
  83.             if DCConfig.scriptActive or DCConfig.burstActive then
  84.                 if ts.target ~= nil and GetDistance(ts.target) < qRange+150 and swing == 0 then
  85.                     myHero:Attack(ts.target)
  86.                 end
  87.             end
  88.         end
  89.         if not myHero.dead and DCConfig.WonlyActive and ts ~= nil then
  90.             if DCConfig.MoveToMouse
  91.             then
  92.                 player:MoveTo(mousePos.x, mousePos.z) -- move to mouse(will not AA while moving, but will cast all spells and continue to move.)
  93.             end
  94.             if ts.target ~= nil and DCConfig.UltActive and myHero:CanUseSpell(_R) == READY and GetDistance(ts.target) <= rRange
  95.             then
  96.                 doSpell(ts, _R, rRange)
  97.                 lastcast = _E
  98.             elseif myHero:CanUseSpell(_W) == READY
  99.             then
  100.                 doSpell(ts, _W, wRange)
  101.                 lastcast = _W
  102.             elseif myHero:CanUseSpell(_Q) == READY
  103.             then
  104.                 doSpell(ts, _Q, qRange)
  105.                 lastcast = _Q
  106.             elseif myHero:CanUseSpell(_E) == READY
  107.             then
  108.                 doSpell(ts, _E, eRange)
  109.                 lastcast = _E
  110.             end
  111.         end
  112.         if not myHero.dead and DCConfig.scriptActive and myHero.cdr < -0.35 and ts ~= nil then
  113.             if myHero:CanUseSpell(_Q) == READY
  114.             then
  115.                doSpell(ts, _Q, qRange)
  116.                lastcast = _Q
  117.             elseif (lastcast == _Q or lastcast == _W) and myHero:CanUseSpell(_W) == READY
  118.             then
  119.                doSpell(ts, _W, wRange)
  120.                lastcast = _W
  121.             elseif (lastcast == _Q or lastcast == _E) and myHero:CanUseSpell(_E) == READY
  122.             then
  123.                doSpell(ts, _E, eRange)
  124.                lastcast = _E
  125.             end
  126.         elseif (not myHero.dead and myHero.cdr >= -0.35 and DCConfig.scriptActive and ts ~= nil) or DCConfig.burstActive and ts ~= nil then
  127.             if myHero:CanUseSpell(_Q) == READY
  128.             then
  129.                doSpell(ts, _Q, qRange)
  130.                lastcast = _Q
  131.             elseif (lastcast == _Q or lastcast == _W) and myHero:CanUseSpell(_W) == READY and ts ~= nil
  132.             then
  133.                doSpell(ts, _W, wRange)
  134.                lastcast = _W
  135.             elseif myHero:CanUseSpell(_E) == READY and myHero:CanUseSpell(_W) ~= READY and myHero:CanUseSpell(_Q) ~= READY and ts ~= nil
  136.             then
  137.                doSpell(ts, _E, eRange)
  138.                lastcast = _E
  139.             end
  140.         end
  141.     end
  142.  
  143.     function OnDraw()
  144.         if myHero.dead then
  145.             return
  146.         end
  147.         if DCConfig.drawcircles and not myHero.dead then
  148.             DrawCircle(myHero.x, myHero.y, myHero.z, rRange, 0x000099) -- blueish(Ult Range)
  149.             DrawCircle(myHero.x, myHero.y, myHero.z, wRange, 0x0000CC) -- Greenish(W Range)
  150.             if ts.target ~= nil then
  151.                 DrawCircle(ts.target.x, ts.target.y, ts.target.z, 100, 0x660066) -- purpleish(target prediction)
  152.             end
  153.         end
  154.     end
  155.  
  156.     function OnSendChat(msg)
  157.         ts:OnSendChat(msg, "pri")
  158.     end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement