Guest User

Morgana Master v.1.1

a guest
Jun 17th, 2014
387
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.69 KB | None | 0 0
  1. if myHero.charName ~= "Morgana" then return end
  2.  
  3. require 'VPrediction'
  4.  
  5. function Menu()
  6. AutoCarry.PluginMenu:addParam("co", "-- Combo Options --", SCRIPT_PARAM_INFO, "")
  7. AutoCarry.PluginMenu:addParam("USEQ", "Use Q in Combo", SCRIPT_PARAM_ONOFF, true)
  8. AutoCarry.PluginMenu:addParam("USEW", "Use W in Combo", SCRIPT_PARAM_ONOFF, true)
  9. AutoCarry.PluginMenu:addParam("USEE", "Use E in Combo", SCRIPT_PARAM_ONOFF, true)
  10. AutoCarry.PluginMenu:addParam("USER", "Use R in Combo", SCRIPT_PARAM_ONOFF, true)
  11. AutoCarry.PluginMenu:addParam("ENEMYTOR", "Min Enemies to Cast R: ", SCRIPT_PARAM_SLICE, 2, 1, 5, 0)
  12. AutoCarry.PluginMenu:addParam("co", "-- End Combo Options --", SCRIPT_PARAM_INFO, "")
  13. AutoCarry.PluginMenu:addParam("aa", "", SCRIPT_PARAM_INFO, "")
  14. AutoCarry.PluginMenu:addParam("ko", "-- KS Options --", SCRIPT_PARAM_INFO, "")
  15. AutoCarry.PluginMenu:addParam("IGN", "KS Ignite", SCRIPT_PARAM_ONOFF, true)
  16. AutoCarry.PluginMenu:addParam("KSQ", "KS Q", SCRIPT_PARAM_ONOFF, true)
  17. AutoCarry.PluginMenu:addParam("KSW", "KS W", SCRIPT_PARAM_ONOFF, true)
  18. AutoCarry.PluginMenu:addParam("KSULT", "KS R", SCRIPT_PARAM_ONOFF, true)
  19. AutoCarry.PluginMenu:addParam("ko", "-- End KS Options --", SCRIPT_PARAM_INFO, "")
  20. AutoCarry.PluginMenu:addParam("aa", "", SCRIPT_PARAM_INFO, "")
  21. AutoCarry.PluginMenu:addParam("ho", "-- Harras Options --", SCRIPT_PARAM_INFO, "")
  22. AutoCarry.PluginMenu:addParam("HQ", "Harras enemy Q", SCRIPT_PARAM_ONOFF, true)
  23. AutoCarry.PluginMenu:addParam("MINMPTOQ", "Min % MP To Harras Q", SCRIPT_PARAM_SLICE, 70, 0, 100, 2)
  24. AutoCarry.PluginMenu:addParam("HW", "Harras enemy W", SCRIPT_PARAM_ONOFF, true)
  25. AutoCarry.PluginMenu:addParam("MINMPTOW", "Min % MP To Harras W", SCRIPT_PARAM_SLICE, 70, 0, 100, 2)
  26. AutoCarry.PluginMenu:addParam("ho", "-- End Harras Options --", SCRIPT_PARAM_INFO, "")
  27. AutoCarry.PluginMenu:addParam("aa", "", SCRIPT_PARAM_INFO, "")
  28. AutoCarry.PluginMenu:addParam("ho", "-- Drawing Options --", SCRIPT_PARAM_INFO, "")
  29. AutoCarry.PluginMenu:addParam("DQL", "Draw Q Collision Line", SCRIPT_PARAM_ONOFF, true)
  30. AutoCarry.PluginMenu:addParam("DQ", "Draw Q Range", SCRIPT_PARAM_ONOFF, true)
  31. AutoCarry.PluginMenu:addParam("DW", "Draw W Range", SCRIPT_PARAM_ONOFF, true)
  32. AutoCarry.PluginMenu:addParam("DR", "Draw R Range", SCRIPT_PARAM_ONOFF, true)
  33. AutoCarry.PluginMenu:addParam("ho", "-- End Drawing Options --", SCRIPT_PARAM_INFO, "")
  34.  
  35. end
  36.  
  37. function PluginOnLoad()
  38. Menu()
  39. VP = VPrediction()
  40. IgniteKey = nil;
  41. if myHero:GetSpellData(SUMMONER_1).name:find("SummonerDot") then
  42. IgniteKey = SUMMONER_1
  43. elseif myHero:GetSpellData(SUMMONER_2).name:find("SummonerDot") then
  44. IgniteKey = SUMMONER_2
  45. else
  46. IgniteKey = nil
  47. end
  48. end
  49.  
  50. function PluginOnTick()
  51. Target = AutoCarry.GetAttackTarget()
  52. QReady = (myHero:CanUseSpell(_Q) == READY)
  53. WReady = (myHero:CanUseSpell(_W) == READY)
  54. EReady = (myHero:CanUseSpell(_E) == READY)
  55. RReady = ((myHero:CanUseSpell(_R) ~= NOTLEARNED) and (myHero:CanUseSpell(_R) ~= COOLDOWN))
  56. IReady = (ignite ~= nil and myHero:CanUseSpell(ignite) == READY)
  57.  
  58.  
  59. if AutoCarry.MainMenu.AutoCarry and Target ~= nil then
  60. if AutoCarry.PluginMenu.USEQ then
  61. CastQ()
  62. end
  63. if AutoCarry.PluginMenu.USEW then
  64. CastW()
  65. end
  66. if AutoCarry.PluginMenu.USEE then
  67. CastE()
  68. end
  69. if AutoCarry.PluginMenu.USER then
  70. CastR()
  71. end
  72. end
  73.  
  74. if AutoCarry.PluginMenu.KSQ and QReady then
  75. players = heroManager.iCount
  76. for i = 1, players, 1 do
  77. target = heroManager:getHero(i)
  78. qDmg = getDmg("Q", myHero, target)
  79. if target ~= nil and target.team ~= player.team and not target.dead then
  80. if QReady and qDmg > target.health then
  81. qRange, qDelay, qSpeed, qWidth = 1300, 150, 1200, 70
  82. local CastPosition, HitChance, Position = VP:GetLineCastPosition(target, qDelay, qWidth, 1300, qSpeed, myHero, true)
  83. if HitChance >= 2 then
  84. CastSpell(_Q, CastPosition.x, CastPosition.z)
  85. return
  86. end
  87. end
  88. end
  89. end
  90. end
  91.  
  92. if AutoCarry.PluginMenu.KSW and WReady then
  93. players = heroManager.iCount
  94. for i = 1, players, 1 do
  95. target = heroManager:getHero(i)
  96. wDmg = getDmg("W", myHero, target)
  97. if target ~= nil and target.team ~= player.team and not target.dead then
  98. if WReady and wDmg > target.health then
  99. wRange, wDelay, wSpeed, wWidth = 900, 150, 1200, 105
  100. local CastPosition, HitChance, Position = VP:GetCircularCastPosition(target, wDelay, wWidth, wRange, wSpeed, myHero, false)
  101. if CastPosition and not target.canMove and HitChance >= 2 then
  102. CastSpell(_W, CastPosition.x, CastPosition.z)
  103. return
  104. end
  105. end
  106. end
  107. end
  108. end
  109.  
  110. if AutoCarry.PluginMenu.KSULT and RReady then
  111. players = heroManager.iCount
  112. for i = 1, players, 1 do
  113. target = heroManager:getHero(i)
  114. rDmg = getDmg("R", myHero, target)
  115. if target ~= nil and target.team ~= player.team and not target.dead then
  116. if RReady and rDmg > target.health then
  117. CastSpell(_R)
  118. end
  119. end
  120. end
  121. end
  122.  
  123. if AutoCarry.PluginMenu.KSIGNITE and IgniteKey ~= nil then
  124. players = heroManager.iCount
  125. for i = 1, players, 1 do
  126. target = heroManager:getHero(i)
  127. iDmg = getDmg("IGNITE", myHero, Target)
  128. if target ~= nil and target.team ~= player.team and not target.dead then
  129. if IReady and iDmg > target.health then
  130. CastSpell(IgniteKey, target)
  131. end
  132. end
  133. end
  134. end
  135.  
  136. if AutoCarry.PluginMenu.HQ and QReady and ((myHero.mana/myHero.maxMana)*100) > AutoCarry.PluginMenu.MINMPTOQ then
  137. players = heroManager.iCount
  138. for i = 1, players, 1 do
  139. target = heroManager:getHero(i)
  140. if target ~= nil and target.team ~= player.team and not target.dead then
  141. qRange, qDelay, qSpeed, qWidth = 1300, 150, 1200, 70
  142. local CastPosition, HitChance, Position = VP:GetLineCastPosition(target, qDelay, qWidth, qRange, qSpeed, myHero, true)
  143. if HitChance >= 2 then
  144. CastSpell(_Q, CastPosition.x, CastPosition.z)
  145. return
  146. end
  147. end
  148. end
  149. end
  150.  
  151. if AutoCarry.PluginMenu.HW and WReady and ((myHero.mana/myHero.maxMana)*100) > AutoCarry.PluginMenu.MINMPTOW then
  152. players = heroManager.iCount
  153. for i = 1, players, 1 do
  154. target = heroManager:getHero(i)
  155. if target ~= nil and target.team ~= player.team and not target.dead then
  156. wRange, wDelay, wSpeed, wWidth = 900, 150, 1200, 105
  157. local CastPosition, HitChance, Position = VP:GetCircularCastPosition(target, wDelay, wWidth, wRange, wSpeed, myHero, false)
  158. if CastPosition and HitChance >= 2 then
  159. CastSpell(_W, CastPosition.x, CastPosition.z)
  160. return
  161. end
  162. end
  163. end
  164. end
  165.  
  166. end
  167.  
  168.  
  169. function CastQ()
  170. if QReady and AutoCarry.PluginMenu.USEQ and Target.canMove then
  171. qRange, qDelay, qSpeed, qWidth = 1300, 150, 1200, 70
  172. local CastPosition, HitChance, Position = VP:GetLineCastPosition(Target, qDelay, qWidth, 1300, qSpeed, myHero, true)
  173. if HitChance >= 2 then
  174. CastSpell(_Q, CastPosition.x, CastPosition.z)
  175. return
  176. end
  177. end
  178. end
  179.  
  180. function CastW()
  181. if WReady and AutoCarry.PluginMenu.USEW then
  182. wRange, wDelay, wSpeed, wWidth = 900, 150, 1200, 105
  183. local CastPosition, HitChance, Position = VP:GetCircularCastPosition(Target, wDelay, wWidth, wRange, wSpeed, myHero, false)
  184. if CastPosition and not Target.canMove and HitChance >= 2 then
  185. CastSpell(_W, CastPosition.x, CastPosition.z)
  186. return
  187. end
  188. end
  189. end
  190.  
  191. function CastE()
  192. if EReady and AutoCarry.PluginMenu.USEE then
  193. CastSpell(_E)
  194. end
  195. end
  196.  
  197. function CastR()
  198. local enemyCount = EnemyCount(myHero, 600)
  199. if RReady and AutoCarry.PluginMenu.USER and enemyCount >= AutoCarry.PluginMenu.ENEMYTOR then
  200. CastSpell(_R)
  201. end
  202. end
  203.  
  204. function EnemyCount(point, range)
  205. local count = 0
  206. for _, enemy in pairs(GetEnemyHeroes()) do
  207. if enemy and not enemy.dead and GetDistance(point, enemy) <= range then
  208. count = count + 1
  209. end
  210. end
  211. return count
  212. end
  213.  
  214. function PluginOnDraw()
  215. if AutoCarry.PluginMenu.DQL and ValidTarget(Target, 1300) then
  216. QMark = Target
  217. DrawLine3D(myHero.x, myHero.y, myHero.z, QMark.x, QMark.y, QMark.z, 65, ARGB(150,40,4,4))
  218. end
  219. if AutoCarry.PluginMenu.DQ and QReady then
  220. DrawCircle(myHero.x, myHero.y, myHero.z, 1300, ARGB(255,0,0,255))
  221. end
  222. if AutoCarry.PluginMenu.DW and WReady then
  223. DrawCircle(myHero.x, myHero.y, myHero.z, 900, ARGB(255,255,0,0))
  224. end
  225. if AutoCarry.PluginMenu.DR and RReady then
  226. DrawCircle(myHero.x, myHero.y, myHero.z, 600, ARGB(255,0,255,0))
  227. end
  228. end
Advertisement
Add Comment
Please, Sign In to add comment