Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[ Varus Helper by HeX 1.1.1 - Toggled ]]--
- --[[ Thanks to eXtragoZ for sharing his Q packet code ]]--
- if myHero.charName ~= "Varus" then return end
- --[[ Ranges ]]--
- local qRange = 0
- local eRange = 925
- --[[ Attacks ]]--
- local ProcReady = false
- --[[ Prediction ]]--
- local ep = TargetPrediction(925, 1.8, 150)
- --[[ Q Stuff ]]--
- local cast = false
- local tick = 0
- --[[ Items ]]--
- local ignite = nil
- local QREADY, EREADY = false, false
- function OnLoad()
- PrintChat("<font color='#CCCCCC'> >> Varus Helper 1.1.1 loaded! <<</font>")
- VHConfig = scriptConfig("Varus Helper", "VarusHelper")
- VHConfig:addParam("scriptActive", "Auto Proc", SCRIPT_PARAM_ONKEYTOGGLE, true, 90)
- VHConfig:addParam("autoignite", "Ignite when Killable", SCRIPT_PARAM_ONOFF, true)
- VHConfig:addParam("drawcirclesSelf", "Draw Circles - Self", SCRIPT_PARAM_ONOFF, false)
- VHConfig:addParam("drawcirclesEnemy", "Draw Circles - Enemy", SCRIPT_PARAM_ONOFF, false)
- VHConfig:addParam("waitDelay", "Delay before Q(ms)",SCRIPT_PARAM_SLICE, 250, 0, 2000, 2)
- VHConfig:permaShow("scriptActive")
- ts = TargetSelector(TARGET_LOW_HP, 1600, DAMAGE_MAGIC)
- ts.name = "Varus"
- VHConfig:addTS(ts)
- ProcReady = false
- 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()
- --[[ Prediction ]]--
- qRange = 925 + (0.3375*VHConfig.waitDelay)
- qp = TargetPrediction(qRange, 1.9, 100)
- if ts.target ~= nil then
- qPred = qp:GetPrediction(ts.target)
- ePred = ep:GetPrediction(ts.target)
- end
- --[[ Ready ]]--
- IREADY = (ignite ~= nil and myHero:CanUseSpell(ignite) == READY)
- QREADY = (myHero:CanUseSpell(_Q) == READY)
- EREADY = (myHero:CanUseSpell(_E) == READY)
- --[[ Auto Ignite ]]--
- if VHConfig.autoignite then
- if IREADY then
- local ignitedmg = 0
- for i = 1, heroManager.iCount, 1 do
- local enemyhero = heroManager:getHero(i)
- if ValidTarget(enemyhero,600) then
- ignitedmg = 50 + 20 * myHero.level
- if enemyhero.health <= ignitedmg then
- CastSpell(ignite, enemyhero)
- end
- end
- end
- end
- end
- --[[ Auto Proc ]]--
- if ts.target ~= nil and VHConfig.scriptActive then
- local qDamage = getDmg("Q",ts.target, myHero)
- local eDamage = getDmg("E",ts.target, myHero)
- --[[ Abilities ]]--
- if qPred ~= nil then
- if QREADY and ProcReady == true and GetDistance(qPred) < qRange then
- QCast()
- elseif QREADY and GetDistance(qPred) < qRange and ts.target.health < qDamage then
- QCast()
- end
- end
- if ePred ~= nil then
- if EREADY and GetDistance(ePred) < eRange and ProcReady == true and not QREADY and GetTickCount() > tick + (VHConfig.waitDelay+1000) then
- CastSpell(_E, ePred.x, ePred.z)
- elseif EREADY and GetDistance(ePred) < eRange and ts.target.health < eDamage then
- CastSpell(_E, ePred.x, ePred.z)
- end
- end
- end
- end
- function OnDraw()
- if VHConfig.drawcirclesSelf and not myHero.dead then
- DrawCircle(myHero.x, myHero.y, myHero.z, qRange, 0x00FF00)
- end
- if VHConfig.drawcirclesEnemy and ts.target ~= nil then
- for j=0, 10 do
- DrawCircle(ts.target.x, ts.target.y, ts.target.z, 40 + j*1.5, 0x00FF00)
- end
- end
- end
- --[[ Functions ]]--
- function OnCreateObj(object)
- if object ~= nil and ts.target ~= nil then
- if object.name == "VarusW_counter_03.troy" and GetDistance(object, ts.target) <= 125 then
- ProcReady = true
- end
- end
- end
- function OnDeleteObj(object)
- if object ~= nil and ts.target ~= nil then
- if object.name == "VarusW_counter_03.troy"and GetDistance(object, ts.target) <= 125 then
- ProcReady = false
- end
- end
- end
- --[[ Q Function ]]--
- function QCast()
- if qPred ~= nil and not cast and GetTickCount() - tick > VHConfig.waitDelay then
- CastSpell(_Q, qPred.x, qPred.z)
- tick = GetTickCount()
- cast = true
- end
- if qPred ~= nil and cast and GetTickCount() - tick > VHConfig.waitDelay then
- pQ2 = CLoLPacket(0xE6)
- pQ2:EncodeF(myHero.networkID)
- pQ2:Encode1(128)
- pQ2:EncodeF(qPred.x)
- pQ2:EncodeF(qPred.y)
- pQ2:EncodeF(qPred.z)
- pQ2.dwArg1 = 1
- pQ2.dwArg2 = 0
- SendPacket(pQ2)
- tick = GetTickCount()
- cast = false
- elseif cast and qPred == nil then
- pQ2 = CLoLPacket(0xE6)
- pQ2:EncodeF(myHero.networkID)
- pQ2:Encode1(128)
- pQ2:EncodeF(mousePos.x)
- pQ2:EncodeF(mousePos.y)
- pQ2:EncodeF(mousePos.z)
- pQ2.dwArg1 = 1
- pQ2.dwArg2 = 0
- SendPacket(pQ2)
- tick = GetTickCount()
- cast = false
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment