Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -->> Maokai <<--
- -- Space - W -> Q
- -- G - E -> W -> Q -> R
- -- Z - E
- if myHero.charName ~= "Maokai" then return end
- local qRange = 600
- local wRange = 650
- local eRange = 1100
- local rRange = 650
- local QREADY, WREADY, EREADY = false, false, false
- local RNDSlot = nil
- if VIP_USER then
- ep = TargetPredictionVIP(eRange, 1750, 0.25, 175)
- PrintChat("<font color='#CCCCCC'> >> Maokai Helper - VIP Prediction <<</font>")
- else
- ep = TargetPrediction(eRange, 1.75, 250, 175)
- PrintChat("<font color='#CCCCCC'> >> Maokai Helper - Basic Prediction <<</font>")
- end
- function OnLoad()
- MHConfig = scriptConfig("MaokaiCombo", "MaokaiCombo")
- MHConfig:addParam("gankCombo", "Gank Combo", SCRIPT_PARAM_ONKEYDOWN, false, 32)
- MHConfig:addParam("fullCombo", "Full Combo", SCRIPT_PARAM_ONKEYDOWN, false, 71)
- MHConfig:addParam("eHarass", "E Harass", SCRIPT_PARAM_ONKEYDOWN, false, 90)
- MHConfig:addParam("drawCircles", "Draw Ranges", SCRIPT_PARAM_ONOFF, false)
- MHConfig:permaShow("gankCombo")
- MHConfig:permaShow("fullCombo")
- ts = TargetSelector(TARGET_LOW_HP, 1200, DAMAGE_MAGIC)
- ts.name = "Maokai"
- MHConfig:addTS(ts)
- end
- function OnTick()
- ts:update()
- QREADY = (myHero:CanUseSpell(_Q) == READY)
- WREADY = (myHero:CanUseSpell(_W) == READY)
- EREADY = (myHero:CanUseSpell(_E) == READY)
- RREADY = (myHero:CanUseSpell(_R) == READY)
- RNDSlot = GetInventorySlotItem(3143)
- if ts.target then
- if MHConfig.gankCombo then -- W -> Q
- gankCombo(ts.target)
- end
- if MHConfig.fullCombo then -- E -> W -> Q -> R
- fullCombo(ts.target)
- end
- if MHConfig.eHarass then -- E
- Harass(ts.target)
- end
- end
- end
- function gankCombo(target)
- if WREADY and GetDistance(target) <= wRange then
- CastSpell(_W, target)
- end
- if RNDSlot ~= nil and CanUseSpell(RNDSlot) == READY and GetDistance(ts.target) <= 500 then
- CastSpell(RNDSlot)
- end
- if QREADY and GetDistance(target) <= qRange then
- CastSpell(_Q, target.x, target.z)
- end
- end
- function fullCombo(target)
- local ePred = ep:GetPrediction(target)
- if EREADY and ePred and GetDistance(ePred) < eRange then
- if ep:GetHitChance(target) > 0.5 then
- CastSpell(_E, ePred.x, ePred.z)
- end
- end
- myHero:Attack(target)
- if WREADY and GetDistance(target) <= wRange then
- CastSpell(_W, target)
- end
- if RNDSlot ~= nil and CanUseSpell(RNDSlot) == READY and GetDistance(ts.target) <= 500 then
- CastSpell(RNDSlot)
- end
- if RREADY and GetDistance(target) <= rRange then
- if myHero:GetSpellData(_R).name ~= "maokaidrain3toggle" then
- CastSpell(_R, target.x, target.z)
- end
- end
- if QREADY and GetDistance(target) <= qRange then
- CastSpell(_Q, target.x, target.z)
- end
- end
- function Harass(target)
- local ePred = ep:GetPrediction(target)
- if EREADY and ePred and GetDistance(ePred) < eRange then
- if ep:GetHitChance(target) > 0.5 then
- CastSpell(_E, ePred.x, ePred.z)
- end
- end
- end
- function OnDraw()
- if not myHero.dead and MHConfig.drawCircles then
- DrawCircle(myHero.x, myHero.y, myHero.z, wRange, 0xCCFF33)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment