Advertisement
Guest User

Ryze-xkjtx-AA-In-Combos--UltAfterW.lua

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