Advertisement
Eddow

Untitled

Nov 4th, 2014
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.66 KB | None | 0 0
  1. class 'Plugin'
  2. if myHero.charName ~= "Nami" then return end
  3. local Menu
  4. local Skills, Keys, Items, Data, Jungle, Helper, MyHero, Minions, Crosshair, Orbwalker = AutoCarry.Helper:GetClasses()
  5. local AllyList = {}
  6. local Q = {
  7. range = 875,
  8. speed = 1750,
  9. delay = 0.5,
  10. width = 200
  11. }
  12.  
  13. function Plugin:__init()
  14. PrintChat("Nami the British Edition v0.1")
  15. -- Prodiction
  16. require 'Prodiction'
  17. Prod = ProdictManager.GetInstance()
  18. ProQ = Prod:AddProdictionObject(_Q, Q.range, Q.speed, Q.delay, Q.width)
  19. Prodiction.AddCallbackDash(Q.range, Q.speed, Q.delay, Q.width, myHero, OnPredictionDash)
  20. end
  21.  
  22. function Plugin:OnTick()
  23. if myHero.dead then
  24. return
  25. end
  26. Checks()
  27. --[[ Mixed Mode ]]--
  28. if Menu.hm.hmuseW then
  29. if Keys.MixedMode and ValidTarget(Target) then
  30. CastSpell(_W, Target)
  31. end
  32. end
  33.  
  34. --[[Carry mode ]]--
  35. -- Auto carry Q Casting
  36. if Menu.ac.acuseQ then
  37. if Keys.AutoCarry and ValidTarget(Target) then
  38. ProQ:GetPredictionCallBack(Target, CastQ)
  39. end
  40. end
  41.  
  42. -- Casting W
  43. if Menu.ac.acuseW then
  44. if Keys.AutoCarry and ValidTarget(Target) then
  45. CastSpell(_W, myHero)
  46. end
  47. end
  48.  
  49. -- Casting E
  50. if Menu.ac.acuseE and Keys.AutoCarry then
  51. for i=1, heroManager.iCount do
  52. local allytarget = heroManager:GetHero(i)
  53. if allytarget.team == myHero.team and not allytarget.dead and allytarget.health > 0 and GetDistance(allytarget) < 950 then
  54. if Menu.ac["teammateE"..i] then
  55. CastSpell(_E, allytarget)
  56. end
  57. end
  58. end
  59. end
  60.  
  61. end
  62. ---------------------------------------------------------------------------
  63.  
  64.  
  65. ----------------------------------------------------------------------------
  66. --[[ Functions ]]--
  67. -- Checks
  68. function Checks()
  69. --target
  70. Target = AutoCarry.Crosshair:GetTarget()
  71. -- Cool downs
  72. QREADY = (myHero:CanUseSpell(_Q) == READY)
  73. WREADY = (myHero:CanUseSpell(_W) == READY)
  74. EREADY = (myHero:CanUseSpell(_E) == READY)
  75. RREADY = (myHero:CanUseSpell(_R) == READY)
  76. end
  77.  
  78. -- Load Allies for Casting E
  79. function LoadEMenu()
  80. for i=1, heroManager.iCount do
  81. local teammate = heroManager:GetHero(i)
  82. if teammate.team == myHero.team then
  83. Menu.ac:addParam("teammateE"..i, "Cast E on "..teammate.charName, SCRIPT_PARAM_ONOFF, true)
  84. end
  85. end
  86. end
  87.  
  88. --[[ Prodiction basic calls ]]--
  89. -- Cast Q
  90. function CastQ(unit, pos)
  91. CastSpell(_Q, pos.x, pos.z)
  92. end
  93.  
  94. --[[ Prodiction adv calls ]]--
  95. -- On Dashing
  96. function OnPredictionDash(unit, pos, info)
  97. -- PrintChat("Target Dashed")
  98. if Menu.al.alqdash and unit and unit.team ~= myHero.team and pos then
  99. CastSpell(_Q, pos.x, pos.z)
  100. end
  101. end
  102. ---------------------------------------------------------------------------
  103. --[[ Menu ]]--
  104. Menu = AutoCarry.Plugins:RegisterPlugin(Plugin(), "Namis fish tank")
  105. -- auto carry menu
  106. Menu:addSubMenu("Auto Carry Mode", "ac")
  107. Menu.ac:addParam("acuseQ", "Cast Q:Aqua Prison", SCRIPT_PARAM_ONOFF, true)
  108. Menu.ac:addParam("acuseW", "Cast W:Ebb and Flow", SCRIPT_PARAM_ONOFF, true)
  109. Menu.ac:addParam("acuseE", "Cast E:Tidecaller's Blessing", SCRIPT_PARAM_ONOFF, true)
  110. LoadEMenu()
  111. -- harass menu
  112. Menu:addSubMenu("Harass Mode", "hm")
  113. Menu.hm:addParam("hmuseQ", "Cast Q:Aqua Prison", SCRIPT_PARAM_ONOFF, true)
  114. Menu.hm:addParam("hmuseW", "Cast W:Ebb and Flow", SCRIPT_PARAM_ONOFF, true)
  115. Menu.hm:addParam("hmuseE", "Cast E:Tidecallers's Blessing", SCRIPT_PARAM_ONOFF, true)
  116. --Advanced Logic
  117. Menu:addSubMenu("Advanced Logic", "al")
  118. Menu.al:addParam("alqdash", "Q at dashing location", SCRIPT_PARAM_ONOFF, true)
  119.  
  120. -- debug
  121. Menu:addSubMenu("Debugging", "db")
  122. Menu.db:addParam("dbSacRangeSwitch", "Change SAC Range Switch", SCRIPT_PARAM_ONOFF, true)
  123. Menu.db:addParam("dbSacRange", "Sac Range", SCRIPT_PARAM_SLICE, 600, 50, 1800, 0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement