Advertisement
Guest User

Orbwalker

a guest
Jan 15th, 2018
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 23.01 KB | None | 0 0
  1.  
  2. -- globals
  3. __gsoOrb_loaded = false
  4. gsoLatency = Game.Latency() * 0.001
  5.  
  6. -- orbwalker class
  7. class "__gsoOrb"
  8.  
  9. -- init
  10. function __gsoOrb:__init()
  11. --print("Gamsteron | orbwalker loaded!")
  12. self.menu = MenuElement({type = MENU, id = "menu", name = "Gamsteron Orbwalker 0.08", leftIcon = "https://i.imgur.com/nahe4Ua.png"})
  13. self:_menu()
  14. __gsoOrb_loaded = true
  15. self.lAttack = 0 -- lastAttackTime
  16. self.lMove = 0 -- lastMoveTime
  17.  
  18. self.stopOrb = false
  19. self.stopSpell = false
  20. self.lastSpellT = {}
  21. self.inAAT = false
  22. self.canAASpell = true
  23.  
  24. self.endTime = myHero.attackData.endTime
  25. self.windUpT = myHero.attackData.windUpTime
  26. self.animT = myHero.attackData.animationTime
  27. self.firstAA = 0
  28. self.countAA = 0
  29.  
  30. self.dActions = {} -- delayedActions
  31. self.aAttacks = {} -- activeAttacks
  32. self.fastLC = true
  33. self.shouldWaitT = 0
  34. self.shouldWait = false
  35.  
  36. self.aMinions = {} -- allyMinions
  37. self.aMinionsC = 0
  38. self.eMinions = {} -- enemyMinions
  39. self.eMinionsC = 0
  40. self.eMinionsLH = {} -- enemyMinionsLastHitable
  41. self.eMinionsLHC = 0
  42. self.eMinionsLC = {} -- enemyMinionsLaneClearable
  43. self.eMinionsLCC = 0
  44. self.eMinionsLHS = {} -- enemyMinionsLastHitableSoon
  45. self.eMinionsLHSC = 0
  46. self.eMinionsLHD = {} -- drawLastHitableMinion
  47. self.eMinionsLHSD = {} -- drawLastHitableSoonMinion
  48.  
  49. Callback.Add('Tick', function() self:_tick1() end)
  50. Callback.Add('Tick', function() self:_tick2() end)
  51. Callback.Add('Draw', function() self:_draw() end)
  52. Callback.Add("WndMsg", function(msg, wParam) self:_wndmsg(msg, wParam) end)
  53.  
  54. end
  55.  
  56. -- menu
  57. function __gsoOrb:_menu()
  58. self.menu:MenuElement({name = "Attack", id = "attack", type = MENU, leftIcon = "https://i.imgur.com/DsGzSEv.png"})
  59. self.menu.attack:MenuElement({name = "Set cursorPos delay", id = "cDelay", value = 50, min = 50, max = 100, step = 5 })
  60. self.menu.attack:MenuElement({name = "lasthit delay", id = "lhDelay", value = 0, min = 0, max = 100, step = 5 })
  61. self.menu.attack:MenuElement({name = "AA delay -> attack speed", id = "asDelay", value = 0, min = 0, max = 100, step = 5 })
  62. self.menu:MenuElement({name = "Movement", id = "movement", type = MENU, leftIcon = "https://i.imgur.com/Utq5iah.png"})
  63. self.menu.movement:MenuElement({name = "Kite Delay", id = "kite", value = 25, min = 0, max = 100, step = 5 })
  64. self.menu.movement:MenuElement({name = "Humanizer Movement Delay", id = "humanizer", value = 200, min = 0, max = 300, step = 10 })
  65. self.menu:MenuElement({name = "Drawings", id = "draw", type = MENU, leftIcon = "https://i.imgur.com/GuE9yOL.png"})
  66. self.menu.draw:MenuElement({name = "Enable", id = "enable", value = true})
  67. self.menu.draw:MenuElement({name = "MyHero attack range", id = "me", type = MENU})
  68. self.menu.draw.me:MenuElement({name = "Enable", id = "enable", value = true})
  69. self.menu.draw.me:MenuElement({name = "Color", id = "color", color = Draw.Color(150, 49, 210, 0)})
  70. self.menu.draw.me:MenuElement({name = "Width", id = "width", value = 1, min = 1, max = 10})
  71. self.menu.draw:MenuElement({name = "Enemy attack range", id = "he", type = MENU})
  72. self.menu.draw.he:MenuElement({name = "Enable", id = "enable", value = true})
  73. self.menu.draw.he:MenuElement({name = "Color", id = "color", color = Draw.Color(150, 255, 0, 0)})
  74. self.menu.draw.he:MenuElement({name = "Width", id = "width", value = 1, min = 1, max = 10})
  75. self.menu.draw:MenuElement({name = "Cursor Posistion", id = "cpos", type = MENU})
  76. self.menu.draw.cpos:MenuElement({name = "Enable", id = "enable", value = true})
  77. self.menu.draw.cpos:MenuElement({name = "Color", id = "color", color = Draw.Color(150, 153, 0, 76)})
  78. self.menu.draw.cpos:MenuElement({name = "Width", id = "width", value = 5, min = 1, max = 10})
  79. self.menu.draw.cpos:MenuElement({name = "Radius", id = "radius", value = 250, min = 1, max = 300})
  80. self.menu.draw:MenuElement({name = "Farm", id = "farm", type = MENU})
  81. self.menu.draw.farm:MenuElement({name = "Enable", id = "enable", value = true})
  82. self.menu.draw.farm:MenuElement({name = "LastHitable", id = "lastHitable", type = MENU})
  83. self.menu.draw.farm.lastHitable:MenuElement({name = "Enable", id = "enable", value = true})
  84. self.menu.draw.farm.lastHitable:MenuElement({name = "Color", id = "color", color = Draw.Color(255, 255, 255, 255)})
  85. self.menu.draw.farm.lastHitable:MenuElement({name = "Width", id = "width", value = 10, min = 1, max = 10})
  86. self.menu.draw.farm.lastHitable:MenuElement({name = "Radius", id = "radius", value = 35, min = 1, max = 100})
  87. self.menu.draw.farm:MenuElement({name = "AlmostLastHitable", id = "almostLastHitable", type = MENU})
  88. self.menu.draw.farm.almostLastHitable:MenuElement({name = "Enable", id = "enable", value = true})
  89. self.menu.draw.farm.almostLastHitable:MenuElement({name = "Color", id = "color", color = Draw.Color(255, 255, 102, 102)})
  90. self.menu.draw.farm.almostLastHitable:MenuElement({name = "Width", id = "width", value = 10, min = 1, max = 10})
  91. self.menu.draw.farm.almostLastHitable:MenuElement({name = "Radius", id = "radius", value = 35, min = 1, max = 100})
  92. self.menu.draw:MenuElement({name = "Minion attacks", id = "minionAttacks", type = MENU})
  93. self.menu.draw.minionAttacks:MenuElement({name = "Enable", id = "enable", value = true})
  94. self.menu.draw.minionAttacks:MenuElement({name = "Color", id = "color", color = Draw.Color(255, 255, 102, 0)})
  95. self.menu.draw.minionAttacks:MenuElement({name = "Width", id = "width", value = 3, min = 1, max = 10})
  96. self.menu.draw.minionAttacks:MenuElement({name = "Radius", id = "radius", value = 10, min = 1, max = 100})
  97. self.menu:MenuElement({name = "Keys", id = "keys", type = MENU, leftIcon = "https://i.imgur.com/QXvoHmH.png"})
  98. self.menu.keys:MenuElement({name = "Combo Key", id = "combo", key = string.byte(" ")})
  99. self.menu.keys:MenuElement({name = "Harrass Key", id = "harras", key = string.byte("C")})
  100. self.menu.keys:MenuElement({name = "LastHit Key", id = "lastHit", key = string.byte("X")})
  101. self.menu.keys:MenuElement({name = "LaneClear Key", id = "laneClear", key = string.byte("V")})
  102. end
  103.  
  104. -- object manager
  105. function __gsoOrb:_valid(range, unit)
  106. if unit.distance < range and unit.dead == false and unit.isTargetable == true and unit.visible == true then
  107. return true
  108. end
  109. return false
  110. end
  111. function __gsoOrb:_addUnits()
  112. local countMinions = Game.MinionCount()
  113. for i = 1, countMinions do
  114. local minion = Game.Minion(i)
  115. if self:_valid(2000, minion) then
  116. if minion.isEnemy then
  117. self.eMinionsC = self.eMinionsC + 1
  118. self.eMinions[self.eMinionsC] = minion
  119. else
  120. self.aMinionsC = self.aMinionsC + 1
  121. self.aMinions[self.aMinionsC] = minion
  122. end
  123. end
  124. end
  125. end
  126. function __gsoOrb:_removeUnits()
  127. self.aMinions = {}
  128. self.aMinionsC = 0
  129. self.eMinions = {}
  130. self.eMinionsC = 0
  131. self.eMinionsLC = {}
  132. self.eMinionsLCC = 0
  133. self.eMinionsLH = {}
  134. self.eMinionsLHC = 0
  135. self.eMinionsLHS = {}
  136. self.eMinionsLHSC = 0
  137. end
  138.  
  139. -- delay action
  140. function __gsoOrb:_delayedPos()
  141. if self.dMouse ~= nil and GetTickCount() - self.dMouse[2] > self.dMouse[3] then
  142. self.dMouse[1]()
  143. self.dMouse = nil
  144. end
  145. end
  146.  
  147. -- predicted pos
  148. function __gsoOrb:_predPos(speed, pPos, unit)
  149. local result = unit.pos
  150. if unit.pathing.hasMovePath == true then
  151. local uPos = unit.pos
  152. local ePos = unit.pathing.endPos
  153. local distUP = pPos:DistanceTo(uPos)
  154. local distEP = pPos:DistanceTo(ePos)
  155. if distEP > distUP then
  156. result = uPos:Extended(ePos, 50+(unit.ms*(distUP / (speed - unit.ms))))
  157. else
  158. result = uPos:Extended(ePos, 50+(unit.ms*(distUP / (speed + unit.ms))))
  159. end
  160. end
  161. return result
  162. end
  163.  
  164. -- predicted hp
  165. function __gsoOrb:_isDead(target)
  166. local result = true
  167. for i = 1, self.eMinionsC do
  168. local eMin = self.eMinions[i]
  169. if target == eMin.handle then
  170. result = false
  171. break
  172. end
  173. end
  174. return result
  175. end
  176. function __gsoOrb:_possibleDmg(eMin, time)
  177. local result = 0
  178. for i = 1, self.aMinionsC do
  179. local aMin = self.aMinions[i]
  180. local aaData = aMin.attackData
  181. local aDmg = (aMin.totalDamage*(1+aMin.bonusDamagePercent))
  182. if aMin.pathing.hasMovePath == true or self:_isDead(aaData.target) == true then
  183. result = result + aDmg
  184. elseif aaData.target == eMin.handle then
  185. local endT = aaData.endTime
  186. local animT = aaData.animationTime
  187. local windUpT = aaData.windUpTime
  188. local pSpeed = aaData.projectileSpeed
  189. local pFlyT = pSpeed > 0 and aMin.pos:DistanceTo(eMin.pos) / pSpeed or 0
  190. local pStartT = endT - animT
  191. local pEndT = pStartT + pFlyT + windUpT
  192. local checkT = Game.Timer()
  193. pEndT = pEndT > checkT and pEndT or pEndT + animT + pFlyT
  194. while pEndT - checkT < time do
  195. result = result + aDmg
  196. pEndT = pEndT + aaData.animationTime + pFlyT
  197. end
  198. end
  199. end
  200. return result
  201. end
  202. function __gsoOrb:_setEnemyMinions()
  203. local mLH = self.menu.attack.lhDelay:Value()*0.001
  204. for i = 1, self.eMinionsC do
  205. local eMinion = self.eMinions[i]
  206. if eMinion.distance < myHero.range + myHero.boundingRadius + eMinion.boundingRadius - 30 then
  207. local eMinion_handle = eMinion.handle
  208. local eMinion_health = eMinion.health
  209. local myHero_aaData = myHero.attackData
  210. local myHero_pFlyTime = myHero_aaData.windUpTime + (eMinion.distance / myHero_aaData.projectileSpeed) + gsoLatency + 0.05 + self.menu.attack.lhDelay:Value()*0.001
  211. for k1,v1 in pairs(self.aAttacks) do
  212. for k2,v2 in pairs(self.aAttacks[k1]) do
  213. if v2.canceled == false and eMinion_handle == v2.to.handle then
  214. local checkT = Game.Timer()
  215. local pEndTime = v2.startTime + v2.pTime
  216.  
  217. if pEndTime > checkT and pEndTime - checkT < myHero_pFlyTime - mLH then
  218. eMinion_health = eMinion_health - v2.dmg
  219. end
  220. end
  221. end
  222. end
  223. local myHero_dmg = myHero.totalDamage + 3
  224. if eMinion_health - myHero_dmg < 0 then
  225. self.eMinionsLHC = self.eMinionsLHC + 1
  226. self.eMinionsLH[self.eMinionsLHC] = { eMinion, eMinion_health - myHero_dmg }
  227. else
  228. if eMinion.health - self:_possibleDmg(eMinion, self.animT*3) - myHero_dmg < 0 then
  229. self.shouldWait = true
  230. self.shouldWaitT = Game.Timer()
  231. self.eMinionsLHSC = self.eMinionsLHSC + 1
  232. self.eMinionsLHS[self.eMinionsLHSC] = eMinion
  233. else
  234. self.eMinionsLCC = self.eMinionsLCC + 1
  235. self.eMinionsLC[self.eMinionsLCC] = eMinion
  236. end
  237. end
  238. end
  239. end
  240. self.eMinionsLHD = self.eMinionsLH
  241. self.eMinionsLHSD = self.eMinionsLHS
  242. end
  243.  
  244. -- active attacks
  245. function __gsoOrb:_setActiveAA()
  246. for i = 1, self.aMinionsC do
  247. local aMinion = self.aMinions[i]
  248. local aHandle = aMinion.handle
  249. local aAAData = aMinion.attackData
  250. if aAAData.endTime > Game.Timer() then
  251. for i = 1, self.eMinionsC do
  252. local eMinion = self.eMinions[i]
  253. local eHandle = eMinion.handle
  254. if eHandle == aAAData.target then
  255. local checkT = Game.Timer()
  256. -- p -> projectile
  257. local pSpeed = aAAData.projectileSpeed
  258. local pFlyT = pSpeed > 0 and aMinion.pos:DistanceTo(eMinion.pos) / pSpeed or 0
  259. local pStartT = aAAData.endTime - aAAData.windDownTime
  260. if not self.aAttacks[aHandle] then
  261. self.aAttacks[aHandle] = {}
  262. end
  263. local aaID = math.floor(aAAData.endTime)
  264. if checkT < pStartT + pFlyT then
  265. if pSpeed > 0 then
  266. if checkT > pStartT then
  267. if not self.aAttacks[aHandle][aaID] then
  268. self.aAttacks[aHandle][aaID] = {
  269. canceled = false,
  270. speed = pSpeed,
  271. startTime = pStartT,
  272. pTime = pFlyT,
  273. pos = aMinion.pos:Extended(eMinion.pos, pSpeed*(checkT-pStartT)),
  274. from = aMinion,
  275. fromPos = aMinion.pos,
  276. to = eMinion,
  277. dmg = (aMinion.totalDamage*(1+aMinion.bonusDamagePercent))-eMinion.flatDamageReduction
  278. }
  279. end
  280. elseif aMinion.pathing.hasMovePath == true then
  281. --print("attack canceled")
  282. self.aAttacks[aHandle][aaID] = {
  283. canceled = true,
  284. from = aMinion
  285. }
  286. end
  287. elseif not self.aAttacks[aHandle][aaID] then
  288. self.aAttacks[aHandle][aaID] = {
  289. canceled = false,
  290. speed = pSpeed,
  291. startTime = pStartT - aAAData.windUpTime,
  292. pTime = aAAData.windUpTime,
  293. pos = aMinion.pos,
  294. from = aMinion,
  295. fromPos = aMinion.pos,
  296. to = eMinion,
  297. dmg = (aMinion.totalDamage*(1+aMinion.bonusDamagePercent))-eMinion.flatDamageReduction
  298. }
  299. end
  300. end
  301. break
  302. end
  303. end
  304. end
  305. end
  306. end
  307. function __gsoOrb:_handleActiveAA()
  308. local aAttacks2 = self.aAttacks
  309. for k1,v1 in pairs(aAttacks2) do
  310. local count = 0
  311. local checkT = Game.Timer()
  312. for k2,v2 in pairs(aAttacks2[k1]) do
  313. count = count + 1
  314. if v2.speed == 0 and (not v2.from or v2.from == nil or v2.from.dead) then
  315. --print("dead")
  316. self.aAttacks[k1] = nil
  317. break
  318. end
  319. if v2.canceled == false then
  320. local ranged = v2.speed > 0
  321. if ranged == true then
  322. self.aAttacks[k1][k2].pTime = v2.fromPos:DistanceTo(self:_predPos(v2.speed, v2.pos, v2.to)) / v2.speed
  323. end
  324. if checkT > v2.startTime + self.aAttacks[k1][k2].pTime - gsoLatency - 0.02 or not v2.to or v2.to == nil or v2.to.dead then
  325. self.aAttacks[k1][k2] = nil
  326. elseif ranged == true then
  327. self.aAttacks[k1][k2].pos = v2.fromPos:Extended(v2.to.pos, (checkT-v2.startTime)*v2.speed)
  328. end
  329. end
  330. end
  331. if count == 0 then
  332. --print("no active attacks")
  333. self.aAttacks[k1] = nil
  334. end
  335. end
  336. end
  337.  
  338. -- target selector
  339. function __gsoOrb:_comboT()
  340. local result = nil
  341. local min = 10000000
  342. for i = 1, Game.HeroCount() do
  343. local hero = Game.Hero(i)
  344. local armor = hero.armor - myHero.armorPen
  345. armor = armor > 0 and myHero.bonusArmorPenPercent * armor or armor
  346. local hp = hero.health + ( 2 * armor ) - ( hero.attackSpeed * hero.totalDamage ) - ( 1.5 * hero.ap )
  347. if hp < min and hero.isEnemy and self:_valid(myHero.range + myHero.boundingRadius + hero.boundingRadius - 30, hero) then
  348. min = hp
  349. result = hero
  350. end
  351. end
  352. return result
  353. end
  354. function __gsoOrb:_lastHitT()
  355. local result = nil
  356. local min = 10000000
  357. if self.eMinionsLHC > 0 then
  358. for i = 1, self.eMinionsLHC do
  359. local eMinionLH = self.eMinionsLH[i]
  360. local minion = eMinionLH[1]
  361. local hp = eMinionLH[2]
  362. if hp < min then
  363. min = hp
  364. result = minion
  365. end
  366. end
  367. end
  368. return result
  369. end
  370. function __gsoOrb:_laneClearT()
  371. local result = self:_lastHitT()
  372. if result == nil and self.eMinionsLHSC == 0 and self.shouldWait == false then
  373. result = self:_comboT()
  374. if result == nil then
  375. local min = 10000000
  376. for i = 1, self.eMinionsLCC do
  377. local minion = self.eMinionsLC[i]
  378. local hp = minion.health
  379. if hp < min then
  380. min = hp
  381. result = minion
  382. end
  383. end
  384. end
  385. end
  386. return result
  387. end
  388. function __gsoOrb:_harassT()
  389. local result = self:_lastHitT()
  390. return result == nil and self:_comboT() or result
  391. end
  392.  
  393. -- orb
  394. function __gsoOrb:_orb(unit)
  395. local checkT = Game.Timer()
  396. local mKite = self.menu.movement.kite:Value()*0.001
  397. local mHum = self.menu.movement.humanizer:Value()*0.001
  398. local mAS = self.menu.attack.asDelay:Value()*0.001
  399. local mDel = self.menu.attack.cDelay:Value()
  400. if self.stopOrb == false and self.stopSpell == false and unit ~= nil and (checkT + 0.13 - mAS > self.endTime or self.canAASpell == true) then
  401. -- checkT > self.lAttack + myHero.attackData.animationTime + 0.075 then
  402. self.canAASpell = false
  403. self.stopOrb = true
  404. self.lAttack = Game.Timer()
  405. Control.mouse_event(MOUSEEVENTF_RIGHTDOWN)
  406. Control.mouse_event(MOUSEEVENTF_RIGHTUP)
  407. local cPos = cursorPos
  408. Control.SetCursorPos(unit.pos)
  409. Control.mouse_event(MOUSEEVENTF_RIGHTDOWN)
  410. Control.mouse_event(MOUSEEVENTF_RIGHTUP)
  411. self.dActions[GetTickCount()] = { function() Control.SetCursorPos(cPos.x, cPos.y) end, mDel }
  412. elseif self.stopOrb == false and checkT - mHum > self.lMove and checkT + self.latency - mKite > self.endTime - (self.animT - self.windUpT) then
  413. --and checkT > self.lAttack + myHero.attackData.windUpTime + 0.075 then
  414. Control.mouse_event(MOUSEEVENTF_RIGHTDOWN)
  415. Control.mouse_event(MOUSEEVENTF_RIGHTUP)
  416. self.lMove = checkT
  417. end
  418. end
  419.  
  420. -- wndmsg
  421. function __gsoOrb:_wndmsg(msg, wParam)
  422. local i = wParam
  423. if i == HK_Q or i == HK_W or i == HK_E or i == HK_R or i == HK_SUMMONER_1 or i == HK_SUMMONER_2 then
  424. local checkT = Game.Timer()
  425. local inAATime = checkT < self.lAttack + self.windUpT + 0.05
  426. self.lastSpellT[checkT] = inAATime == true
  427. self.stopSpell = true
  428. end
  429. end
  430.  
  431. -- tick
  432. function __gsoOrb:_tick1()
  433. gsoLatency = Game.Latency() * 0.001
  434. self:_delayedPos()
  435. self:_addUnits()
  436. self:_setActiveAA()
  437. self:_handleActiveAA()
  438. self:_setEnemyMinions()
  439. local ck = self.menu.keys.combo:Value()
  440. local hk = self.menu.keys.harras:Value()
  441. local lhk = self.menu.keys.lastHit:Value()
  442. local lck = self.menu.keys.laneClear:Value()
  443. if ck or hk or lhk or lck then
  444. local AAtarget = nil
  445. if ck then
  446. AAtarget = self:_comboT()
  447. elseif hk then
  448. AAtarget = self:_harassT()
  449. elseif lhk then
  450. AAtarget = self:_lastHitT()
  451. elseif lck then
  452. AAtarget = self:_laneClearT()
  453. end
  454. self:_orb(AAtarget)
  455. end
  456. self:_removeUnits()
  457. end
  458. function __gsoOrb:_tick2()
  459. local checkT = Game.Timer()
  460. if self.shouldWait == true and checkT > self.shouldWaitT + 0.5 then
  461. self.shouldWait = false
  462. --print("stop")
  463. end
  464. local spellTimers = self.lastSpellT
  465. local countLess = 0
  466. for k,v in pairs(spellTimers) do
  467. if checkT > k + 2 then
  468. self.lastSpellT[k] = nil
  469. elseif checkT < k + 0.25 then
  470. countLess = countLess + 1
  471. self.stopSpell = true
  472. if v == true then
  473. self.inAAT = true
  474. end
  475. --break
  476. end
  477. end
  478. if countLess == 0 then
  479. if self.stopSpell == true then
  480. self.stopSpell = false
  481. end
  482. if self.inAAT == true then
  483. self.canAASpell = true
  484. --print("Spell in aa time: reset attack")
  485. end
  486. self.inAAT = false
  487. end
  488. local dActions = self.dActions
  489. for k,v in pairs(dActions) do
  490. if GetTickCount() - k > dActions[k][2] then
  491. dActions[k][1]()
  492. self.dActions[k] = nil
  493. end
  494. end
  495. self.latency = Game.Latency() * 0.001
  496. local aaData = myHero.attackData
  497. local endTime = aaData.endTime
  498. self.windUpT = aaData.windUpTime
  499. self.animT = aaData.animationTime
  500. if endTime > self.endTime then
  501. self.stopOrb = false
  502. self.endTime = endTime
  503. self.lMove = 0
  504. if self.countAA == 0 then
  505. self.firstAA = checkT
  506. end
  507. self.countAA = self.countAA + 1
  508. if self.countAA == 5 then
  509. --print("5 auto attacks in: "..tostring(math.floor((checkT-self.firstAA)*1000)).."ms")
  510. self.firstAA = 0
  511. self.countAA = 0
  512. end
  513. elseif self.stopOrb == true and checkT > self.lAttack + self.windUpT + 0.15 then
  514. --print("Bad issue: reset attack")
  515. self.stopOrb = false
  516. end
  517. end
  518.  
  519. -- draw
  520. function __gsoOrb:_draw()
  521. if not self.menu.draw.enable:Value() then return end
  522. if self.menu.draw.me.enable:Value() and not myHero.dead and myHero.pos:ToScreen().onScreen then
  523. Draw.Circle(myHero.pos, myHero.range + myHero.boundingRadius + 35, self.menu.draw.me.width:Value(), self.menu.draw.me.color:Value())
  524. end
  525. if self.menu.draw.he.enable:Value() then
  526. for i = 1, Game.HeroCount() do
  527. local hero = Game.Hero(i)
  528. if self:_valid(2000, hero) and hero.pos:ToScreen().onScreen then
  529. Draw.Circle(hero.pos, hero.range + hero.boundingRadius + 35, self.menu.draw.he.width:Value(), self.menu.draw.he.color:Value())
  530. end
  531. end
  532. end
  533. if self.menu.draw.cpos.enable:Value() then
  534. Draw.Circle(mousePos, self.menu.draw.cpos.radius:Value(), self.menu.draw.cpos.width:Value(), self.menu.draw.cpos.color:Value())
  535. end
  536. if self.menu.draw.farm.enable:Value() then
  537. if self.menu.draw.farm.lastHitable.enable:Value() then
  538. local countLH = #self.eMinionsLHD
  539. for i = 1, countLH do
  540. local eMinionLHD = self.eMinionsLHD[i]
  541. local minion = eMinionLHD[1]
  542. Draw.Circle(minion.pos, self.menu.draw.farm.lastHitable.radius:Value(), self.menu.draw.farm.lastHitable.width:Value(), self.menu.draw.farm.lastHitable.color:Value())
  543. end
  544. end
  545. if self.menu.draw.farm.almostLastHitable.enable:Value() then
  546. local countLHS = #self.eMinionsLHSD
  547. for i = 1, countLHS do
  548. local eMinionLHSD = self.eMinionsLHSD[i]
  549. Draw.Circle(eMinionLHSD.pos, self.menu.draw.farm.almostLastHitable.radius:Value(), self.menu.draw.farm.almostLastHitable.width:Value(), self.menu.draw.farm.almostLastHitable.color:Value())
  550. end
  551. end
  552. end
  553. if self.menu.draw.minionAttacks.enable:Value() then
  554. for k1,v1 in pairs(self.aAttacks) do
  555. for k2,v2 in pairs(self.aAttacks[k1]) do
  556. local checkT = Game.Timer()
  557. if v2.to and v2.to ~= nil and not v2.to.dead and checkT > v2.startTime and v2.canceled == false then
  558. if v2.speed > 0 then
  559. Draw.Circle(v2.pos, self.menu.draw.minionAttacks.radius:Value(), self.menu.draw.minionAttacks.width:Value(), self.menu.draw.minionAttacks.color:Value())
  560. else
  561. Draw.Circle(v2.from.pos, self.menu.draw.minionAttacks.radius:Value(), self.menu.draw.minionAttacks.width:Value(), self.menu.draw.minionAttacks.color:Value())
  562. end
  563. end
  564. end
  565. end
  566. end
  567. end
  568.  
  569. function OnLoad()
  570. __gsoOrb()
  571. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement