Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[ Draven's Axe Catcher 1.0 by Dottie]]
- if GetMyHero().charName == "Draven" then
- Draven = { qreticleName = "Draven_Q_reticle_self.troy",
- qRadius = 90,
- aaRange = 550 + 200, --200 is hitbox avg
- eRange = 1100 }
- reticleDetectionRange = 1200 -- will not track reticles outside this range
- reticles = {} -- array of all reticles
- drawAttackRangeColor = 0x00FF0000
- drawERangeColor = 0x00FF0000
- DravenCatcherConfig = scriptConfig("Draven Catcher","dravencatcher")
- DravenCatcherConfig:addParam("catchAxes","Catch Axes",SCRIPT_PARAM_ONKEYDOWN, false, 32) --32 is spacebar
- DravenCatcherConfig:addParam("drawCircles","Draw Circles",SCRIPT_PARAM_ONOFF,true)
- DravenCatcherConfig:permaShow("catchAxes")
- function OnTick()
- if DravenCatcherConfig.catchAxes and next(reticles) and GetDistance(reticles[1]) > Draven.qRadius then
- myHero:MoveTo(reticles[1].x, reticles[1].z)
- end
- end
- function OnCreateObj(object)
- if myHero.dead then return end
- if object ~= nil and object.name ~= nil and object.x and object.z and GetDistance(myHero, object) <= reticleDetectionRange then
- if object.name == Draven.qreticleName then
- table.insert(reticles, object)
- end
- end
- end
- function OnDeleteObj(object)
- if object ~= nil and object.name ~= nil and object.x ~= nil and object.z ~= nil and GetDistance(myHero, object) <= reticleDetectionRange then
- if object.name == Draven.qreticleName then
- table.remove(reticles, 1)
- end
- end
- end
- function OnDraw()
- if not myHero.dead then
- if DravenCatcherConfig.drawCircles then
- DrawCircle(myHero.x, myHero.y, myHero.z, Draven.aaRange, drawAttackRangeColor)
- DrawCircle(myHero.x, myHero.y, myHero.z, Draven.eRange, drawERangeColor)
- end
- end
- end
- PrintChat(" >> Draven's Axe Catcher 1.0")
- end
Advertisement
Add Comment
Please, Sign In to add comment