Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2014
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 41.87 KB | None | 0 0
  1. --[[ iLux - Penta Rainbows by Apple
  2. Special Thanks to Icy for being my testing bitch and being open to every sorts of testing. ^-^
  3.  
  4. FUCK YEAH, IT'S A MOTHERFUCKING UNICORN! Cheers to Rafaelinux!
  5. ,`,`,`,`,
  6. . . . . `\`\`\`\;
  7. `\`\`\`\`, ~|;!;!;\!
  8. ~\;\;\;\|\ (--,!!!~`! .
  9. (--,\\\===~\ (--,|||~`! ./
  10. (--,\\\===~\ `,-,~,=,:. _,//
  11. (--,\\\==~`\ ~-=~-.---|\;/J,
  12. (--,\\\((```==. ~'`~/ a |
  13. (-,.\\('('(`\\. ~'=~| \_. \
  14. (,--(,(,(,'\\. ~'=| \\_;>
  15. (,-( ,(,(,;\\ ~=/ \
  16. (,-/ (.(.(,;\\,/ )
  17. (,--/,;,;,;,\\ ./------.
  18. (==,-;-'`;' /_,----`. \
  19. ,.--_,__.-' `--. ` \
  20. (='~-_,--/ , ,!,___--. \ \_)
  21. (-/~( | \ ,_- | ) /_|
  22. (~/((\ )\._, |-' _,/ /
  23. \\)))) / ./~. | \_\;
  24. ,__///// / /.## ) / @##.
  25. '===~' | |#@&:(, <. &%%::&@##.
  26. #/ / %%00 \. \0000000%%:&@#
  27. #@&/ / \_\ '00%:&@#
  28. #@&:/_!/ >_\ '0%:&@#
  29. #@&:%0 0%:&@#
  30. #@&:%0 0%:&@#
  31. #@&:%0 0%:&@#
  32. "" ' " " ' "" ]]
  33.  
  34. if myHero.charName ~= "Lux" then return end
  35.  
  36. if VIP_USER then require "Collision" end
  37. if FileExist(LIB_PATH.."Prodiction.lua") then require "Prodiction" end
  38. if FileExist(LIB_PATH.."iSAC.lua") then iSAC = true require "iSAC" end
  39.  
  40. --[[ Config ]]--
  41.  
  42. local HK1 = string.byte("A")
  43. local HK2 = string.byte("T")
  44. local HK3 = string.byte("C")
  45. local HK4 = string.byte("X") -- Derp, not used but still here.
  46. local SafeBet = 20 -- %
  47. local AutoShieldPerc = 5 -- %
  48. local damageSafetyNet = 2 --%
  49. local minHitChance = 0.3 -- VIP Users only.
  50. local drawPrediction = false
  51. local OnlyEWhenQNotReadyAndTargetCanMove = false
  52. local minMinionsForEFarm = 2
  53. local useNewCombo = true
  54. local tpProMaxTick = 20
  55.  
  56. local Testing = false -- Warning: Do not enable. It turns your computer into a fruit, which you don't want.
  57.  
  58. --[[ Constants ]]--
  59.  
  60. local QRange, QSpeed, QDelay, QWidth = 1150, 1175, 0.250, 85
  61. local WRange = 1050
  62. local ERange, ESpeed, EDelay, ERadius = 1100, 1300, 0.150, 275
  63. local RRange, RSpeed, RDelay, RWidth = 3340, math.huge, 0.700, 200
  64.  
  65. local igniteRange = 600
  66. local defaultItemRange = 700
  67.  
  68. --[[ Script Variables ]]--
  69.  
  70. local ts = TargetSelector(TARGET_LESS_CAST,QRange,DAMAGE_MAGIC,false)
  71. local tsAA = TargetSelector(TARGET_LESS_CAST,600,DAMAGE_MAGIC,false)
  72. local tpQ = VIP_USER and TargetPredictionVIP(QRange, QSpeed, QDelay, QWidth) or TargetPrediction(QRange, QSpeed/1000, QDelay*1000, QWidth)
  73. local tpQCollision = VIP_USER and Collision(QRange, QSpeed, QDelay, QWidth) or nil
  74. local tpE = VIP_USER and TargetPredictionVIP(ERange, ESpeed, EDelay, ERadius*2) or TargetPrediction(ERange, ESpeed/1000, EDelay*1000, ERadius*2)
  75. local tpR = VIP_USER and TargetPredictionVIP(RRange, RSpeed, RDelay, RWidth) or TargetPrediction(RRange, 100, RDelay*1000, RWidth)
  76. local tpProPos = {
  77. [_Q] = {},
  78. [_E] = {},
  79. [_R] = {}, }
  80. local tpPro = ProdictManager and ProdictManager.GetInstance() or nil
  81. local tpProQ = tpPro and tpPro:AddProdictionObject(_Q, QRange, QSpeed, QDelay, QWidth, myHero) or nil
  82. local tpProE = tpPro and tpPro:AddProdictionObject(_E, ERange, ESpeed, EDelay, ERadius*2, myHero) or nil
  83. local tpProR = tpPro and tpPro:AddProdictionObject(_R, RRange, RSpeed, RDelay, RWidth, myHero) or nil
  84. local iOW = iSAC and iOrbWalker(550, true) or nil
  85.  
  86. local igniteSlot = nil
  87. local EParticle = nil
  88. local QStatus = 0
  89. local TriggerEOnLand = false
  90. local TriggerEOnLandFarm = false
  91. local enemyMinions = {}
  92. local updateTextTimers = {}
  93. local pingTimer = {}
  94. local FriendlySmite = {}
  95. local Debuffed = {}
  96. local CurrentTick = GetTickCount()
  97. local TargetHaveBuff_Old = TargetHaveBuff
  98.  
  99. local items = {
  100. ZHONYAS = {id = 3157, slot = nil, ready = false},
  101. WOOGLETS = {id = 3090, slot = nil, ready = false},
  102. itemsList = {
  103. ["BRK"] = {id = 3153, slot = nil, ready = false, useOnKill = false},
  104. ["EXEC"] = {id = 3123, slot = nil, ready = false, useOnKill = false},
  105. ["YOGH"] = {id = 3142, slot = nil, ready = false, useOnKill = false},
  106. ["RANO"] = {id = 3143, slot = nil, ready = false, useOnKill = false},
  107. ["MARU"] = {id = 3042, slot = nil, ready = false, useOnKill = false},
  108.  
  109. ["DFG"] = {id = 3128, slot = nil, ready = false, useOnKill = true},
  110. ["HXG"] = {id = 3146, slot = nil, ready = false, useOnKill = true},
  111. ["BWC"] = {id = 3144, slot = nil, ready = false, useOnKill = true},
  112. ["BLACKFIRE"] = {id = 3188, slot = nil, READY = false, useOnKill = true},
  113. },
  114. passiveItemsList = {
  115. ["LIANDRYS"] = {id = 3151, slot = nil},
  116. },
  117. }
  118.  
  119. local jungleObjects = {
  120. ["TT_Spiderboss7.1.1"] = {object = nil, isCamp = true},
  121. ["Worm12.1.1"] = {object = nil, isCamp = true},
  122. ["Dragon6.1.1"] = {object = nil, isCamp = true},
  123. ["AncientGolem1.1.1"] = {object = nil, isCamp = true},
  124. ["AncientGolem7.1.1"] = {object = nil, isCamp = true},
  125. }
  126.  
  127. --[[ Core Callbacks ]]--
  128.  
  129. function OnLoad()
  130. iLuxConfig = scriptConfig("iLux - Penta Rainbows", "iLux")
  131.  
  132. iLuxConfig:addParam("sep", "-=[ Hotkeys ]=-", SCRIPT_PARAM_INFO, "")
  133. iLuxConfig:addParam("pewpew","PewPew!", SCRIPT_PARAM_ONKEYDOWN, false, HK1)
  134. iLuxConfig:addParam("harass", "Poke!", SCRIPT_PARAM_ONKEYDOWN, false, HK2)
  135. iLuxConfig:addParam("autoFarm", "Munching Minions", SCRIPT_PARAM_ONKEYDOWN, false, HK3)
  136.  
  137. iLuxConfig:addParam("sep", "-=[ Combo Settings ]=-", SCRIPT_PARAM_INFO, "")
  138. if tpPro then iLuxConfig:addParam("tpPro", "Use Prodiction", SCRIPT_PARAM_ONOFF, true) end
  139. iLuxConfig:addParam("QWithSingleCollide", "Q With Single Minion Collision", SCRIPT_PARAM_ONOFF, false)
  140. iLuxConfig:addParam("UseUlt", "Ultimate in Combo", SCRIPT_PARAM_ONOFF, true)
  141. if iSAC then iLuxConfig:addParam("orbwalk", "Orbwalk", SCRIPT_PARAM_ONOFF, true) end
  142. iLuxConfig:addParam("moveToMouse", "Move To Mouse During PewPew", SCRIPT_PARAM_ONOFF, false)
  143.  
  144. iLuxConfig:addParam("sep", "-=[ Auto Settings ]=-", SCRIPT_PARAM_INFO, "")
  145. iLuxConfig:addParam("AutoTriggerE", "Auto Trigger E", SCRIPT_PARAM_ONOFF, true)
  146. iLuxConfig:addParam("AutoTriggerEMin", "Min Enemies for E", SCRIPT_PARAM_SLICE, 1, 1, 5, 0)
  147. iLuxConfig:addParam("AutoUlt", "Auto Ultimate", SCRIPT_PARAM_ONOFF, true)
  148. iLuxConfig:addParam("AutoShield", "Auto Shield", SCRIPT_PARAM_ONOFF, true)
  149. iLuxConfig:addParam("SmartSave", "Smart Save Items", SCRIPT_PARAM_ONOFF, true)
  150. iLuxConfig:addParam("SafeBet", "Smart Save Health %", SCRIPT_PARAM_SLICE, SafeBet or 20, 1, 100, 0)
  151.  
  152. iLuxConfig:addParam("sep", "-=[ Munching Settings ]=-", SCRIPT_PARAM_INFO, "")
  153. iLuxConfig:addParam("moveToMouseFarm", "Move to Mouse while Munching?", SCRIPT_PARAM_ONOFF, false)
  154. iLuxConfig:addParam("useEFarm", "Use E while Munching?", SCRIPT_PARAM_ONOFF, false)
  155. iLuxConfig:addParam("StealTzeBuffs", "Steal Tze Buffs?", SCRIPT_PARAM_ONOFF, false)
  156. iLuxConfig:addParam("NoRageStealz", "Don't enrage jungler?", SCRIPT_PARAM_ONOFF, true)
  157.  
  158. iLuxConfig:addParam("sep", "-=[ Other Settings ]=-", SCRIPT_PARAM_INFO, "")
  159. iLuxConfig:addParam("drawcircles", "Draw Circles", SCRIPT_PARAM_ONOFF, true)
  160. iLuxConfig:addParam("damageText", "Kill Text", SCRIPT_PARAM_ONOFF, true)
  161. iLuxConfig:addParam("ultAlert", "Ult Notifier", SCRIPT_PARAM_ONOFF, true)
  162.  
  163. iLuxConfig:permaShow("pewpew")
  164. iLuxConfig:permaShow("harass")
  165. iLuxConfig:permaShow("autoFarm")
  166.  
  167. ts.name = "Lux"
  168. iLuxConfig:addTS(ts)
  169.  
  170. igniteSlot = ((myHero:GetSpellData(SUMMONER_1).name == "SummonerDot" and SUMMONER_1) or (myHero:GetSpellData(SUMMONER_2).name == "SummonerDot" and SUMMONER_2) or nil)
  171. enemyMinions = minionManager(MINION_ENEMY, ERange, myHero, MINION_SORT_HEALTH_ASC)
  172.  
  173. for i = 1, objManager.maxObjects do
  174. local object = objManager:getObject(i)
  175. if object and object.valid and jungleObjects[object.name] and jungleObjects[object.name].isCamp then
  176. jungleObjects[object.name].object = object
  177. end
  178. end
  179. for _, ally in pairs(GetAllyHeroes()) do
  180. if ally:GetSpellData(SUMMONER_1).name == "SummonerSmite" or ally:GetSpellData(SUMMONER_2).name == "SummonerSmite" then
  181. FriendlySmite[#FriendlySmite+1] = ally
  182. end
  183. end
  184. end
  185.  
  186. function OnTick()
  187. CurrentTick = GetTickCount()
  188. ts:update()
  189. enemyMinions:update()
  190. updateItems()
  191. if iOW then iOW.AARange = GetDistance(myHero.minBBox) + myHero.range end
  192. if EParticle ~= nil and not EParticle.valid then EParticle = nil end
  193.  
  194. if not myHero.dead then
  195. AutoIgnite()
  196. AutoUlt()
  197. if ValidTarget(ts.target) then
  198. --if iLuxConfig.tpPro then
  199. -- tpProQ:EnableTarget(ts.target, true)
  200. -- tpProE:EnableTarget(ts.target, true)
  201. -- tpProR:EnableTarget(ts.target, true)
  202. --end
  203. if iLuxConfig.pewpew then
  204. if iLuxConfig.tpPro and Testing then
  205. newPewPewTesting()
  206. elseif useNewCombo then
  207. newPewPew()
  208. else
  209. PewPew()
  210. end
  211. end
  212. if iLuxConfig.harass then
  213. Poke()
  214. end
  215. end
  216. if iLuxConfig.pewpew and not (_G.AutoCarry and _G.AutoCarry.MainMenu.AutoCarry) then
  217. if iSAC then
  218. if iLuxConfig.orbwalk then
  219. tsAA.range = iOW.AARange
  220. tsAA:update()
  221. iOW:Orbwalk(mousePos, tsAA.target)
  222. elseif iLuxConfig.moveToMouse then
  223. iOW:Move(mousePos)
  224. end
  225. elseif iLuxConfig.moveToMouse then
  226. myHero:MoveTo(mousePos.x, mousePos.z)
  227. end
  228. end
  229. if EParticle and ((TriggerEOnLand or TriggerEOnLandFarm) or iLuxConfig.AutoTriggerE or iLuxConfig.pewpew) then
  230. AutoTriggerE()
  231. end
  232. if iLuxConfig.autoFarm and not (iLuxConfig.pewpew or iLuxConfig.harass) then autoFarm() end
  233. if iLuxConfig.damageText then damageText() end
  234. if iLuxConfig.StealTzeBuffs then StealTzeBuffs() end
  235. end
  236. end
  237.  
  238. function OnCreateObj(object)
  239. if object.name:find("LuxLightstrike_tar_green") then
  240. EParticle = object
  241. elseif object.name:find("LuxBlitz_nova") then
  242. EParticle = nil
  243. TriggerEOnLand = false
  244. TriggerEOnLandFarm = false
  245. elseif jungleObjects[object.name] and jungleObjects[object.name].isCamp then
  246. jungleObjects[object.name].object = object
  247. end
  248. end
  249.  
  250. function OnDeleteObj(object)
  251. if object.name:find("LuxBlitz_nova") then
  252. EParticle = nil
  253. TriggerEOnLand = false
  254. TriggerEOnLandFarm = false
  255. elseif jungleObjects[object.name] and jungleObjects[object.name].isCamp then
  256. jungleObjects[object.name].object = nil
  257. end
  258. end
  259.  
  260. function OnDraw()
  261. if not myHero.dead and iLuxConfig.drawcircles then
  262. if myHero:CanUseSpell(_Q) == READY or myHero:CanUseSpell(_E) == READY then
  263. DrawCircle(myHero.x, myHero.y, myHero.z, QRange, 0xFF80FF00)
  264. end
  265.  
  266. if myHero:CanUseSpell(_R) == READY then
  267. DrawCircle(myHero.x, myHero.y, myHero.z, RRange, 0xFF80FF00)
  268. end
  269.  
  270. if iOW then
  271. DrawCircle(myHero.x, myHero.y, myHero.z, iOW.AARange, 0xFF80FF00)
  272. end
  273.  
  274. if EParticle then
  275. DrawCircle(EParticle.x, EParticle.y, EParticle.z, ERadius, 0xFF80FF00)
  276. end
  277.  
  278. if drawPrediction then
  279. if myHero:CanUseSpell(_Q) == READY and ValidTarget(ts.target) and GetQPrediction(ts.target) ~= nil then
  280. tpQCollision:DrawCollision(myHero, GetQPrediction(ts.target))
  281. end
  282.  
  283. if VIP_USER and myHero:CanUseSpell(_E) == READY and ValidTarget(ts.target) then
  284. local _,_,tempEPos = tpE:GetPrediction(ts.target)
  285. local EPos = tpE:GetHitChance(ts.target) > minHitChance and tempEPos or nil
  286. if EPos then
  287. DrawCircle(EPos.x, EPos.y, EPos.z, 275, 0xFFFF0000)
  288. end
  289. end
  290. end
  291.  
  292. if ValidTarget(ts.target) then
  293. for i = 1, 10 do
  294. DrawCircle(ts.target.x, ts.target.y, ts.target.z, 90+i, 0xFFFF0000)
  295. end
  296. end
  297.  
  298. for i, minion in ipairs(enemyMinions.objects) do
  299. if minion and ValidTarget(minion, QRange) then
  300. if minion.health < (getDmg("AD", minion, myHero) + (TargetHaveBuff("luxilluminatingfraulein", minion) and getDmg("P", minion, myHero) or 0)) then
  301. for j = 1, 3 do
  302. DrawCircle(minion.x, minion.y, minion.z, 50+j, 0xFF80FF00)
  303. end
  304. elseif minion.health < getDmg("E", minion, myHero) then
  305. for j = 1, 3 do
  306. DrawCircle(minion.x, minion.y, minion.z, 50+j, 0xFFFF0000)
  307. end
  308. end
  309. end
  310. end
  311. end
  312. end
  313.  
  314. function OnGainBuff(unit, buff)
  315. if buff.name == "luxilluminatingfraulein" then
  316. Debuffed[unit.networkID] = true
  317. end
  318. end
  319.  
  320. function OnLoseBuff(unit, buff)
  321. if buff.name == "luxilluminatingfraulein" then
  322. Debuffed[unit.networkID] = nil
  323. end
  324. end
  325.  
  326. --[[ Combat Functions ]]--
  327.  
  328. function newPewPewTesting() -- Experimental
  329. tpProQ:EnableTarget(myHero, false)
  330. tpProE:EnableTarget(myHero, false)
  331. tpProR:EnableTarget(myHero, false)
  332. if ts.target.canMove and myHero:CanUseSpell(_Q) == READY then
  333. tpProQ:EnableTarget(ts.target, true)
  334. elseif not ts.target.canMove then
  335. local calcDmg = calculateDamage(ts.target, true, true)
  336. local passiveOn = TargetHaveBuff("luxilluminatingfraulein", ts.target)
  337. if calcDmg.E + (passiveOn and calcDmg.passive or 0) > ts.target.health then
  338. if myHero:CanUseSpell(_E) == READY and not EParticle then
  339. tpProE:EnableTarget(ts.target, true)
  340. TriggerEOnLand = true
  341. TriggerEOnLandFarm = false
  342. elseif EParticle and myHero:CanUseSpell(_E) == READY and GetDistance(EParticle, ts.target) < ERadius then
  343. CastSpell(_E)
  344. end
  345. elseif calcDmg.Q + (passiveOn and calcDmg.passive or 0) > ts.target.health then
  346. if myHero:CanUseSpell(_Q) == READY then tpProQ:EnableTarget(ts.target, true) end
  347. elseif QPos and EPos and calcDmg.Q + calcDmg.E + (passiveOn and calcDmg.passive * 2 or calcDmg.passive) > ts.target.health then
  348. if myHero:CanUseSpell(_Q) == READY then tpProQ:EnableTarget(ts.target, true) end
  349. if myHero:CanUseSpell(_E) == READY and not EParticle then
  350. tpProE:EnableTarget(ts.target, true)
  351. TriggerEOnLand = true
  352. TriggerEOnLandFarm = false
  353. elseif EParticle and myHero:CanUseSpell(_E) == READY and GetDistance(EParticle, ts.target) < ERadius then
  354. CastSpell(_E)
  355. end
  356. elseif ((calcDmg.DFG > 0 or calcDmg.BLACKFIRE > 0) and 1.2 * (calcDmg.Q + calcDmg.E) or (calcDmg.Q + calcDmg.E)) + calcDmg.items + calcDmg.ignite > ts.target.health then
  357. for item, itemInfo in pairs(items.itemsList) do
  358. if itemInfo.ready and itemInfo.useOnKill then
  359. CastSpell(itemInfo.slot, ts.target)
  360. end
  361. end
  362. if myHero:CanUseSpell(_Q) == READY then tpProQ:EnableTarget(ts.target, true) end
  363. if myHero:CanUseSpell(_E) == READY and not EParticle then
  364. tpProE:EnableTarget(ts.target, true)
  365. TriggerEOnLand = true
  366. TriggerEOnLandFarm = false
  367. elseif EParticle and myHero:CanUseSpell(_E) == READY and GetDistance(EParticle, ts.target) < ERadius then
  368. CastSpell(_E)
  369. end
  370. if igniteSlot and myHero:CanUseSpell(igniteSlot) == READY then CastSpell(igniteSlot, ts.target) end
  371. elseif iLuxConfig.UseUlt and myHero:CanUseSpell(_R) == READY and RPos and calcDmg.total > ts.target.health then
  372. for item, itemInfo in pairs(items.itemsList) do
  373. if itemInfo.ready and itemInfo.useOnKill then
  374. CastSpell(itemInfo.slot, ts.target)
  375. end
  376. end
  377. if myHero:CanUseSpell(_Q) == READY then tpProQ:EnableTarget(ts.target, true) end
  378. if myHero:CanUseSpell(_E) == READY and not EParticle then
  379. tpProE:EnableTarget(ts.target, true)
  380. TriggerEOnLand = true
  381. TriggerEOnLandFarm = false
  382. elseif EParticle and myHero:CanUseSpell(_E) == READY and GetDistance(EParticle, ts.target) < ERadius then
  383. CastSpell(_E)
  384. end
  385. if igniteSlot and myHero:CanUseSpell(igniteSlot) == READY then CastSpell(igniteSlot, ts.target) end
  386. if myHero:CanUseSpell(_R) == READY then tpProR:EnableTarget(ts.target, true) end
  387. else
  388. if myHero:CanUseSpell(_Q) == READY then tpProQ:EnableTarget(ts.target, true) end
  389. if myHero:CanUseSpell(_E) == READY and not EParticle then
  390. tpProE:EnableTarget(ts.target, true)
  391. TriggerEOnLand = true
  392. TriggerEOnLandFarm = false
  393. elseif EParticle and myHero:CanUseSpell(_E) == READY and GetDistance(EParticle, ts.target) < ERadius then
  394. CastSpell(_E)
  395. end
  396. end
  397. elseif myHero:CanUseSpell(_E) == READY and EPos and (not OnlyEWhenQNotReadyAndTargetCanMove or myHero:CanUseSpell(_Q) ~= READY) then
  398. if not EParticle then
  399. tpProE:EnableTarget(ts.target, true)
  400. TriggerEOnLand = true
  401. TriggerEOnLandFarm = false
  402. elseif EParticle and myHero:CanUseSpell(_E) == READY and GetDistance(EParticle, ts.target) < ERadius then
  403. CastSpell(_E)
  404. end
  405. end
  406. end
  407.  
  408. function newPewPew()
  409. local QPos = myHero:CanUseSpell(_Q) == READY and GetQPrediction(ts.target)
  410. local EPos = myHero:CanUseSpell(_E) == READY and GetEPrediction(ts.target) or EParticle
  411. local RPos = myHero:CanUseSpell(_R) == READY and GetRPrediction(ts.target)
  412. if ts.target.canMove and myHero:CanUseSpell(_Q) == READY and QPos then
  413. CastSpell(_Q, QPos.x, QPos.z)
  414. elseif not ts.target.canMove then
  415. local calcDmg = calculateDamage(ts.target, true, true, (QPos or 1), (EPos or 1))
  416. local passiveOn = TargetHaveBuff("luxilluminatingfraulein", ts.target)
  417. if calcDmg.E + (passiveOn and calcDmg.passive or 0) > ts.target.health then
  418. if myHero:CanUseSpell(_E) == READY and not EParticle and EPos then
  419. CastSpell(_E, EPos and EPos.x or ts.target.x, EPos and EPos.z or ts.target.z)
  420. TriggerEOnLand = true
  421. TriggerEOnLandFarm = false
  422. elseif EParticle and myHero:CanUseSpell(_E) == READY and GetDistance(EParticle, ts.target) < ERadius then
  423. CastSpell(_E)
  424. end
  425. elseif calcDmg.Q + (passiveOn and calcDmg.passive or 0) > ts.target.health then
  426. if myHero:CanUseSpell(_Q) == READY then CastSpell(_Q, QPos and QPos.x or ts.target.x, QPos and QPos.z or ts.target.z) end
  427. elseif QPos and EPos and calcDmg.Q + calcDmg.E + (passiveOn and calcDmg.passive * 2 or calcDmg.passive) > ts.target.health then
  428. if myHero:CanUseSpell(_Q) == READY then CastSpell(_Q, QPos and QPos.x or ts.target.x, QPos and QPos.z or ts.target.z) end
  429. if myHero:CanUseSpell(_E) == READY and not EParticle and EPos then
  430. CastSpell(_E, EPos and EPos.x or ts.target.x, EPos and EPos.z or ts.target.z)
  431. TriggerEOnLand = true
  432. TriggerEOnLandFarm = false
  433. elseif EParticle and myHero:CanUseSpell(_E) == READY and GetDistance(EParticle, ts.target) < ERadius then
  434. CastSpell(_E)
  435. end
  436. elseif (calcDmg.DFG > 0 and 1.2 * ((QPos and calcDmg.Q or 0) + (EPos and calcDmg.E or 0)) or (QPos and calcDmg.Q or 0) + (EPos and calcDmg.E or 0)) + calcDmg.items + calcDmg.ignite > ts.target.health then
  437. for item, itemInfo in pairs(items.itemsList) do
  438. if itemInfo.ready and itemInfo.useOnKill then
  439. CastSpell(itemInfo.slot, ts.target)
  440. end
  441. end
  442. if myHero:CanUseSpell(_Q) == READY then CastSpell(_Q, QPos and QPos.x or ts.target.x, QPos and QPos.z or ts.target.z) end
  443. if myHero:CanUseSpell(_E) == READY and not EParticle and EPos then
  444. CastSpell(_E, EPos and EPos.x or ts.target.x, EPos and EPos.z or ts.target.z)
  445. TriggerEOnLand = true
  446. TriggerEOnLandFarm = false
  447. elseif EParticle and myHero:CanUseSpell(_E) == READY and GetDistance(EParticle, ts.target) < ERadius then
  448. CastSpell(_E)
  449. end
  450. if igniteSlot and myHero:CanUseSpell(igniteSlot) == READY then CastSpell(igniteSlot, ts.target) end
  451. elseif iLuxConfig.UseUlt and myHero:CanUseSpell(_R) == READY and RPos and calcDmg.total > ts.target.health then
  452. for item, itemInfo in pairs(items.itemsList) do
  453. if itemInfo.ready and itemInfo.useOnKill then
  454. CastSpell(itemInfo.slot, ts.target)
  455. end
  456. end
  457. if myHero:CanUseSpell(_Q) == READY then CastSpell(_Q, QPos and QPos.x or ts.target.x, QPos and QPos.z or ts.target.z) end
  458. if myHero:CanUseSpell(_E) == READY and not EParticle and EPos then
  459. CastSpell(_E, EPos and EPos.x or ts.target.x, EPos and EPos.z or ts.target.z)
  460. TriggerEOnLand = true
  461. TriggerEOnLandFarm = false
  462. elseif EParticle and myHero:CanUseSpell(_E) == READY and GetDistance(EParticle, ts.target) < ERadius then
  463. CastSpell(_E)
  464. end
  465. if igniteSlot and myHero:CanUseSpell(igniteSlot) == READY then CastSpell(igniteSlot, ts.target) end
  466. CastSpell(_R, RPos and RPos.x or ts.target.x, RPos and RPos.z or ts.target.z)
  467. else
  468. if QPos then CastSpell(_Q, QPos.x, QPos.z) end
  469. if EPos then
  470. if not EParticle then
  471. CastSpell(_E, EPos and EPos.x or ts.target.x, EPos and EPos.z or ts.target.z)
  472. TriggerEOnLand = true
  473. TriggerEOnLandFarm = false
  474. elseif GetDistance(EParticle, ts.target) < ERadius then
  475. CastSpell(_E)
  476. end
  477. end
  478. end
  479. elseif myHero:CanUseSpell(_E) == READY and EPos and (not OnlyEWhenQNotReadyAndTargetCanMove or myHero:CanUseSpell(_Q) ~= READY) then
  480. if not EParticle then
  481. CastSpell(_E, EPos.x, EPos.z)
  482. TriggerEOnLand = true
  483. TriggerEOnLandFarm = false
  484. elseif GetDistance(EParticle, ts.target) < ERadius then
  485. CastSpell(_E)
  486. end
  487. end
  488. end
  489.  
  490. function PewPew()
  491. if ValidTarget(ts.target) then
  492. local QPos = GetQPrediction(ts.target)
  493. local EPos = GetEPrediction(ts.target)
  494. if ts.target.canMove and myHero:CanUseSpell(_Q) == READY and QPos then
  495. CastSpell(_Q, QPos.x, QPos.z)
  496. QStatus = 1
  497. elseif not ts.target.canMove then
  498. local calcDmg = calculateDamage(ts.target, true, true, QPos, EPos)
  499. if calcDmg.E > ts.target.health then
  500. if not EParticle then
  501. CastSpell(_E, ts.target.x, ts.target.z)
  502. TriggerEOnLand = true
  503. TriggerEOnLandFarm = false
  504. elseif GetDistance(EParticle, ts.target) < ERadius then
  505. CastSpell(_E)
  506. end
  507. elseif QPos and calcDmg.Q > ts.target.health then
  508. CastSpell(_Q, QPos.x, QPos.z)
  509. elseif QPos and calcDmg.Q + calcDmg.E > ts.target.health then
  510. CastSpell(_Q, QPos.x, QPos.z)
  511. if not EParticle then
  512. CastSpell(_E, ts.target.x, ts.target.z)
  513. TriggerEOnLand = true
  514. TriggerEOnLandFarm = false
  515. elseif GetDistance(EParticle, ts.target) < ERadius then
  516. CastSpell(_E)
  517. end
  518. elseif (calcDmg.DFG > 0 and 1.2 * ((QPos and calcDmg.Q or 0) + calcDmg.E) or (QPos and calcDmg.Q or 0) + calcDmg.E) + calcDmg.items + calcDmg.ignite > ts.target.health then
  519. for item, itemInfo in pairs(items.itemsList) do
  520. if itemInfo.ready then
  521. CastSpell(itemInfo.slot, ts.target)
  522. end
  523. end
  524. if QPos then CastSpell(_Q, QPos.x, QPos.z) end
  525. if not EParticle then
  526. CastSpell(_E, ts.target.x, ts.target.z)
  527. TriggerEOnLand = true
  528. TriggerEOnLandFarm = false
  529. elseif GetDistance(EParticle, ts.target) < ERadius then
  530. CastSpell(_E)
  531. end
  532. if igniteSlot then CastSpell(igniteSlot, ts.target) end
  533. elseif iLuxConfig.UseUlt and (QPos and calcDmg.total or calcDmg.total - calcDmg.Q) > ts.target.health then
  534. for item, itemInfo in pairs(items.itemsList) do
  535. if itemInfo.ready then
  536. CastSpell(itemInfo.slot, ts.target)
  537. end
  538. end
  539. if QPos then CastSpell(_Q, QPos.x, QPos.z) end
  540. if not EParticle then
  541. CastSpell(_E, ts.target.x, ts.target.z)
  542. TriggerEOnLand = true
  543. TriggerEOnLandFarm = false
  544. elseif GetDistance(EParticle, ts.target) < ERadius then
  545. CastSpell(_E)
  546. end
  547. if igniteSlot then CastSpell(igniteSlot, ts.target) end
  548. CastSpell(_R, ts.target.x, ts.target.z)
  549. else
  550. if QPos then CastSpell(_Q, QPos.x, QPos.z) end
  551. if not EParticle then
  552. CastSpell(_E, ts.target.x, ts.target.z)
  553. TriggerEOnLand = true
  554. TriggerEOnLandFarm = false
  555. elseif GetDistance(EParticle, ts.target) < ERadius then
  556. CastSpell(_E)
  557. end
  558. end
  559. elseif myHero:CanUseSpell(_E) == READY and EPos and QStatus ~= 3 and (OnlyEWhenQNotReadyAndTargetCanMove and myHero:CanUseSpell(_Q) ~= READY or not OnlyEWhenQNotReadyAndTargetCanMove) then
  560. if not EParticle then
  561. CastSpell(_E, EPos.x, EPos.z)
  562. TriggerEOnLand = true
  563. TriggerEOnLandFarm = false
  564. elseif GetDistance(EParticle, ts.target) < ERadius then
  565. CastSpell(_E)
  566. end
  567. end
  568. end
  569. end
  570.  
  571. function Poke()
  572. if myHero:CanUseSpell(_E) == READY then
  573. if not EParticle then
  574. local EPos = GetEPrediction(ts.target)
  575. if EPos then
  576. CastSpell(_E, EPos.x, EPos.z)
  577. TriggerEOnLand = true
  578. TriggerEOnLandFarm = false
  579. end
  580. elseif GetDistance(EParticle, ts.target) < ERadius then
  581. CastSpell(_E)
  582. end
  583. end
  584. end
  585.  
  586. function autoFarm()
  587. local killableMinions = {}
  588. local killablePoints = {}
  589. for i, minion in ipairs(enemyMinions.objects) do
  590. if minion and minion.valid and ValidTarget(minion) and (TargetHaveBuff("luxilluminatingfraulein", minion) and getDmg("P", minion, myHero) + getDmg("E", minion, myHero) or getDmg("E", minion, myHero)) > minion.health then
  591. table.insert(killableMinions, minion)
  592. table.insert(killablePoints, Vector(minion))
  593. end
  594. end
  595. if myHero:CanUseSpell(_E) == READY and iLuxConfig.useEFarm then
  596. if not EParticle then
  597. if #killableMinions >= minMinionsForEFarm then
  598. local mec = MEC(killablePoints)
  599. local spellPos = mec:Compute().center
  600. local PosMinionCount = 0
  601. for i, minion in ipairs(killableMinions) do
  602. if GetDistance(minion, spellPos) < ERadius then
  603. PosMinionCount = PosMinionCount + 1
  604. if PosMinionCount >= 2 then
  605. CastSpell(_E, spellPos.x, spellPos.z)
  606. TriggerEOnLand = false
  607. TriggerEOnLandFarm = true
  608. return
  609. end
  610. end
  611. end
  612. end
  613. else
  614. local PosMinionCount = 0
  615. for i, minion in ipairs(killableMinions) do
  616. if GetDistance(minion, EParticle) < ERadius then
  617. PosMinionCount = PosMinionCount + 1
  618. if PosMinionCount >= minMinionsForEFarm then
  619. CastSpell(_E)
  620. return
  621. end
  622. end
  623. end
  624. end
  625. end
  626. for i, minion in ipairs(killableMinions) do
  627. if minion and minion.valid and ValidTarget(minion) and (TargetHaveBuff("luxilluminatingfraulein", minion) and getDmg("P", minion, myHero) + getDmg("AD", minion, myHero) * 1.1 or getDmg("AD", minion, myHero) * 1.1) > minion.health then
  628. myHero:Attack(minion)
  629. return
  630. end
  631. end
  632. if iLuxConfig.moveToMouseFarm then
  633. myHero:MoveTo(mousePos.x, mousePos.z)
  634. end
  635. end
  636.  
  637. function AutoUlt()
  638. if myHero:CanUseSpell(_R) == READY then
  639. for i, enemy in ipairs(GetEnemyHeroes()) do
  640. if ValidTarget(enemy) and (TargetHaveBuff("luxilluminatingfraulein", enemy) and getDmg("P", enemy, myHero) + getDmg("R", enemy, myHero) or getDmg("R", enemy, myHero)) > enemy.health then
  641. if iLuxConfig.ultAlert then
  642. if pingTimer[enemy.charName] == nil or pingTimer[enemy.charName] < GetTickCount() - 10000 then
  643. PingSignal(PING_NORMAL, enemy.x, enemy.y, enemy.z, 2)
  644. pingTimer[enemy.charName] = GetTickCount()
  645. end
  646. end
  647. --if ValidTarget(enemy, RRange) and iLuxConfig.AutoUlt and (not ts.target or (enemy.networkID ~= ts.target.networkID or (not EParticle or myHero:CanUseSpell(_E) == READY))) then
  648. if ValidTarget(enemy, RRange) and iLuxConfig.AutoUlt then
  649. --if iLuxConfig.tpPro then tpProR:EnableTarget(enemy, true) end
  650. local RPos = GetRPrediction(enemy)
  651. if RPos then
  652. CastSpell(_R, RPos.x, RPos.z)
  653. return
  654. end
  655. end
  656. end
  657. end
  658. end
  659. --tpProR:EnableTarget(myHero, false)
  660. end
  661.  
  662. function AutoTriggerE()
  663. if TriggerEOnLandFarm then
  664. CastSpell(_E)
  665. return
  666. else
  667. local count = 0
  668. for i, enemy in ipairs(GetEnemyHeroes()) do
  669. if ValidTarget(enemy) and GetDistance(enemy, EParticle) + GetDistance(enemy, enemy.minBBox)/2 < ERadius then
  670. if TriggerEOnLand then
  671. CastSpell(_E)
  672. return
  673. else
  674. count = count + 1
  675. if count >= iLuxConfig.AutoTriggerEMin then
  676. CastSpell(_E)
  677. return
  678. end
  679. end
  680. end
  681. end
  682. end
  683. end
  684.  
  685. function StealTzeBuffs()
  686. if myHero:CanUseSpell(_R) == READY then
  687. for _, jungleMob in pairs(jungleObjects) do
  688. if jungleMob and jungleMob.isCamp then
  689. local tempMob = jungleMob.object
  690. if tempMob ~= nil and tempMob.valid and tempMob.visible and not tempMob.dead and GetDistance(tempMob) < RRange then
  691. if iLuxConfig.NoRageStealz then
  692. for _, ally in pairs(FriendlySmite) do
  693. if GetDistance(ally, tempMob) < 600 then return end
  694. end
  695. end
  696. if getDmg("R", tempMob, myHero) > tempMob.health then
  697. CastSpell(_R, tempMob.x, tempMob.z)
  698. end
  699. end
  700. end
  701. end
  702. end
  703. end
  704.  
  705. function AutoIgnite()
  706. if igniteSlot and myHero:CanUseSpell(igniteSlot) == READY then
  707. for i, enemy in ipairs(GetEnemyHeroes()) do
  708. if ValidTarget(enemy, igniteRange) and enemy.health < getDmg("IGNITE", enemy, myHero) then
  709. CastSpell(igniteSlot, enemy)
  710. end
  711. end
  712. end
  713. end
  714.  
  715. --[[ Prediction and Calculations ]]--
  716.  
  717. function GetQPrediction(enemy)
  718. if iLuxConfig.tpPro then
  719. --local tpProPosSub = tpProPos[_Q][enemy.networkID]
  720. --if tpProPosSub and CurrentTick - tpProPosSub.updateTick < tpProMaxTick then
  721. -- local QPos = tpProPosSub.pos
  722. -- if QPos then
  723. -- local willCollide, collideArray = tpQCollision:GetMinionCollision(myHero, QPos)
  724. -- if not willCollide or (iLuxConfig.QWithSingleCollide and #collideArray <= 1) then
  725. -- return QPos
  726. -- else
  727. -- return nil
  728. -- end
  729. -- else
  730. -- return nil
  731. -- end
  732. --else
  733. -- return nil
  734. --end
  735. local QPos, _, QHitChance = tpProQ:GetPrediction(enemy)
  736. if minHitChance ~= 0 and QHitChance and QHitChance < minHitChance or GetDistance(QPos) > QRange then return nil end
  737. local willCollide, collideArray = tpQCollision:GetMinionCollision(myHero, QPos)
  738. if not willCollide or (iLuxConfig.QWithSingleCollide and #collideArray <= 1) then
  739. return QPos
  740. else
  741. return nil
  742. end
  743. elseif VIP_USER then
  744. if minHitChance ~= 0 and tpQ:GetHitChance(enemy) < minHitChance then return nil end
  745. local _,_,QPos = tpQ:GetPrediction(enemy)
  746. local willCollide, collideArray = tpQCollision:GetMinionCollision(myHero, QPos)
  747. if not willCollide or (iLuxConfig.QWithSingleCollide and #collideArray <= 1) then
  748. return QPos
  749. else
  750. return nil
  751. end
  752. else
  753. return tpQ:GetPrediction(enemy)
  754. end
  755. end
  756.  
  757. function GetEPrediction(enemy)
  758. if iLuxConfig.tpPro then
  759. --local tpProPosSub = tpProPos[_E][enemy.networkID]
  760. --return tpProPosSub and CurrentTick - tpProPosSub.updateTick < tpProMaxTick and tpProPosSub.pos or nil
  761. local EPos, _, EHitChance = tpProE:GetPrediction(enemy)
  762. if minHitChance == 0 or not EHitChance or EHitChance > minHitChance or GetDistance(EPos) < ERange then return EPos end
  763. elseif VIP_USER then
  764. if minHitChance ~= 0 and tpE:GetHitChance(enemy) < minHitChance then return nil end
  765. local _,_,EPos = tpE:GetPrediction(enemy)
  766. return EPos
  767. else
  768. return tpE:GetPrediction(enemy)
  769. end
  770. end
  771.  
  772. function GetRPrediction(enemy)
  773. if iLuxConfig.tpPro then
  774. --local tpProPosSub = tpProPos[_E][enemy.networkID]
  775. --if tpProPosSub and CurrentTick - tpProPosSub.updateTick < tpProMaxTick then
  776. -- return tpProPosSub.pos or nil
  777. ----else
  778. ---- local RPos, _, hitchance = tpProR:GetPrediction(enemy)
  779. ---- if RPos and (minHitChance == 0 or hitchance > minHitChance) then
  780. ---- return RPos
  781. ---- end
  782. --end
  783. local RPos, _, RHitChance = tpProR:GetPrediction(enemy)
  784. if minHitChance == 0 or not RHitChance or RHitChance > minHitChance or GetDistance(RPos) < RRange then return RPos end
  785. elseif VIP_USER then
  786. if minHitChance ~= 0 and tpR:GetHitChance(enemy) < minHitChance then return nil end
  787. local _,_,RPos = tpR:GetPrediction(enemy)
  788. return RPos
  789. else
  790. return tpR:GetPrediction(enemy)
  791. end
  792. end
  793.  
  794. function calculateDamage(enemy, checkRange, readyCheck, QPos, EPos)
  795. --local QPos = GetQPrediction(enemy)
  796. --local _,_,tempEPos = tpE:GetPrediction(enemy)
  797. --local EPos = tpE:GetHitChance(enemy) > minHitChance and tempEPos or nil
  798. local safeNet = 1 - damageSafetyNet / 100
  799. local returnDamage = {}
  800. returnDamage.Qbase = (( (myHero:CanUseSpell(_Q) == READY or not readyCheck) and ((iLuxConfig.tpPro and Testing) or ((QPos and QPos ~= 1 and GetDistance({x = QPos.x, z = QPos.z}) < QRange or (QPos ~= 1 and GetDistance(enemy) < QRange)) and not checkRange)) and getDmg("Q", enemy, myHero)) or 0 )
  801. --returnDamage.Wbase = (( (myHero:CanUseSpell(_W) == READY or not readyCheck) and (GetDistance(enemy) < WRange or not checkRange) and getDmg("W", enemy, myHero)) or 0 )
  802. returnDamage.Ebase = (( (myHero:CanUseSpell(_E) == READY or not readyCheck) and ((iLuxConfig.tpPro and Testing) or ((EPos and EPos ~= 1 and (EPos ~= EParticle and GetDistance({x = EPos.x, z = EPos.z}) < ERange or GetDistance(EParticle, enemy) < ERadius) or (EPos ~= 1 and GetDistance(enemy) < ERange)) and not checkRange)) and getDmg("E", enemy, myHero)) or 0 )
  803. returnDamage.Rbase = (( (myHero:CanUseSpell(_R) == READY or not readyCheck) and (GetDistance(enemy) < RRange or not checkRange) and getDmg("R", enemy, myHero)) or 0 )
  804. returnDamage.DFG = (( (items.itemsList["DFG"].ready or (items.itemsList["DFG"].slot and not readyCheck)) and (GetDistance(enemy) < defaultItemRange or not checkRange) and getDmg("DFG", enemy, myHero)) or 0 )
  805. returnDamage.HXG = (( (items.itemsList["HXG"].ready or (items.itemsList["HXG"].slot and not readyCheck)) and (GetDistance(enemy) < defaultItemRange or not checkRange) and getDmg("HXG", enemy, myHero)) or 0 )
  806. returnDamage.BWC = (( (items.itemsList["BWC"].ready or (items.itemsList["BWC"].slot and not readyCheck)) and (GetDistance(enemy) < defaultItemRange or not checkRange) and getDmg("BWC", enemy, myHero)) or 0 )
  807. returnDamage.BLACKFIRE = (( (items.itemsList["BLACKFIRE"].ready or (items.itemsList["BLACKFIRE"].slot and not readyCheck)) and (GetDistance(enemy) < defaultItemRange or not checkRange) and getDmg("BLACKFIRE", enemy, myHero)) or 0 )
  808. returnDamage.LIANDRYS = (( items.passiveItemsList["LIANDRYS"].slot and getDmg("LIANDRYS", enemy, myHero)) or 0)
  809. --returnDamage.BLACKFIRE = (( items.passiveItemsList["BLACKFIRE"].slot and getDmg("BLACKFIRE", enemy, myHero)) or 0)
  810. returnDamage.ignite = (( igniteSlot and (myHero:CanUseSpell(igniteSlot) == READY or not readyCheck) and (GetDistance(enemy) < igniteRange or not checkRange) and getDmg("IGNITE", enemy, myHero)) or 0)
  811. returnDamage.passive = getDmg("P", enemy, myHero)
  812.  
  813. returnDamage.onSpell = (returnDamage.LIANDRYS + returnDamage.BLACKFIRE) * safeNet
  814. returnDamage.Q = (returnDamage.Qbase + returnDamage.onSpell) * safeNet
  815. --returnDamage.W = (returnDamage.Wbase + returnDamage.onSpell) * safeNet
  816. returnDamage.E = (returnDamage.Ebase + returnDamage.onSpell) * safeNet
  817. returnDamage.R = (returnDamage.Rbase + returnDamage.onSpell) * safeNet
  818. returnDamage.QWE = returnDamage.Q --[[+ returnDamage.W]] + returnDamage.E + returnDamage.passive * safeNet
  819. returnDamage.QWER = returnDamage.QWE + returnDamage.R
  820. returnDamage.items = (returnDamage.DFG + returnDamage.HXG + returnDamage.BWC) * safeNet
  821.  
  822. returnDamage.total = ((returnDamage.DFG > 0 and 1.2 * returnDamage.QWER or returnDamage.QWER) + returnDamage.items + returnDamage.ignite) * safeNet
  823.  
  824. return returnDamage
  825. end
  826.  
  827. function updateItems()
  828. for item, itemInfo in pairs(items.itemsList) do
  829. itemInfo.slot = GetInventorySlotItem(itemInfo.id)
  830. itemInfo.ready = (itemInfo.slot and myHero:CanUseSpell(itemInfo.slot) == READY or false)
  831. end
  832. for item, itemInfo in pairs(items.passiveItemsList) do
  833. itemInfo.slot = GetInventorySlotItem(itemInfo.id)
  834. end
  835. items["ZHONYAS"].slot = GetInventorySlotItem(items["ZHONYAS"].id)
  836. items["ZHONYAS"].ready = (items["ZHONYAS"].slot and myHero:CanUseSpell(items["ZHONYAS"].slot) == READY or false)
  837. items["WOOGLETS"].slot = GetInventorySlotItem(items["WOOGLETS"].id)
  838. items["WOOGLETS"].ready = (items["WOOGLETS"].slot and myHero:CanUseSpell(items["WOOGLETS"].slot) == READY or false)
  839. end
  840.  
  841. function damageText()
  842. local damageTextList = {"Poor Enemy", "Ultimate!", "Nuke!", "Risky"}
  843. for i, enemy in ipairs(GetEnemyHeroes()) do
  844. if ValidTarget(enemy) then
  845. if updateTextTimers[enemy.charName] == nil then
  846. updateTextTimers[enemy.charName] = 30
  847. elseif updateTextTimers[enemy.charName] > 1 then
  848. updateTextTimers[enemy.charName] = updateTextTimers[enemy.charName] - 1
  849. elseif updateTextTimers[enemy.charName] == 1 then
  850. local calcDmg = calculateDamage(enemy, false, true)
  851. local killMode = (calcDmg.QWE > enemy.health and 1) or (calcDmg.R > enemy.health and 2) or (calcDmg.QWER > enemy.health and 3) or (calcDmg.total > enemy.health and 4) or 0
  852. if killMode > 0 then PrintFloatText(enemy, 0, damageTextList[killMode]) end
  853. updateTextTimers[enemy.charName] = 30
  854. end
  855. end
  856. end
  857. end
  858.  
  859. --[[ Garbage Bin ]]--
  860.  
  861. if VIP_USER then
  862. function TargetHaveBuff(BuffName, unit)
  863. return BuffName ~= "luxilluminatingfraulein" and TargetHaveBuff_Old(BuffName, unit) or Debuffed[unit.networkID]
  864. end
  865. else
  866. TargetHaveBuff = TargetHaveBuff_Old
  867. end
  868.  
  869. function OnProcessSpell(object, spell)
  870.  
  871. if object.isMe and spell.name == "LuxLightStrikeKugel" then lastEPos = spell.startPos end
  872.  
  873. if object == nil or spell == nil or not object.valid then return end
  874.  
  875. if ((items["WOOGLETS"].ready or items["ZHONYAS"].ready) and iLuxConfig.SmartSave) or (myHero:CanUseSpell(_W) == READY and iLuxConfig.AutoShield) then
  876. if ValidTarget(object) and not myHero.dead and not (object.name:find("Minion_") or object.name:find("Odin")) then
  877. if object.type == "obj_AI_Hero" then
  878. local spellType = getSpellType(object, spell.name)
  879. if spellType ~= nil then
  880.  
  881. -- Basic Attacks
  882. if spellType == "BAttack" or spellType == "CAttack" then
  883. local baseADmg = getDmg("AD", myHero, object)
  884. local onHitDmg = 0
  885. + ((GetInventoryHaveItem(3078, object) and getDmg("TRINITY", myHero, object)) or 0)
  886. + ((GetInventoryHaveItem(3186, object) and getDmg("KITAES", myHero, object)) or 0)
  887. + ((GetInventoryHaveItem(3087, object) and getDmg("STATIKK", myHero, object)) or 0)
  888. + ((GetInventoryHaveItem(3100, object) and getDmg("LICHBANE", myHero, object)) or 0)
  889. + ((GetInventoryHaveItem(3114, object) and getDmg("MALADY", myHero, object)) or 0)
  890. + ((GetInventoryHaveItem(3153, object) and getDmg("RUINEDKING", myHero, object)) or 0)
  891. + ((GetInventoryHaveItem(3042, object) and getDmg("MURAMANA", myHero, object)) or 0)
  892. + ((GetInventoryHaveItem(3091, object) and getDmg("WITSEND", myHero, object)) or 0)
  893. + ((GetInventoryHaveItem(3057, object) and getDmg("SHEEN", myHero, object)) or 0)
  894. + ((GetInventoryHaveItem(3025, object) and getDmg("ICEBORN", myHero, object)) or 0)
  895. + ((GetInventoryHaveItem(3184, object) and 80) or 0)
  896. local PhysDamage = (spellType == "BAttack" and (baseADmg + onHitDmg) * 1.07 + ((GetInventoryHaveItem(3209, object) and getDmg("SPIRITLIZARD", myHero, object)) or 0)) or (spellType == "CAttack" and (GetInventoryHaveItem(3031, object) and (baseADmg * 2.5 + onHitDmg) * 1.07 + ((GetInventoryHaveItem(3209, object) and getDmg("SPIRITLIZARD", myHero, object)) or 0)) or (baseADmg * 1.5 + onHitDmg) * 1.07 + ((GetInventoryHaveItem(3209, object) and getDmg("SPIRITLIZARD", myHero, object)) or 0))
  897.  
  898. if spell.endPos ~= nil and GetDistance(spell.endPos) < 50 then
  899. if myHero.health - PhysDamage < myHero.maxHealth * (iLuxConfig.SafeBet / 100) then
  900. if items["WOOGLETS"].ready and iLuxConfig.SmartSave then
  901. CastSpell(items["WOOGLETS"].slot)
  902. elseif items["ZHONYAS"].ready and iLuxConfig.SmartSave then
  903. CastSpell(items["ZHONYAS"].slot)
  904. end
  905. elseif myHero:CanUseSpell(_W) == READY and iLuxConfig.AutoShield and PhysDamage / myHero.maxHealth > AutoShieldPerc / 100 then
  906. local bestAlly = nil
  907. for i, tempAlly in ipairs(GetAllyHeroes()) do
  908. if GetDistance(tempAlly) < WRange then
  909. if bestAlly == nil or bestAlly.health > tempAlly.health then
  910. bestAlly = tempAlly
  911. end
  912. end
  913. end
  914. CastSpell(_W, bestAlly ~= nil and bestAlly.x or object.x, bestAlly ~= nil and bestAlly.z or object.z)
  915. end
  916. end
  917.  
  918. -- QWER Attacks
  919. elseif string.find("QWER", spellType) then
  920. local onHitSpellDmg = 0
  921. + ((GetInventoryHaveItem(3151, object) and getDmg("LIANDRYS", myHero, object)) or 0)
  922. + ((GetInventoryHaveItem(3042, object) and getDmg("MURAMANA",myHero, object)) or 0)
  923. + ((GetInventoryHaveItem(3188, object) and getDmg("BLACKFIRE", myHero, object)) or 0)
  924. local spellDamage = (getDmg(spellType, myHero, object) + onHitSpellDmg) * 1.07 + (GetInventoryHaveItem(3209) and getDmg("SPIRITLIZARD", myHero, object) or 0)
  925. local skillType, skillRadius, skillMaxDistance = skillData[object.charName][spellType]["type"], skillData[object.charName][spellType]["radius"], skillData[object.charName][spellType]["maxdistance"]
  926. if (skillType == 0 and checkhitaoe(object, spell.endPos, 80, myHero, 0)) or (skillType == 1 and checkhitlinepass(object, spell.endPos, skillRadius, skillMaxDistance, myHero, 50)) or (skillType == 2 and checkhitlinepoint(object, spell.endPos, skillRadius, myHero, 50)) or (skillType == 3 and checkhitaoe(object, spell.endPos, skillRadius, myHero, 50)) or (skillType == 4 and checkhitcone(object, spell.endPos, skillRadius, skillMaxDistance, myHero, 50)) or (skillType == 5 and checkhitwall(object, spell.endPos, skillRadius, skillMaxDistance, myHero, 50)) or (skillType == 6 and (checkhitlinepass(object, spell.endPos, skillRadius, skillMaxDistance, myHero, 50) or checkhitlinepass(object, Vector(object)*2-spell.endPos, skillRadius, skillMaxDistance, myHero, 50))) then
  927. if myHero.health - spellDamage < myHero.maxHealth * (iLuxConfig.SafeBet / 100) then
  928. if items["WOOGLETS"].ready and iLuxConfig.SmartSave then
  929. CastSpell(items["WOOGLETS"].slot)
  930. elseif items["ZHONYAS"].ready and iLuxConfig.SmartSave then
  931. CastSpell(items["ZHONYAS"].slot)
  932. elseif myHero:CanUseSpell(_W) == READY and iLuxConfig.AutoShield and spellDamage / myHero.maxHealth > AutoShieldPerc / 100 then
  933. local bestAlly = nil
  934. for i, tempAlly in ipairs(GetAllyHeroes()) do
  935. if GetDistance(tempAlly) < WRange then
  936. if bestAlly == nil or bestAlly.health > tempAlly.health then
  937. bestAlly = tempAlly
  938. end
  939. end
  940. end
  941. CastSpell(_W, bestAlly ~= nil and bestAlly.x or object.x, bestAlly ~= nil and bestAlly.z or object.z)
  942. end
  943. end
  944. end
  945. end
  946. end
  947. end
  948. end
  949. end
  950. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement