Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Brand-v1.0017
- --[[
- Unlimited
- --Modded/Edited/made to work, by xkjtx
- -Attack Range(650) -- Redish
- -- All ability ranges turn off while on CD
- -Ability(Range) -- Color : On/Off Toggle :
- -Q Range(900) -- Blueish
- -W Range(900) -- Orangeish
- -E Range(625) -- Greenish
- -R Range(900) -- Purpleish
- -Prediction Range(80 on the target) -blueish purple(tried to get a light version)
- -- Better to harass first, then after harass press combo key
- -Move to mouse works with Harass Hot-Key only! When harassing make sure they are moving so the prediction is good..
- -Known Bug...
- -Some times you are unable to cast spells yourself. Turn off KS hot-key(Toggle Off) and you should be able to cast spells yourself.
- ]]
- if myHero.charName ~= "Brand" then return end
- local player = GetMyHero()
- local comboKey = 32 -- Space
- local harassKey = string.byte("S") -- S
- local ksKey = string.byte("X") -- X
- local kill = {}
- local range = 550
- local range2 = 750
- local qrange = 900
- local erange = 625
- local travelduration = 780
- local predic
- local DFGSlot, HXGSlot = nil, nil
- local HXGREADY, DFGREADY, QREADY, WREADY, EREADY, RREADY = false, false, false, false, false, false
- local ts = TargetSelector(TARGET_LOW_HP,qrange,DAMAGE_MAGIC,true) -- TRUE so you .can' select your target!!! Will default when not selected.. Good for jungle and farming.
- local delay = 100
- local qspeed = 1.2
- local startAttackSpeed = 0.625
- local lastBasicAttack = 0
- local swingDelay = 0.15
- local swing = 0
- local burntime = 0
- function OnLoad()
- PrintChat(">> Brand-v1.0017 Loaded!")
- acConfig = scriptConfig("UnlimitedBrand", "Brand-v1.0017")
- acConfig:addParam("scriptActive", "Combo", SCRIPT_PARAM_ONKEYDOWN, false, comboKey) -- Space
- acConfig:addParam("harass", "Harass", SCRIPT_PARAM_ONKEYDOWN, false, harassKey) -- S -- will auto Q and R on killable target
- acConfig:addParam("killsteal", "Auto kill", SCRIPT_PARAM_ONKEYTOGGLE, false, ksKey) -- X -- Off by default to try and fix an issue --
- acConfig:addParam("drawcircles", "Draw Circles", SCRIPT_PARAM_ONOFF, true)
- acConfig:addParam("abilityRange", "Ability Circles", SCRIPT_PARAM_ONOFF, true) -- Turn off and on when on/off CD
- acConfig:addParam("minionP", "Use minion prediction", SCRIPT_PARAM_ONOFF, true)
- acConfig:addParam("moveMe", "Move to mouse", SCRIPT_PARAM_ONOFF, true) -- only works with harass
- acConfig:permaShow("scriptActive")
- acConfig:permaShow("harass")
- acConfig:permaShow("killsteal")
- acConfig:permaShow("minionP")
- acConfig:permaShow("moveMe")
- ts.name = "Brand"
- acConfig:addTS(ts)
- lastBasicAttack = os.clock()
- end
- function OnCreateObj(obj)
- if obj ~= nil and string.find(obj.name, "BrandFireMark") then
- for i=1, heroManager.iCount do
- local enemy = heroManager:GetHero(i)
- if enemy.team ~= myHero.team and GetDistance(obj,enemy) < erange then
- burntime = GetTickCount()
- burned = true
- end
- end
- end
- end
- function OnDeleteObj(obj)
- if obj ~= nil and string.find(obj.name, "BrandFireMark") then
- for i=1, heroManager.iCount do
- local enemy = heroManager:GetHero(i)
- if enemy.team ~= myHero.team and GetDistance(obj,enemy) < erange then
- burntime = GetTickCount()
- burned = false
- end
- end
- end
- end
- function OnTick()
- ts:update()
- if myHero.dead then
- return
- end
- if ts.target ~= nil then
- travelduration = (delay + GetDistance(myHero, ts.target)/qspeed)
- ts:SetPrediction(travelduration)
- predic = ts.nextPosition
- AttackDelay = (1000/(myHero.attackSpeed/(1/startAttackSpeed)))/1000 -- 1/(myHero.attackSpeed*startAttackSpeed)
- if swing == 1 and os.clock() > lastBasicAttack + AttackDelay then
- swing = 0
- end
- if acConfig.scriptActive and ts.target ~= nil then -- Works for multiple hot-keys
- if GetDistance(ts.target) <= range+150 and swing == 0 then
- myHero:Attack(ts.target) -- only need one myHero:Attack and here it is..
- end
- end
- end
- QREADY = (myHero:CanUseSpell(_Q) == READY)
- WREADY = (myHero:CanUseSpell(_W) == READY)
- EREADY = (myHero:CanUseSpell(_E) == READY)
- RREADY = (myHero:CanUseSpell(_R) == READY)
- HXGSlot = GetInventorySlotItem(3146)
- DFGSlot = GetInventorySlotItem(3128)
- HXGREADY = (HXGSlot ~= nil and myHero:CanUseSpell(HXGSlot) == READY)
- DFGREADY = (DFGSlot ~= nil and myHero:CanUseSpell(DFGSlot) == READY)
- Damage()
- if acConfig.scriptActive then
- if ts.target ~= nil and GetDistance(ts.target) <= erange then
- if ValidTarget(ts.target, 750) then
- if DFGREADY then CastSpell(DFGSlot, ts.target) end
- if HXGREADY then CastSpell(HXGSlot, ts.target) end
- end
- if EREADY then
- CastSpell(_E, ts.target)
- end
- if predic ~= nil and QREADY and GetTickCount() - burntime < 3600 and burned then
- if acConfig.minionP and not GetMinionCollision(myHero,ts.nextPosition,70) then
- CastSpell(_Q, predic.x, predic.z)
- elseif not acConfig.minionP then ----------------- This added -deni
- CastSpell(_Q, predic.x, predic.z)
- end
- end
- if WREADY and not ts.target.canMove then -- Will not cast until target cant move
- CastSpell(_W, ts.target.x, ts.target.z)
- end
- if WREADY and myHero:CanUseSpell(_Q) == COOLDOWN and GetDistance(ts.target) <= qrange then
- -- Will cast even if target can move(predicts location) TARGET MUST BE MOVING~~! -- Better to harass first, then press combo key
- CastSpell(_W, predic.x, predic.z)
- end
- if ts.target ~= nil and RREADY and not ts.target.canMove and myHero:CanUseSpell(_Q) == COOLDOWN and myHero:CanUseSpell(_W) == COOLDOWN and myHero:CanUseSpell(_E) == COOLDOWN then
- CastSpell(_R, ts.target)
- end
- end
- end
- if acConfig.harass then
- if acConfig.moveMe then
- player:MoveTo(mousePos.x, mousePos.z) -- move to mouse(will not AA while moving, but will cast all spells)
- end
- if ts.target ~= nil then
- if WREADY and predic ~= nil and GetDistance(ts.target) <= qrange then -- Will cast even if target can move(predicts location)
- CastSpell(_W, predic.x, predic.z)
- end
- if burned and EREADY and GetDistance(ts.target) <= erange then
- CastSpell(_E, ts.target)
- end
- if predic ~= nil and QREADY and GetDistance(ts.target) <= qrange and burned then
- if acConfig.minionP and not GetMinionCollision(myHero,ts.nextPosition,70) then
- CastSpell(_Q, predic.x, predic.z)
- elseif not acConfig.minionP then ----------------- This added -deni
- CastSpell(_Q, predic.x, predic.z)
- end
- end
- end
- end
- if acConfig.killsteal and not acConfig.scriptActive and not acConfig.harass and ts.target ~= nil then
- for i=1, heroManager.iCount do
- local enemy = heroManager:GetHero(i)
- local rdmg = getDmg("R",enemy,myHero)
- local edmg = getDmg("E",enemy,myHero)
- if edmg > enemy.health and myHero:GetDistance(enemy) <= erange and myHero:CanUseSpell(_E) == READY then
- CastSpell(_E,enemy)
- elseif rdmg > enemy.health and myHero:GetDistance(enemy) <= range2 and myHero:CanUseSpell(_R) == READY then
- CastSpell(_R,enemy)
- end
- end
- end
- end
- function Damage()
- ts:update()
- for i=1, heroManager.iCount do
- local dfgdamage = 0
- local enemy = heroManager:GetHero(i)
- local qdmg = getDmg("Q",enemy,myHero)
- local wdmg = getDmg("W",enemy,myHero)
- local edmg = getDmg("E",enemy,myHero)
- local rdmg = getDmg("R",enemy,myHero)
- local dfgdamage = (DFGSlot and getDmg("DFG",enemy,myHero) or 0)
- local possible = qdmg + edmg + wdmg + rdmg + dfgdamage
- local thatkill = 0
- if myHero:CanUseSpell(_Q) == READY then
- thatkill = thatkill + qdmg
- end
- if myHero:CanUseSpell(_E) == READY then
- thatkill = thatkill + edmg
- end
- if myHero:CanUseSpell(_W) == READY then
- thatkill = thatkill + wdmg
- end
- if myHero:CanUseSpell(_R) == READY then
- thatkill = thatkill + rdmg
- end
- if DFGREADY then
- thatkill = thatkill + dfgdamage
- end
- if thatkill >= enemy.health then
- kill[i] = 2
- elseif possible>= enemy.health then
- kill[i] = 1
- else
- kill[i] = 0
- end
- end
- end
- function OnProcessSpell(unit, spell)
- if unit.isMe and spell and spell.name and spell.name:lower():find("attack") then
- swing = 1
- lastBasicAttack = os.clock()
- end
- end
- function OnDraw()
- if myHero.dead then
- return
- end
- if acConfig.drawcircles then
- DrawCircle(myHero.x, myHero.y, myHero.z, range+100, 0xFF0000) -- Attack range -- Redish -Always on
- if acConfig.abilityRange then -- on/off toggle in menu
- if QREADY then
- DrawCircle(myHero.x, myHero.y, myHero.z, qrange, 0x0000CC) -- Q range -- Blueish
- end
- if WREADY then
- DrawCircle(myHero.x, myHero.y, myHero.z, qrange, 0xFF6600) -- W range -- Orangeish
- end
- if EREADY then
- DrawCircle(myHero.x, myHero.y, myHero.z, erange, 0x009900) -- E range -- Greenish
- end
- if RREADY then
- DrawCircle(myHero.x, myHero.y, myHero.z, qrange, 0x990099) -- R range -- Purpleish(Also when Q and W are not on CD)
- end
- end
- if predic ~= nil and ts.target ~= nil then
- DrawCircle(predic.x, predic.y, predic.z, 80, 0x000099) -- blueish purple(tried to get a light version)
- end
- end
- if acConfig.drawcircles and ts.target ~= nil then
- for i=1, heroManager.iCount do
- local enemydraw = heroManager:GetHero(i)
- if ValidTarget(enemydraw) then
- if kill[i] == 1 then
- PrintFloatText(enemydraw,0,"Cooldown")
- DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 100, 0xFF80FF00)
- DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 150, 0xFF80FF00)
- elseif kill[i] == 2 then
- PrintFloatText(enemydraw,0,"MURDER!")
- DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 100, 0xFF80FF00)
- DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 150, 0xFF80FF00)
- DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 200, 0xFF80FF00)
- end
- end
- end
- end
- end
- function OnWndMsg(msg,key)
- if key == kshk then
- if msg == KEY_DOWN then
- if ks then
- ks = false
- PrintChat("Auto KillSteal Disabled!")
- else
- ks = true
- PrintChat("Auto KillSteal Enabled!")
- end
- end
- end
- end
- function OnSendChat(msg)
- ts:OnSendChat(msg, "pri")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement