Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Sonic Rammus by SoudaXD
- ]]
- if myHero.charName ~= "Rammus" then return end
- local Qrange,Wrange,Erange,Rrange = 800, 325, 325, 300
- local ts = TargetSelector(TARGET_LESS_CAST_PRIORITY, 800, DAMAGE_MAGIC)
- function OnLoad()
- JMinions = minionManager(MINION_JUNGLE, 600, myHero)
- RConfig = scriptConfig("Ninja Rammus Opts", "Rammus")
- RConfig:addSubMenu("Combo Settings", "Combo")
- RConfig.Combo:addParam("scriptActive", "Combo", SCRIPT_PARAM_ONKEYDOWN, false, 32)
- RConfig.Combo:addParam("useQ", "Use PowerBall", SCRIPT_PARAM_ONOFF, true)
- RConfig.Combo:addParam("useW", "Use Defensive Curl", SCRIPT_PARAM_ONOFF, true)
- RConfig.Combo:addParam("useE", "Use Taunt", SCRIPT_PARAM_ONOFF, true)
- RConfig.Combo:addParam("useR", "Use Ult Tremors", SCRIPT_PARAM_ONOFF, true)
- RConfig.Combo:addParam("EiRange", "Only Ult w/# Enemys",SCRIPT_PARAM_SLICE, 1, 1, 5, 0)
- RConfig.Combo:addParam("WEcombo", "Only Taunt w/DBC", SCRIPT_PARAM_ONOFF, true)
- RConfig.Combo:addParam("EPercent", "Only E w/X Health%",SCRIPT_PARAM_SLICE, 20, 0, 100, 0)
- RConfig:addSubMenu("Jungle Settings", "Jung")
- RConfig.Jung:addParam("JFarm", "Jungle Farm", SCRIPT_PARAM_ONKEYDOWN, false, string.byte("J"))
- RConfig.Jung:addParam("useQ", "Use PowerBall", SCRIPT_PARAM_ONOFF, true)
- RConfig.Jung:addParam("useW", "Use Defensive Curl", SCRIPT_PARAM_ONOFF, true)
- RConfig.Jung:addParam("useE", "Use Taunt", SCRIPT_PARAM_ONOFF, true)
- RConfig.Jung:addParam("useR", "Use Ult Tremors", SCRIPT_PARAM_ONOFF, true)
- RConfig:addParam("MoveWQ", "Move w/PowerBall", SCRIPT_PARAM_ONKEYTOGGLE, false, string.byte("M"))
- RConfig:addParam("AutoDBC", "Auto DefensiveBall", SCRIPT_PARAM_ONKEYTOGGLE, false, string.byte("D"))
- RConfig:addParam("ADBCrange", "Auto DBC Range",SCRIPT_PARAM_SLICE, 1000, 1, 1000, 0)
- RConfig:addParam("drawcircles", "Draw Circles", SCRIPT_PARAM_ONOFF, true)
- --RConfig.Combo:permaShow("scriptActive")
- RConfig.Combo:permaShow("EiRange")
- RConfig.Combo:permaShow("EPercent")
- RConfig.Combo:permaShow("WEcombo")
- RConfig:permaShow("MoveWQ")
- RConfig:permaShow("AutoDBC")
- --RConfig:permaShow("JFarm")
- ts.name = "Rammus"
- RConfig:addTS(ts)
- LastPosx = myHero.x
- LastPosz = myHero.z
- PrintChat(" >> Sonic Rammus by SoudaXD loaded.")
- end
- function OnTick()
- ts:update()
- JMinions:update()
- Target = ts.target
- DefensiveBallBuff = false
- PowerBallBuff = false
- inRecall = false
- for i = 1, myHero.buffCount,1 do
- local buff = myHero:getBuff(i)
- if buff.name == "DefensiveBallCurl" and buff.valid then DefensiveBallBuff = true
- elseif buff.name == "PowerBall" and buff.valid then PowerBallBuff = true
- elseif buff.name == "Recall" and buff.valid then inRecall = true end
- end
- WREADY = (myHero:CanUseSpell(_W) == READY)
- EREADY = (myHero:CanUseSpell(_E) == READY)
- RREADY = (myHero:CanUseSpell(_R) == READY)
- QREADY = (myHero:CanUseSpell(_Q) == READY)
- ---------Auto move with Q
- if QREADY and RConfig.MoveWQ and LastPosx ~= nil and LastPosz ~= nil and not Target and not PowerBallBuff then
- if myHero.x ~= LastPosx or myHero.z ~= LastPosz then CastSpell(_Q) end
- end
- LastPosx = myHero.x
- LastPosz = myHero.z
- --Combo Q-Powerball, W-DefensiveBallCurl, E-Taunt, R-Ult--
- if RConfig.Combo.scriptActive and Target then
- myHero:Attack(Target)
- if QREADY and RConfig.Combo.useQ and GetDistance(Target) <= Qrange and not PowerBallBuff then
- if GetDistance(Target) > Erange then CastSpell(_Q)
- elseif not DefensiveBallBuff then CastSpell(_Q) end
- end
- if EREADY and RConfig.Combo.useE and GetDistance(Target) <= Erange and myHero.health / myHero.maxHealth > RConfig.Combo.EPercent /100 then
- if RConfig.Combo.WEcombo and DefensiveBallBuff then CastSpell(_E, Target)
- elseif not RConfig.Combo.WEcombo then CastSpell(_E, Target)
- end
- end
- if WREADY and RConfig.Combo.useW and GetDistance(Target) <= Wrange and not PowerBallBuff then CastSpell(_W) end
- if RREADY and RConfig.Combo.useR and GetDistance(Target) <= Rrange and CountEnemyHeroInRange(Rrange) >= RConfig.Combo.EiRange then CastSpell(_R) end
- end
- --Jungle Farm------------------------------------------
- if RConfig.Jung.JFarm then
- for i, minion in pairs(JMinions.objects) do
- if minion and minion.valid and not minion.dead and GetDistance(minion) <= 300 then
- myHero:Attack(minion)
- if QREADY and RConfig.Combo.useQ and GetDistance(minion) <= Qrange and not PowerBallBuff then
- if GetDistance(minion) > Erange then CastSpell(_Q)
- elseif not DefensiveBallBuff then CastSpell(_Q) end
- end
- if EREADY and RConfig.Jung.useE and GetDistance(minion) <= Erange and myHero.health / myHero.maxHealth > RConfig.Combo.EPercent /100 then
- if RConfig.Combo.WEcombo and DefensiveBallBuff then CastSpell(_E, minion) end
- if not RConfig.Combo.WEcombo then CastSpell(_E, minion)
- end
- end
- if WREADY and RConfig.Jung.useW and GetDistance(minion) <= Wrange and not PowerBallBuff then CastSpell(_W) end
- if RREADY and RConfig.Jung.useR and GetDistance(minion) <= Rrange then CastSpell(_R) end
- end
- end
- end
- --------------------------------------------------------
- if Target and WREADY and RConfig.AutoDBC and GetDistance(Target) <= RConfig.ADBCrange and not PowerBallBuff and not inRecall then CastSpell(_W) end --Auto DefensiveBall
- end
- function OnDraw()
- if RConfig.drawcircles and not myHero.dead then
- DrawCircle(myHero.x, myHero.y, myHero.z, Qrange, 0x992D3D)
- DrawCircle(myHero.x, myHero.y, myHero.z, Erange, 0x19A712)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement