Advertisement
Koelion

Viktor

May 15th, 2013
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.88 KB | None | 0 0
  1. --Viktor QQ by Koelionek v 1.1
  2. --Aaa farm Hex
  3. if myHero.charName ~= "Viktor" then return end
  4. -- Range
  5. local qRange = 600
  6. local wRange = 600
  7. local rRange = 700
  8. local eRange = 600
  9. local comboRange = 600
  10. local aarange = 600
  11. local eDelay = 200
  12. -- ts
  13. local ts
  14. -- combo
  15. local waittxt = {}
  16. local calculationenemy = 1
  17. local floattext = {"Skills are not available","Able to fight","Killable","Murder him!"}
  18. local killable = {}
  19. -- Draw
  20. local drawCircle = 600
  21. -- Spells
  22. local ignite = nil
  23. -- Farm
  24. local EnemyMinions = {}
  25. local nextTick = 0
  26. local waitDelay = 400
  27. --
  28. local ignite = nil
  29. local DFGSlot, HXGSlot, BWCSlot, SheenSlot, TrinitySlot, LichBaneSlot, TMTSlot, RAHSlot, RNDSlot, STDSlot = nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil
  30. local QREADY, WREADY, EREADY, RREADY, DFGREADY, HXGREADY, BWCREADY, IREADY, TMTREADY, RAHREADY, RNDREADY, STDREADY, BRKREADY = false, false, false, false, false, false, false, false, false, false, false, false, false
  31.  
  32.  
  33. function OnLoad()
  34. ViktorConfig = scriptConfig("Viktor Combo", "Viktor")
  35. ViktorConfig:addParam("combo", "Combo", SCRIPT_PARAM_ONKEYDOWN, false, 32)
  36. ViktorConfig:addParam("haras", "Haras", SCRIPT_PARAM_ONKEYDOWN, false, 90)
  37. ViktorConfig:addParam("autoqfarm","Auto Q Farming", SCRIPT_PARAM_ONKEYTOGGLE, false, 67)
  38. ViktorConfig:addParam("farm","AA Farm", SCRIPT_PARAM_ONKEYDOWN, false, 88)
  39. ViktorConfig:addParam("wstun","Stun enemy", SCRIPT_PARAM_ONKEYDOWN, false, 86)
  40. ViktorConfig:addParam("minemana","Min Mana for Q/E Haras/Farm",SCRIPT_PARAM_SLICE, 50, 0, 100, 2)
  41. ViktorConfig:addParam("estun","E when stunned",SCRIPT_PARAM_ONOFF, true)
  42. ViktorConfig:addParam("ulticombo","Ulti in Combo",SCRIPT_PARAM_ONOFF, true)
  43. ViktorConfig:addParam("qharas","Q in haras",SCRIPT_PARAM_ONOFF, true)
  44. ViktorConfig:addParam("autoks","Auto Kill Steal",SCRIPT_PARAM_ONOFF, true)
  45. ViktorConfig:addParam("eks","E in Kill Steal",SCRIPT_PARAM_ONOFF, true)
  46. ViktorConfig:addParam("ultiks","Ulti in ks",SCRIPT_PARAM_ONOFF, false)
  47. ViktorConfig:addParam("autoignite","Auto Ignite",SCRIPT_PARAM_ONOFF, true)
  48. ViktorConfig:addParam("move","Move to mouse",SCRIPT_PARAM_ONOFF, false)
  49.  
  50. --Veigar Draw
  51. ViktorDrawConfig = scriptConfig("ViktorDraw","ViktorDraw")
  52. ViktorDrawConfig:addParam("drawfocus","Draw focus",SCRIPT_PARAM_ONOFF, true)
  53. ViktorDrawConfig:addParam("drawcomborange","Draw My Combo Range",SCRIPT_PARAM_ONOFF, true)
  54. ViktorDrawConfig:addParam("drawaarange","Draw My AA Range",SCRIPT_PARAM_ONOFF, true)
  55. ViktorDrawConfig:addParam("drawenemy","Draw Anythink on enemy",SCRIPT_PARAM_ONOFF, true)
  56. ViktorDrawConfig:addParam("drawenemyc","Draw Circe on enemy",SCRIPT_PARAM_ONOFF, true)
  57. ViktorDrawConfig:addParam("drawenemyt","Draw Text on enemy",SCRIPT_PARAM_ONOFF, true)
  58.  
  59. ViktorConfig:permaShow("combo")
  60. ViktorConfig:permaShow("haras")
  61. ViktorConfig:permaShow("autoks")
  62. ViktorConfig:permaShow("farm")
  63. ViktorConfig:permaShow("autoqfarm")
  64.  
  65. ts = TargetSelector(TARGET_LOW_HP, qRange+100,DAMAGE_MAGIC,false )
  66. ts.name = "Viktor"
  67. ViktorConfig:addTS(ts)
  68.  
  69. for i = 0, objManager.maxObjects, 1 do
  70. local object = objManager:GetObject(i)
  71. if objectIsValid(object) then table.insert(EnemyMinions, object) end
  72. end
  73.  
  74. enemyMinions = minionManager(MINION_ENEMY, 600, player, MINION_SORT_HEALTH_ASC)
  75. if myHero:GetSpellData(SUMMONER_1).name:find("SummonerDot") then ignite = SUMMONER_1
  76. elseif myHero:GetSpellData(SUMMONER_2).name:find("SummonerDot") then ignite = SUMMONER_2
  77. end
  78. for i=1, heroManager.iCount do waittxt[i] = i*3 end
  79.  
  80. end
  81.  
  82. function OnTick()
  83. ts:update()
  84. enemyMinions:update()
  85.  
  86. if tick == nil or GetTickCount()-tick>=100 then
  87. tick = GetTickCount()
  88. dmg()
  89. end
  90. DFGSlot, BRKSlot, HXGSlot, BWCSlot = GetInventorySlotItem(3153), GetInventorySlotItem(3128), GetInventorySlotItem(3146), GetInventorySlotItem(3144)
  91. DFGREADY = (DFGSlot ~= nil and myHero:CanUseSpell(DFGSlot) == READY)
  92. HXGREADY = (HXGSlot ~= nil and myHero:CanUseSpell(HXGSlot) == READY)
  93. BWCREADY = (BWCSlot ~= nil and myHero:CanUseSpell(BWCSlot) == READY)
  94. BRKREADY = (BRKSlot ~= nil and myHero:CanUseSpell(BRKSlot) == READY)
  95. TMTREADY = (TMTSlot ~= nil and myHero:CanUseSpell(TMTSlot) == READY)
  96. RAHREADY = (RAHSlot ~= nil and myHero:CanUseSpell(RAHSlot) == READY)
  97. RNDREADY = (RNDSlot ~= nil and myHero:CanUseSpell(RNDSlot) == READY)
  98. QREADY = (myHero:CanUseSpell(_Q) == READY)
  99. WREADY = (myHero:CanUseSpell(_W) == READY)
  100. EREADY = (myHero:CanUseSpell(_E) == READY)
  101. RREADY = (myHero:CanUseSpell(_R) == READY)
  102. iReady = (ignite ~= nil and myHero:CanUseSpell(ignite) == READY)
  103. -- E on stun
  104. if ts.target ~= nil and ViktorConfig.estun and not ts.target.canMove and GetDistance(ts.target)<eRange then
  105. CastSpell(_E, ts.target)
  106. end
  107. -- Stun
  108. if ts.target ~= nil and ViktorConfig.wstun and WREADY and GetDistance(ts.target)<wRange then
  109. CastSpell(_W, ts.target)
  110. end
  111.  
  112. -- Ignite
  113. if ViktorConfig.autoignite then
  114. if iReady then
  115. local ignitedmg = 0
  116. for i = 1, heroManager.iCount, 1 do
  117. local enemyhero = heroManager:getHero(i)
  118. if ValidTarget(enemyhero,600) then
  119. ignitedmg = 50 + 20 * myHero.level
  120. if enemyhero.health <= ignitedmg then
  121. CastSpell(ignite, enemyhero)
  122. end
  123. end
  124. end
  125. end
  126. end
  127.  
  128. -- Haras
  129. if ViktorConfig.haras and not ViktorConfig.combo and ViktorConfig.minemana <=((myHero.mana/myHero.maxMana)*100) and ts.target ~= nil then
  130. if EREADY and GetDistance(ts.target)<=eRange then
  131. for i = 1, heroManager.iCount, 1 do
  132. local Target = heroManager:getHero(i)
  133. if Target ~= nil and not myHero.dead then
  134. EPos = GetPredictionPos(ts.target, eDelay)
  135. end
  136. if EPos ~= nil and ValidTarget(Target, eRange) then
  137. CastSpell(_E, EPos.x, EPos.z)
  138. end
  139. end
  140. end
  141.  
  142. if QREADY and Target ~= nil and Target.team ~= myHero.team and not Target.dead and Target.visible and GetDistance(Target) < qRange and ViktorConfig.qharas then
  143. CastSpell(_Q, Target)
  144. end
  145.  
  146. end
  147. -- Autoks
  148. if ViktorConfig.autoks then
  149.  
  150. for i=1, heroManager.iCount do
  151. Target = heroManager:GetHero(i)
  152. eDMG=getDmg("E",Target,myHero)
  153. qDMG=getDmg("Q",Target,myHero)
  154. rDMG=getDmg("R",Target,myHero)
  155.  
  156. if QREADY and Target ~= nil and Target.team ~= myHero.team and not Target.dead and Target.visible and GetDistance(Target) < qRange and Target.health < qDMG then
  157. CastSpell(_Q, Target)
  158. end
  159.  
  160. if EREADY and Target ~= nil and Target.team ~= myHero.team and not Target.dead and Target.visible and GetDistance(Target) < eRange and Target.health < eDMG then
  161. for i = 1, heroManager.iCount, 1 do
  162. local Target = heroManager:getHero(i)
  163. if Target ~= nil and not myHero.dead then
  164. EPos = GetPredictionPos(ts.target, eDelay)
  165. end
  166. if EPos ~= nil and ValidTarget(Target, eRange) then
  167. CastSpell(_E, EPos.x, EPos.z)
  168. end
  169. end
  170. end
  171.  
  172. if RREADY and Target ~= nil and Target.team ~= myHero.team and not Target.dead and Target.visible and GetDistance(Target) < rRange and Target.health < rDMG then
  173. CastSpell(_R, Target)
  174. end
  175.  
  176. end
  177. end
  178. -- Combo
  179. if ViktorConfig.combo and ts.target ~= nil then
  180.  
  181. if WREADY and GetDistance(ts.target)<comboRange then
  182. CastSpell(_W, ts.target)
  183. end
  184.  
  185. if GetDistance(ts.target) < comboRange then
  186. if DFGREADY then CastSpell(DFGSlot, ts.target) end
  187. if HXGREADY then CastSpell(HXGSlot, ts.target) end
  188. if BWCREADY then CastSpell(BWCSlot, ts.target) end
  189. if BRKREADY then CastSpell(BRKSlot, ts.target) end
  190. if TMTREADY and GetDistance(ts.target) < 275 then CastSpell(TMTSlot) end
  191. if RAHREADY and GetDistance(ts.target) < 275 then CastSpell(RAHSlot) end
  192. if RNDREADY and GetDistance(ts.target) < 275 then CastSpell(RNDSlot) end
  193. end
  194.  
  195. if QREADY and GetDistance(ts.target)<comboRange then
  196. CastSpell(_Q, ts.target)
  197. end
  198. if EREADY and GetDistance(ts.target)<=comboRange then
  199. for i = 1, heroManager.iCount, 1 do
  200. local Target = heroManager:getHero(i)
  201. if Target ~= nil and not myHero.dead then
  202. EPos = GetPredictionPos(Target, eDelay)
  203. end
  204. if EPos ~= nil and ValidTarget(Target, comboRange) then
  205. CastSpell(_E, EPos.x, EPos.z)
  206. end
  207. end
  208.  
  209. end
  210.  
  211. if RREADY and ViktorConfig.ulticombo and GetDistance(ts.target)<comboRange then
  212. CastSpell(_R, ts.target)
  213. end
  214. end
  215.  
  216. -- Farm Q
  217. for i, minion in pairs(EnemyMinions) do
  218. if (minion ~= nil and not minion.valid) or (minion ~= nil and minion.valid and minion.dead) then
  219. table.remove(EnemyMinions, i)
  220. end
  221. end
  222. if ViktorConfig.autoqfarm and ViktorConfig.minqmana <=((myHero.mana/myHero.maxMana)*100) and not ViktorConfig.combo then
  223. local tick = GetTickCount()
  224. for i,object in ipairs(EnemyMinions) do
  225. if object ~= nil and objectIsValid(object) then
  226. local QDMG = (getDmg("Q", object, myHero)-40)
  227. if QREADY and GetDistance(object) <= qRange and object.health <= QDMG then
  228. CastSpell(_Q, object)
  229. end
  230. end
  231. end
  232. end
  233. -- Farm AA
  234. if ViktorConfig.farm then
  235. if GetTickCount() > nextTick then
  236. myHero:MoveTo(mousePos.x, mousePos.z)
  237. end
  238. for index, minion in pairs(enemyMinions.objects) do
  239. local aDmg = getDmg("AD", minion, myHero)
  240. if minion.health <= aDmg and GetDistance(minion) <= (myHero.range+75) and GetTickCount() > nextTick then
  241. myHero:Attack(minion)
  242. nextTick = GetTickCount() + waitDelay
  243. end
  244. end
  245. end
  246. -- Move
  247. if ViktorConfig.move and ViktorConfig.combo then
  248. myHero:MoveTo(mousePos.x, mousePos.z)
  249. end
  250. end
  251. function objectIsValid(object)
  252. return object and object.valid and object.name:find("Minion_") and object.team ~= myHero.team and object.dead == false
  253. end
  254. function OnCreateObj(object)
  255. if objectIsValid(object) then table.insert(EnemyMinions, object) end
  256. end
  257.  
  258. function dmg()
  259. local enemy = heroManager:GetHero(calculationenemy)
  260. if ValidTarget(enemy) then
  261. local pdamage = 0
  262. local wdamage = 0
  263. local qdamage = getDmg("Q",enemy,myHero) --Initial
  264. local edamage = getDmg("E",enemy,myHero)
  265. local rdamage = getDmg("R",enemy,myHero)
  266. local hitdamage = getDmg("AD",enemy,myHero)
  267. local dfgdamage = (DFGSlot and getDmg("DFG",enemy,myHero) or 0)--amplifies all magic damage they take by 20%
  268. local hxgdamage = (HXGSlot and getDmg("HXG",enemy,myHero) or 0)
  269. local bwcdamage = (BWCSlot and getDmg("BWC",enemy,myHero) or 0)
  270. local brkdamage = (BRKREADY and getDmg("RUINEDKING",enemy,myHero,2) or 0)
  271. local ignitedamage = (ignite and getDmg("IGNITE",enemy,myHero) or 0)
  272. local onhitdmg = (SheenSlot and getDmg("SHEEN",enemy,myHero) or 0)+(TrinitySlot and getDmg("TRINITY",enemy,myHero) or 0)+(LBSlot and getDmg("LICHBANE",enemy,myHero) or 0)+(IcebornSlot and getDmg("ICEBORN",enemy,myHero) or 0)
  273.  
  274. local combo1 = hitdamage*2 + (qdamage + wdamage + edamage)*(DFGREADY and 1.2 or 1) + onhitdmg --0 cd
  275. local combo2 = hitdamage*2 + onhitdmg
  276. local combo3 = hitdamage + onhitdmg
  277. local combo4 = 0
  278. if QREADY then
  279. combo2 = combo2 + qdamage
  280. combo3 = combo3 + qdamage
  281. combo4 = combo4 + qdamage
  282. end
  283. if EREADY then
  284. combo2 = combo2 + edamage
  285. combo3 = combo3 + qdamage
  286. end
  287. if RREADY then
  288. combo2 = combo2 + rdamage
  289. combo3 = combo3 + qdamage
  290. combo4 = combo4 + qdamage
  291. end
  292. if DFGREADY then
  293. combo1 = combo1 + dfgdamage
  294. combo2 = combo2 + dfgdamage
  295. combo3 = combo3 + dfgdamage
  296. combo4 = combo4 + dfgdamage
  297. end
  298. if HXGREADY then
  299. combo1 = combo1 + hxgdamage
  300. combo2 = combo2 + hxgdamage
  301. combo3 = combo3 + hxgdamage
  302. combo4 = combo4 + hxgdamage
  303. end
  304. if BWCREADY then
  305. combo1 = combo1 + bwcdamage
  306. combo2 = combo2 + bwcdamage
  307. combo3 = combo3 + bwcdamage
  308. combo4 = combo4 + bwcdamage
  309. end
  310. if BRKREADY then
  311. combo1 = combo1 + brkdamage
  312. combo2 = combo2 + brkdamage
  313. combo3 = combo3 + brkdamage
  314. combo4 = combo4 + brkdamage
  315. end
  316. if TMTREADY then
  317. combo1 = combo1 + tmtdamage
  318. combo2 = combo2 + tmtdamage
  319. combo3 = combo3 + tmtdamage
  320. combo4 = combo4 + tmtdamage
  321. end
  322. if RAHREADY then
  323. combo1 = combo1 + rahdamage
  324. combo2 = combo2 + rahdamage
  325. combo3 = combo3 + rahdamage
  326. combo4 = combo4 + rahdamage
  327. end
  328. if IREADY then
  329. combo1 = combo1 + ignitedamage
  330. combo2 = combo2 + ignitedamage
  331. combo3 = combo3 + ignitedamage
  332.  
  333. end
  334. if combo4 >= enemy.health then killable[calculationenemy] = 4
  335. elseif combo3 >= enemy.health then killable[calculationenemy] = 3
  336. elseif combo2 >= enemy.health then killable[calculationenemy] = 2
  337. elseif combo1 >= enemy.health then killable[calculationenemy] = 1
  338. else killable[calculationenemy] = 0 end
  339. end
  340. if calculationenemy == 1 then calculationenemy = heroManager.iCount
  341. else calculationenemy = calculationenemy-1 end
  342. end
  343.  
  344.  
  345. function OnDraw()
  346. local coloraqua=ARGB(0xFF,0x00,0xFF,0xFF)
  347. DrawText(" Viktor QQ by Koelionek v 1.1", 18, 700, 20, coloraqua)
  348. if ViktorDrawConfig.drawfocus and ValidTarget(ts.target) then
  349. DrawText("Targetting: " .. ts.target.charName, 18, 750, 40, 0xFFFF0000)
  350. for i=0, 10 do
  351. DrawCircle(ts.target.x, ts.target.y, ts.target.z, 60 + i*1.5, 0x66FFFF)
  352. end
  353. end
  354.  
  355. if ViktorDrawConfig.drawcomborange and not myHero.dead and not ViktorConfig.farm then
  356. DrawCircle(myHero.x, myHero.y, myHero.z, comboRange, 0x66FFFF)
  357. end
  358.  
  359. if ViktorDrawConfig.drawaarange and ViktorConfig.farm and not myHero.dead then
  360. DrawCircle(myHero.x, myHero.y, myHero.z, myHero.range+75, 0x00FF00)
  361. end
  362.  
  363. for i=1, heroManager.iCount do
  364. local enemydraw = heroManager:GetHero(i)
  365. if ValidTarget(enemydraw) then
  366. if ViktorDrawConfig.drawenemyc then
  367. if killable[i] == 1 then
  368. for j=0, 20 do
  369. DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 80 + j*1.5, 0x0000FF)
  370. end
  371. elseif killable[i] == 2 then
  372. for j=0, 10 do
  373. DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 80 + j*1.5, 0xFF0000)
  374. end
  375. elseif killable[i] == 3 then
  376. for j=0, 10 do
  377. DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 80 + j*1.5, 0xFF0000)
  378. DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 110 + j*1.5, 0xFF0000)
  379. end
  380. elseif killable[i] == 4 then
  381. for j=0, 10 do
  382. DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 80 + j*1.5, 0xFF0000)
  383. DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 110 + j*1.5, 0xFF0000)
  384. DrawCircle(enemydraw.x, enemydraw.y, enemydraw.z, 140 + j*1.5, 0xFF0000)
  385. end
  386. end
  387. end
  388. if ViktorDrawConfig.drawenemyt and waittxt[i] == 1 and killable[i] ~= 0 then
  389. PrintFloatText(enemydraw,0,floattext[killable[i]])
  390. end
  391. end
  392. if waittxt[i] == 1 then waittxt[i] = 30
  393. else waittxt[i] = waittxt[i]-1 end
  394. end
  395.  
  396. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement