Advertisement
Guest User

Untitled

a guest
Dec 1st, 2015
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.39 KB | None | 0 0
  1. --[HackerWizards Vladimir]--
  2. if myHero.charName ~= "Vladimir" then return end
  3.  
  4. require 'VPrediction'
  5.  
  6. -- PREDICTION
  7. if VIP_USER then
  8. QPredic = TargetPrediction(1200, 1600, .25, 100)
  9. else
  10. QPredic = TargetPrediction(1200, 1423, 250, 100)
  11. end
  12.  
  13.  
  14. -- Misc
  15. local version = "1.0"
  16. local author = "HW"
  17. local Smite = nil
  18. local target = nil
  19. local AARange = 450
  20. local QRange = 650
  21. local WRange = 150 -- No damage
  22. local ERange = 570 -- Actually 610
  23. local RRange = 700-87.5 -- 175 Radius
  24. local EnemyMinions = minionManager(MINION_ENEMY, 600, myHero, MINION_SORT_HEALTH_DEC)
  25. local qDmg = nil
  26. local eStacks = 0
  27. local StackDmg = 1.25 * eStacks
  28. local eDmg = ((myHero.ap * 0.45) + 60 + (myHero:GetSpellData(_E).level * 25)) * StackDmg
  29. local eTick = 0
  30. local QREADY, WREADY, EREADY, RREADY, IREADY = false, false, false, false, false
  31. local RangeToActivateSpell = 550
  32.  
  33.  
  34.  
  35. function OnLoad()
  36. Vladcfg = scriptConfig("HWs Vladimir", "Vladimir by HW")
  37. Vladcfg:addParam("version", "Version", SCRIPT_PARAM_INFO, version)
  38.  
  39.  
  40. --[Combo Menu]--
  41. Vladcfg:addSubMenu("Combo Settings", "combo")
  42. Vladcfg.combo:addParam("combo", "Use Combo", SCRIPT_PARAM_ONKEYDOWN, false, 32)
  43. Vladcfg.combo:addParam("useQ", "Use Q in Combo", SCRIPT_PARAM_ONOFF, true)
  44. Vladcfg.combo:addParam("useE", "Use E in Combo", SCRIPT_PARAM_ONOFF, true)
  45. Vladcfg.combo:addParam("useR", "Use R in Combo", SCRIPT_PARAM_ONOFF, true)
  46. Vladcfg.combo:permaShow("combo")
  47.  
  48.  
  49. --[Harass Menu]--
  50. Vladcfg:addSubMenu("Harass Settings", "harass")
  51. Vladcfg.harass:addParam("harass", "Harass Key", SCRIPT_PARAM_ONKEYTOGGLE, false, string.byte("1"))
  52. Vladcfg.harass:addParam("farm", "Farm Key", SCRIPT_PARAM_ONKEYDOWN, false, string.byte("C"))
  53. Vladcfg.harass:addParam("harassE", "Use E in Harass", SCRIPT_PARAM_ONOFF, true)
  54. Vladcfg.harass:addParam("farmE", "Use E in Farm", SCRIPT_PARAM_ONOFF, true)
  55. Vladcfg.harass:permaShow("farm")
  56.  
  57.  
  58. --[Auto Menu]--
  59. Vladcfg:addSubMenu("Auto Settings", "auto")
  60. Vladcfg.auto:addParam("Autolevel", "Auto Level Spells", SCRIPT_PARAM_ONOFF, false)
  61. Vladcfg.auto:addParam("KS", "Q KS [Toggle]", SCRIPT_PARAM_ONKEYTOGGLE, true,
  62. GetKey('K'))
  63. Vladcfg.auto:addParam("KSE", "KS with E", SCRIPT_PARAM_ONOFF, true)
  64. Vladcfg.auto:addParam("stackE", "E Stack [Toggle]", SCRIPT_PARAM_ONKEYTOGGLE, false, GetKey('3'))
  65. Vladcfg.auto:addParam("AutoPool", "Auto Pool on low HP", SCRIPT_PARAM_ONOFF, true)
  66. Vladcfg.auto:addParam("AutoZhonyas", "Auto Zhonyas on 30 HP", SCRIPT_PARAM_ONOFF, true)
  67. Vladcfg.auto:permaShow("stackE")
  68.  
  69.  
  70. --[Draw Menu]--
  71. Vladcfg:addSubMenu("Draw Settings", "draw")
  72. Vladcfg.draw:addSubMenu("Q Draw Settings", "drawQ")
  73. Vladcfg.draw.drawQ:addParam("drawq", "Draw Q Range", SCRIPT_PARAM_ONOFF, false)
  74. Vladcfg.draw.drawQ:addParam("colorQ", "Q Circle Color", SCRIPT_PARAM_COLOR, {255,0,0,255})
  75. Vladcfg.draw:addSubMenu("E Draw Settings", "drawE")
  76. Vladcfg.draw.drawE:addParam("drawe", "Draw E Range", SCRIPT_PARAM_ONOFF, true)
  77. Vladcfg.draw.drawE:addParam("colorE", "E Circle Color", SCRIPT_PARAM_COLOR, {255,0,0,255})
  78. Vladcfg.draw:addSubMenu("R Draw Settings", "drawR")
  79. Vladcfg.draw.drawR:addParam("drawr", "Draw R Range", SCRIPT_PARAM_ONOFF, false)
  80. Vladcfg.draw.drawR:addParam("colorR", "R Circle Color", SCRIPT_PARAM_COLOR, {255,0,0,255})
  81. Vladcfg.draw:addParam("drawenemy", "Draw Current Target", SCRIPT_PARAM_ONOFF, true)
  82. Vladcfg.draw:addParam("colorTS", "Current Target Circle Color", SCRIPT_PARAM_COLOR, {255,0,0,255})
  83. ts = TargetSelector(TARGET_LESS_CAST, QRange, DAMAGE_Magic)
  84. ts.name = "Vladimir"
  85. Vladcfg:addTS(ts)
  86. enemyMinions = minionManager(MINION_ENEMY, 1200, player)
  87. lastAttack, lastWindUpTime, lastAttackCD = 0, 0, 0
  88. IgniteCheck()
  89. if _G.Reborn_Initialised then
  90. elseif _G.Reborn_Loaded then
  91. PrintChat("<font color=\"#000000\"><b>HWs Vladimir Loaded. SAC detected!</b></font>")
  92. SACLoaded = true
  93. else
  94. orbwalkCheck()
  95. end
  96. end
  97.  
  98. function OnTick()
  99. if myHero.dead then return end
  100. ts:update()
  101. if Vladcfg.combo.combo then
  102. Combo()
  103. end
  104. if Vladcfg.harass.harass then
  105. Harass()
  106. HarassE()
  107. end
  108. if Vladcfg.harass.farm then
  109. Farm()
  110. end
  111. if Vladcfg.auto.Ignite then
  112. AutoIgnite()
  113. end
  114. if Vladcfg.auto.Autolevel then AutoLevel()
  115. end
  116. if Vladcfg.auto.KS then
  117. KS()
  118. end
  119. if Vladcfg.auto.stackE and GetTickCount() - eTick >= 9900 then
  120. eAuto()
  121. end
  122. if Vladcfg.auto.AutoPool then
  123. Pool()
  124. end
  125. if Vladcfg.auto.AutoZhonyas then
  126. Zhonya()
  127. end
  128. if Vladcfg.harass.farmE then
  129. farmE()
  130. end
  131. if Vladcfg.auto.KSE then
  132. KSE()
  133. end
  134. if Vladcfg.harass.harassE then
  135. HarassE()
  136. end
  137. if GetTickCount() - eTick >= 10000 then
  138. eStacks = 0
  139. end
  140. end
  141.  
  142.  
  143. function AutoLevel()
  144. autoLevelSetSequence(levelSequence)
  145. levelSequence = { 0,0,0,0,1,4,1,3,1,3,4,3,3,3,2,2,4,2,2 }
  146. end
  147.  
  148. function AutoIgnite()
  149. if Ignite and ts.target ~= nil then
  150. if Vladcfg.auto.Ignite and ts.target.health <= 40 + (20 * myHero.level) and myHero:CanUseSpell(Ignite) == READY then
  151. CastSpell(Ignite, ts.target)
  152. end
  153. end
  154. end
  155.  
  156. function IgniteCheck()
  157. if myHero:GetSpellData(SUMMONER_1).name:find("summonerdot") then Ignite = SUMMONER_1
  158. Vladcfg.auto:addParam("Ignite", "Auto Ignite", SCRIPT_PARAM_ONOFF, true)
  159. elseif myHero:GetSpellData(SUMMONER_2).name:find("summonerdot") then Ignite = SUMMONER_2
  160. Vladcfg.auto:addParam("Ignite", "Auto Ignite", SCRIPT_PARAM_ONOFF, true)
  161. end
  162. end
  163.  
  164. function orbwalkCheck()
  165. PrintChat("<font color=\"#000000\"><b>HWs Vladimir Loaded. SAC not detected, Loading SxOrbWalk.</b></font>")
  166. require("SxOrbWalk")
  167. SxMenu = scriptConfig("SxOrbWalk", "SxOrbb")
  168. SxOrb:LoadToMenu(SxMenu)
  169. SACLoaded = false
  170. end
  171.  
  172. function Combo()
  173. if ts.target ~= nil then
  174.  
  175. --E
  176. if Vladcfg.combo.useE and
  177. myHero:CanUseSpell(_E) == READY and
  178. GetDistance(ts.target) <= ERange then
  179. CastE()
  180. end
  181.  
  182. --Q
  183. if Vladcfg.combo.useQ then
  184. CastQ()
  185. end
  186.  
  187. --R
  188. if Vladcfg.combo.useR and
  189. myHero:CanUseSpell(_R) == READY and
  190. GetDistance(ts.target) <= RRange and ts.target.health <= ts.target.maxHealth * (50 / 100) then
  191. CastR()
  192. end
  193. end
  194. end
  195.  
  196. function CastQ()
  197. if Recalling then return end
  198. CastSpell(_Q, ts.target)
  199. end
  200.  
  201. function CastE()
  202. if Recalling then return end
  203. CastSpell(_E)
  204. end
  205.  
  206. function Pool()
  207. if Recalling then return end
  208. if myHero.health <= myHero.maxHealth * (25 / 100) and myHero:CanUseSpell(_W) == READY then
  209. for each, enemy in pairs(GetEnemyHeroes()) do -- Loop all enemys
  210. if ValidTarget(enemy) and GetDistance(enemy) <= RangeToActivateSpell then -- If the distance to your enemy is <= the range you specified on the top it will cast
  211. CastSpell(_W)
  212. end
  213. end
  214. end
  215. end
  216.  
  217. function CastR()
  218. if Recalling then return end
  219. CastSpell(_R, ts.target)
  220. end
  221.  
  222. function Harass()
  223. if ts.target ~= nil then
  224. if Vladcfg.harass.harass and
  225. myHero:CanUseSpell(_Q) == READY then
  226. CastQ()
  227. end
  228. end
  229. end
  230.  
  231. function HarassE()
  232. if ts.target ~= nil then
  233. if Vladcfg.harass.harassE and Vladcfg.harass.harass and
  234. myHero:CanUseSpell(_E) == READY and
  235. GetDistance(ts.target) <= ERange-10 then
  236. CastE()
  237. end
  238. end
  239. end
  240.  
  241. function Farm()
  242. if (myHero:CanUseSpell(_Q) == READY) then
  243. for index, minion in pairs(minionManager(MINION_ENEMY, QRange, player, MINION_SORT_HEALTH_ASC).objects) do
  244. local qDmg = getDmg("Q",minion, GetMyHero())
  245. local MinionHealth_ = minion.health
  246. if qDmg >= MinionHealth_ then
  247. CastSpell(_Q, minion)
  248. end
  249. end
  250. end
  251. end
  252.  
  253. function OnCreateObj(obj)
  254. if obj ~= nil then
  255. if obj.name:find("TeleportHome.troy") then
  256. if GetDistance(obj, myHero) <= 70 then
  257. Recalling = true
  258. end
  259. end
  260. end
  261. if obj.name:find("Vladimir_Base_R_AoE_nova.troy") then
  262. Robj = obj and print("R casted on target")
  263. end
  264. end
  265.  
  266.  
  267. function OnDeleteObj(obj)
  268. if obj and obj.valid and obj.name:find("TeleportHome.troy") then
  269. Recalling = false
  270. end
  271. if obj.name and obj.name:find("Vladimir_Base_R_AoE_nova.troy") then
  272. Robj = nil and print("R removed from target")
  273. end
  274. end
  275.  
  276. function OnProcessSpell(object, spell)
  277. if object.isMe then
  278. if spell.name:lower():find("attack") then
  279. lastAttack = GetTickCount() - GetLatency()/2
  280. lastWindUpTime = spell.windUpTime*1000
  281. lastAttackCD = spell.animationTime*1000
  282. end
  283. end
  284. if object.team == myHero.team and spell.name == myHero:GetSpellData(_E).name then
  285. eTick = GetTickCount()
  286. end
  287. if source == myHero then print(spell.name) end
  288. if spell.name == "Tides of Blood" then
  289. if eStacks < 4 then
  290. eStacks = eStacks + 1
  291. end
  292. end
  293. if Robj ~= nil then
  294. local qDmg = ((myHero.ap * .65) + 90 + (myHero:GetSpellData(_E).level * 35)) * .12
  295. local eDmg = ((myHero.ap * .45) + 60 + (myHero:GetSpellData(_E).level * 25)) * .12
  296. local rDmg = ((myHero.ap * .70) + 50 + (myHero:GetSpellData(_E).level * 100)) * .12
  297. end
  298. end
  299.  
  300. function OnDraw()
  301. if Vladcfg.draw.drawQ.drawq then
  302. if myHero:CanUseSpell(_Q) == READY then
  303. DrawCircle(myHero.x, myHero.y, myHero.z, QRange, ARGB(Vladcfg.draw.drawQ.colorQ[1], Vladcfg.draw.drawQ.colorQ[2], Vladcfg.draw.drawQ.colorQ[3], Vladcfg.draw.drawQ.colorQ[4]))
  304. end
  305. end
  306. if Vladcfg.draw.drawE.drawe then
  307. DrawCircle3D(myHero.x, myHero.y, myHero.z, ERange, 1, ARGB(255,25,255,18))
  308. end
  309. if Vladcfg.draw.drawR.drawr then
  310. if myHero:CanUseSpell(_R) == READY then
  311. DrawCircle(myHero.x, myHero.y, myHero.z, RRange, ARGB(Vladcfg.draw.drawR.colorR[1], Vladcfg.draw.drawR.colorR[2], Vladcfg.draw.drawR.colorR[3], Vladcfg.draw.drawR.colorR[4]))
  312. end
  313. end
  314. if ts.target ~= nil and Vladcfg.draw.drawenemy and GetDistance(ts.target) <= ts.range then
  315. DrawCircle(ts.target.x, ts.target.y, ts.target.z, 100, ARGB(Vladcfg.draw.colorTS[1], Vladcfg.draw.colorTS[2], Vladcfg.draw.colorTS[3], Vladcfg.draw.colorTS[4]))
  316. if ts.target ~= nil and Vladcfg.draw.drawenemy and GetDistance(ts.target) <= ts.range then
  317. DrawCircle(ts.target.x, ts.target.y, ts.target.z, 110, ARGB(Vladcfg.draw.colorTS[1], Vladcfg.draw.colorTS[2], Vladcfg.draw.colorTS[3], Vladcfg.draw.colorTS[4]))
  318. if ts.target ~= nil and Vladcfg.draw.drawenemy and GetDistance(ts.target) <= ts.range then
  319. DrawText3D(tostring("Current target"), ts.target.x, ts.target.y, ts.target.z, 15)
  320. end
  321. end
  322. end
  323. if Vladcfg.auto.stackE then
  324. DrawText3D(tostring("E Stack toggled [3]"), myHero.x-15, myHero.y, myHero.z, 15)
  325. end
  326. if Vladcfg.harass.harass then
  327. DrawText3D(tostring("Harass toggled [1]"), myHero.x-15, myHero.y-30, myHero.z, 15)
  328. end
  329. end
  330.  
  331. function minionCollision(predic, width, range)
  332. for _, minionObjectE in pairs(enemyMinions.objects) do
  333. if predic ~= nil and player:GetDistance(minionObjectE) < range then
  334. ex = player.x
  335. ez = player.z
  336. tx = predic.x
  337. tz = predic.z
  338. dx = ex - tx
  339. dz = ez - tz
  340. if dx ~= 0 then
  341. m = dz/dx
  342. c = ez - m*ex
  343. end
  344. mx = minionObjectE.x
  345. mz = minionObjectE.z
  346. distanc = (math.abs(mz - m*mx - c))/(math.sqrt(m*m+1))
  347. if distanc < width and math.sqrt((tx - ex)*(tx - ex) + (tz - ez)*(tz - ez)) > math.sqrt((tx - mx)*(tx - mx) + (tz - mz)*(tz - mz)) then
  348. return true
  349. end
  350. end
  351. end
  352. return false
  353. end
  354.  
  355. function KS()
  356. if not Vladcfg.auto.KS or myHero:CanUseSpell(_Q) ~= READY then return end
  357. for _, target in pairs(GetEnemyHeroes()) do
  358. if target and ValidTarget(target) and GetDistanceSqr(target) < ERange^2 then
  359. if myHero:CanUseSpell(_E) == READY and target.health <= getDmg("Q", target, myHero) + eDmg then
  360. CastSpell(_E, target)
  361. elseif target.health <= getDmg("Q", target, myHero) and ValidTarget(target, QRange) then
  362. CastSpell(_Q, target)
  363. end
  364. end
  365. end
  366. end
  367.  
  368. function KSE()
  369. if not Vladcfg.auto.KS or myHero:CanUseSpell(_E) ~= READY then return end
  370. for _, target in pairs(GetEnemyHeroes()) do
  371. if target and ValidTarget(target) and GetDistanceSqr(target) < QRange^2 then
  372. if myHero:CanUseSpell(_Q) == READY and target.health <= getDmg("Q", target, myHero) + eDmg then
  373. CastSpell(_Q, target)
  374. elseif target.health <= eDmg and ValidTarget(target, ERange) then
  375. CastSpell(_E, target)
  376. end
  377. end
  378. end
  379. end
  380.  
  381. function farmE()
  382. if Vladcfg.harass.farm and (myHero:CanUseSpell(_E) == READY) then
  383. for index, minion in pairs(minionManager(MINION_ENEMY, ERange, player, MINION_SORT_HEALTH_ASC).objects) do
  384. local emDmg = getDmg("E",minion, GetMyHero())
  385. local MinionHealth_ = minion.health
  386. if emDmg >= MinionHealth_ then
  387. CastSpell(_E, minion)
  388. end
  389. end
  390. end
  391. end
  392.  
  393. function Zhonya()
  394. if ts.target ~= nil then
  395. if Recalling or ts.target.health < myHero.health then return end
  396. if myHero.health <= myHero.maxHealth * (30 / 100) then
  397. for each, enemy in pairs(GetEnemyHeroes()) do -- Loop all enemys
  398. if ValidTarget(enemy) and GetDistance(enemy) <= RangeToActivateSpell then -- If the distance to your enemy is <= the range you specified on the top it will cast
  399. CastZhonya()
  400. end
  401. end
  402. end
  403. end
  404. end
  405.  
  406. function CastZhonya()
  407. local item = CheckItem("zhonyashourglass")
  408. if item and myHero:CanUseSpell(item) == 0 then
  409. CastSpell(item)
  410. return true
  411. end
  412. if GetInventoryItemIsCastable(3040) then
  413. CastItem(3040)
  414. end
  415. end
  416.  
  417. function CheckItem(ItemName)
  418. for i = 6, 12 do
  419. local item = myHero:GetSpellData(i).name
  420. if item and item:lower() == ItemName then
  421. return i
  422. end
  423. end
  424. end
  425.  
  426. local originalKD = _G.IsKeyDown;
  427. _G.IsKeyDown = function(theKey)
  428. if (type(theKey) ~= 'number') then
  429. local tn = tonumber(theKey);
  430. if (tn ~= nil) then
  431. return originalKD(tn);
  432. else
  433. return originalKD(GetKey(theKey));
  434. end;
  435. else
  436. return originalKD(theKey);
  437. end
  438. end
  439.  
  440. function eAuto()
  441. if Recalling then return end
  442. if myHero:CanUseSpell(_E) == READY then
  443. CastSpell(_E)
  444. end
  445. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement