Advertisement
H3stia

Untitled

Nov 28th, 2013
286
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 31.83 KB | None | 0 0
  1. -- zikkah's syndra + vadash prodiction fix
  2.  
  3. if myHero.charName ~= "Syndra" then return end
  4. function OnLoad()
  5. require "Prodiction"
  6. PetChamp = false
  7. Menu()
  8. Vars()
  9. Spells()
  10. LoadJungle()
  11. Balls = {}
  12.  
  13. for i=1, heroManager.iCount do
  14. local champ = heroManager:GetHero(i)
  15. if champ.team ~= myHero.team then
  16. EnemysInTable = EnemysInTable + 1
  17. EnemyTable[EnemysInTable] = { hero = champ, Name = champ.charName, q = 0, w = 0, e = 0, r = 0, IndicatorText = "", IndicatorPos, NotReady = false, Pct = 0, PeelMe = false }
  18. if champ.charName == "Yorick" or champ.charName == "Malzahar" or champ.charName == "Heimerdinger" or champ.charName == "Annie" then PetChamp = true end
  19. end
  20. end
  21. for i=1, BallTable do
  22. Balls[i] = { pos = nil, time = nil, stunball = false, wball = false}
  23. end
  24. end
  25. function OnTick()
  26. if GetTickCount() - qTimer > 50 then qTimer = math.huge qPos = nil end
  27. if GetTickCount() - wTimer > 50 then wTimer = math.huge wPos = nil end
  28. if GetTickCount() - eTimer > 50 then eTimer = math.huge ePos = nil end
  29.  
  30. if SMenu.ManualStun then
  31. if qReady and eReady then
  32. for _, enemy in pairs(GetEnemyHeroes()) do
  33. if GetDistance(mousePos, enemy) < 250 then
  34. Stun(enemy)
  35. end
  36. end
  37. end
  38. end
  39.  
  40. if SkipGrab and SkipTil ~= nil then
  41. if SkipTil < GetGameTimer() then
  42. SkipGrab = false
  43. SkipTil = nil
  44. end
  45. end
  46. if StunTil ~= nil and StunTil < GetGameTimer() then
  47. Stunned = nil
  48. StunTil = nil
  49. end
  50.  
  51. Ks()
  52. GetStunBall()
  53. GetPet()
  54. GlobalInfo()
  55. Calculations()
  56. if SMenu.JungleSteal then
  57. JungleSteal()
  58. end
  59. if SMenu.AutoGrabPets and GetPet() ~= nil and wReady and not Grabbed then
  60. CastSpell(_W, GetPet().x, GetPet().z)
  61. end
  62. if SMenu.Harass then
  63. if SMenu.OrbWalk then
  64. OrbWalk()
  65. elseif SMenu.MoveToMouse then
  66. moveToCursor()
  67. end
  68.  
  69. if ValidTarget(Target) then
  70. Harass()
  71. elseif ValidTarget(Target2) and SMenu.HarassStun and qReady and eReady then
  72. Stun(Target2)
  73. end
  74. end
  75. if SMenu.Combo then
  76. if SMenu.OrbWalk then
  77. OrbWalk()
  78. elseif SMenu.MoveToMouse then
  79. moveToCursor()
  80. end
  81.  
  82. if ValidTarget(Target) then
  83. Combo()
  84. elseif ValidTarget(Target2) and qReady and eReady then
  85. Stun(Target2)
  86. end
  87. end
  88. end
  89. function Combo()
  90. if Stunned ~= nil and Target == Stunned then
  91. wPos = Target
  92. qPos = Target
  93. end
  94. Dfg()
  95. Ulti()
  96.  
  97. if qReady and qPos and GetDistance(qPos) < 800 then
  98. CastSpell(_Q, qPos.x, qPos.z)
  99. end
  100. if eReady and ePos and not Grabbed then
  101.  
  102. local StunBall = GetStunBall()
  103. if StunBall and GetDistance(StunBall)<725 then
  104.  
  105. CastSpell(_E, StunBall.x, StunBall.z)
  106. return
  107. end
  108.  
  109. end
  110. if GetDistance(Target) > 800 then
  111. if eReady and qReady and not wReady then
  112. Stun(Target)
  113. return
  114. end
  115. if GetDistance(Target) > 900 and GetDistance(Target) < 1200 and qReady and eReady then
  116. Stun(Target)
  117. return
  118. end
  119.  
  120. end
  121.  
  122. if wPos and GetDistance(wPos) < 925 and wReady then
  123. -- if qReady and qMana + wMana < MyMana then
  124. -- CastSpell(_Q, myHero.x, myHero.z)
  125. -- end
  126. if Grabbed then
  127. CastSpell(_W, wPos.x, wPos.z)
  128.  
  129. end
  130. if not SkipGrab and GrabObject() then
  131. CastSpell(_W, wPos.x, wPos.z)
  132. end
  133. end
  134. end
  135. function Harass()
  136. if Stunned ~= nil and Target == Stunned then
  137. wPos = Target
  138. qPos = Target
  139. end
  140. if qReady and qPos and GetDistance(qPos) < 800 then
  141. CastSpell(_Q, qPos.x, qPos.z)
  142. end
  143.  
  144. if SMenu.UseE then
  145. if eReady and ePos and not Grabbed then
  146. if Harass and not SMenu.UseE then
  147. else
  148. local StunBall = GetStunBall()
  149. if StunBall and GetDistance(StunBall)<725 then
  150.  
  151. CastSpell(_E, StunBall.x, StunBall.z)
  152. return
  153. end
  154. end
  155. end
  156. end
  157. if SMenu.StunHarass then
  158. if GetDistance(Target) > 800 then
  159. if eReady and qReady and not wReady then
  160. Stun(Target)
  161. return
  162. end
  163. if GetDistance(Target) > 900 and GetDistance(Target) < 1200 and qReady and eReady then
  164. Stun(Target)
  165. return
  166. end
  167.  
  168. end
  169. end
  170. if SMenu.UseW then
  171. if wPos and GetDistance(wPos) < 925 and wReady then
  172.  
  173. if Grabbed then
  174. CastSpell(_W, wPos.x, wPos.z)
  175.  
  176. end
  177. if not SkipGrab and GrabObject() then
  178. CastSpell(_W, wPos.x, wPos.z)
  179. end
  180.  
  181. end
  182. end
  183.  
  184. end
  185. function Ulti()
  186. if rReady then
  187. if qDmg > THealth and qCurrCd < 1.5 then return
  188. elseif wDmg > THealth and wCurrCd < 1.5 then return
  189. elseif Grabbed and wDmg > THealth then return
  190. elseif qDmg+eDmg > THealth and qCurrCd < 2 and eCurrCd < 2 then return
  191. elseif qReady and wReady and qDmg+wDmg > THealth then return
  192. elseif qReady and Grabbed and qDmg+wDmg > THealth then return
  193. elseif qReady and wReady and eReady and qDmg+wDmg+eDmg > THealth then return
  194.  
  195. elseif THealth < rDmg + iDmg and GetDistance(Target) < 600 then
  196. if iReady then
  197. CastSpell(iSlot, Target)
  198. end
  199. CastSpell(_R, Target)
  200.  
  201.  
  202. elseif wCurrCd < 1.5 and wDmg + rDmg > THealth then
  203. if not qReady then
  204. CastSpell(_R, Target)
  205. end
  206. elseif Grabbed and wDmg + rDmg > THealth then
  207. if not qReady then
  208. CastSpell(_R, Target)
  209. end
  210.  
  211. elseif qReady and qDmg + rDmg > THealth then
  212. CastSpell(_R, Target)
  213.  
  214.  
  215. elseif qPos and qReady and wCurrCd < 1.5 and eCurrCd < 1.5 and qDmg + wDmg + rDmg > THealth then
  216. CastSpell(_Q, qPos.x, qPos.z)
  217. CastSpell(_R, Target)
  218.  
  219.  
  220. elseif qPos and qReady and Grabbed and eCurrCd < 1.5 and qDmg + wDmg + rDmg > THealth then
  221. CastSpell(_Q, qPos.x, qPos.z)
  222. CastSpell(_R, Target)
  223. end
  224. end
  225. end
  226. function Dfg()
  227. if dfgReady then
  228.  
  229. if qDmg + iDmg > THealth then return
  230. elseif wDmg+ iDmg > THealth then return
  231. elseif wDmg+ iDmg > THealth then return
  232. elseif qDmg+eDmg+ iDmg > THealth then return
  233. elseif qDmg+wDmg+ iDmg > THealth then return
  234. elseif qDmg+wDmg+ iDmg > THealth then return
  235. elseif qReady and wReady and eReady and qDmg+wDmg+eDmg > THealth and GetDistance(Target) < 800 then
  236. CastSpell(dfgSlot, Target)
  237. elseif qDmg+wDmg+eDmg+rDmg+ExtraDamage > THealth then
  238. CastSpell(dfgSlot, Target)
  239. end
  240.  
  241. end
  242. end
  243. function Ks()
  244. for _, enemy in pairs(GetEnemyHeroes()) do
  245. if GetDistance(enemy) < 1300 and ValidTarget(enemy) then
  246. if qReady and eReady and enemy.health < eDmg and GetDistance(enemy) > 900 and GetDistance(enemy) < 1300 then
  247. Stun(enemy)
  248. end
  249.  
  250. if iReady and SMenu.Ignite and iDmg > THealth and GetDistance(enemy) < 600 then
  251. CastSpell(iSlot, enemy)
  252. end
  253. end
  254. end
  255. end
  256. function GrabObject()
  257. local Grab = nil
  258. if SkipGrab then return false end
  259. if Grabbed then return true end
  260. if GetWObject() == nil then
  261. return false
  262. else
  263. Grab = GetWObject()
  264. end
  265.  
  266. if Grab ~= nil and not Grabbed then
  267. CastSpell(_W, Grab.x, Grab.z)
  268. return true
  269. end
  270.  
  271. end
  272. function GetWObject()
  273. local CurrentObject = nil
  274. local CurrentBall = nil
  275. local BallNumber = nil
  276.  
  277. if SMenu.PrioPets and PetChamp and GetPet() ~= nil then
  278. return GetPet()
  279. end
  280.  
  281. -- Get the ball which is longest in the game to extend its duration
  282. for i=1, BallTable do
  283. if Balls[i].pos ~= nil and GetDistance(Balls[i].pos) < 925 then
  284. CurrentBall = Balls[i]
  285. if CurrentObject == nil then CurrentObject = CurrentBall end
  286. if CurrentBall.time < CurrentObject.time then
  287. CurrentObject.wBall = false
  288. CurrentObject = CurrentBall
  289. CurrentObject.wBall = true
  290. end
  291.  
  292. end
  293. end
  294. if CurrentObject ~= nil then
  295.  
  296. return CurrentObject.pos
  297. else
  298.  
  299.  
  300. for i, AvaibleMinion in pairs(Minions.objects) do
  301. if AvaibleMinion ~= nil and AvaibleMinion.valid and AvaibleMinion.team == TEAM_ENEMY then
  302. CurrentObject = AvaibleMinion
  303. end
  304. end
  305. return CurrentObject
  306. end
  307. return nil
  308. end
  309. function GetStunBall()
  310. if ValidTarget(Target) then
  311. local EndPos, time, hitchance = ProStun:GetPrediction(Target)
  312. local stunball = nil
  313. if EndPos then
  314. local Ball = nil
  315. for i=1, BallTable do
  316. if Balls[i].pos ~= nil and GetDistance(Balls[i].pos) < 800 and eReady then
  317. if wReady and GetWObject() == Balls[i].pos then return nil end
  318. local hit = checkhitlinepass(myHero, Balls[i].pos, 80, 1200, EndPos, getHitBoxRadius(Target))
  319.  
  320. if hit then
  321. Balls[i].stunball = true
  322. stunball = Balls[i].pos
  323. return stunball
  324. end
  325.  
  326. else
  327. Balls[i].stunball = false
  328. end
  329. end
  330. return stunball
  331. end
  332. end
  333. end
  334.  
  335. function StunProdiction(target, pos)
  336. if not eReady or not qReady then return end
  337. if pos and GetDistance(pos) < 1250 and myHero.mana > qMana + eMana then
  338.  
  339. local x,y,z = (Vector(pos) - Vector(myHero)):normalized():unpack()
  340. Correction = GetDistance(myHero, pos) / 2
  341.  
  342. local posX = pos.x - (x * Correction)
  343. local posY = pos.y - (y * Correction)
  344. local posZ = pos.z - (z * Correction)
  345. CastSpell(_Q, posX, posZ)
  346. CastSpell(_E, posX, posZ)
  347.  
  348. SkipGrab = true
  349. end
  350. end
  351.  
  352. function Stun(unit)
  353. ProStun:GetPredictionCallBack(unit, StunProdiction)
  354. end
  355. function JungleSteal()
  356. if Nashor ~= nil then if not Nashor.valid or Nashor.dead or Nashor.health <= 0 then Nashor = nil end end
  357. if Dragon ~= nil then if not Dragon.valid or Dragon.dead or Dragon.health <= 0 then Dragon = nil end end
  358. if Golem1 ~= nil then if not Golem1.valid or Golem1.dead or Golem1.health <= 0 then Golem1 = nil end end
  359. if Golem2 ~= nil then if not Golem2.valid or Golem2.dead or Golem2.health <= 0 then Golem2 = nil end end
  360. if Lizard1 ~= nil then if not Lizard1.valid or Lizard1.dead or Lizard1.health <= 0 then Lizard1 = nil end end
  361. if Lizard2 ~= nil then if not Lizard2.valid or Lizard2.dead or Lizard2.health <= 0 then Lizard2 = nil end end
  362.  
  363. if Nashor ~= nil and GetDistance(Nashor) < 1300 and Nashor.visible then Kill(Nashor, true) end
  364. if Dragon ~= nil and GetDistance(Dragon) < 1300 and Dragon.visible then Kill(Dragon, true) end
  365. if Golem1 ~= nil and GetDistance(Golem1) < 1300 and Golem1.visible then Kill(Golem1) end
  366. if Golem2 ~= nil and GetDistance(Golem2) < 1300 and Golem2.visible then Kill(Golem2) end
  367. if Lizard1 ~= nil and GetDistance(Lizard1) < 1300 and Lizard1.visible then Kill(Lizard1) end
  368. if Lizard2 ~= nil and GetDistance(Lizard2) < 1300 and Lizard2.visible then Kill(Lizard2) end
  369. end
  370. function Kill(object, static)
  371. local GrabbedObject = false
  372. if static == nil then static = false end
  373. DmgOnObject = 0
  374. local jqDmg = getDmg("Q", object, myHero)
  375. local jwDmg = getDmg("W", object, myHero)
  376.  
  377. if not static then
  378. if Grabbed then
  379. CastSpell(_W, myHero.x+50, myHero.z+50)
  380.  
  381. elseif qReady and wReady and jqDmg+jwDmg > object.health and GetDistance(object) < 900 then
  382. CastSpell(_W, object.x, object.z)
  383. GrabbedObject = true
  384. elseif wReady and jwDmg > object.health and GetDistance(object) < 1000 then
  385. CastSpell(_W, object.x, object.z)
  386. elseif qReady and jqDmg > object.health and GetDistance(object) < 900 then
  387. CastSpell(_Q, object.x, object.z)
  388. end
  389.  
  390. else
  391. if Grabbed then
  392. CastSpell(_W, object.x, object.z)
  393. elseif GetDistance(object) > 1000 and GetDistance(object) < 1400 then
  394. if eReady and qReady and object.health < eDmg then
  395. Stun(object)
  396. end
  397. elseif GetDistance(object) < 1000 and wReady and GetWObject() ~= nil and wDmg > object.health then
  398. CastSpell(_W, GetWObject().x, GetWObject().z)
  399. GrabbedObject = true
  400. elseif GetDistance(object) < 1000 and wReady and GetWObject() == nil and wDmg > object.health then
  401. CastSpell(_Q, myHero.x, myHero.z)
  402. GrabbedObject = true
  403. elseif GetDistance(object) < 1000 and wReady and qReady and jqDmg + jwDmg > object.health then
  404. CastSpell(_Q, object.x, object.z)
  405. elseif GetDistance(object) < 1000 and qReady and jqDmg > object.health then
  406. CastSpell(_Q, object.x, object.z)
  407. end
  408. end
  409. end
  410.  
  411. function QProdiction(target, pos)
  412. if not qReady then return end
  413. if GetDistance(pos) <= 800 then
  414. qPos = pos
  415. qTimer = GetTickCount()
  416. elseif GetDistance(pos) <= 800 + 150 then
  417. local vec2 = Vector(player) + (Vector(pos) - Vector(player)):normalized() * 800
  418. if vec2 then
  419. qPos = vec2
  420. qTimer = GetTickCount()
  421. end
  422. end
  423. end
  424.  
  425. function WProdiction(target, pos)
  426. if not wReady then return end
  427. wPos = pos
  428. wTimer = GetTickCount()
  429. end
  430.  
  431. function EProdiction(target, pos)
  432. if not eReady then return end
  433. ePos = pos
  434. eTimer = GetTickCount()
  435. end
  436. ------------------
  437. -- Helpers --
  438. ------------------
  439. function GlobalInfo()
  440. MouseScreen = WorldToScreen(D3DXVECTOR3(mousePos.x, mousePos.y, mousePos.z))
  441. ts:update()
  442. Minions:update()
  443. Target = ts.target
  444. if Target == nil then
  445. stuntarget:update()
  446. Target2 = stuntarget.target
  447. end
  448. qReady = myHero:CanUseSpell(_Q) == READY
  449. wReady = myHero:CanUseSpell(_W) == READY
  450. eReady = myHero:CanUseSpell(_E) == READY
  451. rReady = myHero:CanUseSpell(_R) == READY
  452. qMana = myHero:GetSpellData(_Q).mana
  453. wMana = myHero:GetSpellData(_W).mana
  454. eMana = myHero:GetSpellData(_E).mana
  455. rMana = myHero:GetSpellData(_R).mana
  456. qCurrCd = myHero:GetSpellData(_Q).currentCd
  457. wCurrCd = myHero:GetSpellData(_E).currentCd
  458. eCurrCd = myHero:GetSpellData(_E).currentCd
  459. rCurrCd = myHero:GetSpellData(_R).currentCd
  460. if myHero:GetSpellData(_R).level == 3 then
  461. rRange = 750
  462. end
  463. iSlot = ((myHero:GetSpellData(SUMMONER_1).name:find("SummonerDot") and SUMMONER_1) or (myHero:GetSpellData(SUMMONER_2).name:find("SummonerDot") and SUMMONER_2) or nil)
  464. iReady = (iSlot ~= nil and myHero:CanUseSpell(iSlot) == READY)
  465. dfgSlot = GetInventorySlotItem(3128)
  466. dfgReady = (dfgSlot ~= nil and GetInventoryItemIsCastable(3128,myHero))
  467. lichSlot = GetInventorySlotItem(3100)
  468. lichReady = (lichSlot ~= nil and myHero:CanUseSpell(lichSlot) == READY)
  469. sheenSlot = GetInventorySlotItem(3057)
  470. sheenReady = (sheenSlot ~= nil and myHero:CanUseSpell(sheenSlot) == READY)
  471. MyMana = myHero.mana
  472. ManaPct = math.round((myHero.mana / myHero.maxMana)*100)
  473. if qMana + eMana + rMana <= MyMana then
  474. GotMana = true
  475. else
  476. GotMana = false
  477. end
  478. if wTime ~= nil and GetGameTimer()-wTime > 1.4 then
  479. ChannelingW = false
  480. wTime = nil
  481. end
  482.  
  483. if ValidTarget(Target) then
  484. ProQ:GetPredictionCallBack(Target, QProdiction)
  485. ProW:GetPredictionCallBack(Target, WProdiction)
  486. ProE:GetPredictionCallBack(Target, EProdiction)
  487. qDmg = getDmg("Q", Target, myHero)
  488. wDmg = getDmg("W", Target, myHero)
  489. eDmg = getDmg("E", Target, myHero)
  490. rDmg = getDmg("R", Target, myHero)*(3+BallCount)
  491. SphereDmg = getDmg("R", Target, myHero)
  492. iDmg = (iReady and getDmg("IGNITE", Target, myHero) or 0)
  493. THealth = Target.health
  494. sheendamage = (SHEENSlot and getDmg("SHEEN",enemy,myHero) or 0)
  495. lichdamage = (LICHSlot and getDmg("LICHBANE",enemy,myHero) or 0)
  496. TotalDamage = qDmg+eDmg+rDmg+sheendamage+lichdamage+iDmg
  497. ExtraDamage = sheendamage+lichdamage+iDmg
  498. if dfgReady then
  499. TotalDamage = TotalDamage * 1.2
  500. ExtraDamage = ExtraDamage * 1.2
  501. end
  502.  
  503. if rReady then
  504. AllReady = true
  505. if qCurrCd > 1.5 then
  506. AllReady = false
  507. end
  508. if iSlot and not iReady then
  509. AllReady = false
  510. end
  511. if dfgSlot and not dfgReady then
  512. AllReady = false
  513. end
  514. else
  515. AllReady = false
  516. end
  517.  
  518. end
  519. end
  520. function AreaEnemyCount(Spot, Range, Killable)
  521. local count = 0
  522. if Killable == nil then Killable = false end
  523.  
  524. if Killable == true then
  525.  
  526. for _, enemy in pairs(GetEnemyHeroes()) do
  527. if enemy and not enemy.dead and GetDistance(Spot, enemy) <= Range and getDmg("R", enemy, myHero) > enemy.health then
  528. count = count + 1
  529. end
  530. end
  531.  
  532.  
  533. else
  534. for _, enemy in pairs(GetEnemyHeroes()) do
  535. if enemy and not enemy.dead and GetDistance(Spot, enemy) <= Range then
  536. count = count + 1
  537. end
  538. end
  539. end
  540. return count
  541. end
  542. function GetPet()
  543. for i, AvaibleMinion in pairs(Minions.objects) do
  544. if AvaibleMinion ~= nil and AvaibleMinion.valid and AvaibleMinion.team == TEAM_ENEMY then
  545.  
  546. if AvaibleMinion.name:find("Tibbers") then
  547. return AvaibleMinion
  548. elseif AvaibleMinion.name:find("H-28") then
  549. return AvaibleMinion
  550. elseif AvaibleMinion.name:find("Voidling") then
  551. return AvaibleMinion
  552. elseif AvaibleMinion.name:find("Inky") then
  553. return AvaibleMinion
  554. elseif AvaibleMinion.name:find("Blinky") then
  555. return AvaibleMinion
  556. elseif AvaibleMinion.name:find("Clyde") then
  557. return AvaibleMinion
  558. end
  559.  
  560. end
  561. end
  562. return nil
  563. end
  564. ------------------
  565. -- Orbwalkstuff --
  566. ------------------
  567. function OrbWalk()
  568. if ValidTarget(Target) and GetDistance(Target) <= 550 then
  569. if timeToShoot() then
  570. myHero:Attack(Target)
  571. elseif heroCanMove() then
  572. moveToCursor()
  573. end
  574. else
  575. moveToCursor()
  576.  
  577. end
  578. end
  579. function trueRange()
  580. return myHero.range + GetDistance(myHero.minBBox)
  581. end
  582. function heroCanMove()
  583. return (GetTickCount() + GetLatency()/2 > lastAttack + lastWindUpTime + 20)
  584. end
  585. function timeToShoot()
  586. return (GetTickCount() + GetLatency()/2 > lastAttack + lastAttackCD)
  587. end
  588. function moveToCursor()
  589. if GetDistance(mousePos) > 1 or lastAnimation == "Idle1" then
  590. local moveToPos = myHero + (Vector(mousePos) - myHero):normalized()*300
  591. myHero:MoveTo(moveToPos.x, moveToPos.z)
  592. end
  593. end
  594. function getHitBoxRadius(unit)
  595. if unit ~= nil then
  596. return GetDistance(unit.minBBox, unit.maxBBox)/2
  597. else
  598. return 0
  599. end
  600. end
  601. ------------------
  602. -- Draw+Calcs --
  603. ------------------
  604. function OnDraw()
  605.  
  606. if not SMenu.DisableDraw then
  607.  
  608. if SMenu.ManualStun then
  609. DrawCircle(mousePos.x, mousePos.y, mousePos.z, 250, ARGB(255,0,255,0))
  610. end
  611.  
  612. if SMenu.ScriptMenu then
  613. end
  614. --[[if SMenu.DmgIndic then
  615. for i=1, EnemysInTable do
  616. local enemy = EnemyTable[i].hero
  617. if enemy.visible and not enemy.dead and GetDistance(enemy, cameraPos) < 3000 then
  618. enemy.barData = GetEnemyBarData()
  619. local barPos = GetUnitHPBarPos(enemy)
  620. local barPosOffset = GetUnitHPBarOffset(enemy)
  621. local barOffset = { x = enemy.barData.PercentageOffset.x, y = enemy.barData.PercentageOffset.y }
  622. local barPosPercentageOffset = { x = enemy.barData.PercentageOffset.x, y = enemy.barData.PercentageOffset.y }
  623. local BarPosOffsetX = 171
  624. local BarPosOffsetY = 46
  625. local CorrectionY = 14.5
  626. local StartHpPos = 31
  627. local IndicatorPos = EnemyTable[i].IndicatorPos
  628. local Text = EnemyTable[i].IndicatorText
  629. barPos.x = barPos.x + (barPosOffset.x - 0.5 + barPosPercentageOffset.x) * BarPosOffsetX + StartHpPos
  630. barPos.y = barPos.y + (barPosOffset.y - 0.5 + barPosPercentageOffset.y) * BarPosOffsetY + CorrectionY
  631. if IndicatorPos ~= nil then
  632. if EnemyTable[i].NotReady == true then
  633. DrawText(tostring(Text),13,barPos.x+IndicatorPos - 10 ,barPos.y-27 ,orange)
  634. DrawText("|",13,barPos.x+IndicatorPos ,barPos.y ,orange)
  635. DrawText("|",13,barPos.x+IndicatorPos ,barPos.y-9 ,orange)
  636. DrawText("|",13,barPos.x+IndicatorPos ,barPos.y-18 ,orange)
  637. else
  638. DrawText(tostring(Text),13,barPos.x+IndicatorPos - 10 ,barPos.y-27 ,ARGB(255,0,255,0))
  639. DrawText("|",13,barPos.x+IndicatorPos ,barPos.y ,ARGB(255,0,255,0))
  640. DrawText("|",13,barPos.x+IndicatorPos ,barPos.y-9 ,ARGB(255,0,255,0))
  641. DrawText("|",13,barPos.x+IndicatorPos ,barPos.y-18 ,ARGB(255,0,255,0))
  642. end
  643. end
  644. end
  645. end
  646. end]]
  647. if SMenu.ShowQ then
  648. if qReady then
  649. DrawCircle(myHero.x, myHero.y, myHero.z, 800, ARGB(255,0,255,0))
  650. else
  651. DrawCircle(myHero.x, myHero.y, myHero.z, 800, ARGB(255,255,0,0))
  652. end
  653. end
  654. if SMenu.ShowW then
  655. if eReady then
  656. DrawCircle(myHero.x, myHero.y, myHero.z, 900, ARGB(255,0,255,0))
  657. else
  658. DrawCircle(myHero.x, myHero.y, myHero.z, 900, ARGB(255,255,0,0))
  659. end
  660. end
  661. if SMenu.ShowE then
  662. if eReady then
  663. DrawCircle(myHero.x, myHero.y, myHero.z, 575, ARGB(255,0,255,0))
  664. else
  665. DrawCircle(myHero.x, myHero.y, myHero.z, 575, ARGB(255,255,0,0))
  666. end
  667. end
  668. if SMenu.ShowR then
  669. if rReady then
  670. DrawCircle(myHero.x, myHero.y, myHero.z, rRange, ARGB(255,0,255,0))
  671. else
  672. DrawCircle(myHero.x, myHero.y, myHero.z, rRange, ARGB(255,255,0,0))
  673. end
  674. end
  675. if SMenu.ShowStun then
  676. if qReady and eReady then
  677. DrawCircle(myHero.x, myHero.y, myHero.z, 1300, ARGB(255,0,255,0))
  678. else
  679. DrawCircle(myHero.x, myHero.y, myHero.z, 1300, ARGB(255,255,0,0))
  680. end
  681. end
  682. end
  683. end
  684. function Calculations()
  685.  
  686.  
  687.  
  688. for i=1, EnemysInTable do
  689.  
  690. local enemy = EnemyTable[i].hero
  691. if not enemy.dead and enemy.visible then
  692. cqDmg = getDmg("Q", enemy, myHero)
  693. cwDmg = getDmg("W", enemy, myHero)
  694. ceDmg = getDmg("E", enemy, myHero)
  695. crTotalDmg = getDmg("R", enemy, myHero)
  696. crSphereDmg = getDmg("R", enemy, myHero)
  697. ciDmg = getDmg("IGNITE", enemy, myHero)
  698. csheendamage = (SHEENSlot and getDmg("SHEEN",enemy,myHero) or 0)
  699. clichdamage = (LICHSlot and getDmg("LICHBANE",enemy,myHero) or 0)
  700. cDfgDamage = 0
  701. cExtraDmg = 0
  702. cTotal = 0
  703.  
  704. if iReady then
  705. cExtraDmg = cExtraDmg + iDmg
  706. end
  707.  
  708. if sheenReady then
  709. cExtraDmg = cExtraDmg + csheenDamage
  710. end
  711.  
  712. if lichReady then
  713. cExtraDmg = cExtraDmg + clichDamage
  714. end
  715.  
  716.  
  717.  
  718. if rReady then
  719. crTotalDmg = crSphereDmg*(3+BallCount)
  720. EnemyTable[i].r = crTotalDmg
  721. else
  722. EnemyTable[i].r = 0
  723. end
  724.  
  725. EnemyTable[i].q = cqDmg
  726. EnemyTable[i].w = cqDmg
  727. EnemyTable[i].e = ceDmg
  728.  
  729.  
  730.  
  731. if dfgReady then
  732. cDfgDamage = (EnemyTable[i].q + EnemyTable[i].w + EnemyTable[i].e + EnemyTable[i].r) * 1.2
  733. end
  734.  
  735. -- Make combos
  736. if enemy.health < EnemyTable[i].q then
  737. EnemyTable[i].IndicatorText = "Q Kill"
  738. EnemyTable[i].IndicatorPos = 0
  739. if qMana > MyMana or not qReady then
  740. EnemyTable[i].NotReady = true
  741. else
  742. EnemyTable[i].NotReady = false
  743. end
  744.  
  745. elseif enemy.health < EnemyTable[i].r then
  746. EnemyTable[i].IndicatorText = "Ult Kill"
  747. EnemyTable[i].IndicatorPos = 0
  748. if rMana > MyMana or not rReady then
  749. EnemyTable[i].NotReady = true
  750. else
  751. EnemyTable[i].NotReady = false
  752. end
  753.  
  754. elseif enemy.health < EnemyTable[i].q + EnemyTable[i].w then
  755. EnemyTable[i].IndicatorText = "Q+W Kill"
  756. EnemyTable[i].IndicatorPos = 0
  757. if qMana + wMana > MyMana or not qReady or not wReady then
  758. EnemyTable[i].NotReady = true
  759. else
  760. EnemyTable[i].NotReady = false
  761. end
  762.  
  763. elseif enemy.health < EnemyTable[i].q + EnemyTable[i].w + EnemyTable[i].e then
  764. EnemyTable[i].IndicatorText = "Q+W+E Kill"
  765. EnemyTable[i].IndicatorPos = 0
  766. if wMana+qMana+eMana > MyMana or not wReady or not qReady or not eReady then
  767. EnemyTable[i].NotReady = true
  768. else
  769. EnemyTable[i].NotReady = false
  770. end
  771.  
  772. elseif enemy.health < EnemyTable[i].q + EnemyTable[i].w + EnemyTable[i].e + cDfgDamage + cExtraDmg then
  773. EnemyTable[i].IndicatorText = "Burst Kill"
  774. EnemyTable[i].IndicatorPos = 0
  775. if wMana+qMana+eMana > MyMana or not wReady or not qReady or not eReady then
  776. EnemyTable[i].NotReady = true
  777. else
  778. EnemyTable[i].NotReady = false
  779. end
  780.  
  781. elseif enemy.health < EnemyTable[i].q + EnemyTable[i].w + EnemyTable[i].e + EnemyTable[i].r + crSphereDmg + cExtraDmg then
  782. EnemyTable[i].IndicatorText = "All-In Kill"
  783. EnemyTable[i].IndicatorPos = 0
  784. if qMana + rMana > MyMana or not qReady or not rReady then
  785. EnemyTable[i].NotReady = true
  786. else
  787. EnemyTable[i].NotReady = false
  788. end
  789.  
  790. else
  791.  
  792. cTotal = cTotal + EnemyTable[i].q
  793.  
  794. cTotal = cTotal + EnemyTable[i].w
  795. cTotal = cTotal + EnemyTable[i].e
  796.  
  797. cTotal = cTotal + EnemyTable[i].r
  798.  
  799.  
  800. HealthLeft = math.round(enemy.health - cTotal)
  801. PctLeft = math.round(HealthLeft / enemy.maxHealth * 100)
  802. BarPct = PctLeft / 103 * 100
  803. EnemyTable[i].Pct = PctLeft
  804. EnemyTable[i].IndicatorPos = BarPct
  805. EnemyTable[i].IndicatorText = PctLeft .. "% Harass"
  806. if not qReady or not rReady or not eReady then
  807. EnemyTable[i].NotReady = true
  808. else
  809. EnemyTable[i].NotReady = false
  810. end
  811. if qMana + eMana + rMana > MyMana then
  812. EnemyTable[i].NotReady = true
  813. else
  814. EnemyTable[i].NotReady = false
  815. end
  816. end
  817.  
  818. end
  819. end
  820.  
  821.  
  822.  
  823. end
  824. ------------------
  825. -- On Load --
  826. ------------------
  827. function Menu()
  828. SMenu = scriptConfig("Beasty Syndra!", "Syndra")
  829. SMenu:addParam("sep", "----- [ General Settings ] -----", SCRIPT_PARAM_INFO, "")
  830. SMenu:addParam("Combo","Combo", SCRIPT_PARAM_ONKEYDOWN, false, 32)
  831. SMenu:addParam("Harass","Harass", SCRIPT_PARAM_ONKEYTOGGLE, false, string.byte("C"))
  832. SMenu:addParam("OrbWalk","Orbwalk in combo", SCRIPT_PARAM_ONOFF, true)
  833. SMenu:addParam("MoveToMouse","Move to mouse only", SCRIPT_PARAM_ONOFF, true)
  834. SMenu:addParam("JungleSteal","Jungle Steal", SCRIPT_PARAM_ONKEYDOWN, false, string.byte("X"))
  835. SMenu:addParam("ManualStun","Manual stun target near mouse", SCRIPT_PARAM_ONKEYDOWN, false, string.byte("V"))
  836.  
  837. SMenu:addParam("sep", "----- [ Combo Settings ] -----", SCRIPT_PARAM_INFO, "")
  838. SMenu:addParam("PrioPets","Prioritize enemy Pets for grab", SCRIPT_PARAM_ONOFF, true)
  839. SMenu:addParam("AutoGrabPets","Autograb enemy Pets", SCRIPT_PARAM_ONOFF, false)
  840.  
  841. SMenu:addParam("sep", "----- [ Harass ] -----", SCRIPT_PARAM_INFO, "")
  842. SMenu:addParam("UseW","Use W in harass", SCRIPT_PARAM_ONOFF, true)
  843. SMenu:addParam("UseE","Use E in harass", SCRIPT_PARAM_ONOFF, true)
  844. SMenu:addParam("StunHarass","Use stuncombo in harass(900+ range)", SCRIPT_PARAM_ONOFF, false)
  845.  
  846. SMenu:addParam("sep", "----- [ KS ] -----", SCRIPT_PARAM_INFO, "")
  847. SMenu:addParam("AutoKS","Snipe(E+Q)", SCRIPT_PARAM_ONOFF, true)
  848. SMenu:addParam("Ignite","Ignite killable", SCRIPT_PARAM_ONOFF, true)
  849.  
  850.  
  851. SMenu:addParam("sep", "---- [ Draw ] ----", SCRIPT_PARAM_INFO, "")
  852. SMenu:addParam("DmgIndic","Show hp-bar indicator", SCRIPT_PARAM_ONOFF, true)
  853. SMenu:addParam("ShowQ","Draw Q range", SCRIPT_PARAM_ONOFF, true)
  854. SMenu:addParam("ShowW","Draw W range", SCRIPT_PARAM_ONOFF, true)
  855. SMenu:addParam("ShowE","Draw E range", SCRIPT_PARAM_ONOFF, true)
  856. SMenu:addParam("ShowR","Draw R range", SCRIPT_PARAM_ONOFF, true)
  857. SMenu:addParam("ShowStun","Draw max stun range", SCRIPT_PARAM_ONOFF, true)
  858. SMenu:addParam("DisableLagFree","Disable lag free circles(RELOAD)", SCRIPT_PARAM_ONOFF, false)
  859. SMenu:addParam("DisableDraw","Disable all visuals", SCRIPT_PARAM_ONOFF, false)
  860.  
  861.  
  862. end
  863. function Vars()
  864. qPos = nil
  865. qTimer = math.huge
  866. wPos = nil
  867. wTimer = math.huge
  868. ePos = nil
  869. eTimer = math.huge
  870. ts = TargetSelector(TARGET_LESS_CAST_PRIORITY, 950, true)
  871. stuntarget = TargetSelector(TARGET_LOW_HP_PRIORITY, 1300, true)
  872. Grabbed = false
  873. Minions = minionManager(MINION_ALL, 925, myHero)
  874. ts.name = "Syndra"
  875. SMenu:addTS(ts)
  876. BallCount = 0
  877. StunTil = nil
  878. if not SMenu.DisableLagFree then
  879. _G.DrawCircle = DrawCircle2
  880. end
  881. Delay = nil
  882. --Spells
  883. qReady, wReady, eReady, rReady = false, false, false, false, false
  884. AllReady = false
  885. qCurrCd, wCurrCd,eCurrCd, rCurrCd = 0,0,0,0
  886. qDmg, wDmg, eDmg, rDmg, iDmg, dfgDamage = 0,0,0,0,0,0
  887. rRange = 675
  888. cqDmg, wDmg, ceDmg, crTotalDmg, ciDmg, cExtraDmg, cTotal, cMana, crSphereDmg = 0,0,0,0,0,0,0,0,0
  889. MyMana = 0
  890. GotMana = false
  891. StunBall = nil
  892. SkipGrab = false
  893. SkipTil = nil
  894. --Helpers
  895. lastAttack, lastWindUpTime, lastAttackCD = 0, 0, 0
  896. THealth = 0
  897. EnemyTable = {}
  898. EnemysInTable = 0
  899. HealthLeft = 0
  900. PctLeft = 0
  901. BarPct = 0
  902. orange = 0xFFFFE303
  903. green = ARGB(255,0,255,0)
  904. blue = ARGB(255,0,0,255)
  905. red = ARGB(255,255,0,0)
  906. BallTable = 12
  907. test = nil
  908. end
  909. function Spells()
  910. -- Q
  911. ProQ = ProdictManager.GetInstance():AddProdictionObject(_Q, 1000, 1500, 0.250, 100, myHero)
  912. -- W
  913. ProW = ProdictManager.GetInstance():AddProdictionObject(_W, 1000, 1500, 0.250, 100, myHero)
  914. -- E
  915. ProE = ProdictManager.GetInstance():AddProdictionObject(_R, 800, 1200, 0.250, 100, myHero)
  916. ProStun = ProdictManager.GetInstance():AddProdictionObject(stun, 1300, 1200, 0.250, 50, myHero)
  917. end
  918. function LoadJungle()
  919. for i = 1, objManager.maxObjects do
  920. local obj = objManager:getObject(i)
  921. if obj ~= nil and obj.type == "obj_AI_Minion" and obj.name ~= nil then
  922. if obj.name == "TT_Spiderboss7.1.1" then Vilemaw = obj
  923. elseif obj.name == "Worm12.1.1" then Nashor = obj
  924. elseif obj.name == "Dragon6.1.1" then Dragon = obj
  925. elseif obj.name == "AncientGolem1.1.1" then Golem1 = obj
  926. elseif obj.name == "AncientGolem7.1.1" then Golem2 = obj
  927. elseif obj.name == "LizardElder4.1.1" then Lizard1 = obj
  928. elseif obj.name == "LizardElder10.1.1" then Lizard2 = obj end
  929. end
  930. end
  931. end
  932. ------------------
  933. -- Callbacks --
  934. ------------------
  935. function OnProcessSpell(object,spell)
  936. if object == myHero then
  937. if spell.name:lower():find("attack") then
  938. lastAttack = GetTickCount() - GetLatency()/2
  939. lastWindUpTime = spell.windUpTime*1000
  940. lastAttackCD = spell.animationTime*1000
  941. end
  942. if spell.name:find("SyndraW") then
  943. Grabbed = true
  944. end
  945. if spell.name:find("SyndraE") or spell.name:find("syndrae5") then
  946.  
  947. SkipTil = GetGameTimer()+1
  948.  
  949. end
  950. end
  951. end
  952. function OnCreateObj(obj)
  953. if BallCount < 0 then BallCount = 0 end
  954.  
  955. if obj ~= nil and obj.type == "obj_AI_Minion" and obj.name ~= nil then
  956. if obj.name == "TT_Spiderboss7.1.1" then Vilemaw = obj
  957. elseif obj.name == "Worm12.1.1" then Nashor = obj
  958. elseif obj.name == "Dragon6.1.1" then Dragon = obj
  959. elseif obj.name == "AncientGolem1.1.1" then Golem1 = obj
  960. elseif obj.name == "AncientGolem7.1.1" then Golem2 = obj
  961. elseif obj.name == "LizardElder4.1.1" then Lizard1 = obj
  962. elseif obj.name == "LizardElder10.1.1" then Lizard2 = obj end
  963. end
  964.  
  965. if obj.name:find("Syndra_DarkSphere_idle") or obj.name:find("Syndra_DarkSphere5_idle") then
  966.  
  967. BallCount = BallCount+1
  968. for i=1, BallTable do
  969. if Balls[i].pos == nil then
  970. Balls[i] = { pos = obj, time=GetGameTimer() }
  971. return
  972. end
  973. end
  974. end
  975. end
  976. function OnDeleteObj(obj)
  977. if obj ~= nil and obj.name ~= nil then
  978. if obj.name == "TT_Spiderboss7.1.1" then Vilemaw = nil
  979. elseif obj.name == "Worm12.1.1" then Nashor = nil
  980. elseif obj.name == "Dragon6.1.1" then Dragon = nil
  981. elseif obj.name == "AncientGolem1.1.1" then Golem1 = nil
  982. elseif obj.name == "AncientGolem7.1.1" then Golem2 = nil
  983. elseif obj.name == "LizardElder4.1.1" then Lizard1 = nil
  984. elseif obj.name == "LizardElder10.1.1" then Lizard2 = nil end
  985. end
  986. if obj.name:find("Syndra_DarkSphere_idle") or obj.name:find("Syndra_DarkSphere5_idle") then
  987. for i=1, BallTable do
  988. if obj == Balls[i].pos then
  989. Balls[i].pos = nil
  990. Balls[i].time = nil
  991. Balls[i].stunball = false
  992. Balls[i].wball = false
  993. break end
  994. end
  995. BallCount = BallCount -1
  996. end
  997. end
  998. function OnGainBuff(unit, buff)
  999. if unit == Target then
  1000. if buff.name == "syndraebump" and buff.source == myHero then
  1001. Stunned = unit
  1002. StunTil = GetGameTimer() + 1.3
  1003. end
  1004. elseif unit == Target2 then
  1005. if buff.name == "syndraebump" and buff.source == myHero then
  1006.  
  1007. Stunned = unit
  1008. StunTil = GetGameTimer() + 1.3
  1009. end
  1010. end
  1011. end
  1012. function OnLoseBuff(unit, buff)
  1013.  
  1014. if buff.name == "syndraemarker" then
  1015. Stunned = nil
  1016. StunTil = nil
  1017. end
  1018.  
  1019.  
  1020. if unit.isMe then
  1021. if buff.name:find("syndrawtooltip") then
  1022. Grabbed = false
  1023. end
  1024. end
  1025. end
  1026. function OnUpdateBuff(unit, buff)
  1027. if unit.isMe then
  1028. end
  1029. end
  1030. -- Lag free circles (by barasia, vadash and viseversa)
  1031. function DrawCircleNextLvl(x, y, z, radius, width, color, chordlength)
  1032. radius = radius or 300
  1033. quality = math.max(8,round(180/math.deg((math.asin((chordlength/(2*radius)))))))
  1034. quality = 2 * math.pi / quality
  1035. radius = radius*.92
  1036. local points = {}
  1037. for theta = 0, 2 * math.pi + quality, quality do
  1038. local c = WorldToScreen(D3DXVECTOR3(x + radius * math.cos(theta), y, z - radius * math.sin(theta)))
  1039. points[#points + 1] = D3DXVECTOR2(c.x, c.y)
  1040. end
  1041. DrawLines2(points, width or 1, color or 4294967295)
  1042. end
  1043. function round(num)
  1044. if num >= 0 then return math.floor(num+.5) else return math.ceil(num-.5) end
  1045. end
  1046. function DrawCircle2(x, y, z, radius, color)
  1047. local vPos1 = Vector(x, y, z)
  1048. local vPos2 = Vector(cameraPos.x, cameraPos.y, cameraPos.z)
  1049. local tPos = vPos1 - (vPos1 - vPos2):normalized() * radius
  1050. local sPos = WorldToScreen(D3DXVECTOR3(tPos.x, tPos.y, tPos.z))
  1051. if OnScreen({ x = sPos.x, y = sPos.y }, { x = sPos.x, y = sPos.y }) then
  1052. DrawCircleNextLvl(x, y, z, radius, 1, color, 75)
  1053. end
  1054. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement