Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- **SBTW** Dr. Mundo helper v0.15c (Made by xkjtx) Oh Billy!
- --**Pressing hot key will do the following:
- -** 'Auto' Cast Q on target with prediction (WITHOUT MINION COLLISION - Make sure minions are not in the way)
- -** 'Auto' Cast E when in eRange
- -** 'Auto' AA'ing when in qbRange
- -** 'Toggle' Cast W when in wRange and turn off when out of range(credits to jbman for fixing)
- -** 'Toggle' Cast Ult(R) when health is at 15%(you can change this to what you like)
- -** 'Hot-Key' Q Harass with prediction (default letter S for harass)
- ]]
- if myHero.charName ~= "DrMundo" then return end
- local player = GetMyHero()
- local range = 125 -- Basic Attack Range
- local qRange = 1050 -- Q range
- local qbRange = 400 -- Auto Attack in this range (when holding hot-key you will start AA'ing)
- local eRange = 300 -- Turn on E when in this range
- local wRange = 325 -- Turn on W when target is in this range
- local wbRange = 355 -- Turn off W when target is out of this range
- local pRange = 100 -- for prediction circle
- --Hotkeys
- local hotQEWkey = 32 -- Space bar
- local hotQharass = string.byte("S")
- -- more locals
- local QREADY, EREADY, WREADY, RREADY = false, false, false, false
- local wUsed = false
- local travelDuration, buffCount, predic = nil, nil, nil
- local ts
- local delay = 300
- local speed = 1.975
- local HUNDRED = 100
- local healthPercentage = 20 -- Health percentage (18%) this is when Ult will activate
- function OnLoad()
- PrintChat("Dr. Mundo Helper v0.15c: (xkjtx) Oh Billy!)")
- DMConfig = scriptConfig("Dr. Mundo Q Helper 0.15c", "Dr-Mundo-helper-SBTW--v0.15c")
- DMConfig:addParam("qActive", "Infected Cleaver", SCRIPT_PARAM_ONKEYDOWN, false, hotQEWkey) -- Space
- DMConfig:addParam("qHarass", "Cleaver Harass", SCRIPT_PARAM_ONKEYDOWN, false, hotQharass) -- Letter 'S'
- DMConfig:addParam("toggleW", "Turn W Casting On/Off", SCRIPT_PARAM_ONOFF, false) -- Off by default
- DMConfig:addParam("autoUlt", "Use Ult When Low Health", SCRIPT_PARAM_ONOFF, true)
- DMConfig:addParam("drawcircles", "Draw Circles", SCRIPT_PARAM_ONOFF, true)
- DMConfig:permaShow("qActive")
- DMConfig:permaShow("qHarass")
- DMConfig:permaShow("toggleW")
- DMConfig:permaShow("autoUlt")
- ts = TargetSelector(TARGET_LOW_HP,qRange,DAMAGE_PHYSICAL,true) -- So you can select target if you want(left clicking on the ground will default ts)
- ts.name = "DrMundo"
- DMConfig:addTS(ts)
- wUsed = false
- end
- function OnTick()
- if myHero.dead then
- return
- end
- ts:update()
- QREADY = (myHero:CanUseSpell(_Q) == READY)
- EREADY = (myHero:CanUseSpell(_E) == READY)
- WREADY = (myHero:CanUseSpell(_W) == READY)
- RREADY = (player:CanUseSpell(_R) == READY)
- if DMConfig.autoUlt then
- if not player.dead and ((player.health * HUNDRED ) / player.maxHealth) <= healthPercentage and RREADY then
- CastSpell(_R)
- end
- end
- if ts.target ~= nil and not myHero.dead then
- travelDuration = (delay + GetDistance(myHero, ts.target)/speed)
- ts:SetPrediction(travelDuration)
- predic = ts.nextPosition
- if DMConfig.qActive then
- if predic ~= nil and QREADY and GetDistance(predic) < qRange then
- CastSpell(_Q, predic.x, predic.z)
- end
- if GetDistance(ts.target) <= eRange and EREADY then
- CastSpell(_E)
- end
- if GetDistance(ts.target) < qbRange then
- myHero:Attack(ts.target)
- end
- end
- if DMConfig.qHarass then
- if predic ~= nil and QREADY and GetDistance(predic) < qRange then
- CastSpell(_Q, predic.x, predic.z)
- end
- end
- end
- if DMConfig.toggleW and DMConfig.qActive and not myHero.dead then
- if ts.target == nil then
- if wUsed and WREADY then
- CastSpell(_W)
- end
- elseif ts.target ~= nil then
- if GetDistance(ts.target) <= wRange and wUsed == false and WREADY then
- CastSpell(_W)
- elseif ts.target.dead or GetDistance(ts.target) > wbRange and wUsed and WREADY then
- CastSpell(_W)
- end
- end
- end
- end
- function OnProcessSpell(unit, spell)
- if unit.isMe and wUsed == false and spell and spell.name:find("BurningAgony") then
- wUsed = true
- elseif unit.isMe and wUsed == true and spell and spell.name:find("BurningAgony") then
- wUsed = false
- end
- end
- function OnDraw()
- if DMConfig.drawcircles and not myHero.dead then
- DrawCircle(myHero.x, myHero.y, myHero.z, range, 0x990099)
- DrawCircle(myHero.x, myHero.y, myHero.z, qRange, 0x003300)
- DrawCircle(myHero.x, myHero.y, myHero.z, wRange, 0x003300)
- if 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
- if predic ~= nil then
- DrawCircle(predic.x, predic.y, predic.z, pRange, 0x000099)
- end
- end
- end
- end
- function OnSendChat(msg)
- ts:OnSendChat(msg, "pri")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement