Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[((Varus Helper by HeX 1.0))]]--
- if myHero.charName ~= "Varus" then return end
- --[[((Ranges))]]--
- local qRange = 0
- local eRange = 925
- local rRange = 1075
- --[[((Attacks))]]--
- local ProcReady = false
- --[[((Waits))]]--
- local nextTick = 0
- local waitDelay = 400
- local delayTime = 0
- --[[((Prediction))]]--
- local qp = TargetPrediction(850, 1.9, 100)
- local ep = TargetPrediction(925, 1.8, 150)
- local rp = TargetPrediction(1075, 2.0, 280)
- --[[((Q Stuff))]]--
- local buffer = 0
- local iPressedQ = false
- local qTick = 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.0 loaded! <<</font>")
- VHConfig = scriptConfig("Varus Helper", "VarusHelper")
- VHConfig:addParam("scriptActive", "Auto Proc", SCRIPT_PARAM_ONKEYTOGGLE, true, 90)
- VHConfig:addParam("useR", "Use Ultimate", SCRIPT_PARAM_ONKEYDOWN, false, 88)
- VHConfig:addParam("eProc", "Auto E Proc", SCRIPT_PARAM_ONKEYTOGGLE, false, 67)
- 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("useR")
- VHConfig:permaShow("eProc")
- ts = TargetSelector(TARGET_LOW_HP, 1600, DAMAGE_MAGIC)
- ts.name = "Varus"
- VHConfig:addTS(ts)
- ProcReady = false
- lastQ = os.clock()
- qTick = 0
- 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)
- --[[((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
- --[[((Ultimate))]]--
- if rPred ~= nil then
- if RREADY and GetDistance(rPred) < rRange and VHConfig.useR then
- CastSpell(_R, rPred.x, rPred.z)
- 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
- targetX, targetZ = qPred.x, qPred.z
- CastSpellQ()
- end
- end
- if ePred ~= nil then
- if EREADY and GetDistance(ePred) < eRange and ProcReady == true and not QREADY and GetTickCount() > qTick + (VHConfig.waitDelay+500) then
- CastSpell(_E, ePred.x, ePred.z)
- end
- end
- if ts.target ~= nil and ProcReady == true and GetTickCount() < qTick + (VHConfig.waitDelay+500) then
- myHero:Attack(ts.target)
- 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
- if object.name == "VarusQChannel.troy" then iPressedQ = true end
- end
- function OnDeleteObj(object)
- if object ~= nil and object.name == "VarusW_counter_03.troy" then
- ProcReady = false
- end
- if object.name == "VarusQChannel.troy" then iPressedQ = false end
- end
- --[[((Work Around))]]--
- function CastSpellQ()
- if myHero:CanUseSpell(_Q) == READY and GetTickCount() > qTick + VHConfig.waitDelay then
- if not iPressedQ and ProcReady == true then
- CastSpell(_Q, targetX, targetZ)
- CastSpell(10)
- qTick = GetTickCount()
- end
- if iPressedQ and ProcReady == true and GetTickCount() > qTick + VHConfig.waitDelay then
- CastSpell(_Q, targetX, targetZ)
- qTick = GetTickCount()
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment