16HeX16

Nidalee by Pain

Jun 26th, 2013
1,054
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.34 KB | None | 0 0
  1. if myHero.charName ~= "Nidalee" then return end
  2.  
  3. require "Collision"
  4. function OnLoad()
  5.     qp = TargetPredictionVIP(1500, 1300, 0.100, 80)
  6.     wp = TargetPredictionVIP(900, math.huge, 0.400, 80)
  7.     col = Collision(1500, 1300, 0.100, 80)
  8.     NidaleeConfig = scriptConfig("The Bestial Huntress", "Nidalee")
  9.     NidaleeConfig:addParam("AutoQ", "Spear To The Face", SCRIPT_PARAM_ONKEYTOGGLE, false, string.byte("T"))
  10.     NidaleeConfig:addParam("Combo", "Rip Their Heart Out", SCRIPT_PARAM_ONKEYDOWN, false, 32)
  11.     NidaleeConfig:addParam("Heal", "Auto Heal", SCRIPT_PARAM_ONKEYTOGGLE, true, string.byte("Z"))
  12.     NidaleeConfig:addParam("SelfHeal", "Self Heal", SCRIPT_PARAM_ONKEYTOGGLE, false, string.byte("C"))
  13.     NidaleeConfig:addParam("FHeal", "Force Heal", SCRIPT_PARAM_ONKEYTOGGLE, false, string.byte("X"))
  14.     NidaleeConfig:permaShow("AutoQ")
  15.     NidaleeConfig:permaShow("Combo")
  16.     NidaleeConfig:permaShow("FHeal")
  17.     NidaleeConfig:permaShow("Heal")
  18.  
  19.     ts = TargetSelector(TARGET_NEAR_MOUSE, 2000, DAMAGE_MAGICAL, false)
  20.     ts.name = "Nidalee"
  21.     NidaleeConfig:addTS(ts)
  22.     PrintChat("<font color='#CCCCCC'> >> Nidalee - by Pain loaded! <<</font>")
  23. end
  24.  
  25. function OnTick()
  26.     Checks()
  27.    
  28.     if NidaleeConfig.SelfHeal and HUMAN == true then SelfHeal() end
  29.     if NidaleeConfig.Heal and HUMAN == true then Heal() end
  30.     if NidaleeConfig.FHeal and NidaleeConfig.Heal and COUGAR == true then FHeal() end
  31.     if ts.target then
  32.         spear = qp:GetPrediction(ts.target)
  33.         trap = wp:GetPrediction(ts.target)
  34.         if NidaleeConfig.Combo and HUMAN == true then HCombo() end
  35.         if NidaleeConfig.Combo and COUGAR == true then CCombo() end
  36.         if NidaleeConfig.AutoQ and HUMAN == true then Spear() end
  37.     end
  38. end
  39.  
  40. function HCombo()
  41.     if HUMAN == true then
  42.         if spear and not col:GetMinionCollision(ts.target) and qp:GetHitChance(ts.target) > 0.5 then
  43.             CastSpell(_Q, spear.x, spear.z)
  44.         end
  45.         if trap then
  46.             CastSpell(_W, trap.x, trap.z)
  47.         end
  48.         CastSpell(_R)
  49.     end
  50. end
  51.  
  52. function CCombo()
  53.     if COUGAR == true then
  54.         myHero:Attack(ts.target)
  55.         CastSpell(_W)
  56.         if GetDistance(ts.target) < 280 then CastSpell(_E) end
  57.         if ts.target.health < (ts.target.maxHealth*0.50) then CastSpell(_Q) end
  58.     end
  59. end
  60.  
  61. function SelfHeal()
  62.     if HUMAN == true then
  63.         if myHero.health < (myHero.maxHealth*0.50) and myHero:CanUseSpell(_E) == READY then
  64.             CastSpell(_E, myHero)
  65.         end
  66.     end
  67. end
  68.  
  69. function Heal()
  70.     if HUMAN == true then
  71.         for i=1, heroManager.iCount do
  72.             local allytarget = heroManager:GetHero(i)
  73.             if allytarget.team == myHero.team and not allytarget.dead and GetDistance(allytarget) <= 600 and allytarget.health < (allytarget.maxHealth*0.70) and myHero:CanUseSpell(_E) == READY then
  74.                 CastSpell(_E, allytarget)
  75.             end
  76.         end
  77.     end
  78. end
  79.  
  80. function FHeal()
  81.     if COUGAR == true then
  82.         CastSpell(_R)
  83.     end
  84. end
  85.  
  86. function Spear()
  87.     if HUMAN == true then
  88.         if spear and qp:GetHitChance(ts.target) > 0.5 and not col:GetMinionCollision(ts.target) then
  89.             CastSpell(_Q, spear.x, spear.z)
  90.         end
  91.     end
  92. end
  93.  
  94. function Checks()
  95.     ts:update()
  96.     if myHero:GetSpellData(_Q).name == "JavelinToss" or myHero:GetSpellData(_W).name == "Bushwhack" or myHero:GetSpellData(_E).name == "PrimalSurge" then
  97.         HUMAN = true
  98.     COUGAR = false
  99.     end
  100.  
  101.   if myHero:GetSpellData(_Q).name == "Takedown" or myHero:GetSpellData(_W).name == "Pounce" or myHero:GetSpellData(_E).name == "Swipe" then
  102.         COUGAR = true
  103.     HUMAN = false
  104.     end
  105. end
Advertisement
Add Comment
Please, Sign In to add comment