Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[ Varus Helper by HeX 1.1 ]]--
- --[[ Thanks to eXtragoZ for sharing his Q packet code ]]--
- if myHero.charName ~= "Varus" then return end
- --[[ Ranges ]]--
- local qRange = 0
- local eRange = 925
- local rRange = 1075
- --[[ Attacks ]]--
- local ProcReady = false
- --[[ Prediction ]]--
- local ep = TargetPrediction(925, 1.8, 150)
- local rp = TargetPrediction(1075, 2.0, 280)
- --[[ Q Stuff ]]--
- local cast = false
- local tick = 0
- --[[ Items ]]--
- local ignite = nil
- local QREADY, EREADY, RREADY = false, false, false
- local DFGREADY, BRKREADY, HXGREADY, BWCREADY, STDREADY = false, false, false, false, false
- local DFGSlot, BRKSlot, HXGSlot, BWCSlot, STDSlot = nil, nil, nil, nil, nil
- function OnLoad()
- PrintChat("<font color='#CCCCCC'> >> Varus Helper 1.1 loaded! <<</font>")
- VHConfig = scriptConfig("Varus Helper", "VarusHelper")
- VHConfig:addParam("scriptActive", "Auto Proc", SCRIPT_PARAM_ONKEYDOWN, false, 32)
- VHConfig:addParam("useR", "Use Ultimate", SCRIPT_PARAM_ONKEYTOGGLE, false, 90)
- VHConfig:addParam("eProc", "Auto E Proc", SCRIPT_PARAM_ONKEYTOGGLE, false, 88)
- 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")
- VHConfig:permaShow("eProc")
- VHConfig:permaShow("useR")
- 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()
- qRange = 925 + (0.3375*VHConfig.waitDelay)
- qp = TargetPrediction(qRange, 1.9, 100)
- --[[ Prediction ]]--
- if ts.target ~= nil then
- qPred = qp:GetPrediction(ts.target)
- ePred = ep:GetPrediction(ts.target)
- rPred = rp:GetPrediction(ts.target)
- end
- --[[ Ready ]]--
- DFGSlot, BRKSlot, HXGSlot, BWCSlot, STDSlot = GetInventorySlotItem(3153), GetInventorySlotItem(3128), GetInventorySlotItem(3146), GetInventorySlotItem(3144), GetInventorySlotItem(3131)
- DFGREADY = (DFGSlot ~= nil and myHero:CanUseSpell(DFGSlot) == READY)
- BRKREADY = (BRKSlot ~= nil and myHero:CanUseSpell(BRKSlot) == READY)
- HXGREADY = (HXGSlot ~= nil and myHero:CanUseSpell(HXGSlot) == READY)
- BWCREADY = (BWCSlot ~= nil and myHero:CanUseSpell(BWCSlot) == READY)
- STDREADY = (STDSlot ~= nil and myHero:CanUseSpell(STDSlot) == READY)
- IREADY = (ignite ~= nil and myHero:CanUseSpell(ignite) == READY)
- QREADY = (myHero:CanUseSpell(_Q) == READY)
- EREADY = (myHero:CanUseSpell(_E) == READY)
- RREADY = (myHero:CanUseSpell(_R) == 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
- --[[ EProc ]]--
- if ts.target ~= nil and VHConfig.eProc and not VHConfig.scriptActive then
- if ePred ~= nil then
- if EREADY and GetDistance(ePred) < eRange and ProcReady == true then
- CastSpell(_E, ePred.x, ePred.z)
- end
- end
- end
- --[[ Auto Proc ]]--
- if ts.target ~= nil and VHConfig.scriptActive then
- --[[ Items ]]--
- if GetDistance(ts.target) < 600 then
- if DFGREADY then CastSpell(DFGSlot, ts.target) end
- if BRKREADY then CastSpell(BRKSlot, ts.target) end
- if HXGREADY then CastSpell(HXGSlot, ts.target) end
- if BWCREADY then CastSpell(BWCSlot, ts.target) end
- if STDREADY then CastSpell(STDSlot) end
- end
- --[[ Abilities ]]--
- if qPred ~= nil then
- if QREADY and ProcReady == true and GetDistance(qPred) < qRange 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)
- end
- end
- if rPred ~= nil then
- if RREADY and GetDistance(rPred) < rRange and VHConfig.useR then
- CastSpell(_R, rPred.x, rPred.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 object.name == "VarusW_counter_03.troy" and GetDistance(object, ts.target) <= 125 then
- ProcReady = true
- end
- end
- function OnDeleteObj(object)
- if object ~= nil and object.name == "VarusW_counter_03.troy" then
- ProcReady = false
- 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