Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[Jayce the Rapist by jbman!
- Based heavily on Manciuszz's Jayce Helper Script]]
- if myHero.charName == "Jayce" then
- PrintChat(" >> Jayce the Rapist loaded!")
- require "AllClass"
- --SETTINGS
- local showRanges = true --Displays Q range and Q > E max range when in Mercury Cannon stance(will show range only of the available spells(not on cooldown))
- local focusedTarget = true
- local EnableAutoE = true
- local QEHowFarAway = 0.11 --Cast Acceleration gate this far away when firing QE at your target. From 0.1 to 0.15 I prefer 0.11 cause it drops it near me, getting the buff with the improved blast almost instantly.
- local FreeQEHowFarAway = 0.11 --Cast Acceleration gate this far away when firing QE your cursor (great for clearing mobs). From 0.1 to 0.15 I prefer 0.11 cause it drops it near me, getting the buff with the improved blast almost instantly.
- local RefreshRate = 50 --function OnTick() refresh rate(How fast will it work) | Good Value is from 50 to 500
- local targetCircle = 100 --RED Circle of a enemy that is in Target Selectors scan range.
- --Globals
- --Attack Cast
- local lastBasicAttack = 0
- local swingDelay = 0.15 -- Play around with this to get the right delay. I usually set mine lower but people with faster connections may not want to.
- local shootDelay = 0.15 -- Play around with this to get the right delay. I usually set mine lower but people with faster connections may not want to.
- local swing = 0
- -- Target Prediction
- local range = 1600
- local proj_speed = 2.1
- local delay = 200
- local smoothness = 50
- local targetSelected = true
- --[[ Code ]]
- local ts = TargetSelector(TARGET_LOW_HP, range)
- local tp = TargetPrediction(range, proj_speed, delay, smoothness)
- function GetDistanceTo(target1, target2)
- if target1 and target2 then
- if target1.x and target2.x and target1.z and target2.z then
- local distance = math.floor(math.sqrt((target2.x - target1.x) ^ 2 + (target2.z - target1.z) ^ 2))
- return distance
- end
- end
- end
- function OnProcessSpell(object, spell)
- spellName = spell.name
- if object ~= nil and object.name == myHero.name and ((spellName == "jaycepassiverangedattack") or (spellName == "jaycepassivemeleeattack") or (spellName == "JayceBasicAttack") or (spellName == "JayceBasicAttack2") or (spellName == "JayceBasicAttack3") or (spellName == "JayceCritAttack") or (spellName == "JayceCritAttack2")or (spellName == "JayceRangedAttack") or (spellName == "JayceRangedAttack2") or (spellName == "JayceRangedAttack3") or (spellName == "JayceRangedCritAttack")) then
- swing = 1
- lastBasicAttack = os.clock()
- end
- end
- -- SCRIPT---
- function OnTick()
- if myHero.dead then --If dead. Do nothing.
- return
- end
- --QE in Cannon Stance
- if (IsKeyDown(88) or IsKeyDown(67)) and myHero:GetSpellData(_R).name == "jaycestancegth" and (myHero:CanUseSpell(_Q) == READY and myHero:CanUseSpell(_E) == READY) then
- ts:update()
- TargetPrediction__OnTick()
- if ts.target ~= nil and not ts.target.dead and ts.target.team ~= myHero.team and ts.target.visible then
- local predictedPos = tp:GetPrediction(ts.target)
- if predictedPos ~= nil and (myHero:CanUseSpell(_Q) == READY and myHero:CanUseSpell(_E) == READY) then
- EnemyPos = Vector(predictedPos.x,predictedPos.z)
- HeroPos = Vector(myHero.x,myHero.z)
- GatePos = HeroPos + ( HeroPos - EnemyPos ):normalized()*(-QEHowFarAway)
- if (myHero:CanUseSpell(_Q) == READY and myHero:CanUseSpell(_E) == READY) then
- CastSpell(_Q, predictedPos.x, predictedPos.z) -- _Q has a 0.5~ channel time and casting E doesn't cancel it, making pretty comfty combo
- CastSpell(_E, GatePos.x, GatePos.z) -- Drops it near yourself.This way YOU GET THE SPEED BOOST almost IMMEDIATELY + You get almost instant powered Q.
- end
- end
- end
- end
- --FreeQE in Cannon Stance
- if IsKeyDown(84) and myHero:GetSpellData(_R).name == "jaycestancegth" and (myHero:CanUseSpell(_Q) == READY and myHero:CanUseSpell(_E) == READY) then
- EnemyPos = Vector(mousePos.x,mousePos.z)
- HeroPos = Vector(myHero.x,myHero.z)
- GatePos = HeroPos + ( HeroPos - EnemyPos ):normalized() * (-FreeQEHowFarAway)
- if (myHero:CanUseSpell(_Q) == READY and myHero:CanUseSpell(_E) == READY) then
- CastSpell(_Q, mousePos.x,mousePos.z) -- _Q has a 0.5~ channel time and casting E doesn't cancel it, making pretty comfty combo
- CastSpell(_E, GatePos.x, GatePos.z) -- Drops it near yourself.This way YOU GET THE SPEED BOOST almost IMMEDIATELY + You get almost instant powered Q.
- end
- end
- -- Burst Combo. If your QE in Canon stance is on CD. You will switch to Hammer Stance and Q, AA-E.
- if IsKeyDown(67) then
- ts:update()
- if myHero:GetSpellData(_R).name == "jaycestancegth" and ts.target ~= nil and myHero:CanUseSpell(_Q) ~= READY and myHero:CanUseSpell(_E) ~= READY then
- CastSpell(_W)
- CastSpell(_R)
- elseif myHero:GetSpellData(_R).name == "JayceStanceHtG" then
- if ts.target ~= nil and myHero:CanUseSpell(_Q) == READY and not ts.target.dead and ts.target.team ~= myHero.team and ts.target.visible and GetDistanceTo(myHero,ts.target) <= 620 then
- CastSpell(_Q, ts.target)
- end
- if ts.target ~= nil and not ts.target.dead and ts.target.team ~= myHero.team and ts.target.visible and GetDistanceTo(myHero,ts.target) <= 620 then
- myHero:Attack(ts.target)
- end
- if myHero:GetSpellData(_R).name == "JayceStanceHtG" and swing == 1 then
- CastSpell(_W)
- if (os.clock() - lastBasicAttack > swingDelay) and ts.target ~= nil and myHero:CanUseSpell(_E) == READY and not ts.target.dead and ts.target.team ~= myHero.team and ts.target.visible then
- CastSpell(_E, ts.target)
- swing = 0
- end
- end
- end
- end
- -- Just Q in Hammer Stance
- if IsKeyDown(88) and myHero:GetSpellData(_R).name == "JayceStanceHtG" then
- ts:update() -- When in Hammer form go dunk that enemy and attack-kite him.
- if ts.target ~= nil and myHero:CanUseSpell(_Q) == READY and not ts.target.dead and ts.target.team ~= myHero.team and ts.target.visible and GetDistanceTo(myHero,ts.target) < 620 then
- CastSpell(_Q, ts.target)
- end
- end
- --Auto Last Hit kill
- if (IsKeyPressed(88) or IsKeyPressed(90) or IsKeyPressed(67)) and myHero:GetSpellData(_R).name == "JayceStanceHtG" then
- ts:update()
- if ts.target ~= nil then
- local jayceEhammerdmg = (((30 * myHero:GetSpellData(_E).level + 10) + myHero.addDamage) + ((3 * myHero:GetSpellData(_E).level + 5) * ts.target.maxHealth/100) - (ts.target.maxHealth/20))
- if ts.target.health < jayceEhammerdmg and GetDistanceTo(myHero, ts.target) <= 305 then
- if ts.target ~= nil and myHero:CanUseSpell(_E) == READY and not ts.target.dead and ts.target.team ~= myHero.team and ts.target.visible and GetDistanceTo(myHero,ts.target) < 305 then
- CastSpell(_E, ts.target)
- end
- end
- end
- end
- -- AA-E in Hammer Stance
- if IsKeyDown(90) and myHero:GetSpellData(_R).name == "JayceStanceHtG" then
- ts:update()
- if swing == 1 then
- if (os.clock() - lastBasicAttack > swingDelay) and ts.target ~= nil and myHero:CanUseSpell(_E) == READY and not ts.target.dead and ts.target.team ~= myHero.team and ts.target.visible and GetDistanceTo(myHero,ts.target) < 305 then
- CastSpell(_E, ts.target)
- swing = 0
- end
- end
- end
- -- Just E in Hammer Stance
- if IsKeyDown(90) and myHero:GetSpellData(_R).name == "JayceStanceHtG" then
- ts:update()
- if ts.target ~= nil and myHero:CanUseSpell(_E) == READY and not ts.target.dead and ts.target.team ~= myHero.team and ts.target.visible and (GetDistanceTo(myHero,ts.target) > 325 and GetDistanceTo(myHero,ts.target) < 500) then
- CastSpell(_E, ts.target)
- end
- end
- -- AA-W in Cannon Stance
- if IsKeyDown(90) and myHero:GetSpellData(_R).name == "jaycestancegth" then
- if swing == 1 then
- if (os.clock() - lastBasicAttack > shootDelay) and myHero:CanUseSpell(_W) == READY then
- CastSpell(_W)
- swing = 0
- end
- end
- end
- if os.clock() > lastBasicAttack + 0.7 then
- swing = 0
- end
- end
- function OnDraw()
- if myHero.dead then
- return
- end
- if focusedTarget then
- if ts.target ~= nil then
- DrawCircle(ts.target.x, ts.target.y, ts.target.z, targetCircle, 0xFFFF0000)
- end
- end
- if showRanges then
- if myHero:GetSpellData(_R).name == "jaycestancegth" then --if in Mercury Cannon stance
- if myHero:CanUseSpell(_Q) == READY and myHero:CanUseSpell(_E) == READY then
- DrawCircle(myHero.x, myHero.y, myHero.z, range, 0xFF00FF00)
- end
- elseif myHero:GetSpellData(_R).name == "JayceStanceHtG" then --if in Hammer stance
- if myHero:CanUseSpell(_Q) == READY then
- DrawCircle(myHero.x, myHero.y, myHero.z, 600, 0xFFFF0000)
- elseif myHero:CanUseSpell(_E) == READY then
- DrawCircle(myHero.x, myHero.y, myHero.z, 305, 0xFFFF0000)
- end
- end
- end
- end
- end
Add Comment
Please, Sign In to add comment