Advertisement
Hepht

[Script] Valdorian's Zed (with yayo)

Sep 8th, 2014
327
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 40.91 KB | None | 0 0
  1. --[[This is originally Val's Zed script. I just added yayo into it. You're going to need to manually use R because the script rarely uses R, might be because the script is outdated. The script will sometimes use W in combo, but the main thing is the fact that it will delay on the teleport, so if you're trying to stick to a target, make sure you spam W while holding the combo key. Good luck!
  2.  
  3. Hepht]]
  4. require 'Utils'
  5. require 'winapi'
  6. require 'SKeys'
  7. require 'runrunrun'
  8. require 'vals_lib'
  9. require 'spell_damage'
  10. local yayo = require 'yayo'
  11. local send = require 'SendInputScheduled'
  12. local uiconfig = require 'uiconfig'
  13. local Q,W,E,R = 'Q','W','E','R'
  14. local version = '1.17'
  15.  
  16. ---------- CONFIG ----------
  17. local Qdelay = 1.6 -- Q Cast AAdelay (1.5 = 250ms)
  18. local Qspeed = 17 -- Q projectile speed (17 = 1700 units/second)
  19. local Wdelay = 0.1 -- W Cast AAdelay (1.5 = 250ms)
  20. local Wspeed = 24 -- W projectile speed (17 = 1700 units/second)
  21. local AAdelay = 135 -- Attack animation AAdelay
  22. local Harass_Mode = 6 -- Harassmode on gamestart [1=Q, 2=WE, 3=WQ (900 range,2 hits), 4=WQ (1450 range,1 hit), 5=WEQ 6=Q+AutoE]
  23. local skillingOrder = {Zed = {Q,W,E,Q,Q,R,Q,E,Q,E,R,E,E,W,W,R,W,W},} -- Skillorder for Auto-Level
  24. local Qrange = 800 -- Range of Q-spell
  25. local Wrange = 595 -- Range of W-spell
  26. local Erange = 250 -- Range of E-spell
  27. local Rrange = 625 -- Range of R-spell
  28. local DrawX = 70 -- X coordinate of the 'Harass Mode'-text
  29. local DrawY = 170 -- Y coordinate of the 'Harass Mode'-text
  30. local Color = 0xFF00EE00 -- Color of the 'Harass Mode'-text (default: green)
  31. local ShowRange = 2500
  32. local jumpspotrange = 25
  33. local jumpmouserange = 100
  34.  
  35. --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
  36. -- DON'T CHANGE ANYTHING BELOW THIS LINE UNLESS YOU KNOW WHAT YOU ARE DOING! --
  37. --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
  38. local timer,timer2,ShadowTimer,UltTimer,KStimer = 0,0,0,0,0
  39. local target,ulttarget
  40. local toggle_timer = os.clock()
  41. local _registry = {}
  42. local qx,qy,qz,vst,vse,deconce,pdot,ddot,edot=0,0,0,0,0,0,0,0,0
  43. local hero_table = {}
  44. local zv = Vector(0,0,0)
  45. local amax_heroes = 0
  46. local metakey = SKeys.Control
  47. local attempts = 0
  48. local lastAttempt = 0
  49. local p = myHero
  50. local jump = false
  51. local Enemies = {}
  52. local EnemyIndex = 1
  53. local HavocDamage = 0
  54. local ExecutionerDamage = 0
  55. local debugmode = false
  56.  
  57. local JumpSpots = {
  58.     {x =8429 , y = -189, z = 2475},
  59.     {x =8138 , y = -189, z = 3035},
  60.     {x =7879 , y = -189, z = 2275},
  61.     {x =7714 , y = -189, z = 2665},
  62.     {x =9829 , y = -189, z = 3275},
  63.     {x =9317 , y = -189, z = 3658},
  64.     {x =10029 , y = -189, z = 8223},
  65.     {x =10522 , y = -189, z = 8629},
  66.     {x =9579 , y = -189, z = 8873},
  67.     {x =10123 , y = -189, z = 9208},
  68.     {x =8759 , y = -189, z = 9639},
  69.     {x =8875 , y = -189, z = 10218},
  70.     {x =8329 , y = -189, z = 9723},
  71.     {x =8264 , y = -189, z = 10359},
  72.     {x =7979 , y = -189, z = 9523},
  73.     {x =7753 , y = -189, z = 10077},
  74.     {x =5959 , y = -189, z = 9491},
  75.     {x =6300 , y = -189, z = 9864},
  76.     {x =5531 , y = -189, z = 9723},
  77.     {x =5354 , y = -189, z = 10293},
  78.     {x =4257 , y = -189, z = 8867},
  79.     {x =3698 , y = -189, z = 9061},
  80.     {x =3881 , y = -189, z = 8223},
  81.     {x =3348 , y = -189, z = 8575},
  82.     {x =4581 , y = -189, z = 3675},
  83.     {x =4095 , y = -189, z = 3276},
  84.     {x =5731 , y = -189, z = 3025},
  85.     {x =5568 , y = -189, z = 2449},
  86.     {x =6231 , y = -189, z = 2625},
  87.     {x =6023 , y = -189, z = 2261},
  88.     {x =6377 , y = -189, z = 3809},
  89.     {x =6626 , y = -189, z = 3230},
  90.     {x =7529 , y = -189, z = 3775},
  91.     {x =7642 , y = -189, z = 3198},
  92.     {x =9279 , y = -189, z = 5375},
  93.     {x =8705 , y = -189, z = 5523},
  94.     {x =9499 , y = -189, z = 5843},
  95.     {x =9071 , y = -189, z = 6318},
  96.     {x =4443 , y = -189, z = 5833},
  97.     {x =4659 , y = -188, z = 6434},
  98.     {x =4581 , y = -189, z = 5525},
  99.     {x =5176 , y = -189, z = 5467},
  100.     {x =6631 , y = -189, z = 8373},
  101.     {x =7270 , y = -189, z = 8386},
  102.     {x =5631 , y = -189, z = 7073},
  103.     {x =5522 , y = -189, z = 7703},
  104.     {x =8329 , y = -189, z = 5725},
  105.     {x =7756 , y = -189, z = 6007},
  106.     {x =8479 , y = -189, z = 6275},
  107.     {x =8049 , y = -189, z = 6573},
  108.     {x =7069 , y = -189, z = 4447},
  109.     {x =7584 , y = -189, z = 4753},
  110.     {x =5581 , y = -189, z = 5775},
  111.     {x =6184 , y = -189, z = 5972},
  112.     {x =5456 , y = -189, z = 6192},
  113.     {x =5921 , y = -189, z = 6390},
  114.     {x =9179 , y = -189, z = 1525},
  115.     {x =9784 , y = -189, z = 1732},
  116.     {x =10179 , y = -189, z = 2075},
  117.     {x =10537 , y = -189, z = 2604},
  118.     {x =11129 , y = -189, z = 2525},
  119.     {x =11564 , y = -188, z = 2993},
  120.     {x =12379 , y = -189, z = 6773},
  121.     {x =12332 , y = -189, z = 6136},
  122.     {x =12379 , y = -189, z = 7223},
  123.     {x =12198 , y = -189, z = 7835},
  124.     {x =12119 , y = -189, z = 8295},
  125.     {x =11979 , y = -189, z = 8877},
  126.     {x =6945 , y = -194, z = 11493},
  127.     {x =6935 , y = -189, z = 11893},
  128.     {x =6925 , y = -148, z = 10579},
  129.     {x =6939 , y = -189, z = 9942},
  130.     {x =2069 , y = -189, z = 8901},
  131.     {x =1923 , y = -189, z = 8328},
  132.     {x =1731 , y = -189, z = 7823},
  133.     {x =1618 , y = -189, z = 7197},
  134.     {x =1513 , y = -189, z = 6763},
  135.     {x =1526 , y = -189, z = 6142},
  136.     {x =2781 , y = -189, z = 2475},
  137.     {x =2435 , y = -189, z = 3012},
  138.     {x =3681 , y = -189, z = 2049},
  139.     {x =3423 , y = -189, z = 2590},
  140.     {x =4151 , y = -189, z = 1789},
  141.     {x =4771 , y = -189, z = 1633},
  142.             }  
  143.  
  144. function ZedMain()
  145.     if IsChatOpen() == 0 and tostring(winapi.get_foreground_window()) == "League of Legends (TM) Client" and myHero.name == "Zed" then
  146.     SetVariables()
  147.     velocity()
  148.     HarassModes()
  149.     Killsteal()
  150.     Jump1()
  151.     send.tick()
  152.  
  153.     if ZedKeyConfig.Combo and timer2 == 0 then
  154.         Combo()
  155.         jump = false
  156.     end
  157.     if ZedKeyConfig.Escape and timer2 == 0 then Escape() end
  158.     if ZedMiscConfig.ignite then ignite() end
  159.     if ZedMiscConfig.Autolevel and timer2 == 0 then Autolevel() end
  160.    
  161. end
  162. end
  163.    
  164.     ZedKeyConfig, menu = uiconfig.add_menu('Zed Config', 250)
  165.     menu.keydown('Combo', 'Combo', Keys.X)
  166.     menu.keydown('Harass', 'Harass', Keys.Y)
  167.     menu.keydown('Escape', 'Escape', Keys.W)
  168.     menu.keydown('HarassMode', 'Change Harass Mode', Keys.F1)
  169.     menu.permashow('Combo')
  170.     menu.permashow('Harass')
  171.     menu.permashow('Escape')
  172.  
  173.     ZedMiscConfig, menu = uiconfig.add_menu('Zed Misc Config', 200)
  174.     menu.checkbutton('ignite', 'Auto-Ignite', true)
  175.     menu.checkbutton('execute', 'Killsteal', true)
  176.     menu.checkbutton('useItems', 'Auto Items', true)
  177.     menu.checkbutton('Autolevel', 'Auto Level', false)
  178.     menu.checkbutton('move', 'Movement', false)
  179.     menu.checkbutton('jumphelper', 'JumpHelper', true)
  180.     menu.slider('norcombo', 'Normal Combo', 1, 2, 2, {"Safe","Full"})
  181.     menu.slider('ultcombo', 'Ult Combo', 1, 2, 2, {"Safe","Full"})
  182.    
  183.     ZedDrawConfig, menu = uiconfig.add_menu('Zed Draw Config', 200)
  184.     menu.checkbutton('drawcircles', 'Circles on/off', true)
  185.     menu.checkbutton('drawq', 'Draw Q-range', true)
  186.     menu.checkbutton('draww', 'Draw W-range', true)
  187.     menu.checkbutton('drawe', 'Draw E-range', false)
  188.     menu.checkbutton('drawaa', 'Draw AAdam-range', false)
  189.     menu.checkbutton('drawshadow', 'Draw Circle around Shadow', true)
  190.     menu.checkbutton('drawenemy', 'Draw Circle around target', true)
  191.     menu.checkbutton('drawksnote', 'Draw KS Notifications', true)
  192.  
  193. function SetVariables()
  194.     target = GetWeakEnemy('PHYS',1000)
  195.     AArange = (myHero.range+(GetDistance(GetMinBBox(myHero), GetMaxBBox(myHero))/2))+15
  196.    
  197.     if GetTickCount() - ShadowTimer > 4000 then
  198.         Shadow,ShadowX,ShadowY,ShadowZ = nil,nil,nil,nil
  199.         ShadowTimer = 0
  200.     end
  201.     if GetTickCount() - timer2 > 500 then
  202.         timer2 = 0
  203.     end
  204.     if GetTickCount() - UltTimer > 3500 then
  205.         ulttarget = nil
  206.         UltTimer = 0
  207.     end
  208.     if timer ~= 0 then
  209.         if GetTickCount() - timer > ((AAdelay+20)/myHero.attackspeed) then
  210.             MoveToXYZ(myHero.x,0,myHero.z)
  211.             MouseRightClick(GetLastOrder())
  212.             timer = 0
  213.         end
  214.     end
  215.     if GetTickCount() - timer > (((AAdelay+20)/myHero.attackspeed)+20*2) then
  216.         timer = 0
  217.     end
  218.    
  219.     if myHero.SpellTimeQ > 1.0 and GetSpellLevel('Q') ~= 0 and myHero.mana >= (80-(GetSpellLevel('Q')*5)) then QRDY = 1
  220.         else QRDY = 0 end
  221.     if myHero.SpellTimeW > 1.0 and GetSpellLevel('W') ~= 0 and myHero.mana >= (45-(GetSpellLevel('W')*5)) then WRDY = 1
  222.         else WRDY = 0 end
  223.     if myHero.SpellTimeE > 1.0 and GetSpellLevel('E') ~= 0 and myHero.mana >= 50 then ERDY = 1
  224.         else ERDY = 0 end
  225.     if myHero.SpellTimeR > 1.0 and GetSpellLevel('R') ~= 0 then RRDY = 1
  226.         else RRDY = 0 end
  227.     if myHero.SpellNameW == "ZedShadowDash" and myHero.SpellTimeW > 1.0 and GetSpellLevel('W')>0 and myHero.mana >= (45-(GetSpellLevel('W')*5)) then
  228.         W1RDY = 1
  229.         W2RDY = 0
  230.     else
  231.         W1RDY = 0
  232.     end
  233.     if myHero.SpellNameW == "zedw2" then
  234.         W2RDY = 1
  235.         W1RDY = 0
  236.     else
  237.         W2RDY = 0
  238.     end
  239.     for i = 1, objManager:GetMaxHeroes(), 1 do
  240.         Hero = objManager:GetHero(i)
  241.         if Hero ~= nil and Hero.team ~= myHero.team then
  242.             if Enemies[Hero.name] == nil then
  243.                 Enemies[Hero.name] = { Unit = Hero, Number = EnemyIndex }
  244.                 EnemyIndex = EnemyIndex + 1
  245.             end
  246.         end
  247.     end
  248. end
  249.  
  250. function Killsteal()
  251.     for i = 1, objManager:GetMaxHeroes() do
  252.         local enemy = objManager:GetHero(i)
  253.         if (enemy ~= nil and enemy.team ~= myHero.team and enemy.visible == 1 and enemy.invulnerable==0 and enemy.dead == 0) then
  254.        
  255.                 local xAD = (getDmg("AD",enemy,myHero))
  256.                 local xRP = (((15*GetSpellLevel('R')+5)/100)*RRDY)
  257.                 local xQ1 = (getDmg("Q",enemy,myHero,1)*QRDY)
  258.                 local xQ2 = (getDmg("Q",enemy,myHero,3)*QRDY)
  259.                 local xQ3 = ((getDmg("Q",enemy,myHero,1)*2)*QRDY)
  260.                 local xE = (getDmg("E",enemy,myHero)*ERDY)
  261.                 local xR = (xAD*RRDY)
  262.                
  263.                 local Qdam = (xQ1*QRDY)
  264.                 local Edam = (xE*ERDY)
  265.                 local QAAdam = ((xQ1+xAD)*QRDY)
  266.                 local EAAdam = ((xE+xAD)*ERDY)
  267.                 local EQdam = (((xQ1+xE)*QRDY)*ERDY)
  268.                 local EQAAdam = (((xQ1+xE+xAD)*QRDY)*ERDY)
  269.                 local WEdam = ((xE*W1RDY)*ERDY)
  270.                 local WQ1dam = ((xQ2*W1RDY)*QRDY)
  271.                 local WEQdam = ((((xQ2+xE)*W1RDY)*QRDY)*ERDY)
  272.                 local WQ2dam = (xQ1*W1RDY)
  273.                 local REAAdam = (((xR+xAD+xE+((xAD+xE)*xRP))*RRDY)*ERDY)
  274.                 local RQAAdam = (((xR+xAD+xQ2+((xAD+xQ2)*xRP))*RRDY)*QRDY)
  275.                 local REQAAdam = ((((xR+xAD+xQ2+xE+((xAD+xQ2+xE)*xRP))*RRDY)*ERDY)*QRDY)
  276.                 local RWQAAdam = ((((xR+xAD+xQ3+((xAD+xQ3)*xRP))*W1RDY)*RRDY)*QRDY)
  277.                 local RWEQAAdam = (((((xR+xAD+xQ3+xE+((xAD+xQ3+xE)*xRP))*W1RDY)*RRDY)*ERDY)*QRDY)
  278.                
  279.                 if debugmode == true then
  280.                     if ZedMiscConfig.ultcombo == 1 then
  281.                         DrawText("Max. Damage: " .. round(math.max(Qdam,Edam,EQdam,WEdam,WQ1dam,WEQdam,WQ2dam,REAAdam,RQAAdam,REQAAdam),0),DrawX,DrawY-30,0xFFF0FFFF)
  282.                     elseif ZedMiscConfig.ultcombo == 2 then
  283.                         DrawText("Max. Damage: " .. round(math.max(Qdam,Edam,EQdam,WEdam,WQ1dam,WEQdam,WQ2dam,REAAdam,RQAAdam,REQAAdam,RWQAAdam,RWEQAAdam),0),DrawX,DrawY-30,0xFFF0FFFF)
  284.                     end
  285.                 end
  286.    
  287.             if ZedMiscConfig.execute then
  288.                 if enemy.health < Qdam and GetDistance(myHero,enemy) < Qrange then
  289.                     CustomCircle(75,30,5,enemy)
  290.                     SpellPred(Q,QRDY,myHero,enemy,Qrange,Qdelay,Qspeed)
  291.                     jump = false
  292.                 elseif enemy.health < Edam and (GetDistance(myHero,enemy) < Erange or (W2RDY == 1 and Shadow ~= nil and GetDistance(Shadow,enemy) < Erange)) then
  293.                     CustomCircle(75,30,5,enemy)
  294.                     SpellXYZ(E,ERDY,myHero,enemy,Erange,myHero.x,myHero.z)
  295. --                  AttackTarget(enemy)
  296.                     jump = false
  297.                 elseif enemy.health < QAAdam and GetDistance (myHero,enemy) < AArange then
  298.                     CustomCircle(75,30,5,enemy)
  299.                     SpellPred(Q,QRDY,myHero,enemy,Qrange,Qdelay,Qspeed)
  300. --                  AttackTarget(enemy)
  301.                     jump = false
  302.                 elseif enemy.health < EAAdam and GetDistance (myHero,enemy) < AArange then
  303.                     CustomCircle(75,30,5,enemy)
  304.                     SpellXYZ(E,ERDY,myHero,enemy,Erange,myHero.x,myHero.z)
  305. --                  AttackTarget(enemy)
  306.                     jump = false
  307.                 elseif enemy.health < EQdam and (GetDistance(myHero,enemy) < Erange or (W2RDY == 1 and Shadow ~= nil and GetDistance(Shadow,enemy) < Erange)) then
  308.                     CustomCircle(75,30,5,enemy)
  309.                     SpellXYZ(E,ERDY,myHero,enemy,Erange,myHero.x,myHero.z)
  310.                     SpellPred(Q,QRDY,myHero,enemy,Qrange,Qdelay,Qspeed)
  311.                     jump = false
  312.                 elseif enemy.health < EQAAdam and GetDistance(myHero,enemy) < AArange then
  313.                     CustomCircle(75,30,5,enemy)
  314.                     SpellXYZ(E,ERDY,myHero,enemy,Erange,myHero.x,myHero.z)
  315.                     SpellPred(Q,QRDY,myHero,enemy,Qrange,Qdelay,Qspeed)
  316. --                  AttackTarget(enemy)
  317.                     jump = false
  318.                 elseif enemy.health < WEdam and GetDistance(myHero,enemy) > Erange and GetDistance(myHero,enemy) < Wrange+Erange then
  319.                     CustomCircle(75,30,5,enemy)
  320.                     W_Spell_delayed()
  321.                     SpellXYZ(E,ERDY,myHero,enemy,Erange,myHero.x,myHero.z)
  322.                     SpellXYZ(E,ERDY,Shadow,enemy,Erange,myHero.x,myHero.z)
  323.                     jump = false
  324.                 elseif enemy.health < WQ1dam and GetDistance(myHero,enemy) < Qrange then
  325.                     CustomCircle(75,30,5,enemy)
  326.                     W_Spell_delayed()
  327.                     SpellPred(Q,QRDY,myHero,enemy,Qrange,Qdelay,Qspeed)
  328.                     jump = false
  329.                 elseif enemy.health < WEQdam and GetDistance(myHero,enemy) < Wrange and GetDistance(myHero,enemy) > Erange then
  330.                     CustomCircle(75,30,5,enemy)
  331.                     W_Spell_delayed()
  332.                     SpellXYZ(E,ERDY,myHero,enemy,Erange,myHero.x,myHero.z)
  333.                     SpellXYZ(E,ERDY,Shadow,enemy,Erange,myHero.x,myHero.z)
  334.                     SpellPred(Q,QRDY,myHero,enemy,Qrange,Qdelay,Qspeed)
  335.                     jump = false
  336.                 elseif enemy.health < WQ2dam and GetDistance(myHero,enemy) < Qrange+Wrange and GetDistance(myHero,enemy) > Qrange then
  337.                     CustomCircle(75,30,5,enemy)
  338.                     W_Spell_delayed()
  339.                     Prediction_Shadow_enemy()
  340.                     jump = false
  341.                 elseif (enemy.health < REAAdam or enemy.health < RQAAdam or enemy.health < REQAAdam) and GetDistance(myHero,enemy) < Rrange then
  342.                     CustomCircle(75,30,5,enemy)
  343.                     DrawTextObject("HOLD COMBO", myHero, 0xFFFFFF00)
  344.                     run_many_reset(1, Rspell)
  345.                     jump = false
  346.                 elseif ZedMiscConfig.ultcombo == 2 and (enemy.health < RWQAAdam or enemy.health < RWEQAAdam) and GetDistance(myHero,enemy) < Rrange then
  347.                     CustomCircle(75,30,5,enemy)
  348.                     DrawTextObject("HOLD COMBO", myHero, 0xFFFFFF00)
  349.                     run_many_reset(1, Rspell)
  350.                     jump = false
  351.                 end
  352.             end
  353.             if ZedDrawConfig.drawksnote then
  354.                 if enemy.health < Qdam then DrawTextObject("Q", enemy, 0xFF00EE00)
  355.                 elseif enemy.health < Edam then DrawTextObject("E", enemy, 0xFF00EE00)
  356.                 elseif enemy.health < EQdam then DrawTextObject("EQ", enemy, 0xFF00EE00)
  357.                 elseif enemy.health < WEdam then DrawTextObject("WE", enemy, 0xFF00EE00)
  358.                 elseif enemy.health < WQ1dam then DrawTextObject("WQ1", enemy, 0xFF00EE00)
  359.                 elseif enemy.health < WEQdam then DrawTextObject("WEQ", enemy, 0xFF00EE00)
  360.                 elseif enemy.health < WQ2dam then DrawTextObject("WWQ", enemy, 0xFF00EE00)
  361.                 elseif enemy.health < REAAdam then DrawTextObject("REAA", enemy, 0xFF00EE00)
  362.                 elseif enemy.health < RQAAdam then DrawTextObject("RQAA", enemy, 0xFF00EE00)
  363.                 elseif enemy.health < REQAAdam then DrawTextObject("REQAA", enemy, 0xFF00EE00)
  364.                 elseif enemy.health < RWQAAdam and ZedMiscConfig.ultcombo == 2 then DrawTextObject("RWQAA", enemy, 0xFF00EE00)
  365.                 elseif enemy.health < RWEQAAdam and ZedMiscConfig.ultcombo == 2 then DrawTextObject("RWEQAA", enemy, 0xFF00EE00)
  366.                 end
  367.             end
  368.         end
  369.     end
  370. end
  371.  
  372. function Rspell()
  373.     if enemy~=nil then SpellTarget(R,RRDY,myHero,enemy,Rrange) end
  374.     if RRDY==1 then
  375.         return true
  376.     end
  377. end
  378.  
  379. function Combo()
  380.     local targetaa = GetWeakEnemy('PHYS',(myHero.range+(GetDistance(GetMinBBox(myHero), GetMaxBBox(myHero))/2)+15))
  381.     if ulttarget ~= nil then
  382.         if ZedMiscConfig.ultcombo == 1 then
  383.             SpellPred(Q,QRDY,myHero,ulttarget,Qrange,Qdelay,Qspeed)
  384.             SpellXYZ(E,ERDY,myHero,ulttarget,Erange,myHero.x,myHero.z)
  385.             SpellXYZ(E,ERDY,Shadow,ulttarget,Erange,myHero.x,myHero.z)
  386.         elseif ZedMiscConfig.ultcombo == 2 then
  387.             if GetTickCount() - UltTimer > 520 then
  388.                 WSpecial_delayed()
  389.                 if (W2RDY == 1 or WRDY == 0) then
  390.                     SpellPred(Q,QRDY,myHero,ulttarget,Qrange,Qdelay,Qspeed)
  391.                 end
  392.                 SpellXYZ(E,ERDY,myHero,ulttarget,Erange,myHero.x,myHero.z)
  393.                 SpellXYZ(E,ERDY,Shadow,ulttarget,Erange,myHero.x,myHero.z)
  394.                 if (W2RDY == 1 or WRDY == 0) and GetDistance(ulttarget)>AArange and (Shadow ~= nil and GetDistance(Shadow,ulttarget)<Erange) then
  395.                     CastSpellXYZ('W',myHero.x,0,myHero.z)
  396.                 end
  397.             end
  398.         end
  399.     elseif target ~= nil then
  400.         if ZedMiscConfig.norcombo == 1 then
  401.             SpellPred(Q,QRDY,myHero,target,Qrange,Qdelay,Qspeed)
  402.             SpellXYZ(E,ERDY,myHero,target,Erange,myHero.x,myHero.z)
  403.             SpellXYZ(E,ERDY,Shadow,target,Erange,myHero.x,myHero.z)
  404.         elseif ZedMiscConfig.norcombo == 2 then
  405.             if QRDY == 1 and W1RDY == 1 and GetDistance(target)<Qrange and GetDistance(target)>AArange+50  then
  406.                 W_Spell_delayed()
  407.             end
  408.             if ERDY == 1 and W1RDY == 1 and GetDistance(target)>Erange and GetDistance(target)<Wrange+Erange and GetDistance(target)>AArange+50 then
  409.                 W_Spell_delayed()
  410.             end
  411.             if W1RDY == 1 and QRDY == 0 and GetDistance(target)<Wrange and GetDistance(target)>AArange+50 then
  412.                 W_Spell_delayed()
  413.             end
  414.             if (W2RDY == 1 or WRDY == 0) and QRDY == 1 then
  415.                 SpellPred(Q,QRDY,myHero,target,Qrange,Qdelay,Qspeed)
  416.             end
  417.             SpellXYZ(E,ERDY,myHero,target,Erange,myHero.x,myHero.z)
  418.             SpellXYZ(E,ERDY,Shadow,target,Erange,myHero.x,myHero.z)
  419.             if W2RDY == 1 and Shadow ~= nil and (QRDY == 0 or GetDistance(target)>Qrange) and GetDistance(target)>AArange and GetDistance(Shadow,target)<Erange then
  420.                 SpellXYZ(W,W2RDY,Shadow,target,AArange,myHero.x,myHero.z)
  421.             end
  422.         end
  423.        
  424.         -----------------------------
  425.     end
  426.     if targetaa ~= nil then
  427.         if ZedMiscConfig.useItems then
  428.             UseAllItems(targetaa)
  429.         end
  430. --      AttackTarget(targetaa)
  431.     end
  432.     if ZedMiscConfig.move and timer == 0 then
  433.         if ulttarget == nil or target == nil then
  434. --          MoveToMouse()
  435.         elseif ulttarget ~= nil then
  436. --          MoveToXYZ(ulttarget.x,0,ulttarget.z)
  437.         elseif target ~= nil then
  438. --           MoveToXYZ(target.x,0,target.z)
  439.         end
  440.     end
  441. end
  442.  
  443. function Harass1() -- Q
  444.     SpellPred(Q,QRDY,myHero,target,Qrange,Qdelay,Qspeed)
  445. end
  446.  
  447. function Harass2() -- W-E
  448.     if target ~= nil then
  449.         if ERDY == 1 and GetDistance(target) < (Wrange+Erange) and GetDistance(target) > Erange then
  450.             W2_Spell_delayed()
  451.         end
  452.         SpellXYZ(E,ERDY,myHero,target,Erange,myHero.x,myHero.z)
  453.         SpellXYZ(E,ERDY,Shadow,target,Erange,myHero.x,myHero.z)
  454.     end
  455. end
  456.  
  457. function Harass3() --  -- W-Q (900 range)
  458.     if target ~= nil then
  459.         if QRDY == 1 and GetDistance(target) < Qrange then
  460.             W2_Spell_delayed()
  461.         end
  462.         if W2RDY == 1 or WRDY == 0 then
  463.             SpellPred(Q,QRDY,myHero,target,Qrange,Qdelay,Qspeed)
  464.         end
  465.     end
  466. end
  467.  
  468. function Harass4() -- W-Q (1450 range)
  469. local target2 = GetWeakEnemy('PHYS',(Qrange+Wrange))
  470.     if QRDY == 1 and GetDistance(target2) < Qrange+Wrange then
  471.         W_Spell_delayed_target2()
  472.     end
  473.     if (W2RDY == 1 and QRDY == 1) and GetDistance(target2) < Qrange+Wrange then
  474.         Prediction_Shadow_target2()
  475.     end
  476. end
  477.  
  478. function Harass5() -- W-E-Q
  479.     if target ~= nil then
  480.         if QRDY == 1 and W1RDY == 1 and GetDistance(target)<Qrange then
  481.             W_Spell_delayed()
  482.         end
  483.         if ERDY == 1 and W1RDY == 1 and GetDistance(target)>Erange and GetDistance(target)<Wrange+Erange then
  484.             W_Spell_delayed()
  485.         end
  486.         if W1RDY == 1 and QRDY == 0 and GetDistance(target)<Wrange and GetDistance(target)>AArange then
  487.             W_Spell_delayed()
  488.         end
  489.         if (W2RDY == 1 or WRDY == 0) and QRDY == 1 then
  490.             SpellPred(Q,QRDY,myHero,target,Qrange,Qdelay,Qspeed)
  491.         end
  492.         SpellXYZ(E,ERDY,myHero,target,Erange,myHero.x,myHero.z)
  493.         SpellXYZ(E,ERDY,Shadow,target,Erange,myHero.x,myHero.z)
  494.     end
  495. end
  496.  
  497. function Escape()  
  498.     local MousePos = Vector(mousePos)
  499.     local HeroPos = Vector(myHero.x,0,myHero.z)
  500.     local ShadowPos = HeroPos+(HeroPos-MousePos )*(-Wrange+100)
  501.     SpellXYZ(W,W1RDY,myHero,myHero,1,ShadowPos.x,ShadowPos.z)
  502.     SpellXYZ(W,W2RDY,myHero,Shadow,1200,myHero.x,myHero.z)
  503.     MoveToMouse()
  504. end
  505.  
  506. function HarassModes()
  507.     DrawText("Harass Mode:",DrawX,DrawY-10,0xFFF0FFFF)
  508.     if (ZedKeyConfig.HarassMode and os.clock() - toggle_timer>0.3) then
  509.         toggle_timer = os.clock()
  510.         Harass_Mode = ((Harass_Mode+1)%7)
  511.     end
  512.     if (Harass_Mode == 1) then
  513.         DrawText("Q",DrawX,DrawY,0xFFF0FFFF)
  514.     elseif (Harass_Mode == 2) then
  515.         DrawText("W-E",DrawX,DrawY,0xFFF0FFFF)
  516.     elseif (Harass_Mode == 3) then
  517.         DrawText("W-Q (900 range)",DrawX,DrawY,0xFFF0FFFF)
  518.     elseif (Harass_Mode == 4) then
  519.         DrawText("W-Q (1450 range)",DrawX,DrawY,0xFFF0FFFF)
  520.     elseif (Harass_Mode == 5) then
  521.         DrawText("W-E-Q",DrawX,DrawY,0xFFF0FFFF)
  522.     elseif (Harass_Mode == 6) then
  523.         DrawText("Q+Auto-E",DrawX,DrawY,0xFFF0FFFF)
  524.     else
  525.         DrawText("OFF",DrawX,DrawY,0xFFF0FFFF)
  526.         return
  527.     end
  528.    
  529.     if ZedKeyConfig.Harass then
  530.         if Harass_Mode == 1 then Harass1()
  531.         elseif Harass_Mode == 2 then Harass2()
  532.         elseif Harass_Mode == 3 then Harass3()
  533.         elseif Harass_Mode == 4 then Harass4()
  534.         elseif Harass_Mode == 5 then Harass5()
  535.         elseif Harass_Mode == 6 then Harass1()
  536.         end
  537.     end
  538.     if Harass_Mode == 6 then
  539.         if GetSpellLevel('E') > 1 then
  540.             SpellXYZ(E,ERDY,myHero,target,Erange,myHero.x,myHero.z)
  541.             SpellXYZ(E,ERDY,Shadow,target,Erange,myHero.x,myHero.z)
  542.         end
  543.     end
  544. end
  545.  
  546. function W_Spell()
  547.     if target ~= nil and W1RDY == 1 then CastSpellXYZ('W',GetFireahead(target,Wdelay,Wspeed)) end
  548.     if enemy ~= nil and W1RDY == 1 then CastSpellXYZ('W',GetFireahead(enemy,Wdelay,Wspeed)) end
  549. end
  550.  
  551. function W2_Spell()
  552.     SpellPred(W,W1RDY,myHero,target,(Wrange+Erange),Wdelay,Wspeed)
  553. end
  554.  
  555. function W_Spell_target2()
  556.     local target2 = GetWeakEnemy('PHYS',(Qrange+Wrange))
  557.     SpellPred(W,W1RDY,myHero,target2,(Qrange+Wrange),Wdelay,Wspeed)
  558. end
  559.  
  560. function WSpecial()
  561.     if ulttarget ~= nil then CastSpellXYZ('W',GetFireahead(ulttarget,Wdelay,Wspeed)) end
  562. end
  563.  
  564. function WSpecial_delayed()
  565.     run_every(0.2,W_Spell)
  566. end
  567.  
  568. function W_Spell_delayed()
  569.     run_every(8,W_Spell)
  570. end
  571.  
  572. function W2_Spell_delayed()
  573.     run_every(8,W2_Spell)
  574. end
  575.  
  576. function W_Spell_delayed_target2()
  577.     run_every(8,W_Spell_target2)
  578. end
  579.  
  580. function OnDraw()
  581.     if myHero.dead == 0 then
  582.         if ZedDrawConfig.drawcircles then
  583.             if ZedDrawConfig.drawq then
  584.                 if QRDY == 1 then
  585.                     CustomCircle(Qrange,2,2,myHero)
  586.                 else
  587.                     CustomCircle(Qrange,2,3,myHero)
  588.                 end
  589.             end
  590.            
  591.             if ZedDrawConfig.draww then
  592.                 if W1RDY == 1 then
  593.                     CustomCircle(Wrange,1,3,myHero)
  594.                 end
  595.             end
  596.            
  597.             if ZedDrawConfig.drawe then
  598.                 if ERDY == 1 then
  599.                     CustomCircle(Erange,1,1,myHero)
  600.                 end
  601.             end
  602.            
  603.             if ZedDrawConfig.drawshadow then
  604.                 if Shadow ~= nil and ERDY == 1 then
  605.                     CustomCircle(Erange,3,2,Shadow)
  606.                 elseif Shadow ~= nil and ERDY == 0 then
  607.                     CustomCircle(75,5,1,Shadow)
  608.                 end
  609.             end
  610.            
  611.             if ZedDrawConfig.drawaa then
  612.                 CustomCircle(AArange,1,2,myHero)
  613.             end
  614.            
  615.             if ZedDrawConfig.drawenemy then
  616.                 if target ~= nil then
  617.                     CustomCircle(100,4,2,target)
  618.                 end
  619.             end
  620.         end
  621.         for _, JumpSpot in pairs(JumpSpots) do
  622.             if ZedMiscConfig.jumphelper and GetMap() == 2 then
  623.                 if GetDistance(JumpSpot,myHero) <= ShowRange then
  624.                     if GetDistance(JumpSpot,mousePos) <= jumpmouserange then
  625.                         DrawCircle(JumpSpot.x, JumpSpot.y, JumpSpot.z, jumpmouserange, 0xFFFF0000)
  626.                     else DrawCircle(JumpSpot.x, JumpSpot.y, JumpSpot.z, jumpmouserange, 0xFFFF8000)
  627.                     end
  628.                 end
  629.             end
  630.         end
  631.         if myHero.mana<math.min((QRDY*(80-(GetSpellLevel('Q')*5))),(ERDY*50)) then
  632.             DrawTextObject("LOW ENERGY", myHero, 0xFFFF8000)
  633.         end
  634.     end
  635.     for i, Enemy in pairs(Enemies) do
  636.         if Enemy ~= nil then
  637.             Hero = Enemy.Unit
  638.             local PositionX = (13.3/16) * GetScreenX()
  639.             local QDMG = getDmg('Q', Hero, myHero)+(getDmg('Q',Hero,myHero)*(HavocDamage + ExecutionerDamage))
  640.             local WDMG = getDmg('W', Hero, myHero)+(getDmg('W',Hero,myHero)*(HavocDamage + ExecutionerDamage))
  641.             local EDMG = getDmg('E', Hero, myHero)+(getDmg('E',Hero,myHero)*(HavocDamage + ExecutionerDamage))
  642.             local RDMG = getDmg('R', Hero, myHero)+(getDmg('R',Hero,myHero)*(HavocDamage + ExecutionerDamage))
  643.             local Current_Burst
  644.             local Damage
  645.             if myHero.selflevel >= 6 and myHero.SpellTimeR > 1.0 then
  646.                 Current_Burst = Round(WDMG + EDMG + RDMG, 0) --Show damage of WER combo if Ult is available
  647.             else
  648.                 Current_Burst = Round(WDMG + EDMG, 0) --Show damage of WE combo if Ult is not available
  649.             end
  650.             if myHero.SummonerD == 'SummonerDot' and myHero.SpellTimeD > 1.0 or myHero.SummonerF == 'SummonerDot' and myHero.SpellTimeF > 1.0 then
  651.                 Current_Burst = Current_Burst + ((myHero.selflevel*20)+50) --If Ignite detected and is not on cooldown add ignite damage to combo damage
  652.             end
  653.             Damage = Current_Burst 
  654.             DrawText("Champion: "..Hero.name, PositionX, ((15/900) * GetScreenY()) * Enemy.Number + ((53/90) * GetScreenY()), 0xFF87CEFA)  
  655.             if Hero.visible == 1 and Hero.dead ~= 1 then
  656.                 if Damage < Hero.health then
  657.                     DrawText("DMG "..Damage, PositionX + 150, ((15/900) * GetScreenY()) * Enemy.Number + ((53/90) * GetScreenY()), 0xFFFFFF00)
  658.                 elseif Damage > Hero.health then
  659.                     DrawText("Killable!", PositionX + 150, ((15/900) * GetScreenY()) * Enemy.Number + ((53/90) * GetScreenY()), 0xFFFF0000)
  660.                 end
  661.             end    
  662.             if Hero.visible == 0 and Hero.dead ~= 1 then
  663.                 DrawText("MIA", PositionX + 150, ((15/900) * GetScreenY()) * Enemy.Number + ((53/90) * GetScreenY()), 0xFFFF8000)
  664.             elseif Hero.dead == 1 then
  665.                 DrawText("Dead", PositionX + 150, ((15/900) * GetScreenY()) * Enemy.Number + ((53/90) * GetScreenY()), 0xFF32CD32)
  666.             end
  667.         end
  668.     end
  669. end
  670.  
  671. function Prediction_Shadow_target2()
  672.     local target2 = GetWeakEnemy('PHYS',(Qrange+Wrange))
  673.     if target2 ~= nil then
  674.         local bq = bestcoords(target2)
  675.         local vts = hero_table[target2.name][3]
  676.         if Shadow ~= nil and (W2RDY == 1 and QRDY == 1) and GetDistance(Shadow, target2) < Qrange then
  677.             if  bq == 1  and vts:len() ~= 0 then
  678.                 CastSpellXYZ('Q',qx, qy, qz)
  679.             elseif bq == 1 and vts:len() == 0 then
  680.                 CastSpellXYZ('Q',qx, qy, qz)
  681.             end
  682.         end
  683.     end
  684. end
  685.  
  686. function Prediction_Shadow_enemy()
  687.     if enemy ~= nil then
  688.         local bq = bestcoords(enemy)
  689.         local vts = hero_table[enemy.name][3]
  690.         if Shadow ~= nil and GetDistance(Shadow, enemy) < Qrange then
  691.             if  bq == 1  and vts:len() ~= 0 then
  692.                 CastSpellXYZ('Q',qx, qy, qz)
  693.             elseif bq == 1 and vts:len() == 0 then
  694.                 CastSpellXYZ('Q',qx, qy, qz)
  695.             end
  696.         end
  697.     end
  698. end
  699.  
  700. function bestcoords(btarget)
  701.     if Shadow ~= nil then
  702.         local x1,y1,z1 = GetFireahead(btarget,Qdelay,Qspeed)
  703.         local ve= Vector(x1 - btarget.x,y1 - btarget.y,z1 - btarget.z) -- getfireahead - target
  704.         local nb = btarget.name
  705.         local vvt = hero_table[nb][3] -- velocity vector of target
  706.         if Shadow.x ~= nil then
  707.             vst = Vector(btarget.x - Shadow.x,btarget.y-Shadow.y,btarget.z - Shadow.z) -- target - Shadow
  708.             vse = Vector(x1-Shadow.x,y1-Shadow.y,z1-Shadow.z) -- getfireahead - Shadow
  709.         end
  710.         local speedratio = (btarget.movespeed / vvt:len())
  711.         if vvt:len() ~= 0 then
  712.             local vstn = vst:normalized()
  713.             local vvtn = vvt:normalized()
  714.             local ven = ve:normalized()
  715.             local vsen = vse:normalized()
  716.             ddot = math.abs(vsen:dotP(ven))
  717.             edot = math.abs(vvtn:dotP(ven))
  718.             pdot = math.abs(vstn:dotP(vvtn))    
  719.             if (pdot > 0.75 and ddot > 0.75 and edot > 0.95 and vst:len() < 1450) then
  720.                 qx=x1
  721.                 qy=y1
  722.                 qz=z1
  723.                 return 1
  724.             end
  725.         elseif Shadow ~= nil and vvt:len() == 0 and vst:len() < 1485 then
  726.                 qx=btarget.x
  727.                 qy=btarget.y
  728.                 qz=btarget.z
  729.                 return 1
  730.         else
  731.             return 0
  732.         end
  733.     end
  734.     return 0
  735. end
  736.  
  737. function OnCreateObj(obj)
  738.     if obj ~= nil then
  739.         if obj.charName == "Shadow" and GetDistance(myHero,obj) < 550 then
  740.             Shadow = obj
  741.         end
  742.         if obj.charName == "Zed_CloneDeath.troy" and GetDistance(myHero,obj) < 550 then
  743.             Shadow = nil
  744.         end
  745.     end
  746. end
  747.  
  748. function OnProcessSpell(unit,spell)
  749.     local targetult = GetWeakEnemy('PHYS',Rrange)
  750.     local targetaa = GetWeakEnemy('PHYS',(myHero.range+(GetDistance(GetMinBBox(myHero), GetMaxBBox(myHero))/2)+15))
  751.     if unit ~= nil and spell ~= nil and unit.charName == myHero.charName then
  752.         if spell.name == "ZedShadowDash" then
  753.             ShadowTimer = GetTickCount()
  754.             ShadowX = spell.endPos.x
  755.             ShadowY = spell.endPos.y
  756.             ShadowZ = spell.endPos.z
  757.         end
  758.         if spell.name == "zedw2" then
  759.             ShadowX = myHero.x
  760.             ShadowY = myHero.y
  761.             ShadowZ = myHero.z
  762.         end
  763.         if targetaa ~= nil then
  764.             if (spell.name == "ZedBasicAttack" or spell.name == "ZedBasicAttack2" or spell.name == "ZedCritAttack") and spell.target ~= nil and spell.target.name == targetaa.name and ZedKeyConfig.Combo then
  765.                 timer = GetTickCount()
  766.                 jump = false
  767.             end
  768.         end
  769.         if targetult ~= nil then
  770.             if spell.name == "zedult" and spell.target ~= nil and spell.target.name == targetult.name then
  771.                 ulttarget = targetult
  772.                 UltTimer = GetTickCount()
  773.                 jump = false
  774.             end
  775.         end
  776.     end
  777. end
  778.  
  779. function Autolevel()
  780.     local spellLevelSum = GetSpellLevel(Q) + GetSpellLevel(W) + GetSpellLevel(E) + GetSpellLevel(R)
  781.     if attempts <= 10 or (attempts > 10 and GetTickCount() > lastAttempt+1500) then
  782.         if spellLevelSum < myHero.selflevel then
  783.             if lastSpellLevelSum ~= spellLevelSum then attempts = 0 end
  784.             letter = skillingOrder[myHero.name][spellLevelSum+1]
  785.             Level_Spell(letter, spellLevelSum)
  786.             attempts = attempts+1
  787.             lastAttempt = GetTickCount()
  788.             lastSpellLevelSum = spellLevelSum
  789.         else
  790.             attempts = 0
  791.         end
  792.     end
  793.     send.tick()
  794. end
  795.  
  796. function Level_Spell(letter)  
  797.      if letter == Q then send.key_press(0x69)
  798.      elseif letter == W then send.key_press(0x6a)
  799.      elseif letter == E then send.key_press(0x6b)
  800.      elseif letter == R then send.key_press(0x6c) end
  801. end
  802.  
  803. function ignite()
  804.     local targetignite = GetWeakEnemy('TRUE',600)
  805.     local damage = (myHero.selflevel*20)+50
  806.     if targetignite ~= nil then
  807.         if myHero.SummonerD == "SummonerDot" then
  808.             if targetignite.health < damage then
  809.                 CastSpellTarget("D",targetignite)
  810.             end
  811.         end
  812.         if myHero.SummonerF == "SummonerDot" then
  813.             if targetignite.health < damage then
  814.                 CastSpellTarget("F",targetignite)
  815.             end
  816.         end
  817.     end
  818. end
  819.  
  820. function declare2darray()
  821.     amax_heroes=objManager:GetMaxHeroes()
  822.     if amax_heroes > 1 then
  823.         for i = 1,amax_heroes, 1 do
  824.             local h=objManager:GetHero(i)
  825.             local name=h.name
  826.             hero_table[name]={}
  827.             hero_table[name][0] = 0
  828.             hero_table[name][1] = zv
  829.             hero_table[name][2] = 0
  830.             hero_table[name][3] = zv
  831.         end
  832.     end
  833. end
  834.  
  835. function velocity()
  836.     local max_heroes=objManager:GetMaxHeroes()
  837.     if max_heroes > amax_heroes then declare2darray() end
  838.     local timedif = 0
  839.     local cordif = Vector(0,0,0)  
  840.     for i = 1,max_heroes, 1 do
  841.         local h=objManager:GetHero(i)
  842.         local name=h.name
  843.         if hero_table[name] ~= nil then
  844.             timedif = GetClock() - hero_table[name][0]
  845.             cordif = Vector(h.x,h.y,h.z) - hero_table[name][1]
  846.             hero_table[name][3] = Vector(round(cordif.x/timedif,7),round(cordif.y/timedif,7),round(cordif.z/timedif,7))
  847.             hero_table[name][0]    = GetClock()
  848.             hero_table[name][1]    = Vector(h.x,h.y,h.z)
  849.         end
  850.     end
  851. end
  852.  
  853. function Jump1()
  854.     local a1x,a1z = 8429,2475
  855.     local b1x,b1z = 8138,3035
  856.     local a2x,a2z = 7879,2275
  857.     local b2x,b2z = 7714,2665
  858.     local a3x,a3z = 9829,3275
  859.     local b3x,b3z = 9317,3658
  860.     local a4x,a4z = 10029,8223
  861.     local b4x,b4z = 10522,8629
  862.     local a5x,a5z = 9579,8873
  863.     local b5x,b5z = 10123,9208
  864.     local a9x,a9z = 9179,1525
  865.     local b9x,b9z = 9784,1732
  866.     local a10x,a10z = 7979,9523
  867.     local b10x,b10z = 7753,10077
  868.     local a11x,a11z = 5959,9491
  869.     local b11x,b11z = 6300,9864
  870.     local a12x,a12z = 5531,9723
  871.     local b12x,b12z = 5354,10293
  872.     local a13x,a13z = 4257,8867
  873.     local b13x,b13z = 3698,9061
  874.     local a14x,a14z = 3881,8223
  875.     local b14x,b14z = 3348,8575
  876.     local a15x,a15z = 4581,3675
  877.     local b15x,b15z = 4095,3276
  878.     local a16x,a16z = 5731,3025
  879.     local b16x,b16z = 5568,2449
  880.     local a17x,a17z = 6231,2625
  881.     local b17x,b17z = 6023,2261
  882.     local a18x,a18z = 6377,3809
  883.     local b18x,b18z = 6626,3230
  884.     local a19x,a19z = 7529,3775
  885.     local b19x,b19z = 7642,3198
  886.     local a20x,a20z = 9279,5375
  887.     local b20x,b20z = 8705,5523
  888.     local a21x,a21z = 9499,5843
  889.     local b21x,b21z = 9071,6318
  890.     local a22x,a22z = 4443,5833
  891.     local b22x,b22z = 4659,6434
  892.     local a23x,a23z = 4581,5525
  893.     local b23x,b23z = 5176,5467
  894.     local a24x,a24z = 6631,8373
  895.     local b24x,b24z = 7270,8386
  896.     local a25x,a25z = 5631,7073
  897.     local b25x,b25z = 5522,7703
  898.     local a26x,a26z = 8329,5725
  899.     local b26x,b26z = 7756,6007
  900.     local a27x,a27z = 8479,6275
  901.     local b27x,b27z = 8049,6573
  902.     local a28x,a28z = 7069,4447
  903.     local b28x,b28z = 7584,4753
  904.     local a29x,a29z = 5581,5775
  905.     local b29x,b29z = 6184,5972
  906.     local a30x,a30z = 5456,6192
  907.     local b30x,b30z = 5921,6390
  908.     local a31x,a31z = 8759,9639
  909.     local b31x,b31z = 8875,10218
  910.     local a32x,a32z = 8329,9723
  911.     local b32x,b32z = 8264,10359
  912.     local a33x,a33z = 10179,2075
  913.     local b33x,b33z = 10537,2604
  914.     local a34x,a34z = 11129,2525
  915.     local b34x,b34z = 11564,2993
  916.     local a35x,a35z = 12379,6773
  917.     local b35x,b35z = 12332,6136
  918.     local a36x,a36z = 12379,7223
  919.     local b36x,b36z = 12198,7835
  920.     local a37x,a37z = 12119,8295
  921.     local b37x,b37z = 11979,8877
  922.     local a38x,a38z = 6945,11493
  923.     local b38x,b38z = 6935,11893
  924.     local a39x,a39z = 6925,10579
  925.     local b39x,b39z = 6939,9942
  926.     local a40x,a40z = 2069,8901
  927.     local b40x,b40z = 1923,8328
  928.     local a41x,a41z = 1731,7823
  929.     local b41x,b41z = 1618,7197
  930.     local a42x,a42z = 1513,6763
  931.     local b42x,b42z = 1526,6142
  932.     local a43x,a43z = 2781,2475
  933.     local b43x,b43z = 2435,3012
  934.     local a44x,a44z = 3681,2049
  935.     local b44x,b44z = 3423,2590
  936.     local a45x,a45z = 4151,1789
  937.     local b45x,b45z = 4771,1633
  938.    
  939.     for _, JumpSpot in pairs(JumpSpots) do
  940.         if GetDistance(JumpSpot,mousePos) <= jumpmouserange and KeyDown(1) and ZedMiscConfig.jumphelper and GetMap() == 2 then
  941.             MoveToXYZ(JumpSpot.x,JumpSpot.y,JumpSpot.z)
  942.             jump = true
  943.         end
  944.     end
  945.    
  946.     if KeyDown(2) and ZedMiscConfig.jumphelper then
  947.         jump = false
  948.     end
  949.    
  950.     if jump == true and ZedMiscConfig.jumphelper and W1RDY == 1 and GetMap() == 2 then
  951.         if distXYZ(a1x,a1z,p.x,p.z)<jumpspotrange then
  952.             CastSpellXYZ('W',b1x,-189,b1z)
  953.         elseif distXYZ(b1x,b1z,p.x,p.z)<jumpspotrange then
  954.             CastSpellXYZ('W',a1x,-189,a1z)
  955.         elseif distXYZ(a2x,a2z,p.x,p.z)<jumpspotrange then
  956.             CastSpellXYZ('W',b2x,-189,b2z)
  957.         elseif distXYZ(b2x,b2z,p.x,p.z)<jumpspotrange then
  958.             CastSpellXYZ('W',a2x,-189,a2z)
  959.         elseif distXYZ(a3x,a3z,p.x,p.z)<jumpspotrange then
  960.             CastSpellXYZ('W',b3x,-189,b3z)
  961.         elseif distXYZ(b3x,b3z,p.x,p.z)<jumpspotrange then
  962.             CastSpellXYZ('W',a3x,-189,a3z)
  963.         elseif distXYZ(a4x,a4z,p.x,p.z)<jumpspotrange then
  964.             CastSpellXYZ('W',b4x,-189,b4z)
  965.         elseif distXYZ(b4x,b4z,p.x,p.z)<jumpspotrange then
  966.             CastSpellXYZ('W',a4x,-189,a4z)
  967.         elseif distXYZ(a5x,a5z,p.x,p.z)<jumpspotrange then
  968.             CastSpellXYZ('W',b5x,-189,b5z)
  969.         elseif distXYZ(b5x,b5z,p.x,p.z)<jumpspotrange then
  970.             CastSpellXYZ('W',a5x,-189,a5z)
  971.         elseif distXYZ(a9x,a9z,p.x,p.z)<jumpspotrange then
  972.             CastSpellXYZ('W',b9x,-189,b9z)
  973.         elseif distXYZ(b9x,b9z,p.x,p.z)<jumpspotrange then
  974.             CastSpellXYZ('W',a9x,-189,a9z)
  975.         elseif distXYZ(a10x,a10z,p.x,p.z)<jumpspotrange then
  976.             CastSpellXYZ('W',b10x,-189,b10z)
  977.         elseif distXYZ(b10x,b10z,p.x,p.z)<jumpspotrange then
  978.             CastSpellXYZ('W',a10x,-189,a10z)
  979.         elseif distXYZ(a11x,a11z,p.x,p.z)<jumpspotrange then
  980.             CastSpellXYZ('W',b11x,-189,b11z)
  981.         elseif distXYZ(b11x,b11z,p.x,p.z)<jumpspotrange then
  982.             CastSpellXYZ('W',a11x,-189,a11z)
  983.         elseif distXYZ(a12x,a12z,p.x,p.z)<jumpspotrange then
  984.             CastSpellXYZ('W',b12x,-189,b12z)
  985.         elseif distXYZ(b12x,b12z,p.x,p.z)<jumpspotrange then
  986.             CastSpellXYZ('W',a12x,-189,a12z)
  987.         elseif distXYZ(a13x,a13z,p.x,p.z)<jumpspotrange then
  988.             CastSpellXYZ('W',b13x,-189,b13z)
  989.         elseif distXYZ(b13x,b13z,p.x,p.z)<jumpspotrange then
  990.             CastSpellXYZ('W',a13x,-189,a13z)
  991.         elseif distXYZ(a14x,a14z,p.x,p.z)<jumpspotrange then
  992.             CastSpellXYZ('W',b14x,-189,b14z)
  993.         elseif distXYZ(b14x,b14z,p.x,p.z)<jumpspotrange then
  994.             CastSpellXYZ('W',a14x,-189,a14z)
  995.         elseif distXYZ(a15x,a15z,p.x,p.z)<jumpspotrange then
  996.             CastSpellXYZ('W',b15x,-189,b15z)
  997.         elseif distXYZ(b15x,b15z,p.x,p.z)<jumpspotrange then
  998.             CastSpellXYZ('W',a15x,-189,a15z)
  999.         elseif distXYZ(a16x,a16z,p.x,p.z)<jumpspotrange then
  1000.             CastSpellXYZ('W',b16x,-189,b16z)
  1001.         elseif distXYZ(b16x,b16z,p.x,p.z)<jumpspotrange then
  1002.             CastSpellXYZ('W',a16x,-189,a16z)
  1003.         elseif distXYZ(a17x,a17z,p.x,p.z)<jumpspotrange then
  1004.             CastSpellXYZ('W',b17x,-189,b17z)
  1005.         elseif distXYZ(b17x,b17z,p.x,p.z)<jumpspotrange then
  1006.             CastSpellXYZ('W',a17x,-189,a17z)
  1007.         elseif distXYZ(a18x,a18z,p.x,p.z)<jumpspotrange then
  1008.             CastSpellXYZ('W',b18x,-189,b18z)
  1009.         elseif distXYZ(b18x,b18z,p.x,p.z)<jumpspotrange then
  1010.             CastSpellXYZ('W',a18x,-189,a18z)
  1011.         elseif distXYZ(a19x,a19z,p.x,p.z)<jumpspotrange then
  1012.             CastSpellXYZ('W',b19x,-189,b19z)
  1013.         elseif distXYZ(b19x,b19z,p.x,p.z)<jumpspotrange then
  1014.             CastSpellXYZ('W',a19x,-189,a19z)
  1015.         elseif distXYZ(a20x,a20z,p.x,p.z)<jumpspotrange then
  1016.             CastSpellXYZ('W',b20x,-189,b20z)
  1017.         elseif distXYZ(b20x,b20z,p.x,p.z)<jumpspotrange then
  1018.             CastSpellXYZ('W',a20x,-189,a20z)
  1019.         elseif distXYZ(a21x,a21z,p.x,p.z)<jumpspotrange then
  1020.             CastSpellXYZ('W',b21x,-189,b21z)
  1021.         elseif distXYZ(b21x,b21z,p.x,p.z)<jumpspotrange then
  1022.             CastSpellXYZ('W',a21x,-189,a21z)
  1023.         elseif distXYZ(a22x,a22z,p.x,p.z)<jumpspotrange then
  1024.             CastSpellXYZ('W',b22x,-189,b22z)
  1025.         elseif distXYZ(b22x,b22z,p.x,p.z)<jumpspotrange then
  1026.             CastSpellXYZ('W',a22x,-189,a22z)
  1027.         elseif distXYZ(a23x,a23z,p.x,p.z)<jumpspotrange then
  1028.             CastSpellXYZ('W',b23x,-189,b23z)
  1029.         elseif distXYZ(b23x,b23z,p.x,p.z)<jumpspotrange then
  1030.             CastSpellXYZ('W',a23x,-189,a23z)
  1031.         elseif distXYZ(a24x,a24z,p.x,p.z)<jumpspotrange then
  1032.             CastSpellXYZ('W',b24x,-189,b24z)
  1033.         elseif distXYZ(b24x,b24z,p.x,p.z)<jumpspotrange then
  1034.             CastSpellXYZ('W',a24x,-189,a24z)
  1035.         elseif distXYZ(a25x,a25z,p.x,p.z)<jumpspotrange then
  1036.             CastSpellXYZ('W',b25x,-189,b25z)
  1037.         elseif distXYZ(b25x,b25z,p.x,p.z)<jumpspotrange then
  1038.             CastSpellXYZ('W',a25x,-189,a25z)
  1039.         elseif distXYZ(a26x,a26z,p.x,p.z)<jumpspotrange then
  1040.             CastSpellXYZ('W',b26x,-189,b26z)
  1041.         elseif distXYZ(b26x,b26z,p.x,p.z)<jumpspotrange then
  1042.             CastSpellXYZ('W',a26x,-189,a26z)
  1043.         elseif distXYZ(a27x,a27z,p.x,p.z)<jumpspotrange then
  1044.             CastSpellXYZ('W',b27x,-189,b27z)
  1045.         elseif distXYZ(b27x,b27z,p.x,p.z)<jumpspotrange then
  1046.             CastSpellXYZ('W',a27x,-189,a27z)
  1047.         elseif distXYZ(a28x,a28z,p.x,p.z)<jumpspotrange then
  1048.             CastSpellXYZ('W',b28x,-189,b28z)
  1049.         elseif distXYZ(b28x,b28z,p.x,p.z)<jumpspotrange then
  1050.             CastSpellXYZ('W',a28x,-189,a28z)
  1051.         elseif distXYZ(a29x,a29z,p.x,p.z)<jumpspotrange then
  1052.             CastSpellXYZ('W',b29x,-189,b29z)
  1053.         elseif distXYZ(b29x,b29z,p.x,p.z)<jumpspotrange then
  1054.             CastSpellXYZ('W',a29x,-189,a29z)
  1055.         elseif distXYZ(a30x,a30z,p.x,p.z)<jumpspotrange then
  1056.             CastSpellXYZ('W',b30x,-189,b30z)
  1057.         elseif distXYZ(b30x,b30z,p.x,p.z)<jumpspotrange then
  1058.             CastSpellXYZ('W',a30x,-189,a30z)
  1059.         elseif distXYZ(a31x,a31z,p.x,p.z)<jumpspotrange then
  1060.             CastSpellXYZ('W',b31x,-189,b31z)   
  1061.         elseif distXYZ(b31x,b31z,p.x,p.z)<jumpspotrange then
  1062.             CastSpellXYZ('W',a31x,-189,a31z)
  1063.         elseif distXYZ(a32x,a32z,p.x,p.z)<jumpspotrange then
  1064.             CastSpellXYZ('W',b32x,-189,b32z)
  1065.         elseif distXYZ(b32x,b32z,p.x,p.z)<jumpspotrange then
  1066.             CastSpellXYZ('W',a32x,-189,a32z)
  1067.         elseif distXYZ(a33x,a33z,p.x,p.z)<jumpspotrange then
  1068.             CastSpellXYZ('W',b33x,-189,b33z)   
  1069.         elseif distXYZ(b33x,b33z,p.x,p.z)<jumpspotrange then
  1070.             CastSpellXYZ('W',a33x,-189,a33z)
  1071.         elseif distXYZ(a34x,a34z,p.x,p.z)<jumpspotrange then
  1072.             CastSpellXYZ('W',b34x,-189,b34z)       
  1073.         elseif distXYZ(b34x,b34z,p.x,p.z)<jumpspotrange then
  1074.             CastSpellXYZ('W',a34x,-189,a34z)   
  1075.         elseif distXYZ(a35x,a35z,p.x,p.z)<jumpspotrange then
  1076.             CastSpellXYZ('W',b35x,-189,b35z)       
  1077.         elseif distXYZ(b35x,b35z,p.x,p.z)<jumpspotrange then
  1078.             CastSpellXYZ('W',a35x,-189,a35z)   
  1079.         elseif distXYZ(a36x,a36z,p.x,p.z)<jumpspotrange then
  1080.             CastSpellXYZ('W',b36x,-189,b36z)       
  1081.         elseif distXYZ(b36x,b36z,p.x,p.z)<jumpspotrange then
  1082.             CastSpellXYZ('W',a36x,-189,a36z)       
  1083.         elseif distXYZ(a37x,a37z,p.x,p.z)<jumpspotrange then
  1084.             CastSpellXYZ('W',b37x,-189,b37z)           
  1085.         elseif distXYZ(b37x,b37z,p.x,p.z)<jumpspotrange then
  1086.             CastSpellXYZ('W',a37x,-189,a37z)   
  1087.         elseif distXYZ(a38x,a38z,p.x,p.z)<jumpspotrange then
  1088.             CastSpellXYZ('W',b38x,-189,b38z)       
  1089.         elseif distXYZ(b38x,b38z,p.x,p.z)<jumpspotrange then
  1090.             CastSpellXYZ('W',a38x,-189,a38z)   
  1091.         elseif distXYZ(a39x,a39z,p.x,p.z)<jumpspotrange then
  1092.             CastSpellXYZ('W',b39x,-189,b39z)   
  1093.         elseif distXYZ(b39x,b39z,p.x,p.z)<jumpspotrange then
  1094.             CastSpellXYZ('W',a39x,-189,a39z)       
  1095.         elseif distXYZ(a40x,a40z,p.x,p.z)<jumpspotrange then
  1096.             CastSpellXYZ('W',b40x,-189,b40z)       
  1097.         elseif distXYZ(b40x,b40z,p.x,p.z)<jumpspotrange then
  1098.             CastSpellXYZ('W',a40x,-189,a40z)
  1099.         elseif distXYZ(a41x,a41z,p.x,p.z)<jumpspotrange then
  1100.             CastSpellXYZ('W',b41x,-189,b41z)       
  1101.         elseif distXYZ(b41x,b41z,p.x,p.z)<jumpspotrange then
  1102.             CastSpellXYZ('W',a41x,-189,a41z)   
  1103.         elseif distXYZ(a42x,a42z,p.x,p.z)<jumpspotrange then
  1104.             CastSpellXYZ('W',b42x,-189,b42z)       
  1105.         elseif distXYZ(b42x,b42z,p.x,p.z)<jumpspotrange then
  1106.             CastSpellXYZ('W',a42x,-189,a42z)
  1107.         elseif distXYZ(a43x,a43z,p.x,p.z)<jumpspotrange then
  1108.             CastSpellXYZ('W',b43x,-189,b43z)       
  1109.         elseif distXYZ(b43x,b43z,p.x,p.z)<jumpspotrange then
  1110.             CastSpellXYZ('W',a43x,-189,a43z)   
  1111.         elseif distXYZ(a44x,a44z,p.x,p.z)<jumpspotrange then
  1112.             CastSpellXYZ('W',b44x,-189,b44z)   
  1113.         elseif distXYZ(b44x,b44z,p.x,p.z)<jumpspotrange then
  1114.             CastSpellXYZ('W',a44x,-189,a44z)       
  1115.         elseif distXYZ(a45x,a45z,p.x,p.z)<jumpspotrange then
  1116.             CastSpellXYZ('W',b45x,-189,b45z)       
  1117.         elseif distXYZ(b45x,b45z,p.x,p.z)<jumpspotrange then
  1118.             CastSpellXYZ('W',a45x,-189,a45z)
  1119.         end
  1120.     end
  1121. end
  1122.  
  1123. SetTimerCallback("ZedMain")
  1124. print("\nVal's Zed v"..version.."\n")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement