Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Caitlyn
- AesConfig version 0.4 beta By Puze aka Bestplox
- --xkjtx modded to his liking..
- ]]--
- -- RANGE
- local ERange = 1000
- -- PREDICTION
- local QPredic = TargetPrediction(1300, 2.2, 610) -- Range , Speed, Delay
- local WPredic = TargetPrediction(800)
- local EPredic = TargetPrediction(1000, 0, 8)
- -- Misc
- local ignite = nil
- local IREADY = false
- function OnLoad()
- --PrintChat(" >> Caitlyn combo loaded!")
- Config = scriptConfig("Caitlyn Combo", "ConfigCombo")
- Config:addParam("combo", "Use Combo", SCRIPT_PARAM_ONKEYDOWN, false, 32) -- SpaceBar
- Config:addParam("ult", "Use ult", SCRIPT_PARAM_ONKEYTOGGLE, false, 88) -- X
- Config:addParam("trap", "Trap under enemy", SCRIPT_PARAM_ONKEYDOWN, false, 83) -- S
- Config:addParam("autoignite", "Use ignite", SCRIPT_PARAM_ONOFF, false) -- I use my own
- Config:addParam("net", "Use net in combo", SCRIPT_PARAM_ONKEYTOGGLE, false, 86) -- V
- Config:addParam("movement", "Move to mouse", SCRIPT_PARAM_ONOFF, true) -- only moves with Trap hot-key
- Config:addParam("draw", "Draw Circles", SCRIPT_PARAM_ONOFF, true)
- Config:permaShow("ult")
- Config:permaShow("net")
- ts = TargetSelector(TARGET_LOW_HP, 1400, DAMAGE_PHYSICAL, true) -- setting to true, gives the option to focus your own target
- ts.name = "Caitlyn"
- Config:addTS(ts)
- enemyMinions = minionManager(MINION_ENEMY, 1200, player)
- if myHero:GetSpellData(SUMMONER_1).name:find("SummonerDot") then
- ignite = SUMMONER_1
- elseif
- myHero:GetSpellData(SUMMONER_2).name:find("SummonerDot") then
- ignite = SUMMONER_2
- end
- end
- function OnTick()
- ts:update()
- enemyMinions:update()
- -- COMBO
- if Config.combo and ts.target ~= nil then
- -- Q
- QPredict = QPredic:GetPrediction(ts.target)
- if myHero:CanUseSpell(_Q) == READY and QPredict ~= nil and GetDistance(QPredict) <= 1300 then
- CastSpell(_Q, QPredict.x, QPredict.z)
- end
- -- E
- EPredict = EPredic:GetPrediction(ts.target)
- if myHero:CanUseSpell(_E) == READY and EPredict ~= nil and Config.net and GetDistance(EPredict) <= 1000 then
- if not minionCollision(EPredict, 60, ERange) then
- CastSpell(_E, EPredict.x, EPredict.z)
- end
- end
- end
- -- TRAP
- if Config.trap and ts.target ~= nil then
- WPredict = WPredic:GetPrediction(ts.target)
- if myHero:CanUseSpell(_W) == READY and WPredict ~= nil then
- CastSpell(_W, WPredict.x, WPredict.z)
- end
- end
- -- Auto Attack -- Will only AA after casting spells in Combo
- if ts.target ~= nil and Config.combo and GetDistance(ts.target) <= 850 then
- myHero:Attack(ts.target)
- end
- -- MOVE TO MOUSE
- if Config.movement and Config.trap then -- taken out : or Config.combo
- myHero:MoveTo(mousePos.x, mousePos.z)
- end
- -- Ultimate
- if Config.ult then
- local rDmg = 0
- if myHero:CanUseSpell(_R) == READY then
- for i = 1, heroManager.iCount, 1 do
- local target = heroManager:getHero(i)
- if ValidTarget(target) then
- rDmg = (getDmg("R", target, myHero) - 100)
- if target ~= nil and target.team ~= myHero.team and not target.dead and target.visible and GetDistance(target) <= 3000
- and target.health < rDmg and GetDistance(target) >= 400 then
- CastSpell(_R, target)
- end
- end
- end
- end
- end
- -- Ignite
- if Config.autoignite then
- IREADY = (ignite ~= nil and myHero:CanUseSpell(ignite) == READY)
- if IREADY then
- local ignitedmg = 0
- for j = 1, heroManager.iCount, 1 do
- local enemyhero = heroManager:getHero(j)
- if ValidTarget(enemyhero,600) then
- ignitedmg = 50 + 20 * myHero.level
- if enemyhero.health <= ignitedmg then
- CastSpell(ignite, enemyhero)
- end
- end
- end
- end
- end
- -- Draw
- function OnDraw()
- if Config.draw then
- if myHero:CanUseSpell(_Q) == READY then
- DrawCircle(myHero.x, myHero.y, myHero.z, 1300, 0xFF0000)
- end
- if myHero:CanUseSpell(_E) == READY then
- DrawCircle(myHero.x, myHero.y, myHero.z, 1000, 0xFF0000)
- end
- DrawCircle(myHero.x, myHero.y, myHero.z, 650, 0xFF0000) -- real AA range
- end
- end
- -- Minion Collision
- function minionCollision(predic, width, range)
- for _, minionObjectE in pairs(enemyMinions.objects) do
- if predic ~= nil and player:GetDistance(minionObjectE) < range then
- ex = player.x
- ez = player.z
- tx = predic.x
- tz = predic.z
- dx = ex - tx
- dz = ez - tz
- if dx ~= 0 then
- m = dz/dx
- c = ez - m*ex
- end
- mx = minionObjectE.x
- mz = minionObjectE.z
- distanc = (math.abs(mz - m*mx - c))/(math.sqrt(m*m+1))
- if distanc < width and math.sqrt((tx - ex)*(tx - ex) + (tz - ez)*(tz - ez)) > math.sqrt((tx - mx)*(tx - mx) + (tz - mz)*(tz - mz)) then
- return true
- end
- end
- end
- return false
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement