Script4


SUBMITTED BY: Alerand

DATE: May 3, 2016, 9:30 a.m.

FORMAT: Text only

SIZE: 52.8 kB

HITS: 20826

  1. --[[
  2. version = 0.051
  3. author = "Mr-Skizo"
  4. SCRIPT_NAME = "SkizophrenicLeBlanc"
  5. ]]
  6. if myHero.charName ~= "Leblanc" then return end
  7. --------------------------------------------- Auto Update -------------------------------------------
  8. -----------------------------------------------------------------------------------------------------
  9. -----------------------------------------------------------------------------------------------------
  10. local version = 0.051
  11. local author = "Mr-Skizo"
  12. local last_update = "14/04/2016"
  13. function AutoUpdater()
  14. local AUTOUPDATE = true
  15. if(AUTOUPDATE) then
  16. local UPDATE_HOST = "raw.githubusercontent.com"
  17. local UPDATE_PATH = "/Mr-Skizo/Skizophrenic/master/SkizophrenicLeBlanc.lua".."?rand="..math.random(1,10000)
  18. local UPDATE_FILE_PATH = SCRIPT_PATH..GetCurrentEnv().FILE_NAME
  19. local UPDATE_URL = "https://"..UPDATE_HOST..UPDATE_PATH
  20. local ServerData = GetWebResult(UPDATE_HOST, "/Mr-Skizo/Skizophrenic/master/Leblanc.version.txt")
  21. if ServerData then
  22. ServerVersion = type(tonumber(ServerData)) == "number" and tonumber(ServerData) or nil
  23. if ServerVersion then
  24. if tonumber(version) < ServerVersion then
  25. SendMsg("New version available "..ServerVersion)
  26. SendMsg(">>Updating, please don't press F9<<")
  27. DelayAction(function() DownloadFile(UPDATE_URL, UPDATE_FILE_PATH, function () SendMsg("Successfully updated. ("..version.." => "..ServerVersion.."), press F9 twice to load the updated version.") end) end, 3)
  28. else
  29. DelayAction(function() SendMsg("Hello, "..GetUser()..". You got the latest version! ("..ServerVersion..")") end, 3)
  30. end
  31. end
  32. else
  33. SendMsg("Error downloading version info")
  34. end
  35. end
  36. end
  37. ---------------------------------------------BOL Tracker --------------------------------------------
  38. -----------------------------------------------------------------------------------------------------
  39. -----------------------------------------------------------------------------------------------------
  40. assert(load(Base64Decode("G0x1YVIAAQQEBAgAGZMNChoKAAAAAAAAAAAA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A4AAABib2wtdG9vbHMuY29tAAQXAAAAL2FwaS9ldmVudHM/c2NyaXB0S2V5PQAECgAAAHNjcmlwdEtleQAECQAAACZhY3Rpb249AAQLAAAAJmNoYW1waW9uPQAEDgAAACZib2xVc2VybmFtZT0ABAcAAAAmaHdpZD0ABA0AAAAmaW5nYW1lVGltZT0ABAgAAAAmaXNWaXA9AAAAAAACAAAAAAABAQAAAAAAAAAAAAAAAAAAAAAmAAAAKgAAAAMACiEAAADGQEAAAYEAAN2AAAHHwMAB3YCAAArAAIDHAEAAzADBAUABgACBQQEA3UAAAscAQADMgMEBQcEBAIABAAHBAQIAAAKAAEFCAgBWQYIC3UCAAccAQADMgMIBQcECAIEBAwDdQAACxwBAAMyAwgFBQQMAgYEDAN1AAAIKAMSHCgDEiB8AgAASAAAABAcAAABTb2NrZXQABAgAAAByZXF1aXJlAAQHAAAAc29ja2V0AAQEAAAAdGNwAAQIAAAAY29ubmVjdAADAAAAAAAAVEAEBQAAAHNlbmQABAUAAABHRVQgAAQSAAAAIEhUVFAvMS4wDQpIb3N0OiAABAUAAAANCg0KAAQLAAAAc2V0dGltZW91dAADAAAAAAAAAAAEAgAAAGIAAwAAAPyD15dBBAIAAAB0AAQKAAAATGFzdFByaW50AAQBAAAAAAQFAAAARmlsZQAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAA="), nil, "bt", _ENV))()
  41. TrackerLoad("FQlQOrlhcKIwUVOU")
  42. --------------------------------------------- Orblwalker Loader -------------------------------------
  43. -----------------------------------------------------------------------------------------------------
  44. -----------------------------------------------------------------------------------------------------
  45. local OrbWalkers = {}
  46. local LoadedOrb = nil
  47. local Ignite = nil
  48. function LoadOrb()
  49. if OrbWalkers[Menu.Orbwalkers.Orbwalker] == "SAC" then
  50. LoadedOrb = "Sac"
  51. TIMETOSACLOAD = false
  52. DelayAction(function() TIMETOSACLOAD = true end,15)
  53. elseif OrbWalkers[Menu.Orbwalkers.Orbwalker] == "MMA" then
  54. LoadedOrb = "Mma"
  55. elseif OrbWalkers[Menu.Orbwalkers.Orbwalker] == "Pewalk" then
  56. LoadedOrb = "Pewalk"
  57. elseif OrbWalkers[Menu.Orbwalkers.Orbwalker] == "NOW" then
  58. LoadedOrb = "Now"
  59. require "Nebelwolfi's Orb Walker"
  60. _G.NOWi = NebelwolfisOrbWalkerClass()
  61. _G.NebelwolfisOrbWalkerClass(Menu.Orbwalkers.NOW)
  62. elseif OrbWalkers[Menu.Orbwalkers.Orbwalker] == "Big Fat Walk" then
  63. LoadedOrb = "Big"
  64. require "Big Fat Orbwalker"
  65. elseif OrbWalkers[Menu.Orbwalkers.Orbwalker] == "SOW" then
  66. LoadedOrb = "Sow"
  67. require "SOW"
  68. _G.SOWi = SOW(_G.VP)
  69. SOW:LoadToMenu(Menu.Orbwalkers.SOW)
  70. elseif OrbWalkers[Menu.Orbwalkers.Orbwalker] == "SxOrbWalk" then
  71. LoadedOrb = "SxOrbWalk"
  72. require "SxOrbWalk"
  73. SxOrb:LoadToMenu(Menu.Orbwalkers.SxOrbWalk)
  74. elseif OrbWalkers[Menu.Orbwalkers.Orbwalker] == "S1mpleOrbWalker" then
  75. require "S1mpleOrbWalker"
  76. _G.S1mpleOrbWalker:AddToMenu(Menu.Orbwalkers)
  77. end
  78. end
  79. function Keys()
  80. if LoadedOrb == "Sac" and TIMETOSACLOAD then
  81. if _G.AutoCarry.Keys.AutoCarry then return "Combo" end
  82. if _G.AutoCarry.Keys.MixedMode then return "Harass" end
  83. if _G.AutoCarry.Keys.LaneClear then return "Laneclear" end
  84. if _G.AutoCarry.Keys.LastHit then return "Lasthit" end
  85. elseif LoadedOrb == "Mma" then
  86. if _G.MMA_IsOrbwalking() then return "Combo" end
  87. if _G.MMA_IsDualCarrying() then return "Harass" end
  88. if _G.MMA_IsLaneClearing() then return "Laneclear" end
  89. if _G.MMA_IsLastHitting() then return "Lasthit" end
  90. elseif LoadedOrb == "Pewalk" then
  91. if _G._Pewalk.GetActiveMode().Carry then return "Combo" end
  92. if _G._Pewalk.GetActiveMode().Mixed then return "Harass" end
  93. if _G._Pewalk.GetActiveMode().LaneClear then return "Laneclear" end
  94. if _G._Pewalk.GetActiveMode().Farm then return "Lasthit" end
  95. elseif LoadedOrb == "Now" then
  96. if _G.NOWi.Config.k.Combo then return "Combo" end
  97. if _G.NOWi.Config.k.Harass then return "Harass" end
  98. if _G.NOWi.Config.k.LaneClear then return "Laneclear" end
  99. if _G.NOWi.Config.k.LastHit then return "Lasthit" end
  100. elseif LoadedOrb == "Big" then
  101. if _G["BigFatOrb_Mode"] == "Combo" then return "Combo" end
  102. if _G["BigFatOrb_Mode"] == "Harass" then return "Harass" end
  103. if _G["BigFatOrb_Mode"] == "LaneClear" then return "Laneclear" end
  104. if _G["BigFatOrb_Mode"] == "LastHit" then return "Lasthit" end
  105. elseif LoadedOrb == "Sow" then
  106. if _G.SOWi.Menu.Mode0 then return "Combo" end
  107. if _G.SOWi.Menu.Mode1 then return "Harass" end
  108. if _G.SOWi.Menu.Mode2 then return "Laneclear" end
  109. if _G.SOWi.Menu.Mode3 then return "Lasthit" end
  110. elseif LoadedOrb == "SxOrbWalk" then
  111. if _G.SxOrb.isFight then return "Combo" end
  112. if _G.SxOrb.isHarass then return "Harass" end
  113. if _G.SxOrb.isLaneClear then return "Laneclear" end
  114. if _G.SxOrb.isLastHit then return "Lasthit" end
  115. elseif LoadedOrb == "S1mpleOrbWalker" then
  116. if _G.S1mpleOrbWalker.aamode == "sbtw" then return "Combo" end
  117. if _G.S1mpleOrbWalker.aamode == "harass" then return "Harass" end
  118. if _G.S1mpleOrbWalker.aamode == "laneclear" then return "Laneclear" end
  119. if _G.S1mpleOrbWalker.aamode == "lasthit"then return "Lasthit" end
  120. end
  121. end
  122. function LoadTableOrbs()
  123. if _G.Reborn_Loaded or _G.Reborn_Initialised or _G.AutoCarry ~= nil then
  124. table.insert(OrbWalkers, "SAC")
  125. end
  126. if _G.MMA_IsLoaded then
  127. table.insert(OrbWalkers, "MMA")
  128. end
  129. if _G._Pewalk then
  130. table.insert(OrbWalkers, "Pewalk")
  131. end
  132. if FileExist(LIB_PATH .. "/Nebelwolfi's Orb Walker.lua") then
  133. table.insert(OrbWalkers, "NOW")
  134. end
  135. if FileExist(LIB_PATH .. "/Big Fat Orbwalker.lua") then
  136. table.insert(OrbWalkers, "Big Fat Walk")
  137. end
  138. if FileExist(LIB_PATH .. "/SOW.lua") then
  139. table.insert(OrbWalkers, "SOW")
  140. end
  141. if FileExist(LIB_PATH .. "/SxOrbWalk.lua") then
  142. table.insert(OrbWalkers, "SxOrbWalk")
  143. end
  144. if FileExist(LIB_PATH .. "/S1mpleOrbWalker.lua") then
  145. table.insert(OrbWalkers, "S1mpleOrbWalker")
  146. end
  147. if #OrbWalkers > 0 then
  148. Menu:addSubMenu("> Orbwalkers", "Orbwalkers")
  149. Menu:addSubMenu("> Key Config", "Keys")
  150. Menu.Orbwalkers:addParam("Orbwalker", "OrbWalker", SCRIPT_PARAM_LIST, 1, OrbWalkers)
  151. Menu.Keys:addParam("Flee", "Flee key", SCRIPT_PARAM_ONKEYDOWN, false, string.byte("Q"))
  152. Menu.Keys:addParam("info", "Detecting others keys from: "..OrbWalkers[Menu.Orbwalkers.Orbwalker], SCRIPT_PARAM_INFO, "")
  153. local OrbAlr = false
  154. Menu.Orbwalkers:setCallback("Orbwalker", function(value)
  155. if OrbAlr then return end
  156. OrbAlr = true
  157. Menu.Orbwalkers:addParam("info", "Press F9 2x to load your selected Orbwalker.", SCRIPT_PARAM_INFO, "")
  158. SendMsg("Press F9 2x to load your selected Orbwalker")
  159. end)
  160. end
  161. end
  162. --------------------------------------------- Variables ---------------------------------------------
  163. -----------------------------------------------------------------------------------------------------
  164. -----------------------------------------------------------------------------------------------------
  165. function Variables()
  166. Rspell = 'Q'
  167. CanIBack = false
  168. CanIBackM = false
  169. PassiveUp = false
  170. clone = nil
  171. lastAttack = 0
  172. lastAttackCD = 0
  173. Last_LevelSpell = 0
  174. VARS =
  175. { Q = {range = 700},
  176. W = {range = 600, width = 250, speed = 1450, delay = 0.25 , DMGrange = 750},
  177. E = {range = 950, width = 55, speed= 1750, delay = 0.25},
  178. AA = {range = 525}
  179. }
  180. Champ = { }
  181. Passive = { }
  182. lastTime = { }
  183. myEnemyTable = GetEnemyHeroes()
  184. for i, enemy in pairs(myEnemyTable) do
  185. Champ[i] = enemy.charName
  186. end
  187. enemyMinions = minionManager(MINION_ENEMY, 1000, myHero, MINION_SORT_MAXHEALTH_ASC)
  188. jungleMinions = minionManager(MINION_JUNGLE, 1000, myHero, MINION_SORT_MAXHEALTH_DEC)
  189. UPL:AddSpell(_W, {speed = VARS.W.speed, delay = VARS.W.delay, range = VARS.W.DMGrange, width = VARS.W.width, collision = false, aoe = false, type = "circular"})
  190. UPL:AddSpell(_E, {speed = VARS.E.speed, delay = VARS.E.delay, range = VARS.E.range, width = VARS.E.width, collision = true, aoe = false, type = "linear"})
  191. ts = TargetSelector(TARGET_LESS_CAST_PRIORITY, 1000, DAMAGE_MAGICAL, false, true)
  192. target = ts.target
  193. forcedTarget = nil
  194. forcedTargetTime = os.clock()
  195. if string.lower(myHero:GetSpellData(SUMMONER_1).name) == string.lower("SummonerDot") then
  196. Ignite = SUMMONER_1
  197. elseif string.lower(myHero:GetSpellData(SUMMONER_2).name) == string.lower("SummonerDot") then
  198. Ignite = SUMMONER_2
  199. end
  200. end
  201. --------------------------------------------- Menu Function --------------------------------------
  202. -----------------------------------------------------------------------------------------------------
  203. -----------------------------------------------------------------------------------------------------
  204. function DrawMenu()
  205. Menu = scriptConfig("Skizophrenic LeBlanc", "Skizophrenic")
  206. Menu:addSubMenu("> Combo", "combo")
  207. Menu.combo:addParam('comboM', 'Combo Mode', SCRIPT_PARAM_LIST, 4, {"Q>R>W>E", "Q>W>R>E","Q>W>E>R","Smart"})
  208. Menu.combo:addParam("doublechaine", "ChaineZ combo (Double E)", SCRIPT_PARAM_ONKEYDOWN, false, string.byte("C"))
  209. Menu.combo:addParam("doublezed", "AOEPOP combo (Double W)", SCRIPT_PARAM_ONKEYDOWN, false, string.byte("X"))
  210. Menu.combo:addParam("", "", SCRIPT_PARAM_INFO, "")
  211. Menu.combo:addParam("forceE","Force E even if target is not killable", SCRIPT_PARAM_ONOFF,true)
  212. if Ignite then
  213. Menu.combo:addParam("UseIgnite", "Use Ignite in Combo", SCRIPT_PARAM_ONOFF, true)
  214. end
  215. Menu:addSubMenu("> Harass Mode", "harass")
  216. Menu.harass:addParam("harassQ","Use Q", SCRIPT_PARAM_ONOFF,true)
  217. Menu.harass:addParam("harassW","Use W", SCRIPT_PARAM_ONOFF,true)
  218. Menu.harass:addParam("harassW2","Back to W pos", SCRIPT_PARAM_ONOFF,true)
  219. Menu:addSubMenu("> Farming", "farm")
  220. Menu.farm:addSubMenu("> Last Hit", "LHfarm")
  221. Menu.farm.LHfarm:addParam("QinLH","Use Q", SCRIPT_PARAM_ONOFF,false)
  222. Menu.farm.LHfarm:addParam("WinLH","Use W", SCRIPT_PARAM_ONOFF,false)
  223. Menu.farm.LHfarm:addParam("LHAACD", "Only if can't AA", SCRIPT_PARAM_ONOFF, true)
  224. Menu.farm:addSubMenu("> LaneClear", "Lfarm")
  225. Menu.farm.Lfarm:addParam("Qinlane","Use Q", SCRIPT_PARAM_ONOFF,false)
  226. Menu.farm.Lfarm:addParam("Winlane","Use W", SCRIPT_PARAM_ONOFF,false)
  227. Menu.farm.Lfarm:addParam("Rinlane","Use R W", SCRIPT_PARAM_ONOFF,false)
  228. Menu.farm.Lfarm:addParam("WinlaneCount", "Min minions to W", SCRIPT_PARAM_SLICE, 3, 0, 30, 0)
  229. Menu.farm.Lfarm:addParam("RinlaneCount", "Min minions to R", SCRIPT_PARAM_SLICE, 5, 0, 30, 0)
  230. Menu.farm:addSubMenu("> JungleClear", "Jfarm")
  231. Menu.farm.Jfarm:addParam("Qinjungle","Use Q", SCRIPT_PARAM_ONOFF,true)
  232. Menu.farm.Jfarm:addParam("Winjungle","Use W", SCRIPT_PARAM_ONOFF,true)
  233. Menu.farm.Jfarm:addParam("Einjungle","Use E", SCRIPT_PARAM_ONOFF,true)
  234. Menu.farm.Jfarm:addParam("Rinjungle","Use R", SCRIPT_PARAM_ONOFF,false)
  235. Menu:addSubMenu("> Steal","Steal")
  236. Menu.Steal:addSubMenu("> Kill Steal", "Killsteal")
  237. Menu.Steal.Killsteal:addParam("KillStealOn", "Use KillSteal" , SCRIPT_PARAM_ONOFF, true)
  238. Menu.Steal.Killsteal:addParam("", "", SCRIPT_PARAM_INFO, "")
  239. Menu.Steal.Killsteal:addParam("Qkillsteal", "Use Q", SCRIPT_PARAM_ONOFF, true)
  240. Menu.Steal.Killsteal:addParam("Wkillsteal", "Use W", SCRIPT_PARAM_ONOFF, true)
  241. Menu.Steal.Killsteal:addParam("Ekillsteal", "Use E", SCRIPT_PARAM_ONOFF, false)
  242. Menu.Steal.Killsteal:addParam("Rkillsteal", "Use R", SCRIPT_PARAM_ONOFF, false)
  243. Menu.Steal.Killsteal:addParam("1", "", SCRIPT_PARAM_INFO, "")
  244. Menu.Steal.Killsteal:addParam("Gapcloser", "Use W to gapcloser" , SCRIPT_PARAM_ONOFF, true)
  245. Menu.Steal:addParam("JungleSteal", "Jungle Steal", SCRIPT_PARAM_ONKEYDOWN, false, string.byte("T"))
  246. UPL:AddToMenu(Menu, "> Predictions")
  247. Menu:addSubMenu("> TargetSelector", "TargetSelector")
  248. -- Menu.TargetSelector:addParam("useChat","Use chat for forced target change", SCRIPT_PARAM_ONOFF, true)
  249. Menu.TargetSelector:addParam("annouce", "Annouce Mode", SCRIPT_PARAM_LIST, 1, {"Use Chat", "Use notification","None"})
  250. Menu.TargetSelector:addParam("ephemeralTarget","Ephemeral Forced Target", SCRIPT_PARAM_ONOFF, true)
  251. Menu.TargetSelector:addParam("ephemeralTargetSec", "Auto reset forced target (s)", SCRIPT_PARAM_SLICE, 10, 0, 30, 0)
  252. Menu:addSubMenu("> Drawing", "draws")
  253. Menu.draws:addParam("DisRang", "Disable All Draw", SCRIPT_PARAM_ONOFF, false)
  254. Menu.draws:addParam('drawType', 'Draw Type', SCRIPT_PARAM_LIST, 2, {"Lag Free", "Normal"})
  255. Menu.draws:addParam("DrawQ", "Draw Q Rang", SCRIPT_PARAM_ONOFF, true)
  256. Menu.draws:addParam("DrawW", "Draw W rang", SCRIPT_PARAM_ONOFF, true)
  257. Menu.draws:addParam("DrawE", "Draw E rang", SCRIPT_PARAM_ONOFF, true)
  258. Menu.draws:addParam("", "", SCRIPT_PARAM_INFO, "")
  259. Menu.draws:addParam("DrawTarget" , "Draw Forced Target", SCRIPT_PARAM_ONOFF, true)
  260. Menu.draws:addParam("2", "", SCRIPT_PARAM_INFO, "")
  261. Menu.draws:addParam("drawSafeZone", "Draw safe zone", SCRIPT_PARAM_ONOFF, true)
  262. Menu.draws:addParam("3", "", SCRIPT_PARAM_INFO, "")
  263. Menu.draws:addParam("drawit", "Draw dmg in hp bar", SCRIPT_PARAM_ONOFF, true)
  264. Menu.draws:addParam('drawitType', 'Dmg show', SCRIPT_PARAM_LIST, 2, {"Classic", "New"})
  265. Menu:addSubMenu("> Safe Zone","misc")
  266. Menu.misc:addParam("safeZone", "Active Safe Zone", SCRIPT_PARAM_ONOFF, true)
  267. Menu.misc:addParam("safeZoneRange", "Safe Zone Range", SCRIPT_PARAM_SLICE, 375, 0, 1000, 0)
  268. --Menu.misc:addParam("drawit", "Draw dmg in hp bar", SCRIPT_PARAM_ONOFF, true)
  269. if VIP_USER then
  270. Menu:addSubMenu("> Skin Changer", "skin")
  271. Menu:addSubMenu("> Level Up", "LVLUP")
  272. Menu.LVLUP:addParam("lvlOn", "Use Auto Leveler", SCRIPT_PARAM_ONOFF, false)
  273. Menu.LVLUP:addParam("lvlMode", "Mode", SCRIPT_PARAM_LIST, 2, {"Q>W>E", "W>Q>E"})
  274. --Menu.misc.Enable = false
  275. end
  276. Menu:addParam("", "", SCRIPT_PARAM_INFO, "")
  277. Menu:addParam("Version", "Version", SCRIPT_PARAM_INFO, version)
  278. Menu:addParam("Author", "Author:", SCRIPT_PARAM_INFO,author )
  279. Menu:addParam("LastUpdate", "LastUpdate", SCRIPT_PARAM_INFO, last_update)
  280. end
  281. --------------------------------------------- Utility Function --------------------------------------
  282. -----------------------------------------------------------------------------------------------------
  283. -----------------------------------------------------------------------------------------------------
  284. function Checks()
  285. if(myHero:CanUseSpell(_Q) == READY and myHero:GetSpellData(_Q).level >= 1) then
  286. Qready = true
  287. else
  288. Qready = false
  289. end
  290. if(myHero:CanUseSpell(_W) == READY and myHero:GetSpellData(_W).level >= 1) then
  291. Wready = true
  292. else
  293. Wready = false
  294. end
  295. if(myHero:CanUseSpell(_E) == READY and myHero:GetSpellData(_E).level >= 1) then
  296. Eready = true
  297. else
  298. Eready = false
  299. end
  300. if(myHero:CanUseSpell(_R) == READY and myHero:GetSpellData(_R).level >= 1) then
  301. Rready = true
  302. else
  303. Rready = false
  304. end
  305. enemyMinions:update()
  306. jungleMinions:update()
  307. if(forcedTarget) then
  308. if(not forcedTarget.visible or forcedTarget.dead or GetDistance(forcedTarget, myHero) >= 5000) then
  309. if (GetDistance(forcedTarget, myHero) >= 5000) then
  310. if(Menu.TargetSelector.annouce == 1) then
  311. SendMsg("Deselected target: " .. forcedTarget.charName .." to far from you")
  312. elseif (Menu.TargetSelector.annouce == 2) then
  313. SendNotification("Target Selector","Deselected target: " .. forcedTarget.charName .." to far from you" , 10)
  314. end
  315. else
  316. if(Menu.TargetSelector.annouce == 1) then
  317. SendMsg("Deselected target: " .. forcedTarget.charName)
  318. elseif (Menu.TargetSelector.annouce == 2) then
  319. SendNotification("Target Selector","Deselected target: " .. forcedTarget.charName , 10)
  320. end
  321. end
  322. forcedTarget = nil
  323. ts:update()
  324. target = ts.target
  325. else
  326. target = forcedTarget
  327. end
  328. else
  329. ts:update()
  330. target = ts.target
  331. end
  332. end
  333. function SendMsg(msg)
  334. PrintChat("Schizophrenic LeBlanc: <font color=\"#C2FDF3\"><b> "..msg..".</b></font>")
  335. end
  336. function LoadNotificationLib()
  337. local LibPath = LIB_PATH.."NotificationLib.lua"
  338. if not FileExist(LibPath) then
  339. local Host = "raw.github.com"
  340. local Path = "/Mr-Skizo/Skizophrenic/master/Common/NotificationLib.lua".."?rand="..math.random(1,10000)
  341. DownloadFile("https://"..Host..Path, LibPath, function () end)
  342. DelayAction(function () require("NotificationLib") end, 5)
  343. else
  344. require("NotificationLib")
  345. end
  346. end
  347. function SendNotification(Header , Msg , Duration)
  348. NotificationLib:AddTile(Header, Msg, Duration)
  349. end
  350. function CountEnemyHeroInRange(range, object)
  351. local object = object or myHero
  352. local range = range and range * range or myHero.range * myHero.range
  353. local enemyInRange = 0
  354. for i = 1, heroManager.iCount, 1 do
  355. local hero = heroManager:getHero(i)
  356. if ValidTarget(hero) and GetDistanceSqr(object, hero) <= range then
  357. enemyInRange = enemyInRange + 1
  358. end
  359. end
  360. return enemyInRange
  361. end
  362. function CountAllyHeroInRange(range, object)
  363. local object = object or myHero
  364. local range = range and range * range or myHero.range * myHero.range
  365. local AllyInRange = 0
  366. for i = 1, heroManager.iCount, 1 do
  367. local hero = heroManager:getHero(i)
  368. if hero.team == myHero.team and GetDistanceSqr(object, hero) <= range and not hero.isMe then
  369. AllyInRange = AllyInRange + 1
  370. end
  371. end
  372. return AllyInRange
  373. end
  374. function CastQ(unit)
  375. CastSpell(_Q, unit)
  376. end
  377. function CastW(unit)
  378. local Pos, HitChance, HeroPosition = UPL:Predict(_W, myHero, unit)
  379. if HitChance > 0 then
  380. CastSpell(_W, Pos.x, Pos.z)
  381. end
  382. end
  383. function CastE(unit)
  384. local Pos, HitChance, HeroPosition = UPL:Predict(_E, myHero, unit)
  385. if HitChance > 0 then
  386. CastSpell(_E, Pos.x, Pos.z)
  387. end
  388. end
  389. function CastR(unit)
  390. if(Rspell == 'Q') then
  391. CastSpell(_R, unit)
  392. elseif(Rspell == 'W' and not CanIBackM) then
  393. local Pos, HitChance, HeroPosition = UPL:Predict(_W, myHero, unit)
  394. if HitChance > 0 then
  395. CastSpell(_R, Pos.x, Pos.z)
  396. end
  397. elseif(Rspell == 'E') then
  398. local Pos, HitChance, HeroPosition = UPL:Predict(_E, myHero, unit)
  399. if HitChance > 0 then
  400. CastSpell(_R, Pos.x, Pos.z)
  401. end
  402. end
  403. end
  404. function CastSpel(unit,Spell)
  405. if(Spell == 'Q' and Qready) then
  406. CastQ(unit)
  407. end
  408. if(Spell == 'W' and Wready and not CanIBack) then
  409. CastW(unit)
  410. end
  411. if(Spell == 'E' and Eready) then
  412. CastE(unit)
  413. end
  414. if(Spell == 'R' and Rready and not CanIBackM) then
  415. CastR(unit)
  416. end
  417. end
  418. function GapCloser(enemy)
  419. if WReady and not CanIBack then
  420. local bestPos = Vector(myHero) + (Vector(enemy) - myHero):normalized() * VARS.W.range
  421. CastSpell(_W, bestPos.x, bestPos.z)
  422. end
  423. end
  424. function TargetMarked(unit)
  425. for i, Champ in pairs(Champ) do
  426. if Champ == unit.charName then
  427. return Passive[i]
  428. end
  429. end
  430. end
  431. function Qdmg(unit)
  432. QTdmg = getDmg("Q", unit, myHero)
  433. if TargetMarked(unit) then
  434. QTdmg = QTdmg*2
  435. end
  436. return QTdmg
  437. end
  438. function Wdmg(unit)
  439. WTdmg = getDmg("W", unit, myHero)
  440. return WTdmg
  441. end
  442. function Edmg(unit)
  443. ETdmg = getDmg("E", unit, myHero)
  444. return ETdmg
  445. end
  446. function GetUltimateDamage(unit, Rspell)
  447. RTdmg = 0
  448. Rlvl = myHero:GetSpellData(_R).level
  449. if(Rspell == 'Q') then
  450. Rdmg = {100, 200, 300}
  451. RTdmg = Rdmg[Rlvl] + (myHero.ap * 60 ) / 100
  452. if TargetMarked(unit) then
  453. RTdmg = RTdmg*2
  454. end
  455. elseif(Rspell == 'W') then
  456. Rdmg = {150, 300, 450}
  457. RTdmg = Rdmg[Rlvl] + (myHero.ap * 90 ) / 100
  458. elseif(Rspell == 'E') then
  459. Rdmg = {100, 200, 300}
  460. RTdmg = Rdmg[Rlvl] + (myHero.ap * 60 ) / 100
  461. end
  462. --SendMsg(RTdmg)
  463. return RTdmg
  464. end
  465. function GetComboDmg(unit)
  466. TTdmg = 0
  467. if ValidTarget(unit) then
  468. if(Qready) then
  469. TTdmg = TTdmg + Qdmg(unit)
  470. end
  471. if(Wready) then
  472. TTdmg = TTdmg + Wdmg(unit)
  473. end
  474. if(Eready) then
  475. TTdmg = TTdmg + Edmg(unit)
  476. end
  477. if(Rready) then
  478. RTdmg = GetUltimateDamage(unit, Rspell)
  479. TTdmg = TTdmg + RTdmg
  480. end
  481. if(Ignite) then
  482. TTdmg = TTdmg + (50 + (20*myHero.level))
  483. end
  484. if TargetHaveBuff("SummonerExhaust", myHero) then
  485. TTdmg = TTdmg - ((TTdmg*40)/100)
  486. end
  487. end
  488. return TTdmg
  489. end
  490. function IsKillable(unit)
  491. if unit.health <= (GetComboDmg(unit) + 300) then
  492. return true
  493. end
  494. return false
  495. end
  496. function GetHPBarPos(enemy)
  497. enemy.barData = {PercentageOffset = {x = -0.05, y = 0}}
  498. local barPos = GetUnitHPBarPos(enemy)
  499. local barPosOffset = GetUnitHPBarOffset(enemy)
  500. local barOffset = { x = enemy.barData.PercentageOffset.x, y = enemy.barData.PercentageOffset.y }
  501. local barPosPercentageOffset = { x = enemy.barData.PercentageOffset.x, y = enemy.barData.PercentageOffset.y }
  502. local BarPosOffsetX = -50
  503. local BarPosOffsetY = 46
  504. local CorrectionY = 39
  505. local StartHpPos = 31
  506. barPos.x = math.floor(barPos.x + (barPosOffset.x - 0.5 + barPosPercentageOffset.x) * BarPosOffsetX + StartHpPos)
  507. barPos.y = math.floor(barPos.y + (barPosOffset.y - 0.5 + barPosPercentageOffset.y) * BarPosOffsetY + CorrectionY)
  508. local StartPos = Vector(barPos.x , barPos.y, 0)
  509. local EndPos = Vector(barPos.x + 108 , barPos.y , 0)
  510. return Vector(StartPos.x, StartPos.y, 0), Vector(EndPos.x, EndPos.y, 0)
  511. end
  512. function DrawLineHPBar(damage, text, unit, enemyteam)
  513. if unit.dead or not unit.visible then return end
  514. local p = WorldToScreen(D3DXVECTOR3(unit.x, unit.y, unit.z))
  515. if not OnScreen(p.x, p.y) then return end
  516. local thedmg = 0
  517. local line = 2
  518. local linePosA = {x = 0, y = 0 }
  519. local linePosB = {x = 0, y = 0 }
  520. local TextPos = {x = 0, y = 0 }
  521. if damage >= unit.maxHealth then
  522. thedmg = unit.maxHealth - 1
  523. else
  524. thedmg = damage
  525. end
  526. thedmg = math.round(thedmg)
  527. local StartPos, EndPos = GetHPBarPos(unit)
  528. local Real_X = StartPos.x + 24
  529. local Offs_X = (Real_X + ((unit.health - thedmg) / unit.maxHealth) * (EndPos.x - StartPos.x - 2))
  530. if Offs_X < Real_X then Offs_X = Real_X end
  531. local mytrans = 350 - math.round(255*((unit.health-thedmg)/unit.maxHealth))
  532. if mytrans >= 255 then mytrans=254 end
  533. local my_bluepart = math.round(400*((unit.health-thedmg)/unit.maxHealth))
  534. if my_bluepart >= 255 then my_bluepart=254 end
  535. if enemyteam then
  536. linePosA.x = Offs_X-150
  537. linePosA.y = (StartPos.y-(30+(line*15)))
  538. linePosB.x = Offs_X-150
  539. linePosB.y = (StartPos.y-10)
  540. TextPos.x = Offs_X-148
  541. TextPos.y = (StartPos.y-(30+(line*15)))
  542. else
  543. linePosA.x = Offs_X-125
  544. linePosA.y = (StartPos.y-(30+(line*15)))
  545. linePosB.x = Offs_X-125
  546. linePosB.y = (StartPos.y-15)
  547. TextPos.x = Offs_X-122
  548. TextPos.y = (StartPos.y-(30+(line*15)))
  549. end
  550. local dmgDraw = unit.health - thedmg
  551. if dmgDraw < 0 then dmgDraw = 0 end
  552. DrawLine(linePosA.x, linePosA.y, linePosB.x, linePosB.y , 2, ARGB(mytrans, 255, my_bluepart, 0))
  553. DrawText("HP: "..tostring(math.ceil(dmgDraw)).." | "..tostring(text), 15, TextPos.x, TextPos.y , ARGB(mytrans, 255, my_bluepart, 0))
  554. end
  555. function BestCombo(unit)
  556. if GetDistance(unit) <= VARS.Q.range + VARS.W.DMGrange and GetDistance(unit) > VARS.Q.range then
  557. if unit.health < Qdmg(unit)+ GetUltimateDamage(unit,'Q') + Edmg(unit) then
  558. return {'W','Q','R','E'}
  559. end
  560. elseif GetDistance(unit) <= VARS.Q.range and GetDistance(unit) > VARS.W.DMGrange then
  561. if unit.health < Qdmg(unit) + GetUltimateDamage(unit,'Q') + Edmg(unit) then
  562. return {'Q','R','W','E'}
  563. end
  564. elseif GetDistance(unit) <= VARS.W.DMGrange then
  565. if unit.health < Qdmg(unit) + GetUltimateDamage(unit,'Q') + Edmg(unit) + Wdmg(unit) then
  566. return {'Q','R','W','E'}
  567. elseif unit.health < Qdmg(unit) + GetUltimateDamage(unit,'W') + Edmg(unit) + Wdmg(unit) then
  568. return {'Q','W','R','E'}
  569. end
  570. end
  571. return nil
  572. end
  573. function CanAA()
  574. return (GetTickCount() + GetLatency() * 0.5 > lastAttack + lastAttackCD)
  575. end
  576. function GetBestAOEPosition(objects, range, radius, source)
  577. local pos = nil
  578. local count2 = 0
  579. local source = source or myHero
  580. local range = (range and range * range) or myHero.range * myHero.range
  581. for i, object in ipairs(objects) do
  582. if GetDistanceSqr(object, source) < range then
  583. local count = 0
  584. for i, ob in ipairs(objects) do
  585. if GetDistanceSqr(ob, object) <= radius * radius then
  586. count = count + 1
  587. end
  588. end
  589. if count > count2 then
  590. count2 = count
  591. pos = object.pos
  592. end
  593. end
  594. end
  595. return pos, count2
  596. end
  597. function ephemeralTarget()
  598. if forcedTarget and Menu.TargetSelector.ephemeralTarget then
  599. if forcedTargetTime + Menu.TargetSelector.ephemeralTargetSec < os.clock() then
  600. if(Menu.TargetSelector.annouce == 1) then
  601. SendMsg("Ephemeral Target On. ".. forcedTarget.charName .. " Deselected")
  602. elseif Menu.TargetSelector.annouce == 2 then
  603. SendNotification("Target Selector","Ephemeral Target On. ".. forcedTarget.charName .. " Deselected", 10)
  604. end
  605. forcedTarget = nil
  606. end
  607. end
  608. end
  609. function AutoIgnite(target)
  610. if Ignite == nil then return end
  611. if not target.dead and target.visible then
  612. if GetDistance(target,myHero) <= 600 then
  613. if (target.health <= (50 + (20*myHero.level)) and Ignite ~= nil and myHero:CanUseSpell(Ignite) == READY and ValidTarget(target, 600)) then
  614. CastSpell(Ignite, target)
  615. end
  616. end
  617. end
  618. end
  619. --------------------------------------------- Feature Function --------------------------------------
  620. -----------------------------------------------------------------------------------------------------
  621. -----------------------------------------------------------------------------------------------------
  622. function TryToRun()
  623. if Menu.Keys.Flee and not CanIBack then
  624. myHero:MoveTo(mousePos.x, mousePos.z)
  625. CastSpell(_W, mousePos.x, mousePos.z)
  626. end
  627. end
  628. function combo()
  629. if not target then return end
  630. if Keys() == "Combo" then
  631. if(Menu.combo.UseIgnite) then
  632. AutoIgnite(target)
  633. end
  634. if Menu.combo.comboM == 1 and ValidTarget(target, VARS.Q.range) and target and GetDistance(target) <= VARS.Q.range then
  635. if Qready then
  636. CastQ(target)
  637. end
  638. if Rready and Rspell == 'Q' then
  639. CastR(target)
  640. end
  641. if Wready and not CanIBack then
  642. CastW(target)
  643. end
  644. if Eready then
  645. CastE(target)
  646. end
  647. end
  648. if Menu.combo.comboM == 2 and ValidTarget(target, VARS.W.DMGrange ) and target and GetDistance(target) <= VARS.W.DMGrange then
  649. if Qready then
  650. CastQ(target)
  651. end
  652. if Wready and not CanIBack then
  653. CastW(target)
  654. end
  655. if Rready and Rspell == 'W' then
  656. CastR(target)
  657. end
  658. if Eready then
  659. CastE(target)
  660. end
  661. end
  662. if Menu.combo.comboM == 3 and ValidTarget(target, VARS.W.DMGrange) and target and GetDistance(target) <= VARS.W.DMGrange then
  663. if Qready then
  664. CastQ(target)
  665. end
  666. if Wready and not CanIBack then
  667. CastW(target)
  668. end
  669. if Eready then
  670. CastE(target)
  671. end
  672. if Rready and Rspell == 'E' then
  673. CastR(target)
  674. end
  675. end
  676. if Menu.combo.comboM == 4 then
  677. if not Rready and target then
  678. if(IsKillable(target) and GetDistance(target) < VARS.E.range) then
  679. CastE(target)
  680. CastQ(target)
  681. if not CanIBack and GetDistance(target) < VARS.W.DMGrange and TargetMarked(target)then
  682. CastW(target)
  683. end
  684. end
  685. if(CountAllyHeroInRange(2000,target) >= 1 ) then
  686. if(not IsKillable(target)) then
  687. if GetDistance(target) <= (VARS.W.DMGrange + VARS.E.range ) and GetDistance(target)> VARS.E.range and not CanIBack and Wready and Eready then
  688. CastW(target)
  689. CastE(target)
  690. if(Qready) then
  691. CastQ(target)
  692. end
  693. end
  694. if Eready and GetDistance(target) < VARS.E.range then
  695. if(Qready) then
  696. CastQ(target)
  697. end
  698. if(Wready) and not CanIBack then
  699. CastW(target)
  700. end
  701. CastE(target)
  702. end
  703. end
  704. elseif not IsKillable(target) then
  705. if(GetDistance(target) <= VARS.W.DMGrange) then
  706. if(Qready) then
  707. CastQ(target)
  708. end
  709. if Wready and not CanIBack then
  710. CastW(target)
  711. end
  712. if(Menu.combo.forceE)then
  713. CastE(target)
  714. end
  715. end
  716. end
  717. end
  718. if Rready and target then
  719. sequence = BestCombo(target)
  720. if(sequence) then
  721. for i, spell in pairs(sequence) do
  722. CastSpel(target,spell)
  723. end
  724. elseif CountAllyHeroInRange(2000,target) >= 1 and GetDistance(target) <= (VARS.W.DMGrange + VARS.E.range) and GetDistance(target) >= VARS.W.DMGrange then
  725. sequence = {'W','Q','E','R'}
  726. for i, spell in pairs(sequence) do
  727. CastSpel(target,spell)
  728. end
  729. elseif GetDistance(target) <= VARS.W.DMGrange then
  730. sequence = {'Q','W','R','E'}
  731. for i, spell in pairs(sequence) do
  732. CastSpel(target,spell)
  733. end
  734. end
  735. end
  736. end
  737. end
  738. end
  739. function DrawLifeBar()
  740. if Menu.draws.drawit then
  741. for i, unit in pairs(myEnemyTable) do
  742. if ValidTarget(unit) and GetDistance(unit) <= 3000 then
  743. local dba = WorldToScreen(D3DXVECTOR3(unit.x, unit.y, unit.z))
  744. local _ca = dba.x - 35
  745. local aca = dba.y - 40
  746. DrawText(unit.charName .. " - " .. "Distance : " .. math.ceil(GetDistance(unit)), 12, _ca, aca, ARGB(255, 255, 204, 0))
  747. DrawLineHPBar(GetComboDmg(unit),"", unit, true)
  748. end
  749. end
  750. end
  751. end
  752. function DrawLifeBar2()
  753. if Menu.draws.drawit then
  754. for i, unit in pairs(myEnemyTable) do
  755. if ValidTarget(unit) and GetDistance(unit) <= 3000 then
  756. local Center = GetUnitHPBarPos(unit)
  757. if Center.x > -100 and Center.x < WINDOW_W+100 and Center.y > -100 and Center.y < WINDOW_H+100 then
  758. local off = GetUnitHPBarOffset(unit)
  759. local y=Center.y + (off.y * 53) + 2
  760. local xOff = ({['AniviaEgg'] = -0.1,['Darius'] = -0.05,['Renekton'] = -0.05,['Sion'] = -0.05,['Thresh'] = -0.03,})[unit.charName]
  761. local x = Center.x + ((xOff or 0) * 140) - 66
  762. dmg = unit.health - GetComboDmg(unit)
  763. local mytrans = 350 - math.round(255*((unit.health-dmg)/unit.maxHealth))
  764. if mytrans >= 255 then mytrans=254 end
  765. local my_bluepart = math.round(400*((unit.health-dmg)/unit.maxHealth))
  766. if my_bluepart >= 255 then my_bluepart=254 end
  767. DrawLine(x + ((unit.health /unit.maxHealth) * 104),y, x+(((dmg > 0 and dmg or 0) / unit.maxHealth) * 104),y,9, GetDistance(unit) < 3000 and ARGB(mytrans, 255, my_bluepart, 0))
  768. end
  769. end
  770. end
  771. end
  772. end
  773. function KillSteal()
  774. if Menu.Steal.Killsteal.KillStealOn and not Keys() ~= "Combo" then
  775. local LastDeadTime = 0
  776. for i, enemy in pairs(myEnemyTable) do
  777. if not myHero.dead then
  778. if GetDistance(enemy) <= VARS.W.DMGrange then
  779. if(Menu.Steal.Killsteal.Wkillsteal and Wready and enemy.health < Wdmg(enemy)) then
  780. if(ValidTarget(enemy) and not CanIBack ) then
  781. CastW(enemy)
  782. LastDeadTime = os.clock()
  783. end
  784. if CanIBack and enemy.dead and (os.clock() - LastDeadTime ) < 1 then
  785. -- SendMsg("Dead")
  786. CastSpell(_W)
  787. end
  788. elseif (ValidTarget(enemy) and Menu.Steal.Killsteal.Qkillsteal and Qready and enemy.health < Qdmg(enemy)) then
  789. CastQ(enemy)
  790. elseif (ValidTarget(enemy) and Menu.Steal.Killsteal.Ekillsteal and Eready and enemy.health < Edmg(enemy)) then
  791. CastE(enemy)
  792. elseif (ValidTarget(enemy) and Menu.Steal.Killsteal.Rkillsteal and Rready and enemy.health < GetUltimateDamage(enemy,Rspell) and not CanIBackM) then
  793. CastR(enemy)
  794. elseif (Menu.Steal.Killsteal.Wkillsteal and Menu.Steal.Killsteal.Qkillsteal and Qready and Wready and enemy.health < Qdmg(enemy)+Wdmg(enemy)) then
  795. CastQ(enemy)
  796. if(ValidTarget(enemy) and not CanIBack) then
  797. LastDeadTime = os.clock()
  798. CastW(enemy)
  799. end
  800. if CanIBack and enemy.dead and (os.clock() - LastDeadTime) < 1 then
  801. --SendMsg("Dead")
  802. CastSpell(_W)
  803. end
  804. elseif(Menu.Steal.Killsteal.Wkillsteal and Menu.Steal.Killsteal.Qkillsteal and Menu.Steal.Killsteal.Ekillsteal and Eready and Qready and Wready and enemy.health < Qdmg(enemy)+Wdmg(enemy)+Edmg(enemy)) then
  805. CastQ(enemy)
  806. if(ValidTarget(enemy) and not CanIBack) then
  807. CastW(enemy)
  808. CastE(enemy)
  809. end
  810. if CanIBack and enemy.dead and (os.clock() - LastDeadTime) < 1 then
  811. --SendMsg("Dead")
  812. CastSpell(_W)
  813. end
  814. end
  815. elseif GetDistance(enemy) <= (VARS.Q.range + VARS.W.range) and Menu.Steal.Killsteal.Gapcloser and ValidTarget(enemy)then
  816. if(Menu.Steal.Killsteal.Qkillsteal and Qready and enemy.health < Qdmg(enemy)) then
  817. GapCloser(enemy)
  818. if(GetDistance(enemy)<= VARS.Q.range) then
  819. CastQ(enemy)
  820. end
  821. elseif (Menu.Steal.Killsteal.Ekillsteal and Eready and enemy.health < Edmg(enemy)) then
  822. GapCloser(enemy)
  823. if(GetDistance(enemy)<= VARS.E.range) then
  824. CastE(enemy)
  825. end
  826. elseif (Menu.Steal.Killsteal.Qkillsteal and Menu.Steal.Killsteal.Ekillsteal and Qready and Eready and enemy.health < Qdmg(enemy)+Edmg(enemy)) then
  827. GapCloser(enemy)
  828. if(GetDistance(enemy)<= VARS.Q.range) then
  829. CastQ(enemy)
  830. end
  831. if(GetDistance(enemy)<= VARS.E.range) then
  832. CastE(enemy)
  833. end
  834. elseif (Menu.Steal.Killsteal.Qkillsteal and Menu.Steal.Killsteal.Rkillsteal and Qready and Rready and enemy.health < Qdmg(enemy)+GetUltimateDamage(enemy,Rspell) and not CanIBackM) then
  835. GapCloser(enemy)
  836. if(GetDistance(enemy)<= VARS.Q.range) then
  837. CastQ(enemy)
  838. end
  839. if(Rspell == "Q" and GetDistance(enemy)<= VARS.Q.range) then
  840. CastR(enemy)
  841. elseif(Rspell == "W" and GetDistance(enemy)<= VARS.W.range and not CanIBackM) then
  842. CastR(enemy)
  843. elseif(Rspell == "E" and GetDistance(enemy)<= VARS.E.range) then
  844. CastR(enemy)
  845. end
  846. end
  847. end
  848. end
  849. end
  850. end
  851. end
  852. function JungleSteal()
  853. if Menu.Steal.JungleSteal then
  854. myHero:MoveTo(mousePos.x, mousePos.z)
  855. for i, unit in pairs(jungleMinions.objects) do
  856. if ValidTarget(unit) and unit.health <= Qdmg(unit)+Edmg(unit) then
  857. CastW(unit)
  858. CastQ(unit)
  859. CastE(unit)
  860. end
  861. end
  862. end
  863. end
  864. function harass()
  865. if not target then return end
  866. if (Keys() == "Harass" ) then
  867. if Menu.harass.harassQ then
  868. if(Qready) then
  869. CastQ(target)
  870. end
  871. end
  872. if Menu.harass.harassW and Menu.harass.harassQ then
  873. if Wready and not Qready and GetDistance(target) <= (VARS.W.DMGrange) then
  874. if(Menu.harass.harassW2) then
  875. if(TargetMarked(target)) then
  876. CastW(target)
  877. end
  878. if(CanIBack) then
  879. CastW(target)
  880. end
  881. elseif(not CanIBack) then
  882. if(TargetMarked(target)) then
  883. CastW(target)
  884. end
  885. end
  886. end
  887. elseif Menu.harass.harassW then
  888. if Wready and GetDistance(target) <= (VARS.W.DMGrange) then
  889. if(Menu.harass.harassW2) then
  890. CastW(target)
  891. elseif(not CanIBack) then
  892. CastW(target)
  893. end
  894. end
  895. end
  896. end
  897. end
  898. function doubleChaine()
  899. if Menu.combo.doublechaine then
  900. myHero:MoveTo(mousePos.x, mousePos.z)
  901. if not target then return end
  902. if Rready and GetDistance(target)< VARS.E.range and target then
  903. if Eready then
  904. CastE(target)
  905. end
  906. if Rready and Rspell == 'E' then
  907. CastR(target)
  908. end
  909. DelayAction(function()
  910. if(Qready) then
  911. CastQ(target)
  912. end
  913. if Wready and not CanIBack then
  914. CastW(target)
  915. end
  916. end,3)
  917. end
  918. end
  919. end
  920. function doubleZed()
  921. if Menu.combo.doublezed then
  922. myHero:MoveTo(mousePos.x, mousePos.z)
  923. if not target then return end
  924. if Rready and GetDistance(target)< VARS.W.DMGrange and target then
  925. local bestPos, enemyCount = GetBestAOEPosition(myEnemyTable, VARS.W.range, VARS.W.width, myHero)
  926. if Wready and not CanIBack then
  927. CastSpell(_W, bestPos.x, bestPos.z)
  928. end
  929. if Rready and Rspell == 'W' then
  930. CastSpell(_R, bestPos.x, bestPos.z)
  931. end
  932. DelayAction(function()
  933. if(Qready) then
  934. CastQ(target)
  935. end
  936. if Eready then
  937. CastE(target)
  938. end
  939. end,2)
  940. end
  941. end
  942. end
  943. function lastHit()
  944. if Keys() == "Lasthit" then
  945. for i, minion in pairs(enemyMinions.objects) do
  946. if(Menu.farm.LHfarm.LHAACD and not CanAA()) then
  947. if minion and Menu.farm.LHfarm.QinLH and not CanAA()then
  948. DelayAction(function()
  949. if Qdmg(minion) > minion.health and Qready and not CanAA() and not minion.dead then
  950. CastQ(minion)
  951. return
  952. end
  953. end,0.5)
  954. end
  955. if minion and Menu.farm.LHfarm.WinLH and not CanAA() then
  956. DelayAction(function()
  957. if Wdmg(minion) > minion.health and Wready and not Qready and not CanAA() and not minion.dead then
  958. CastW(minion)
  959. return
  960. end
  961. end,2)
  962. end
  963. end
  964. if(not Menu.farm.LHfarm.LHAACD) then
  965. if minion and Menu.farm.LHfarm.QinLH then
  966. DelayAction(function()
  967. if Qdmg(minion) > minion.health and Qready and not minion.dead then
  968. CastQ(minion)
  969. return
  970. end
  971. end,0.5)
  972. end
  973. if minion and Menu.farm.LHfarm.WinLH then
  974. DelayAction(function()
  975. if Wdmg(minion) > minion.health and Wready and not minion.dead then
  976. CastW(minion)
  977. return
  978. end
  979. end,2)
  980. end
  981. end
  982. end
  983. end
  984. end
  985. function laneClear()
  986. if Keys() == "Laneclear" then
  987. if Qready and Menu.farm.Lfarm.Qinlane then
  988. for i, Jminion in ipairs(enemyMinions.objects) do
  989. if GetDistance(Jminion) < VARS.Q.range and not CanAA() then
  990. CastSpell(_Q, Jminion)
  991. break
  992. end
  993. end
  994. end
  995. if Wready and Menu.farm.Lfarm.Winlane and not CanAA() then
  996. local bestPos, minionCount = GetBestAOEPosition(enemyMinions.objects, VARS.W.range, VARS.W.width, myHero)
  997. if bestPos and minionCount >= Menu.farm.Lfarm.WinlaneCount and not CanAA() then
  998. CastSpell(_W, bestPos.x, bestPos.z)
  999. CastSpell(_W)
  1000. end
  1001. end
  1002. if Rready and Rspell == 'W' and Menu.farm.Lfarm.Rinlane and not CanAA() then
  1003. local bestPos, minionCount = GetBestAOEPosition(enemyMinions.objects, VARS.W.range, VARS.W.width, myHero)
  1004. if bestPos and minionCount >= Menu.farm.Lfarm.WinlaneCount and not CanAA() then
  1005. CastSpell(_R, bestPos.x, bestPos.z)
  1006. CastSpell(_R)
  1007. end
  1008. end
  1009. end
  1010. end
  1011. function jungleClear()
  1012. if Keys() == "Laneclear" then
  1013. for _, jminion in pairs(jungleMinions.objects) do
  1014. if ValidTarget(jminion, 700) then
  1015. if Qready and Menu.farm.Jfarm.Qinjungle and not CanAA() then
  1016. CastQ(jminion)
  1017. end
  1018. if Wready and Menu.farm.Jfarm.Winjungle and not CanIBack and not CanAA() then
  1019. CastW(jminion)
  1020. end
  1021. if Rready and Menu.farm.Jfarm.Rinjungle and not CanIBackM and not CanAA() and Rspell == 'W' then
  1022. CastR(jminion)
  1023. end
  1024. if Eready and Menu.farm.Jfarm.Einjungle and not CanAA() then
  1025. DelayAction(function()
  1026. CastE(jminion)
  1027. end,1)
  1028. end
  1029. end
  1030. end
  1031. end
  1032. end
  1033. function clonecontrole()
  1034. --if(clone and PassiveUp) then
  1035. -- local p = CLoLPacket(0x127)
  1036. -- p.vTable = 0xF0929C
  1037. -- p:EncodeF(myHero.networkID)
  1038. -- p:Encode1(items[Item][1])--Item Specific
  1039. -- p:Encode1(items[Item][2])--Item Specific
  1040. -- for i = 1, 2 do p:Encode1(0x1E) end
  1041. -- for i = 1, 4 do p:Encode1(0x00) end
  1042. -- SendPacket(p)
  1043. --end
  1044. end
  1045. function safeZone()
  1046. if Menu.misc.safeZone and target then
  1047. if not Keys() and not Wready and Eready and GetDistance(target) <= Menu.misc.safeZoneRange then
  1048. CastE(target)
  1049. end
  1050. end
  1051. end
  1052. --------------------------------------------- VIP Function ------------------------------------------
  1053. -----------------------------------------------------------------------------------------------------
  1054. -----------------------------------------------------------------------------------------------------
  1055. if VIP_USER then
  1056. function SkinLoad()
  1057. Menu.skin:addParam('changeSkin', 'Change Skin', SCRIPT_PARAM_ONOFF, false)
  1058. Menu.skin:setCallback('changeSkin', function(nV)
  1059. if (nV) then
  1060. SetSkin(myHero, Menu.skin.skinID)
  1061. else
  1062. SetSkin(myHero, -1)
  1063. end
  1064. end)
  1065. Menu.skin:addParam('skinID', 'Skin', SCRIPT_PARAM_LIST, 1, {"Wicked", "Prestigious", "Mistletoe", "Ravenborn", "Elderwood","Original"})
  1066. Menu.skin:setCallback('skinID', function(nV)
  1067. if (Menu.skin.changeSkin) then
  1068. SetSkin(myHero, nV)
  1069. end
  1070. end)
  1071. if (Menu.skin.changeSkin) then
  1072. SetSkin(myHero, Menu.skin.skinID)
  1073. end
  1074. end
  1075. function AutoLvlUp()
  1076. if VIP_USER and os.clock()-Last_LevelSpell > 0.5 then
  1077. if Menu.LVLUP.lvlOn then
  1078. autoLevelSetSequence(levelSequence)
  1079. Last_LevelSpell = os.clock()
  1080. elseif not Menu.LVLUP.lvlOn then
  1081. autoLevelSetSequence(nil)
  1082. Last_LevelSpell = os.clock()+10
  1083. end
  1084. end
  1085. end
  1086. function CheckAutoLvl()
  1087. if Menu.LVLUP.lvlModeo == 1 then
  1088. levelSequence = {1,2,3,1,1,4,2,1,2,3,4,1,2,3,2,4,3,3}
  1089. elseif Menu.LVLUP.lvlMode == 2 then
  1090. levelSequence = {2,1,3,2,2,4,1,2,1,3,4,2,1,3,1,4,3,3}
  1091. else
  1092. return
  1093. end
  1094. end
  1095. end
  1096. --------------------------------------------- Basic Function ----------------------------------------
  1097. -----------------------------------------------------------------------------------------------------
  1098. -----------------------------------------------------------------------------------------------------
  1099. function OnIssueOrder(unit, iAction, targetPos, Target)
  1100. --SendMsg(unit.name)
  1101. end
  1102. function OnProcessSpell(unit,spell)
  1103. if unit.isMe and spell.name == "LeblancChaosOrb" then
  1104. Rspell = 'Q'
  1105. end
  1106. if unit.isMe and spell.name == "LeblancSlide" then
  1107. Rspell = 'W'
  1108. end
  1109. if unit.isMe and spell.name == "LeblancSoulShackle" then
  1110. Rspell = 'E'
  1111. end
  1112. end
  1113. function OnAnimation(unit, animation)
  1114. if unit and animation and unit.isMe and animation:lower():find("attack") then
  1115. lastAttack = GetTickCount() - GetLatency() * 0.5
  1116. lastAttackCD = unit.spell.animationTime * 1000
  1117. end
  1118. end
  1119. function OnUpdateBuff(unit, buff)
  1120. if buff.name == "LeblancChaosOrb" and unit and not unit.isMe then
  1121. for i, Champ in pairs(Champ) do
  1122. if Champ == unit.charName then
  1123. Passive[i] = true
  1124. lastTime[i] = os.clock()
  1125. end
  1126. end
  1127. end
  1128. if buff.name=="LeblancSlide" and unit and unit.isMe then
  1129. CanIBack = true
  1130. end
  1131. if buff.name=="LeblancSlideM" and unit and unit.isMe then
  1132. CanIBackM = true
  1133. end
  1134. end
  1135. function OnRemoveBuff(unit,buff)
  1136. if buff.name == "LeblancChaosOrb" and unit and not unit.isMe then
  1137. for i, Champ in pairs(Champ) do
  1138. if Champ == unit.charName then
  1139. Passive[i] = false
  1140. end
  1141. end
  1142. end
  1143. if buff.name=="LeblancSlide" and unit and unit.isMe then
  1144. CanIBack = false
  1145. end
  1146. if buff.name=="LeblancSlideM" and unit and unit.isMe then
  1147. CanIBackM = false
  1148. end
  1149. end
  1150. function OnDraw()
  1151. if(Menu.draws.DisRang == false) then
  1152. if(Menu.draws.DrawQ and Qready) then
  1153. if(Menu.draws.drawType == 2) then
  1154. DrawCircle(myHero.x, myHero.y, myHero.z, VARS.Q.range, 0x111111)
  1155. else
  1156. DrawCircle3D(myHero.x, myHero.y, myHero.z, VARS.Q.range, 2)
  1157. end
  1158. end
  1159. if(Menu.draws.DrawW and Wready) then
  1160. if(Menu.draws.drawType == 2)then
  1161. DrawCircle(myHero.x, myHero.y, myHero.z, VARS.W.range, 0x111111)
  1162. else
  1163. DrawCircle3D(myHero.x, myHero.y, myHero.z, VARS.W.range, 2)
  1164. end
  1165. end
  1166. if(Menu.draws.DrawE and Eready) then
  1167. if(Menu.draws.drawType == 2)then
  1168. DrawCircle(myHero.x, myHero.y, myHero.z, VARS.E.range, 0x111111)
  1169. else
  1170. DrawCircle3D(myHero.x, myHero.y, myHero.z, VARS.E.range, 2)
  1171. end
  1172. end
  1173. if Menu.draws.drawSafeZone and Menu.misc.safeZone then
  1174. if(Menu.draws.drawType == 2)then
  1175. DrawCircle(myHero.x, myHero.y, myHero.z, Menu.misc.safeZoneRange, 0x111111)
  1176. else
  1177. DrawCircle3D(myHero.x, myHero.y, myHero.z, Menu.misc.safeZoneRange, 2)
  1178. end
  1179. end
  1180. if Menu.draws.drawitType == 1 then
  1181. DrawLifeBar()
  1182. elseif Menu.draws.drawitType == 2 then
  1183. DrawLifeBar2()
  1184. end
  1185. if forcedTarget and Menu.draws.DrawTarget then
  1186. DrawCircle3D(forcedTarget.x, forcedTarget.y, forcedTarget.z, 50, 2)
  1187. end
  1188. end
  1189. end
  1190. function OnCreateObj(object)
  1191. if object.name== "LeBlanc_Base_P_Image.troy" then
  1192. --SendMsg("up")
  1193. clone = object
  1194. PassiveUp = true
  1195. end
  1196. if object.name=="LeBlanc_Base_P_imageDeath.troy" then
  1197. --SendMsg("down")
  1198. clone = nil
  1199. PassiveUp = false
  1200. end
  1201. end
  1202. function OnWndMsg(key , msg)
  1203. if key == WM_LBUTTONDOWN then
  1204. local enemySelected
  1205. for i, enemy in pairs(myEnemyTable) do
  1206. if enemy and enemy.visible and not enemy.dead and ValidTarget(enemy) and GetDistanceSqr(enemy, mousePos) <= 40000 then
  1207. enemySelected = enemy
  1208. end
  1209. end
  1210. if enemySelected and GetDistanceSqr(enemySelected, mousePos) < 40000 then
  1211. if forcedTarget and enemySelected.networkID == forcedTarget.networkID then
  1212. forcedTarget = nil
  1213. if(Menu.TargetSelector.annouce == 1) then
  1214. SendMsg("Deselected target: " .. enemySelected.charName)
  1215. elseif (Menu.TargetSelector.annouce == 2) then
  1216. SendNotification("Target Selector","Deselected target: " .. enemySelected.charName , 10)
  1217. end
  1218. else
  1219. forcedTarget = enemySelected
  1220. if(Menu.TargetSelector.annouce == 1) then
  1221. SendMsg("Selected target: " .. enemySelected.charName)
  1222. elseif (Menu.TargetSelector.annouce == 2) then
  1223. SendNotification("Target Selector","Selected target: " .. enemySelected.charName , 10)
  1224. end
  1225. forcedTargetTime = os.clock()
  1226. end
  1227. end
  1228. end
  1229. end
  1230. function OnTick()
  1231. Checks()
  1232. combo()
  1233. lastHit()
  1234. laneClear()
  1235. harass()
  1236. KillSteal()
  1237. JungleSteal()
  1238. doubleChaine()
  1239. doubleZed()
  1240. jungleClear()
  1241. TryToRun()
  1242. clonecontrole()
  1243. ephemeralTarget()
  1244. safeZone()
  1245. if VIP_USER then
  1246. AutoLvlUp()
  1247. end
  1248. end
  1249. function OnLoad()
  1250. LoadNotificationLib()
  1251. --UPL FIN
  1252. if not _G.UPLloaded then
  1253. if FileExist(LIB_PATH .. "/UPL.lua") then
  1254. require("UPL")
  1255. UPL = UPL()
  1256. else
  1257. SendMsg("Downloading UPL, please don't press F9")
  1258. DelayAction(function() DownloadFile("https://raw.github.com/nebelwolfi/BoL/master/Common/UPL.lua".."?rand="..math.random(1,10000), LIB_PATH.."UPL.lua", function () SendMsg("Successfully downloaded UPL. Press F9 twice") end) end, 3)
  1259. return
  1260. end
  1261. end
  1262. --UPL FIN
  1263. AutoUpdater()
  1264. Variables()
  1265. DrawMenu()
  1266. Menu.TargetSelector:addTS(ts)
  1267. LoadTableOrbs()
  1268. LoadOrb()
  1269. if VIP_USER then
  1270. SkinLoad()
  1271. CheckAutoLvl()
  1272. end
  1273. end

comments powered by Disqus