Advertisement
Guest User

Sonic Rammus

a guest
Feb 8th, 2016
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.59 KB | None | 0 0
  1. --[[
  2. Sonic Rammus by SoudaXD
  3.  
  4.  
  5. ]]
  6.  
  7. if myHero.charName ~= "Rammus" then return end
  8.  
  9. local Qrange,Wrange,Erange,Rrange = 800, 325, 325, 300
  10. local ts = TargetSelector(TARGET_LESS_CAST_PRIORITY, 800, DAMAGE_MAGIC)
  11.  
  12. function OnLoad()
  13.  
  14. JMinions = minionManager(MINION_JUNGLE, 600, myHero)
  15. RConfig = scriptConfig("Ninja Rammus Opts", "Rammus")
  16.  
  17. RConfig:addSubMenu("Combo Settings", "Combo")
  18. RConfig.Combo:addParam("scriptActive", "Combo", SCRIPT_PARAM_ONKEYDOWN, false, 32)
  19. RConfig.Combo:addParam("useQ", "Use PowerBall", SCRIPT_PARAM_ONOFF, true)
  20. RConfig.Combo:addParam("useW", "Use Defensive Curl", SCRIPT_PARAM_ONOFF, true)
  21. RConfig.Combo:addParam("useE", "Use Taunt", SCRIPT_PARAM_ONOFF, true)
  22. RConfig.Combo:addParam("useR", "Use Ult Tremors", SCRIPT_PARAM_ONOFF, true)
  23. RConfig.Combo:addParam("EiRange", "Only Ult w/# Enemys",SCRIPT_PARAM_SLICE, 1, 1, 5, 0)
  24. RConfig.Combo:addParam("WEcombo", "Only Taunt w/DBC", SCRIPT_PARAM_ONOFF, true)
  25. RConfig.Combo:addParam("EPercent", "Only E w/X Health%",SCRIPT_PARAM_SLICE, 20, 0, 100, 0)
  26.  
  27. RConfig:addSubMenu("Jungle Settings", "Jung")
  28. RConfig.Jung:addParam("JFarm", "Jungle Farm", SCRIPT_PARAM_ONKEYDOWN, false, string.byte("J"))
  29. RConfig.Jung:addParam("useQ", "Use PowerBall", SCRIPT_PARAM_ONOFF, true)
  30. RConfig.Jung:addParam("useW", "Use Defensive Curl", SCRIPT_PARAM_ONOFF, true)
  31. RConfig.Jung:addParam("useE", "Use Taunt", SCRIPT_PARAM_ONOFF, true)
  32. RConfig.Jung:addParam("useR", "Use Ult Tremors", SCRIPT_PARAM_ONOFF, true)
  33.  
  34. RConfig:addParam("MoveWQ", "Move w/PowerBall", SCRIPT_PARAM_ONKEYTOGGLE, false, string.byte("M"))
  35. RConfig:addParam("AutoDBC", "Auto DefensiveBall", SCRIPT_PARAM_ONKEYTOGGLE, false, string.byte("D"))
  36. RConfig:addParam("ADBCrange", "Auto DBC Range",SCRIPT_PARAM_SLICE, 1000, 1, 1000, 0)
  37. RConfig:addParam("drawcircles", "Draw Circles", SCRIPT_PARAM_ONOFF, true)
  38.  
  39.  
  40. --RConfig.Combo:permaShow("scriptActive")
  41. RConfig.Combo:permaShow("EiRange")
  42. RConfig.Combo:permaShow("EPercent")
  43. RConfig.Combo:permaShow("WEcombo")
  44. RConfig:permaShow("MoveWQ")
  45. RConfig:permaShow("AutoDBC")
  46. --RConfig:permaShow("JFarm")
  47. ts.name = "Rammus"
  48. RConfig:addTS(ts)
  49. LastPosx = myHero.x
  50. LastPosz = myHero.z
  51. PrintChat(" >> Sonic Rammus by SoudaXD loaded.")
  52. end
  53.  
  54. function OnTick()
  55. ts:update()
  56. JMinions:update()
  57. Target = ts.target
  58. DefensiveBallBuff = false
  59. PowerBallBuff = false
  60. inRecall = false
  61. for i = 1, myHero.buffCount,1 do
  62. local buff = myHero:getBuff(i)
  63. if buff.name == "DefensiveBallCurl" and buff.valid then DefensiveBallBuff = true
  64. elseif buff.name == "PowerBall" and buff.valid then PowerBallBuff = true
  65. elseif buff.name == "Recall" and buff.valid then inRecall = true end
  66. end
  67. WREADY = (myHero:CanUseSpell(_W) == READY)
  68. EREADY = (myHero:CanUseSpell(_E) == READY)
  69. RREADY = (myHero:CanUseSpell(_R) == READY)
  70. QREADY = (myHero:CanUseSpell(_Q) == READY)
  71. ---------Auto move with Q
  72. if QREADY and RConfig.MoveWQ and LastPosx ~= nil and LastPosz ~= nil and not Target and not PowerBallBuff then
  73. if myHero.x ~= LastPosx or myHero.z ~= LastPosz then CastSpell(_Q) end
  74. end
  75. LastPosx = myHero.x
  76. LastPosz = myHero.z
  77. --Combo Q-Powerball, W-DefensiveBallCurl, E-Taunt, R-Ult--
  78. if RConfig.Combo.scriptActive and Target then
  79. myHero:Attack(Target)
  80. if QREADY and RConfig.Combo.useQ and GetDistance(Target) <= Qrange and not PowerBallBuff then
  81. if GetDistance(Target) > Erange then CastSpell(_Q)
  82. elseif not DefensiveBallBuff then CastSpell(_Q) end
  83. end
  84. if EREADY and RConfig.Combo.useE and GetDistance(Target) <= Erange and myHero.health / myHero.maxHealth > RConfig.Combo.EPercent /100 then
  85. if RConfig.Combo.WEcombo and DefensiveBallBuff then CastSpell(_E, Target)
  86. elseif not RConfig.Combo.WEcombo then CastSpell(_E, Target)
  87. end
  88. end
  89. if WREADY and RConfig.Combo.useW and GetDistance(Target) <= Wrange and not PowerBallBuff then CastSpell(_W) end
  90. if RREADY and RConfig.Combo.useR and GetDistance(Target) <= Rrange and CountEnemyHeroInRange(Rrange) >= RConfig.Combo.EiRange then CastSpell(_R) end
  91. end
  92. --Jungle Farm------------------------------------------
  93. if RConfig.Jung.JFarm then
  94. for i, minion in pairs(JMinions.objects) do
  95. if minion and minion.valid and not minion.dead and GetDistance(minion) <= 300 then
  96. myHero:Attack(minion)
  97. if QREADY and RConfig.Combo.useQ and GetDistance(minion) <= Qrange and not PowerBallBuff then
  98. if GetDistance(minion) > Erange then CastSpell(_Q)
  99. elseif not DefensiveBallBuff then CastSpell(_Q) end
  100. end
  101. if EREADY and RConfig.Jung.useE and GetDistance(minion) <= Erange and myHero.health / myHero.maxHealth > RConfig.Combo.EPercent /100 then
  102. if RConfig.Combo.WEcombo and DefensiveBallBuff then CastSpell(_E, minion) end
  103. if not RConfig.Combo.WEcombo then CastSpell(_E, minion)
  104. end
  105. end
  106. if WREADY and RConfig.Jung.useW and GetDistance(minion) <= Wrange and not PowerBallBuff then CastSpell(_W) end
  107. if RREADY and RConfig.Jung.useR and GetDistance(minion) <= Rrange then CastSpell(_R) end
  108. end
  109. end
  110. end
  111. --------------------------------------------------------
  112. if Target and WREADY and RConfig.AutoDBC and GetDistance(Target) <= RConfig.ADBCrange and not PowerBallBuff and not inRecall then CastSpell(_W) end --Auto DefensiveBall
  113. end
  114.  
  115.  
  116. function OnDraw()
  117. if RConfig.drawcircles and not myHero.dead then
  118. DrawCircle(myHero.x, myHero.y, myHero.z, Qrange, 0x992D3D)
  119. DrawCircle(myHero.x, myHero.y, myHero.z, Erange, 0x19A712)
  120. end
  121. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement