Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Based on a true story (EZREAL-ASHE-DRAVEN Helper) 1.5
- <Pun intended>
- Explanation: Base because it shoots at base, true because trueshotbarrage,
- and story because you'll tell your kids about the time you killed someone at base using an ez ulti.
- Basically the same thing so I merged em. You can add your champions yourself eg Draven. More code needed though ;P
- by Kevinkev
- ]]--
- if myHero.charName == "Ezreal" or myHero.charName == "Ashe" or myHero.charName == "Draven" then
- function OnLoad()
- globalDelay = 0
- useIT = true
- if GetMap().index == 1 then
- --SummonersRift
- BaseSpots = {
- -- Recall-to-Base Locations
- { x = 28.58, y = 184.62, z = 267.16 }, -- BOT LEFT BASE [1]
- { x = 13936.64, y = 184.97, z = 14174.86} -- TOP RIGHT BASE [9]
- }
- BuffCamps = {
- --To steal later on.. ;P
- ["topBlue"] ={ name = "AncientGolem7.1.1", x = 10386.60546875, y = 54.86909866333, z = 6811.1123046875}, --[6]
- ["Dragon"] ={ name = "Dragon6.1.1", x = 9459.51953125, y = -60.592025756836, z = 4193.0297851563}, --[3]
- ["Baron"] ={ name = "Worm12.1.1", x = 4600.4951171875, y = -63.072219848633, z = 10250.461914063}, --[7]
- ["botBlue"] ={ name = "AncientGolem1.1.1", x = 3632.7001953125, y = 54.173000335693, z = 7600.373046875}, --[4]
- ["botRed"] ={ name = "LizardElder4.1.1", x = 7455.615234375, y = 57.275253295898, z = 3890.2026367188}, --[2]
- ["topRed"] ={ name = "LizardElder10.1.1", x = 6504.2407226563, y = 54.63500213623, z = 10584.5625} --[8]
- --If its easier to read I made this
- --[[
- Ba = Baron
- S = base "S"pot
- b = blue
- R = red
- D = dragon
- 5 is the "H"otkey to activate this.
- [7] [8] [9]
- [4] [5] [6]
- [1] [2] [3]
- ============
- [Ba][R] [S]
- [b] [H] [b]
- [S] [R] [D]
- ]]--
- }
- elseif GetMap().index == 8 then
- --Dominion
- BaseSpots = {
- -- Recall-to-Base Locations
- { x = 514.287109375, y = -35.081577301025, z = 4149.9916992188 }, -- LEFT BASE [4]
- { x = 13311.96484375, y = -37.369071960449, z = 4161.232421875 } -- RIGHT BASE [6]
- }
- end
- if player.team == TEAM_BLUE then
- aim = 2 --Top
- else
- aim = 1 --Bot
- end
- --Change these to your liking. I couldnt be bothered putting it in tables.
- championsArray = {
- {name = "Ezreal", projSpeed = 1720.89, spellDelay = 265},
- {name = "Ashe", projSpeed = 1600, spellDelay = 265},
- {name = "Draven", projSpeed = 1900, spellDelay = 480},
- }
- if myHero.charName == "Ezreal" then
- --Ezreal STATS
- --
- ultiProjectileSpeed = 1720.89
- spellDelay = 265
- elseif myHero.charName == "Ashe" then
- --ASHE STATS
- --
- ultiProjectileSpeed = 1600
- spellDelay = 265
- elseif myHero.charName == "Draven" then
- --DRAVEN STATS
- --
- ultiProjectileSpeed = 1890
- spellDelay = 480
- end
- --HOTKEYS
- ShootHK = 32 --Change it if you wish
- autoUltHK = string.byte("X") --Change it if you wish
- manualUltHK = string.byte("V") --Change it if you wish
- aimRecallHK = string.byte("C") --Change it if you wish
- --OTHER
- ultiShootDelay = 0
- player = GetMyHero()
- drawCircles = true
- moveBuffer = 20 --To detect pressing B while moving.
- HeroBackSpots = {
- {name, x, y, z, endTime, damageCheck},
- {name, x, y, z, endTime, damageCheck},
- {name, x, y, z, endTime, damageCheck},
- {name, x, y, z, endTime, damageCheck},
- {name, x, y, z, endTime, damageCheck}
- }
- --ShiftMenu
- KCConfig = scriptConfig("EzrealAsheDraven Ult Helper", "autoUlti")
- KCConfig:addParam("Shoot", "Shoot", SCRIPT_PARAM_ONKEYDOWN, false, ShootHK)
- PrintChat(">> ".. tostring(myHero.charName) .." Helper Loaded [Kevinkev]")
- end
- function OnProcessSpell(object,spell)
- buffer = 500 --Champ dissapears after this buffer..
- spellName = spell.name
- --
- if object~=nil and object.team ~= player.team then
- local Rdamage = getDmg("R",object,myHero)
- if Rdamage > object.health then
- damageParameter = true
- --PrintChat("Dominion Recall: ".. object.name)
- if spell.name == "OdinRecall" then
- --PrintChat("Dominion Recall")
- drawMeBacking(object, GetTickCount() + 4500 +buffer,damageParameter) --4.5 seconds for dominion
- elseif spell.name == "RecallImproved" then
- --PrintChat("Improved Recall")
- drawMeBacking(object, GetTickCount() + 7000 +buffer,damageParameter) --7 Seconds for improved recall
- elseif spellName == "Recall" then
- --PrintChat("Normal Recall")
- drawMeBacking(object, GetTickCount() +8000 +buffer,damageParameter) --8 Seconds for normal recall
- end
- end
- end
- end
- function drawMeBacking(object,endTime,check)
- for i,HeroBackSpots in pairs(HeroBackSpots) do
- if HeroBackSpots.name == nil then
- HeroBackSpots.name = object.name --Record the name & positions
- HeroBackSpots.x = object.x
- HeroBackSpots.y = object.y
- HeroBackSpots.z = object.z
- HeroBackSpots.endTime = endTime
- HeroBackSpots.damageCheck = check
- --PrintChat(HeroBackSpots.name)
- break --to avoid filling multiple entries
- end
- end
- end
- function checkMyRecall()
- for i,HeroBackSpots in pairs(HeroBackSpots) do
- if GetTickCount() > (HeroBackSpots.endTime or 0) then
- HeroBackSpots.name = nil --Delete the name (positions are now irrelephant)
- end
- end
- end
- function mathStuff(x,y)
- return math.floor(math.sqrt((x)^2 + (y)^2))
- end
- function moreMathStuff(x,y,z)
- return mathStuff(z,mathStuff(x,y))
- end
- function OnDeleteObj(object)
- if object.name == "TeleportHome.troy" then
- for i,HeroBackSpots in pairs(HeroBackSpots) do
- --If within proximity
- if moreMathStuff(HeroBackSpots.x,HeroBackSpots.y,HeroBackSpots.z) - moreMathStuff(object.x,object.y,object.z) < moveBuffer then
- --And in the list of heroes
- for j = 1, heroManager.iCount, 1 do
- local enemyhero = heroManager:getHero(j)
- if HeroBackSpots.name == enemyhero.name then
- --This particular one is still visible
- if enemyhero.visible then
- --Then they cancelled their recall ;)
- HeroBackSpots.name = nil
- --So delete them from the list >:D
- break
- end
- end
- end
- end
- end
- end
- end
- --No longer used
- function didTheyMove()
- for j = 1, heroManager.iCount, 1 do
- local enemyhero = heroManager:getHero(j)
- for i,HeroBackSpots in pairs(HeroBackSpots) do
- if HeroBackSpots.name == enemyhero.name then
- if moveBuffer<mathStuff( mathStuff(HeroBackSpots.x - enemyhero.x, HeroBackSpots.y - enemyhero.y), HeroBackSpots.z - enemyhero.z) then
- HeroBackSpots.name = nil
- end
- end
- end
- end
- end
- function OnTick()
- --didTheyMove()
- checkMyRecall()
- TheMagicHappens()
- end
- function theTimeisRightForRecall()
- for i,HeroBackSpots in pairs(HeroBackSpots) do
- if HeroBackSpots.name ~= nil and HeroBackSpots.damageCheck then
- Speed = ((mathStuff(player.x - HeroBackSpots.x, player.z - HeroBackSpots.z)/(ultiProjectileSpeed/1000)) + GetTickCount())
- if (Speed < HeroBackSpots.endTime - spellDelay - GetLatency()/2) then
- doIt(HeroBackSpots.x,HeroBackSpots.z)
- end
- end
- end
- end
- function theTimeisRight()
- for i,HeroBackSpots in pairs(HeroBackSpots) do
- if HeroBackSpots.name ~= nil and HeroBackSpots.damageCheck then
- Speed = ((mathStuff(player.x - BaseSpots[aim].x, player.z - BaseSpots[aim].z)/(ultiProjectileSpeed/1000)) + GetTickCount())
- if (Speed > HeroBackSpots.endTime - spellDelay - (GetLatency()/2)) and Speed - GetTickCount() <= 8000 then
- doIt(BaseSpots[aim].x,BaseSpots[aim].z)
- end
- end
- end
- end
- function doIt(x,z)
- --If delay is less than the one set.
- if globalDelay < GetTickCount() then
- if myHero:CanUseSpell(_R) == READY then
- CastSpell(_R,x,z)
- if myHero.charName == "Draven" then
- globalDelay = GetTickCount()+15000 --Because it will see that R can be used and it'll send the ulti back (1.5 bug fixed)
- end
- end
- end
- end
- function TheMagicHappens()
- if autoUlt and myHero:CanUseSpell(_R) == READY then
- if aimRecall then
- theTimeisRightForRecall()
- end
- theTimeisRight()
- end
- if manualUlt then
- if KCConfig.Shoot then
- target = whoTarget()
- if target ~= 0 then
- if target.visible then --if visible
- doIt(target.x,target.z)
- end
- end
- end
- end
- end
- function whoTarget()
- for j = 1, heroManager.iCount, 1 do
- local enemyhero = heroManager:getHero(j)
- if ValidTarget(enemyhero) and enemyhero.dead == false then
- if lowestHP == nil then lowestHP = enemyhero end
- if enemyhero.health < lowestHP.health then
- lowestHP = enemyhero
- end
- end
- end
- if lowestHP == nil then
- return 0
- else
- return lowestHP
- end
- end
- function OnWndMsg(msg,key)
- if key == manualUltHK then
- if msg == KEY_DOWN then
- if manualUlt then
- manualUlt = false
- PrintChat(">> Manual Timing OFF")
- else
- manualUlt = true
- PrintChat(">> Manual Timing ON")
- end
- end
- end
- if key == autoUltHK then
- if msg == KEY_DOWN then
- if autoUlt then
- autoUlt = false
- PrintChat(">> Auto Shoot Ultimate DISABLED")
- else
- autoUlt = true
- PrintChat(">> Auto Shoot Ultimate ENABLED")
- end
- end
- end
- if key == aimRecallHK then
- if msg == KEY_DOWN then
- if aimRecall then
- aimRecall = false
- PrintChat(">> Aim recall location DISABLED")
- else
- aimRecall = true
- PrintChat(">> Aim recall location ENABLED")
- end
- end
- end
- SC__OnWndMsg(msg,key)
- end
- function OnDraw()
- if manualUlt then
- x,y = get2DFrom3D(player.x, player.y, player.z) --gets the position on the screen
- if whoTarget() ~= 0 then
- DrawText(tostring("Aiming: "..whoTarget().charName),15,x,y, 0xFF00FF00)
- end
- end
- if drawCircles then
- for i,HeroBackSpots in pairs(HeroBackSpots) do
- if HeroBackSpots.name ~= nil then
- --Thanks Apple--
- text = math.round((HeroBackSpots.endTime - GetTickCount())/1000) --gets the timer in digits
- --Thanks gReY--
- x,y = get2DFrom3D(HeroBackSpots.x, HeroBackSpots.y, HeroBackSpots.z) --gets the position on the screen
- DrawText("RECALL IN " ..text,22, x - 60, y + 80, 0xFF00FF00)
- DrawCircle(HeroBackSpots.x, HeroBackSpots.y, HeroBackSpots.z, 28, circleColor)
- DrawCircle(HeroBackSpots.x, HeroBackSpots.y, HeroBackSpots.z, 29, circleColor)
- DrawCircle(HeroBackSpots.x, HeroBackSpots.y, HeroBackSpots.z, 30, circleColor)
- DrawCircle(HeroBackSpots.x, HeroBackSpots.y, HeroBackSpots.z, 31, circleColor)
- DrawCircle(HeroBackSpots.x, HeroBackSpots.y, HeroBackSpots.z, 32, circleColor)
- --I'd rather the circles get smaller Apple ;) time tick tick away~
- DrawCircle(HeroBackSpots.x, HeroBackSpots.y, HeroBackSpots.z, 15*text + 30, circleColor)
- end
- end
- for i,BaseSpots in pairs(BaseSpots) do
- if GetDistance(BaseSpots, mousePos) <= 250 then
- circleColor = 0x00FF00
- else
- circleColor = 0xFFFFFF
- end
- DrawCircle(BaseSpots.x, BaseSpots.y, BaseSpots.z, 28, circleColor)
- DrawCircle(BaseSpots.x, BaseSpots.y, BaseSpots.z, 29, circleColor)
- DrawCircle(BaseSpots.x, BaseSpots.y, BaseSpots.z, 30, circleColor)
- DrawCircle(BaseSpots.x, BaseSpots.y, BaseSpots.z, 31, circleColor)
- DrawCircle(BaseSpots.x, BaseSpots.y, BaseSpots.z, 32, circleColor)
- DrawCircle(BaseSpots.x, BaseSpots.y, BaseSpots.z, 100, circleColor)
- end
- end
- SC__OnDraw()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement