Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2014
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 40.65 KB | None | 0 0
  1. ]] --
  2.  
  3. -- / Hero Name Check / --
  4. if myHero.charName ~= "Katarina" then return end
  5. -- / Hero Name Check / --
  6. _G.Kata_Autoupdate = true
  7.  
  8. -- / Lib Auto-Update Function / --
  9. local lib_Required = {
  10. ["SOW"] = "https://raw.githubusercontent.com/Hellsing/BoL/master/Common/SOW.lua",
  11. ["VPrediction"] = "https://raw.githubusercontent.com/Hellsing/BoL/master/Common/VPrediction.lua"
  12. }
  13.  
  14. local lib_downloadNeeded, lib_downloadCount = false, 0
  15.  
  16. function AfterDownload()
  17. lib_downloadCount = lib_downloadCount - 1
  18. if lib_downloadCount == 0 then
  19. lib_downloadNeeded = false
  20. print("<font color=\"#FF0000\">Katarina - The Sinister Blade:</font> <font color=\"#FFFFFF\">Required libraries downloaded successfully, please reload (double F9).</font>")
  21. end
  22. end
  23.  
  24. for lib_downloadName, lib_downloadUrl in pairs(lib_Required) do
  25. local lib_fileName = LIB_PATH .. lib_downloadName .. ".lua"
  26.  
  27. if FileExist(lib_fileName) then
  28. require(lib_downloadName)
  29. else
  30. lib_downloadNeeded = true
  31. lib_downloadCount = lib_downloadCount and lib_downloadCount + 1 or 1
  32. DownloadFile(lib_downloadUrl, lib_fileName, function() AfterDownload() end)
  33. end
  34. end
  35.  
  36. if lib_downloadNeeded then return end
  37. -- / Lib Auto-Update Function / --
  38.  
  39. -- / Auto-Update Function / --
  40. local script_downloadName = "Katarina - The Sinister Blade"
  41. local script_downloadHost = "raw.github.com"
  42. local script_downloadPath = "/UglyOldGuy/BoL/master/Katarina%20-%20The%20Sinister%20Blade.lua" .. "?rand=" .. math.random(1, 10000)
  43. local script_downloadUrl = "https://" .. script_downloadHost .. script_downloadPath
  44. local script_filePath = SCRIPT_PATH .. GetCurrentEnv().FILE_NAME
  45.  
  46. function script_Messager(msg) print("<font color=\"#FF0000\">" .. script_downloadName .. ":</font> <font color=\"#FFFFFF\">" .. msg .. ".</font>") end
  47.  
  48. if _G.Kata_Autoupdate then
  49. local script_webResult = GetWebResult(script_downloadHost, script_downloadPath)
  50. if script_webResult then
  51. local script_serverVersion = string.match(script_webResult, "local%s+version%s+=%s+\"%d+.%d+\"")
  52.  
  53. if script_serverVersion then
  54. script_serverVersion = tonumber(string.match(script_serverVersion or "", "%d+%.?%d*"))
  55.  
  56. if not script_serverVersion then
  57. script_Messager("Please contact the developer of the script \"" .. script_downloadName .. "\", since the auto updater returned an invalid version.")
  58. return
  59. end
  60.  
  61. if tonumber(version) < script_serverVersion then
  62. script_Messager("New version available: " .. script_serverVersion)
  63. script_Messager("Updating, please don't press F9")
  64. DelayAction(function () DownloadFile(script_downloadUrl, script_filePath, function() script_Messager("Successfully updated the script, please reload!") end) end, 2)
  65. else
  66. script_Messager("You've got the latest version: " .. script_serverVersion)
  67. end
  68. end
  69. else
  70. script_Messager("Error downloading server version!")
  71. end
  72. end
  73. -- / Auto-Update Function / --
  74.  
  75. -- / Loading Function / --
  76. function OnLoad()
  77. --->
  78. Variables()
  79. KatarinaMenu()
  80. ---<
  81. end
  82. -- / Loading Function / --
  83.  
  84. -- / Tick Function / --
  85. function OnTick()
  86. --->
  87. Checks()
  88. DamageCalculation()
  89. UseConsumables()
  90.  
  91. if Target then
  92. if KatarinaMenu.harass.wharass and not SkillR.castingUlt then CastW(Target) end
  93. if KatarinaMenu.killsteal.Ignite then AutoIgnite(Target) end
  94. end
  95.  
  96. -- Menu Variables --
  97. --->
  98. ComboKey = KatarinaMenu.combo.comboKey
  99. FarmingKey = KatarinaMenu.farming.farmKey
  100. HarassKey = KatarinaMenu.harass.harassKey
  101. ClearKey = KatarinaMenu.clear.clearKey
  102. WardJumpKey = KatarinaMenu.misc.wardJumpKey
  103. ---<
  104. -- Menu Variables --
  105. --->
  106. if ComboKey then
  107. FullCombo()
  108. end
  109. if HarassKey then
  110. HarassCombo()
  111. end
  112. if FarmingKey and not ComboKey then
  113. Farm()
  114. end
  115. if ClearKey then
  116. MixedClear()
  117. end
  118. if WardJumpKey then
  119. moveToCursor()
  120. local WardPos = GetDistanceSqr(mousePos) <= SkillWard.range * SkillWard.range and mousePos or getMousePos()
  121. wardJump(WardPos.x, WardPos.z)
  122. end
  123. if KatarinaMenu.killsteal.smartKS then
  124. KillSteal()
  125. end
  126. if KatarinaMenu.misc.jumpAllies then
  127. DangerCheck()
  128. end
  129. ---<
  130. end
  131. -- / Tick Function / --
  132.  
  133. -- / Variables Function / --
  134. function Variables()
  135. --- Skills Vars --
  136. --->
  137. SkillQ = {range = 675, name = "Bouncing Blades", ready = false, delay = 400, projSpeed = 1400, timeToHit = 0, markDelay = 4000, color = ARGB(255,178, 0 , 0 ) }
  138. SkillW = {range = 375, name = "Sinister Steel", ready = false, color = ARGB(255, 32,178,170) }
  139. SkillE = {range = 700, name = "Shunpo", ready = false, color = ARGB(255,128, 0 ,128) }
  140. SkillR = {range = 550, name = "Death Lotus", ready = false, castingUlt = false, }
  141. SkillWard = {range = 600, lastJump = 0, itemSlot = nil }
  142. ---<
  143. --- Skills Vars ---
  144. --- Items Vars ---
  145. --->
  146. Items =
  147. {
  148. HealthPot = {ready = false},
  149. FlaskPot = {ready = false},
  150. TrinketWard = {ready = false},
  151. RubySightStone = {ready = false},
  152. SightStone = {ready = false},
  153. SightWard = {ready = false},
  154. VisionWard = {ready = false}
  155. }
  156. ---<
  157. --- Items Vars ---
  158. --- Orbwalking Vars ---
  159. --->
  160. vPred = VPrediction()
  161.  
  162. kSOW = SOW(vPred)
  163. ---<
  164. --- Orbwalking Vars ---
  165. if VIP_USER then
  166. --- LFC Vars ---
  167. --->
  168. _G.oldDrawCircle = rawget(_G, 'DrawCircle')
  169. _G.DrawCircle = DrawCircle2
  170. ---<
  171. --- LFC Vars ---
  172. end
  173. --- Drawing Vars ---
  174. --->
  175. TextList = {"Harass him", "Q = Kill", "W = Kill", "E = Kill!", "Q+W = Kill", "Q+E = Kill", "E+W = Kill", "Q+E+W = Kill", "Q+E+W+Itm = Kill", "Q+W+E+R: ", "Need CDs"}
  176. KillText = {}
  177. colorText = ARGB(255,255,204,0)
  178. wardColor =
  179. {
  180. available = ARGB(255,255,255,255),
  181. searching = ARGB(255,250,123, 20),
  182. unavailable = ARGB(255,255, 0 , 0 )
  183. }
  184. ---<
  185. --- Drawing Vars ---
  186. --- Misc Vars ---
  187. --->
  188. levelSequence = {
  189. { 1,3,2,1,1,4,1,2,1,2,4,2,2,3,3,4,3,3 }, -- Prioritise Q
  190. { 1,3,2,2,2,4,2,1,2,1,4,1,1,3,3,4,3,3 } -- Prioritise W
  191. }
  192. UsingHPot = false
  193. gameState = GetGame()
  194. if gameState.map.shortName == "twistedTreeline" then
  195. TTMAP = true
  196. else
  197. TTMAP = false
  198. end
  199. ---<
  200. --- Misc Vars ---
  201. --- Tables ---
  202. --->
  203. Wards = {}
  204. allyHeroes = GetAllyHeroes()
  205. enemyHeroes = GetEnemyHeroes()
  206. enemyMinions = minionManager(MINION_ENEMY, SkillE.range, player, MINION_SORT_HEALTH_ASC)
  207. allyMinions = minionManager(MINION_ALLY, SkillE.range, player, MINION_SORT_HEALTH_ASC)
  208. JungleMobs = {}
  209. JungleFocusMobs = {}
  210. priorityTable = {
  211. AP = {
  212. "Annie", "Ahri", "Akali", "Anivia", "Annie", "Brand", "Cassiopeia", "Diana", "Evelynn", "FiddleSticks", "Fizz", "Gragas", "Heimerdinger", "Karthus",
  213. "Kassadin", "Katarina", "Kayle", "Kennen", "Leblanc", "Lissandra", "Lux", "Malzahar", "Mordekaiser", "Morgana", "Nidalee", "Orianna",
  214. "Ryze", "Sion", "Swain", "Syndra", "Teemo", "TwistedFate", "Veigar", "Viktor", "Vladimir", "Xerath", "Ziggs", "Zyra"
  215. },
  216. Support = {
  217. "Alistar", "Blitzcrank", "Janna", "Karma", "Leona", "Lulu", "Nami", "Nunu", "Sona", "Soraka", "Taric", "Thresh", "Zilean"
  218. },
  219. Tank = {
  220. "Amumu", "Chogath", "DrMundo", "Galio", "Hecarim", "Malphite", "Maokai", "Nasus", "Rammus", "Sejuani", "Nautilus", "Shen", "Singed", "Skarner", "Volibear",
  221. "Warwick", "Yorick", "Zac"
  222. },
  223. AD_Carry = {
  224. "Ashe", "Caitlyn", "Corki", "Draven", "Ezreal", "Graves", "Jayce", "Jinx", "KogMaw", "Lucian", "MasterYi", "MissFortune", "Pantheon", "Quinn", "Shaco", "Sivir",
  225. "Talon","Tryndamere", "Tristana", "Twitch", "Urgot", "Varus", "Vayne", "Yasuo","Zed"
  226. },
  227. Bruiser = {
  228. "Aatrox", "Darius", "Elise", "Fiora", "Gangplank", "Garen", "Irelia", "JarvanIV", "Jax", "Khazix", "LeeSin", "Nocturne", "Olaf", "Poppy",
  229. "Renekton", "Rengar", "Riven", "Rumble", "Shyvana", "Trundle", "Udyr", "Vi", "MonkeyKing", "XinZhao"
  230. }
  231. }
  232. if TTMAP then --
  233. FocusJungleNames = {
  234. ["TT_NWraith1.1.1"] = true,
  235. ["TT_NGolem2.1.1"] = true,
  236. ["TT_NWolf3.1.1"] = true,
  237. ["TT_NWraith4.1.1"] = true,
  238. ["TT_NGolem5.1.1"] = true,
  239. ["TT_NWolf6.1.1"] = true,
  240. ["TT_Spiderboss8.1.1"] = true
  241. }
  242. JungleMobNames = {
  243. ["TT_NWraith21.1.2"] = true,
  244. ["TT_NWraith21.1.3"] = true,
  245. ["TT_NGolem22.1.2"] = true,
  246. ["TT_NWolf23.1.2"] = true,
  247. ["TT_NWolf23.1.3"] = true,
  248. ["TT_NWraith24.1.2"] = true,
  249. ["TT_NWraith24.1.3"] = true,
  250. ["TT_NGolem25.1.1"] = true,
  251. ["TT_NWolf26.1.2"] = true,
  252. ["TT_NWolf26.1.3"] = true
  253. }
  254. else
  255. JungleMobNames = {
  256. ["Wolf8.1.2"] = true,
  257. ["Wolf8.1.3"] = true,
  258. ["YoungLizard7.1.2"] = true,
  259. ["YoungLizard7.1.3"] = true,
  260. ["LesserWraith9.1.3"] = true,
  261. ["LesserWraith9.1.2"] = true,
  262. ["LesserWraith9.1.4"] = true,
  263. ["YoungLizard10.1.2"] = true,
  264. ["YoungLizard10.1.3"] = true,
  265. ["SmallGolem11.1.1"] = true,
  266. ["Wolf2.1.2"] = true,
  267. ["Wolf2.1.3"] = true,
  268. ["YoungLizard1.1.2"] = true,
  269. ["YoungLizard1.1.3"] = true,
  270. ["LesserWraith3.1.3"] = true,
  271. ["LesserWraith3.1.2"] = true,
  272. ["LesserWraith3.1.4"] = true,
  273. ["YoungLizard4.1.2"] = true,
  274. ["YoungLizard4.1.3"] = true,
  275. ["SmallGolem5.1.1"] = true
  276. }
  277. FocusJungleNames = {
  278. ["Dragon6.1.1"] = true,
  279. ["Worm12.1.1"] = true,
  280. ["GiantWolf8.1.1"] = true,
  281. ["AncientGolem7.1.1"] = true,
  282. ["Wraith9.1.1"] = true,
  283. ["LizardElder10.1.1"] = true,
  284. ["Golem11.1.2"] = true,
  285. ["GiantWolf2.1.1"] = true,
  286. ["AncientGolem1.1.1"] = true,
  287. ["Wraith3.1.1"] = true,
  288. ["LizardElder4.1.1"] = true,
  289. ["Golem5.1.2"] = true,
  290. ["GreatWraith13.1.1"] = true,
  291. ["GreatWraith14.1.1"] = true
  292. }
  293. end
  294. for i = 0, objManager.maxObjects do
  295. local object = objManager:getObject(i)
  296. if object and object.valid and not object.dead then
  297. if FocusJungleNames[object.name] then
  298. JungleFocusMobs[#JungleFocusMobs+1] = object
  299. elseif JungleMobNames[object.name] then
  300. JungleMobs[#JungleMobs+1] = object
  301. end
  302. end
  303. end
  304. ---<
  305. --- Tables ---
  306. end
  307. -- / Variables Function / --
  308.  
  309. -- / Menu Function / --
  310. function KatarinaMenu()
  311. --- Main Menu ---
  312. --->
  313. KatarinaMenu = scriptConfig("Katarina - The Sinister Blade", "Katarina")
  314. ---> Combo Menu
  315. KatarinaMenu:addSubMenu("[" .. myHero.charName .. " - Combo Settings]", "combo")
  316. KatarinaMenu.combo:addParam("comboKey", "Full Combo Key (SBTW)", SCRIPT_PARAM_ONKEYDOWN, false, 32)
  317. KatarinaMenu.combo:addParam("stopUlt", "Stop " .. SkillR.name .. " (R) If Target Can Die", SCRIPT_PARAM_ONOFF, false)
  318. KatarinaMenu.combo:addParam("autoE", "Auto E if not in " .. SkillR.name .. " (R) Range while Ult", SCRIPT_PARAM_ONOFF, false)
  319. KatarinaMenu.combo:addParam("detonateQ", "Try to Proc " .. SkillQ.name .. " (Q) Mark", SCRIPT_PARAM_ONOFF, false)
  320. KatarinaMenu.combo:addParam("comboItems", "Use Items with Burst", SCRIPT_PARAM_ONOFF, true)
  321. KatarinaMenu.combo:permaShow("comboKey")
  322. ---<
  323. ---> Harass Menu
  324. KatarinaMenu:addSubMenu("[" .. myHero.charName .. " - Harass Settings]", "harass")
  325. KatarinaMenu.harass:addParam("harassKey", "Harass Hotkey (C)", SCRIPT_PARAM_ONKEYDOWN, false, GetKey('C'))
  326. KatarinaMenu.harass:addParam("hMode", "Harass Mode", SCRIPT_PARAM_LIST, 1, { "Q+E+W", "Q+W" })
  327. KatarinaMenu.harass:addParam("detonateQ", "Proc Q Mark", SCRIPT_PARAM_ONOFF, true)
  328. KatarinaMenu.harass:addParam("wharass", "Always " .. SkillW.name .. " (W)", SCRIPT_PARAM_ONOFF, true)
  329. KatarinaMenu.harass:permaShow("harassKey")
  330. ---<
  331. ---> Farming Menu
  332. KatarinaMenu:addSubMenu("[" .. myHero.charName .. " - Farming Settings]", "farming")
  333. KatarinaMenu.farming:addParam("farmKey", "Farming ON/Off (Z)", SCRIPT_PARAM_ONKEYTOGGLE, true, 90)
  334. KatarinaMenu.farming:addParam("qFarm", "Farm with " .. SkillQ.name .. " (Q)", SCRIPT_PARAM_ONOFF, true)
  335. KatarinaMenu.farming:addParam("wFarm", "Farm with " .. SkillW.name .. " (W)", SCRIPT_PARAM_ONOFF, true)
  336. KatarinaMenu.farming:addParam("eFarm", "Farm with " .. SkillE.name .. " (E)", SCRIPT_PARAM_ONOFF, false)
  337. KatarinaMenu.farming:permaShow("farmKey")
  338. ---<
  339. ---> Clear Menu
  340. KatarinaMenu:addSubMenu("[" .. myHero.charName .. " - Clear Settings]", "clear")
  341. KatarinaMenu.clear:addParam("clearKey", "Jungle/Lane Clear Key (V)", SCRIPT_PARAM_ONKEYDOWN, false, GetKey('V'))
  342. KatarinaMenu.clear:addParam("JungleFarm", "Use Skills to Farm Jungle", SCRIPT_PARAM_ONOFF, true)
  343. KatarinaMenu.clear:addParam("ClearLane", "Use Skills to Clear Lane", SCRIPT_PARAM_ONOFF, true)
  344. KatarinaMenu.clear:addParam("clearQ", "Clear with " .. SkillQ.name .. " (Q)", SCRIPT_PARAM_ONOFF, true)
  345. KatarinaMenu.clear:addParam("clearW", "Clear with " .. SkillW.name .. " (W)", SCRIPT_PARAM_ONOFF, true)
  346. KatarinaMenu.clear:addParam("clearE", "Clear with " .. SkillE.name .. " (E)", SCRIPT_PARAM_ONOFF, true)
  347. ---<
  348. ---> KillSteal Menu
  349. KatarinaMenu:addSubMenu("[" .. myHero.charName .. " - KillSteal Settings]", "killsteal")
  350. KatarinaMenu.killsteal:addParam("smartKS", "Use Smart Kill Steal", SCRIPT_PARAM_ONOFF, true)
  351. -- KatarinaMenu.killsteal:addParam("wardKS", "Use Wards to KS", SCRIPT_PARAM_ONOFF, true)
  352. KatarinaMenu.killsteal:addParam("ultKS", "Use " .. SkillR.name .. " (R) to KS", SCRIPT_PARAM_ONOFF, true)
  353. KatarinaMenu.killsteal:addParam("itemsKS", "Use Items to KS", SCRIPT_PARAM_ONOFF, true)
  354. KatarinaMenu.killsteal:addParam("Ignite", "Auto Ignite", SCRIPT_PARAM_ONOFF, true)
  355. KatarinaMenu.killsteal:permaShow("smartKS")
  356. ---<
  357. ---> Drawing Menu
  358. KatarinaMenu:addSubMenu("[" .. myHero.charName .. " - Drawing Settings]", "drawing")
  359. if VIP_USER then
  360. KatarinaMenu.drawing:addSubMenu("[" .. myHero.charName .. " - LFC Settings]", "lfc")
  361. KatarinaMenu.drawing.lfc:addParam("LagFree", "Activate Lag Free Circles", SCRIPT_PARAM_ONOFF, false)
  362. KatarinaMenu.drawing.lfc:addParam("CL", "Length before Snapping", SCRIPT_PARAM_SLICE, 300, 75, 2000, 0)
  363. KatarinaMenu.drawing.lfc:addParam("CLinfo", "Higher length = Lower FPS Drops", SCRIPT_PARAM_INFO, "")
  364. end
  365. KatarinaMenu.drawing:addParam("disableAll", "Disable All Ranges Drawing", SCRIPT_PARAM_ONOFF, false)
  366. KatarinaMenu.drawing:addParam("drawText", "Draw Enemy Text", SCRIPT_PARAM_ONOFF, true)
  367. KatarinaMenu.drawing:addParam("drawTargetText", "Draw Who I'm Targetting", SCRIPT_PARAM_ONOFF, true)
  368. KatarinaMenu.drawing:addParam("drawQ", "Draw Bouncing Blades (Q) Range", SCRIPT_PARAM_ONOFF, true)
  369. KatarinaMenu.drawing:addParam("drawW", "Draw Sinister Steel (W) Range", SCRIPT_PARAM_ONOFF, false)
  370. KatarinaMenu.drawing:addParam("drawE", "Draw Shunpo (E) Range", SCRIPT_PARAM_ONOFF, false)
  371. ---<
  372. ---> Misc Menu
  373. KatarinaMenu:addSubMenu("[" .. myHero.charName .. " - Misc Settings]", "misc")
  374. KatarinaMenu.misc:addParam("wardJumpKey", "Ward Jump Hotkey (G)", SCRIPT_PARAM_ONKEYDOWN, false, 71)
  375. KatarinaMenu.misc:addParam("jumpAllies", "Jump To Allies if In Danger", SCRIPT_PARAM_ONOFF, true)
  376. KatarinaMenu.misc:addParam("ZWItems", "Auto Zhonyas/Wooglets", SCRIPT_PARAM_ONOFF, true)
  377. KatarinaMenu.misc:addParam("ZWHealth", "Min Health % for Zhonyas/Wooglets", SCRIPT_PARAM_SLICE, 15, 0, 100, -1)
  378. KatarinaMenu.misc:addParam("aHP", "Auto Health Pots", SCRIPT_PARAM_ONOFF, true)
  379. KatarinaMenu.misc:addParam("HPHealth", "Min % for Health Pots", SCRIPT_PARAM_SLICE, 50, 0, 100, -1)
  380. KatarinaMenu.misc:permaShow("wardJumpKey")
  381. ---<
  382. ---> Orbwalking Menu
  383. KatarinaMenu:addSubMenu("[" .. myHero.charName .. "] - Orbwalking Settings", "Orbwalking")
  384. kSOW:LoadToMenu(KatarinaMenu.Orbwalking)
  385. ---<
  386. ---> Version Info
  387. KatarinaMenu:addParam("kataVer", "Version: ", SCRIPT_PARAM_INFO, version)
  388. ---<
  389. ---> Target Selector
  390. TargetSelector = TargetSelector(TARGET_LESS_CAST, SkillE.range, DAMAGE_MAGIC, true)
  391. TargetSelector.name = "Katarina"
  392. KatarinaMenu:addTS(TargetSelector)
  393. ---<
  394. ---> Arrange Priorities
  395. if heroManager.iCount < 10 then -- borrowed from Sidas Auto Carry, modified to 3v3
  396. script_Messager("Too few champions to arrange priority!")
  397. elseif heroManager.iCount == 6 and TTMAP then
  398. ArrangeTTPriorities()
  399. else
  400. ArrangePriorities()
  401. end
  402. ---<
  403. ---<
  404. --- Main Menu ---
  405. end
  406. -- / Menu Function / --
  407.  
  408. -- / Full Combo Function / --
  409. function FullCombo()
  410. --- Combo While Not Channeling --
  411. --->
  412. if not SkillR.castingUlt then
  413. if ValidTarget(Target) and Target ~= nil then
  414. if KatarinaMenu.combo.comboItems then
  415. UseItems(Target)
  416. end
  417. CastQ(Target)
  418. if KatarinaMenu.combo.detonateQ and GetTickCount() >= SkillQ.timeToHit then
  419. if not SkillQ.ready then CastE(Target) end
  420. if not SkillE.ready then CastW(Target) end
  421. elseif not KatarinaMenu.combo.detonateQ then
  422. CastE(Target)
  423. CastW(Target)
  424. end
  425. CastR()
  426. end
  427. end
  428. ---<
  429. --- Combo While Not Channeling --
  430. end
  431. -- / Full Combo Function / --
  432.  
  433. -- / Harass Combo Function / --
  434. function HarassCombo()
  435. --- Smart Harass --
  436. --->
  437. if ValidTarget(Target) and Target ~= nil then
  438. --- Harass Mode 1 Q+W+E ---
  439. if KatarinaMenu.harass.hMode == 1 then
  440. CastQ(Target)
  441. if KatarinaMenu.harass.detonateQ and GetTickCount() >= SkillQ.timeToHit then
  442. if not SkillQ.ready then CastE(Target) end
  443. if not SkillE.ready then CastW(Target) end
  444. elseif not KatarinaMenu.harass.detonateQ then
  445. CastE(Target)
  446. CastW(Target)
  447. end
  448. end
  449. --- Harass Mode 1 ---
  450. --- Harass Mode 2 Q+W ---
  451. if KatarinaMenu.harass.hMode == 2 then
  452. CastQ(Target)
  453. CastW(Target)
  454. end
  455. --- Harass Mode 2 ---
  456. end
  457. ---<
  458. --- Smart Harass ---
  459. end
  460. -- / Harass Combo Function / --
  461.  
  462. -- / Farm Function / --
  463. function Farm()
  464. --->
  465. for _, minion in pairs(enemyMinions.objects) do
  466. --- Minion Damages ---
  467. local pMinionDmg = getDmg("Q", minion, myHero, 2)
  468. local qMinionDmg = getDmg("Q", minion, myHero)
  469. local wMinionDmg = getDmg("W", minion, myHero)
  470. local eMinionDmg = getDmg("E", minion, myHero)
  471. --- Minion Damages ---
  472. --- Minion Keys ---
  473. local qFarmKey = KatarinaMenu.farming.qFarm
  474. local wFarmKey = KatarinaMenu.farming.wFarm
  475. local eFarmKey = KatarinaMenu.farming.eFarm
  476. --- Minion Keys ---
  477. --- Farming Minions ---
  478. if ValidTarget(minion) and minion ~= nil then
  479. if GetDistanceSqr(minion) <= SkillW.range*SkillW.range then
  480. if qFarmKey and wFarmKey then
  481. if SkillQ.ready and SkillW.ready then
  482. if minion.health <= (pMinionDmg + qMinionDmg + wMinionDmg) and minion.health > wMinionDmg then
  483. CastQ(minion)
  484. CastSpell(_W)
  485. end
  486. elseif SkillW.ready then
  487. if minion.health <= (wMinionDmg) then
  488. CastSpell(_W)
  489. end
  490. elseif SkillQ.ready and not SkillW.ready then
  491. if minion.health <= (qMinionDmg) then
  492. CastQ(minion)
  493. end
  494. end
  495. elseif qFarmKey and not wFarmKey then
  496. if SkillQ.ready then
  497. if minion.health <= (qMinionDmg) then
  498. CastQ(minion)
  499. end
  500. end
  501. elseif not qFarmKey and wFarmKey then
  502. if SkillW.ready then
  503. if minion.health <= (wMinionDmg) then
  504. CastSpell(_W)
  505. end
  506. end
  507. end
  508. elseif (GetDistanceSqr(minion) > SkillW.range*SkillW.range) then
  509. if qFarmKey then
  510. if minion.health <= qMinionDmg and (GetDistanceSqr(minion) <= SkillQ.range*SkillQ.range) then
  511. CastQ(minion)
  512. end
  513. end
  514. if eFarmKey then
  515. if minion.health <= eMinionDmg and (GetDistanceSqr(minion) <= SkillE.range*SkillE.range) then
  516. CastE(minion)
  517. end
  518. end
  519. end
  520. end
  521. break
  522. end
  523. --- Farming Minions ---
  524. ---<
  525. end
  526. -- / Farm Function / --
  527.  
  528. -- / Clear Function / --
  529. function MixedClear()
  530. --- Jungle Clear ---
  531. --->
  532. if KatarinaMenu.clear.JungleFarm then
  533. local JungleMob = GetJungleMob()
  534. if JungleMob ~= nil then
  535. if KatarinaMenu.clear.clearQ and SkillQ.ready and GetDistanceSqr(JungleMob) <= SkillQ.range*SkillQ.range then
  536. CastQ(JungleMob)
  537. end
  538. if KatarinaMenu.clear.clearW and SkillW.ready and GetDistanceSqr(JungleMob) <= SkillW.range*SkillW.range then
  539. CastSpell(_W)
  540. end
  541. if KatarinaMenu.clear.clearE and SkillE.ready and GetDistanceSqr(JungleMob) <= SkillE.range*SkillE.range then
  542. CastE(JungleMob)
  543. end
  544. end
  545. end
  546. ---<
  547. --- Jungle Clear ---
  548. --- Lane Clear ---
  549. --->
  550. if KatarinaMenu.clear.ClearLane then
  551. for _, minion in pairs(enemyMinions.objects) do
  552. if ValidTarget(minion) and minion ~= nil then
  553. if KatarinaMenu.clear.clearQ and SkillQ.ready and GetDistanceSqr(minion) <= SkillQ.range*SkillQ.range then
  554. CastQ(minion)
  555. end
  556. if KatarinaMenu.clear.clearW and SkillW.ready and GetDistanceSqr(minion) <= SkillW.range*SkillW.range then
  557. CastSpell(_W)
  558. end
  559. if KatarinaMenu.clear.clearE and SkillE.ready and GetDistanceSqr(minion) <= SkillE.range*SkillE.range then
  560. CastE(minion)
  561. end
  562. end
  563. end
  564. end
  565. ---<
  566. --- Lane Clear ---
  567. end
  568. -- / Clear Function / --
  569.  
  570. -- / Casting Q Function / --
  571. function CastQ(enemy)
  572. --- Dynamic Q Cast ---
  573. --->
  574. if not SkillQ.ready or (GetDistanceSqr(enemy) > SkillQ.range*SkillQ.range) then
  575. return false
  576. end
  577. if ValidTarget(enemy) and enemy ~= nil then
  578. if VIP_USER then
  579. Packet("S_CAST", {spellId = _Q, targetNetworkId = enemy.networkID}):send()
  580. return true
  581. else
  582. CastSpell(_Q, enemy)
  583. return true
  584. end
  585. if SkillQ.timeToHit == 0 or GetTickCount() >= SkillQ.timeToHit then
  586. SkillQ.timeToHit = GetTickCount() + (SkillQ.delay + (GetDistance(myHero, enemy) / SkillQ.projSpeed))
  587. return true
  588. end
  589. end
  590. return false
  591. ---<
  592. --- Dynamic Q Cast ---
  593. end
  594. -- / Casting Q Function / --
  595.  
  596. -- / Casting E Function / --
  597. function CastE(enemy)
  598. --- Dynamic E Cast ---
  599. --->
  600. if not SkillE.ready or (GetDistanceSqr(enemy) > SkillE.range*SkillE.range) then
  601. return false
  602. end
  603. if ValidTarget(enemy) and enemy ~= nil then
  604. if VIP_USER then
  605. Packet("S_CAST", {spellId = _E, targetNetworkId = enemy.networkID}):send()
  606. return true
  607. else
  608. CastSpell(_E, enemy)
  609. return true
  610. end
  611. end
  612. return false
  613. ---<
  614. --- Dynamic E Cast ---
  615. end
  616. -- / Casting E Function / --
  617.  
  618. -- / Casting W Function / --
  619. function CastW(enemy)
  620. --- Dynamic W Cast ---
  621. --->
  622. if not SkillW.ready or (GetDistanceSqr(enemy) > SkillW.range*SkillW.range) then
  623. return false
  624. end
  625. if ValidTarget(enemy) and enemy ~= nil then
  626. CastSpell(_W)
  627. return true
  628. end
  629. return false
  630. ---<
  631. --- Dynamic W Cast ---
  632. end
  633. -- / Casting W Function / --
  634.  
  635. -- / Casting R Function / --
  636. function CastR()
  637. --- Dynamic R Cast ---
  638. --->
  639. if (SkillQ.ready or SkillW.ready or SkillE.ready or SkillR.castingUlt) or not SkillR.ready then
  640. return false
  641. end
  642. if CountEnemyHeroInRange(SkillR.range) >= 1 then
  643. CastSpell(_R)
  644. SkillR.castingUlt = true
  645. end
  646. ---<
  647. --- Dymanic R Cast --
  648. end
  649. -- / Casting R Function / --
  650.  
  651. -- / Ward Jumping Function / --
  652. function wardJump(x, y)
  653. --->
  654. if SkillE.ready then
  655. local Jumped = false
  656. local WardDistance = 300
  657. for _, ally in pairs(allyHeroes) do
  658. if ValidTarget(ally, SkillE.range, false) and ally ~= nil then
  659. if GetDistanceSqr(ally, mousePos) <= WardDistance*WardDistance then
  660. CastSpell(_E, ally)
  661. Jumped = true
  662. SkillWard.lastJump = GetTickCount() + 2000
  663. end
  664. end
  665. end
  666. for _, minion in pairs(allyMinions.objects) do
  667. if ValidTarget(minion, SkillE.range, false) and minion ~= nil then
  668. if GetDistanceSqr(minion, mousePos) <= WardDistance*WardDistance then
  669. CastSpell(_E, minion)
  670. Jumped = true
  671. SkillWard.lastJump = GetTickCount() + 2000
  672. end
  673. end
  674. end
  675. for _, minion in pairs(enemyMinions.objects) do
  676. if ValidTarget(minion, SkillE.range, false) and minion ~= nil then
  677. if GetDistanceSqr(minion, mousePos) <= WardDistance*WardDistance then
  678. CastSpell(_E, minion)
  679. Jumped = true
  680. SkillWard.lastJump = GetTickCount() + 2000
  681. end
  682. end
  683. end
  684. if next(Wards) ~= nil then
  685. for i, obj in pairs(Wards) do
  686. if obj.valid then
  687. MousePos = getMousePos()
  688. if GetDistanceSqr(obj, MousePos) <= WardDistance*WardDistance then
  689. CastSpell(_E, obj)
  690. Jumped = true
  691. SkillWard.lastJump = GetTickCount() + 2000
  692. end
  693. end
  694. end
  695. end
  696.  
  697. if not Jumped and GetTickCount() >= SkillWard.lastJump then
  698. if Items.TrinketWard.ready then
  699. SkillWard.itemSlot = ITEM_7
  700. elseif Items.RubySightStone.ready then
  701. SkillWard.itemSlot = rstSlot
  702. elseif Items.SightStone.ready then
  703. SkillWard.itemSlot = ssSlot
  704. elseif Items.SightWard.ready then
  705. SkillWard.itemSlot = swSlot
  706. elseif Items.VisionWard.ready then
  707. SkillWard.itemSlot = vwSlot
  708. end
  709.  
  710. if SkillWard.itemSlot ~= nil then
  711. CastSpell(SkillWard.itemSlot, x, y)
  712. Jumped = true
  713. SkillWard.lastJump = GetTickCount() + 2000
  714. SkillWard.itemSlot = nil
  715. end
  716. end
  717. end
  718. ---<
  719. end
  720. -- / Ward Jumping Function / --
  721.  
  722. -- / Use Items Function / --
  723. function UseItems(enemy)
  724. --- Use Items (Will Improve Soon) ---
  725. --->
  726. if not enemy then
  727. enemy = Target
  728. end
  729. if ValidTarget(enemy) and enemy ~= nil then
  730. if dfgReady and GetDistanceSqr(enemy) <= 600*600 then CastSpell(dfgSlot, enemy) end
  731. if bftReady and GetDistanceSqr(enemy) <= 600*600 then CastSpell(bftSlot, enemy) end
  732. if hxgReady and GetDistanceSqr(enemy) <= 600*600 then CastSpell(hxgSlot, enemy) end
  733. if bwcReady and GetDistanceSqr(enemy) <= 450*450 then CastSpell(bwcSlot, enemy) end
  734. if brkReady and GetDistanceSqr(enemy) <= 450*450 then CastSpell(brkSlot, enemy) end
  735. end
  736. ---<
  737. --- Use Items ---
  738. end
  739. -- / Use Items Function / --
  740.  
  741. function UseConsumables()
  742. --- Check if Zhonya/Wooglets Needed --
  743. --->
  744. if KatarinaMenu.misc.ZWItems and isLow('Zhonya') and Target and (znaReady or wgtReady) then
  745. CastSpell((wgtSlot or znaSlot))
  746. end
  747. ---<
  748. --- Check if Zhonya/Wooglets Needed --
  749. --- Check if Potions Needed --
  750. --->
  751. if KatarinaMenu.misc.aHP and isLow('Health') and not (UsingHPot or UsingFlask) and (Items.HealthPot.ready or Items.FlaskPot.ready) then
  752. CastSpell((hpSlot or fskSlot))
  753. end
  754. ---<
  755. --- Check if Potions Needed --
  756. end
  757.  
  758. -- / Auto Ignite Function / --
  759. function AutoIgnite(enemy)
  760. --- Simple Auto Ignite ---
  761. --->
  762. if enemy.health <= iDmg and GetDistanceSqr(enemy) <= 600*600 then
  763. if iReady then CastSpell(ignite, enemy) end
  764. end
  765. ---<
  766. --- Simple Auto Ignite ---
  767. end
  768. -- / Auto Ignite Function / --
  769.  
  770. -- / Damage Calculation Function / --
  771. function DamageCalculation()
  772. --- Calculate our Damage On Enemies ---
  773. --->
  774. for i=1, heroManager.iCount do
  775. local enemy = heroManager:GetHero(i)
  776. if ValidTarget(enemy) and enemy ~= nil then
  777. dfgDmg, hxgDmg, bwcDmg, iDmg, bftDmg, liandrysDmg = 0, 0, 0, 0, 0, 0
  778. pDmg = ((SkillQ.ready and getDmg("Q", enemy, myHero, 2)) or 0)
  779. qDmg = ((SkillQ.ready and getDmg("Q",enemy,myHero)) or 0)
  780. wDmg = ((SkillW.ready and getDmg("W",enemy,myHero)) or 0)
  781. eDmg = ((SkillE.ready and getDmg("E",enemy,myHero)) or 0)
  782. rDmg = getDmg("R",enemy,myHero,3)
  783. dfgDmg = ((dfgReady and getDmg("DFG", enemy, myHero)) or 0)
  784. hxgDmg = ((hxgReady and getDmg("HXG", enemy, myHero)) or 0)
  785. bwcDmg = ((bwcReady and getDmg("BWC", enemy, myHero)) or 0)
  786. bftdmg = ((bftReady and getDmg("BLACKFIRE", enemy, myHero)) or 0)
  787. liandrysDmg = ((liandrysReady and getDmg("LIANDRYS", enemy, myHero)) or 0)
  788. iDmg = ((ignite and getDmg("IGNITE", enemy, myHero)) or 0)
  789. onspellDmg = liandrysDmg + bftDmg
  790. itemsDmg = dfgDmg + hxgDmg + bwcDmg + iDmg + onspellDmg
  791. ---<
  792. --- Calculate our Damage On Enemies ---
  793. --- Setting KillText Color & Text ---
  794. --->
  795. if enemy.health > (pDmg + qDmg + eDmg + wDmg + rDmg + itemsDmg) and itemsDmg ~= 0 then
  796. KillText[i] = 1
  797. elseif enemy.health <= qDmg then
  798. if SkillQ.ready then
  799. KillText[i] = 2
  800. else
  801. KillText[i] = 11
  802. end
  803. elseif enemy.health <= wDmg then
  804. if SkillW.ready then
  805. KillText[i] = 3
  806. else
  807. KillText[i] = 11
  808. end
  809. elseif enemy.health <= eDmg then
  810. if SkillE.ready then
  811. KillText[i] = 4
  812. else
  813. KillText[i] = 11
  814. end
  815. elseif enemy.health <= (qDmg + wDmg) and SkillQ.ready and SkillW.ready then
  816. if SkillQ.ready and SkillW.ready then
  817. KillText[i] = 5
  818. else
  819. KillText[i] = 11
  820. end
  821. elseif enemy.health <= (qDmg + eDmg) and SkillQ.ready and SkillE.ready then
  822. if SkillQ.ready and SkillE.ready then
  823. KillText[i] = 6
  824. else
  825. KillText[i] = 11
  826. end
  827. elseif enemy.health <= (wDmg + eDmg) and SkillW.ready and SkillE.ready then
  828. if SkillW.ready and SkillE.ready then
  829. KillText[i] = 7
  830. else
  831. KillText[i] = 11
  832. end
  833. elseif enemy.health <= (qDmg + wDmg + eDmg) and SkillQ.ready and SkillW.ready and SkillE.ready then
  834. if SkillQ.ready and SkillW.ready and SkillE.ready then
  835. KillText[i] = 8
  836. else
  837. KillText[i] = 11
  838. end
  839. elseif (enemy.health <= (qDmg + wDmg + eDmg + itemsDmg) or enemy.health <= (qDmg + pDmg + wDmg + eDmg + itemsDmg)) and SkillQ.ready and SkillW.ready and SkillE.ready then
  840. if SkillQ.ready and SkillW.ready and SkillE.ready then
  841. KillText[i] = 9
  842. else
  843. KillText[i] = 11
  844. end
  845. elseif enemy.health <= (qDmg + pDmg + wDmg + eDmg + rDmg + itemsDmg) then
  846. if SkillQ.ready and SkillW.ready and SkillE.ready then
  847. KillText[i] = 10
  848. else
  849. KillText[i] = 11
  850. end
  851. end
  852. end
  853. end
  854. ---<
  855. --- Setting KillText Color & Text ---
  856. end
  857. -- / Damage Calculation Function / --
  858.  
  859. -- / KillSteal Function / --
  860. function KillSteal()
  861. --- KillSteal No Wards ---
  862. --->
  863. for _, enemy in pairs(enemyHeroes) do
  864. if enemy ~= nil and ValidTarget(enemy) then
  865. local distance = GetDistanceSqr(enemy)
  866. local health = enemy.health
  867. if health <= qDmg and SkillQ.ready and (distance <= SkillQ.range*SkillQ.range) then
  868. CastQ(enemy)
  869. elseif health <= wDmg and SkillW.ready and (distance <= SkillW.range*SkillW.range) then
  870. CastW(enemy)
  871. elseif health <= eDmg and SkillE.ready and (distance <= SkillE.range*SkillE.range) then
  872. CastE(enemy)
  873. elseif health <= (qDmg + wDmg) and SkillQ.ready and SkillW.ready and (distance <= SkillW.range*SkillW.range) then
  874. CastW(enemy)
  875. elseif health <= (qDmg + eDmg) and SkillQ.ready and SkillE.ready and (distance <= SkillE.range*SkillE.range) then
  876. CastE(enemy)
  877. elseif health <= (wDmg + eDmg) and SkillW.ready and SkillE.ready and (distance <= SkillW.range*SkillW.range) then
  878. CastW(enemy)
  879. elseif health <= (qDmg + wDmg + eDmg) and SkillQ.ready and SkillW.ready and SkillE.ready and (distance <= SkillE.range*SkillE.range) then
  880. CastE(enemy)
  881. elseif KatarinaMenu.killsteal.ultKS then
  882. if health <= (qDmg + pDmg + wDmg + eDmg + rDmg) and SkillQ.ready and SkillW.ready and SkillE.ready and SkillR.ready and (distance <= SkillE.range*SkillE.range) then
  883. CastE(enemy)
  884. CastQ(enemy)
  885. CastW(enemy)
  886. CastR()
  887. end
  888. if health <= rDmg and distance <= ((SkillR.range*SkillR.range) - 100) then
  889. CastR()
  890. end
  891. elseif KatarinaMenu.killsteal.itemsKS then
  892. if health <= (qDmg + pDmg + wDmg + eDmg + rDmg + itemsDmg) then
  893. if SkillQ.ready and SkillW.ready and SkillE.ready and SkillR.ready then
  894. UseItems(enemy)
  895. end
  896. elseif health <= (qDmg + wDmg + eDmg + itemsDmg) and health >= (qDmg + wDmg + eDmg) then
  897. if SkillQ.ready and SkillW.ready and SkillE.ready then
  898. UseItems(enemy)
  899. end
  900. end
  901. end
  902. end
  903. end
  904. ---<
  905. --- KillSteal No Wards ---
  906. end
  907. -- / KillSteal Function / --
  908.  
  909. -- / Misc Functions / --
  910. --- Danger Check ---
  911. --->
  912. function DangerCheck()
  913. if isInDanger(myHero) and Target then
  914. for _, ally in pairs(allyHeroes) do
  915. if ValidTarget(Ally, SkillE.range, false) and Ally ~= nil then
  916. if GetDistance(Ally, Target) <= GetDistance(myHero, Target) then
  917. if SkillE.ready then CastSpell(_E, ally) end
  918. end
  919. end
  920. end
  921. end
  922. end
  923. ---<
  924. --- Get Mouse Pos Function by Klokje ---
  925. --->
  926. function getMousePos(range)
  927. local temprange = range or SkillWard.range
  928. local MyPos = Vector(myHero.x, myHero.y, myHero.z)
  929. local MousePos = Vector(mousePos.x, mousePos.y, mousePos.z)
  930.  
  931. return MyPos - (MyPos - MousePos):normalized() * SkillWard.range
  932. end
  933. ---<
  934. --- Get Mouse Pos Function by Klokje ---
  935. --- On Animation (Setting our last Animation) ---
  936. --->
  937. function OnAnimation(unit, animationName)
  938. if unit == myHero then
  939. if animationName == "Spell4" then
  940. SkillR.castingUlt = true
  941. else
  942. SkillR.castingUlt = false
  943. end
  944. end
  945. end
  946. ---<
  947. --- On Animation (Setting our last Animation) ---
  948. --- Checking if Hero in Danger ---
  949. --->
  950. function isInDanger(hero)
  951. nEnemiesClose, nEnemiesFar = 0, 0
  952. hpPercent = hero.health / hero.maxHealth
  953. for _, enemy in pairs(enemyHeroes) do
  954. if not enemy.dead and hero:GetDistance(enemy) <= 200 then
  955. nEnemiesClose = nEnemiesClose + 1
  956. if hpPercent < 0.5 and hpPercent < enemy.health / enemy.maxHealth then return true end
  957. elseif not enemy.dead and hero:GetDistance(enemy) <= 1000 then
  958. nEnemiesFar = nEnemiesFar + 1
  959. end
  960. end
  961.  
  962. if nEnemiesClose > 1 then return true end
  963. if nEnemiesClose == 1 and nEnemiesFar > 1 then return true end
  964. return false
  965. end
  966. ---<
  967. --- Checking if Hero in Danger ---
  968. --- Get Jungle Mob Function by Apple ---
  969. --->
  970. function GetJungleMob()
  971. for _, Mob in pairs(JungleFocusMobs) do
  972. if ValidTarget(Mob, SkillQ.range) then return Mob end
  973. end
  974. for _, Mob in pairs(JungleMobs) do
  975. if ValidTarget(Mob, SkillQ.range) then return Mob end
  976. end
  977. end
  978. ---<
  979. --- Get Jungle Mob Function by Apple ---
  980. --- Arrange Priorities 5v5 ---
  981. --->
  982. function ArrangePriorities()
  983. for i, enemy in pairs(enemyHeroes) do
  984. SetPriority(priorityTable.AD_Carry, enemy, 1)
  985. SetPriority(priorityTable.AP, enemy, 2)
  986. SetPriority(priorityTable.Support, enemy, 3)
  987. SetPriority(priorityTable.Bruiser, enemy, 4)
  988. SetPriority(priorityTable.Tank, enemy, 5)
  989. end
  990. end
  991. ---<
  992. --- Arrange Priorities 5v5 ---
  993. --- Arrange Priorities 3v3 ---
  994. --->
  995. function ArrangeTTPriorities()
  996. for i, enemy in pairs(enemyHeroes) do
  997. SetPriority(priorityTable.AD_Carry, enemy, 1)
  998. SetPriority(priorityTable.AP, enemy, 1)
  999. SetPriority(priorityTable.Support, enemy, 2)
  1000. SetPriority(priorityTable.Bruiser, enemy, 2)
  1001. SetPriority(priorityTable.Tank, enemy, 3)
  1002. end
  1003. end
  1004. ---<
  1005. --- Arrange Priorities 3v3 ---
  1006. --- Set Priorities ---
  1007. --->
  1008. function SetPriority(table, hero, priority)
  1009. for i = 1, #table do
  1010. if hero.charName:find(table[i]) ~= nil then
  1011. TS_SetHeroPriority(priority, hero.charName)
  1012. end
  1013. end
  1014. end
  1015. ---<
  1016. --- Set Priorities ---
  1017. -- / Misc Functions / --
  1018.  
  1019. -- / On Send Packet Function / --
  1020. function OnSendPacket(packet)
  1021. -- Block Packets if Channeling --
  1022. --->
  1023. local SendP = Packet(packet)
  1024. if SkillR.castingUlt and not WardJumpKey then
  1025. if (SendP:get('name') == 'S_MOVE' or SendP:get('name') == 'S_CAST') and SendP:get('sourceNetworkId') == myHero.networkID and (SendP:get('spellId') ~= SUMMONER_1 and SendP:get('spellId') ~= SUMMONER_2) then
  1026. if KatarinaMenu.combo.stopUlt then
  1027. if ValidTarget(Target, SkillE.range) and SkillQ.ready and SkillW.ready and SkillE.ready and Target.health <= (qDmg + wDmg + eDmg) then
  1028. return
  1029. else
  1030. -- PrintChat("Debug 1")
  1031. SendP:block()
  1032. end
  1033. end
  1034. if KatarinaMenu.combo.autoE then
  1035. if Packet(p):get('spellId') ~= SPELL_3 then
  1036. -- PrintChat("Debug 2")
  1037. SendP:block()
  1038. end
  1039. end
  1040. if not KatarinaMenu.combo.stopUlt and not KatarinaMenu.combo.autoE then
  1041. -- PrintChat("Debug 3")
  1042. SendP:block()
  1043. end
  1044. end
  1045. else
  1046. if (SendP:get('name') == 'S_CAST') and (SendP:get('sourceNetworkId') == myHero.networkID) and (SendP:get('spellId') == _R) then
  1047. SkillR.castingUlt = true
  1048. end
  1049. end
  1050. ---<
  1051. --- Block Packets if Channeling --
  1052. end
  1053. -- / On Send Packet Function / --
  1054.  
  1055. -- / On Create Obj Function / --
  1056. function OnCreateObj(obj)
  1057. --- All of Our Objects (CREATE) --
  1058. -->
  1059. if obj ~= nil then
  1060. if (obj.name:find("katarina_deathLotus_mis.troy") or obj.name:find("katarina_deathLotus_tar.troy")) then
  1061. if GetDistanceSqr(obj, myHero) <= 70*70 then
  1062. SkillR.castingUlt = true
  1063. --PrintChat("OnCreateObject: Casting Ult")
  1064. end
  1065. end
  1066. if (obj.name:find("katarina_deathlotus_success.troy") or obj.name:find("Katarina_deathLotus_empty.troy")) then
  1067. if GetDistanceSqr(obj, myHero) <= 70*70 then
  1068. SkillR.castingUlt = true
  1069. --PrintChat("OnCreateObject: Casting Ult")
  1070. end
  1071. end
  1072. if obj.name:find("Global_Item_HealthPotion.troy") then
  1073. if GetDistanceSqr(obj, myHero) <= 70*70 then
  1074. UsingHPot = true
  1075. end
  1076. end
  1077. if obj.valid and (string.find(obj.name, "Ward") ~= nil or string.find(obj.name, "Wriggle") ~= nil or string.find(obj.name, "Trinket")) then
  1078. Wards[#Wards+1] = obj
  1079. end
  1080. if FocusJungleNames[obj.name] then
  1081. JungleFocusMobs[#JungleFocusMobs+1] = obj
  1082. elseif JungleMobNames[obj.name] then
  1083. JungleMobs[#JungleMobs+1] = obj
  1084. end
  1085. end
  1086. ---<
  1087. --- All of Our Objects (CREATE) --
  1088. end
  1089. -- / On Create Obj Function / --
  1090.  
  1091. -- / On Delete Obj Function / --
  1092. function OnDeleteObj(obj)
  1093. --- All of Our Objects (CLEAR) --
  1094. --->
  1095. if obj ~= nil then
  1096. if obj.name:find("TeleportHome.troy") then
  1097. Recall = false
  1098. end
  1099. if obj.name:find("Global_Item_HealthPotion.troy") then
  1100. UsingHPot = false
  1101. end
  1102. for i, Mob in pairs(JungleMobs) do
  1103. if obj.name == Mob.name then
  1104. table.remove(JungleMobs, i)
  1105. end
  1106. end
  1107. for i, Mob in pairs(JungleFocusMobs) do
  1108. if obj.name == Mob.name then
  1109. table.remove(JungleFocusMobs, i)
  1110. end
  1111. end
  1112. for i, ward in pairs(Wards) do
  1113. if not ward.valid or (obj.name == ward.name and obj.x == ward.x and obj.z == ward.z) then
  1114. table.remove(Wards, i)
  1115. end
  1116. end
  1117. end
  1118. --- All of Our Objects (CLEAR) --
  1119. ---<
  1120. end
  1121. --- All The Objects in The World Literally ---
  1122. -- / On Delete Obj Function / --
  1123.  
  1124. -- / On Draw Function / --
  1125. function OnDraw()
  1126. --- Drawing Our Ranges ---
  1127. --->
  1128. if not myHero.dead then
  1129. if not KatarinaMenu.drawing.disableAll then
  1130. if SkillQ.ready and KatarinaMenu.drawing.drawQ then
  1131. DrawCircle(myHero.x, myHero.y, myHero.z, SkillQ.range, SkillQ.color)
  1132. end
  1133. if SkillW.ready and KatarinaMenu.drawing.drawW then
  1134. DrawCircle(myHero.x, myHero.y, myHero.z, SkillW.range, SkillW.color)
  1135. end
  1136. if SkillE.ready and KatarinaMenu.drawing.drawE then
  1137. DrawCircle(myHero.x, myHero.y, myHero.z, SkillE.range, SkillE.color)
  1138. end
  1139. end
  1140. end
  1141. ---<
  1142. --- Drawing Our Ranges ---
  1143. --- Draw Enemy Damage Text ---
  1144. --->
  1145. if KatarinaMenu.drawing.drawText then
  1146. for i = 1, heroManager.iCount do
  1147. local enemy = heroManager:GetHero(i)
  1148. if ValidTarget(enemy) and enemy ~= nil then
  1149. local barPos = WorldToScreen(D3DXVECTOR3(enemy.x, enemy.y, enemy.z)) --(Credit to Zikkah)
  1150. local PosX = barPos.x - 35
  1151. local PosY = barPos.y - 10
  1152. if KillText[i] ~= 10 then
  1153. DrawText(TextList[KillText[i]], 16, PosX, PosY, colorText)
  1154. else
  1155. DrawText(TextList[KillText[i]] .. string.format("%4.1f", ((enemy.health - (qDmg + pDmg + wDmg + eDmg + itemsDmg)) * (1/rDmg)) * 2.5) .. "s = Kill", 16, PosX, PosY, colorText)
  1156. end
  1157. end
  1158. end
  1159. end
  1160. ---<
  1161. --- Draw Enemy Damage Text ---
  1162. --- Draw Enemy Target ---
  1163. --->
  1164. if Target then
  1165. if KatarinaMenu.drawing.drawTargetText then
  1166. DrawText("Targeting: " .. Target.charName, 12, 100, 100, colorText)
  1167. end
  1168. end
  1169. ---<
  1170. --- Draw Enemy Target ---
  1171. --- Draw Ward Jump Range and Mouse ---
  1172. --->
  1173. if WardJumpKey then
  1174. if SkillE.ready then
  1175. DrawCircle3D(myHero.x, myHero.y, myHero.z, SkillWard.range, 2, wardColor.available, 50)
  1176. if GetDistanceSqr(mousePos) <= SkillWard.range*SkillWard.range then
  1177. DrawCircle3D(mousePos.x, mousePos.y, mousePos.z, 50, 2, wardColor.available, 20)
  1178. else
  1179. DrawCircle3D(mousePos.x, mousePos.y, mousePos.z, 50, 2, wardColor.unavailable, 20)
  1180. end
  1181. if (GetDistanceSqr(mousePos) <= 700*700 and GetDistanceSqr(mousePos) > SkillWard.range*SkillWard.range) or not (Items.TrinketWard.ready or Items.RubySightStone.ready or Items.SightStone.ready or Items.VisionWard.ready) then
  1182. DrawCircle3D(mousePos.x, mousePos.y, mousePos.z, 50, 2, wardColor.searching, 20)
  1183. end
  1184. else
  1185. DrawCircle3D(mousePos.x, mousePos.y, mousePos.z, 50, 2, wardColor.unavailable, 20)
  1186. end
  1187. end
  1188. ---<
  1189. --- Draw Ward Jump Range and Mouse ---
  1190. end
  1191. -- / On Draw Function / --
  1192.  
  1193. -- / OnWndMsg Function / --
  1194. function OnWndMsg(msg, key)
  1195. if msg == WM_RBUTTONDOWN and SkillR.castingUlt then
  1196. SkillR.castingUlt = false
  1197. end
  1198. end
  1199. -- / OnWndMsg Function / --
  1200.  
  1201. -- / OnGainBuff Function / --
  1202. function OnGainBuff(unit, buff)
  1203. if unit.isMe and buff.name == "katarinarsound" then
  1204. SkillR.castingUlt = true
  1205. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement