Advertisement
Guest User

Yi Q Dodge by Logge

a guest
Aug 31st, 2015
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.38 KB | None | 0 0
  1. if GetObjectName(GetMyHero()) == "MasterYi" then
  2.  
  3. debug=true
  4. delay=false
  5. castQ=false
  6. beta=true
  7.  
  8. Q_ON = {
  9. ["Aatrox"]      = {0,_R},
  10. ["Ahri"]        = {0,_E},
  11. ["Akali"]       = {0,_Q},
  12. ["Alistar"]     = {0,_Q,_W},
  13. ["Amumu"]       = {0,_R},
  14. ["Anivia"]      = {0,_E},
  15. ["Annie"]       = {0,_R},
  16. ["Ashe"]        = {0,_R},
  17. ["Azir"]        = {0,_R},
  18. ["Blitzcrank"]  = {0,_Q},
  19. ["Brand"]       = {0,_R},       --current pos to add alphabetically
  20. ["Caitlyn"]     = {0,_R},
  21. ["Cassiopeia"]  = {0,_R},
  22. ["Darius"]      = {0,_R},
  23. ["Draven"]      = {0,_R},
  24. ["Elise"]       = {0,_E},
  25. ["Fizz"]        = {0,_R},
  26. ["Garen"]       = {0,_R},
  27. ["Gragas"]      = {0,_E},
  28. ["Graves"]      = {0,_R},
  29. ["Hecarim"]     = {0,_R},
  30. ["JarvanIV"]    = {0,_R},
  31. ["Jinx"]        = {0,_R},
  32. ["Kassadin"]    = {0,_R},
  33. ["Katarina"]    = {0,_Q},
  34. ["KhaZix"]      = {0,_E},
  35. ["LeeSin"]      = {0,_R},
  36. ["Lissandra"]   = {0,_R},
  37. ["Lulu"]        = {0,_W},
  38. ["Lucian"]      = {0,_E},
  39. ["Lux"]         = {0,_Q},
  40. ["Malphite"]    = {0,_R},
  41. ["Malzahar"]    = {0,_R},
  42. ["Morgana"]     = {0,_R},
  43. ["Nautilus"]    = {0,_R},
  44. ["Orianna"]     = {0,_R},
  45. ["Pantheon"]    = {0,_W},
  46. ["Quinn"]       = {0,_Q,_E},
  47. ["Rammus"]      = {0,_E},
  48. ["RekSai"]      = {0,_E},
  49. ["Renekton"]    = {0,_W},
  50. ["Rumble"]      = {0,_R},
  51. ["Ryze"]        = {0,_W},
  52. ["Sejuani"]     = {0,_R},
  53. ["Shaco"]       = {0,_Q},
  54. ["Shen"]        = {0,_E},
  55. ["Singed"]      = {0,_E},
  56. ["Skarner"]     = {0,_R},
  57. ["Sona"]        = {0,_R},
  58. ["Syndra"]      = {20,_R},
  59. ["Talon"]       = {0,_R},
  60. ["Taric"]       = {0,_E},
  61. ["Teemo"]       = {0,_Q},       --FUCK YOU
  62. ["Thresh"]      = {0,_E},
  63. ["Tryndamere"]  = {0,_E},
  64. ["TwistedFate"] = {0,_E},       --special goldcardpreattack
  65. ["Urgot"]       = {0,_R},
  66. ["Varus"]       = {0,_R},
  67. ["Vayne"]       = {0,_E},
  68. ["Veigar"]      = {0,_R},
  69. ["Vi"]          = {0,_R},
  70. ["Vladimir"]    = {0,_R},
  71. ["Warwick"]     = {0,_R},
  72. ["Xerath"]      = {0,_E},
  73. ["Trundle"]     = {0,_R},
  74. ["Tristana"]    = {0,_W},
  75. ["Yasuo"]       = {0,_R},       --special yasuoq3/yasuoq3w
  76. ["Zyra"]        = {0,_E}
  77. }
  78.  
  79. if beta then
  80. Q_ON = {
  81. ["Riven"]       = {0,_R},
  82. ["Nocturne"]    = {0,_R},
  83. ["Karthus"]     = {3000,_R},
  84. ["Zed"]         = {0,_R},
  85. ["Jax"]         = {1000,_E},
  86. ["Rengar"]      = {0,_Q},
  87. }
  88. end
  89.  
  90. -- Menu
  91. Config = scriptConfig("Yi", "Yi")
  92. Config.addParam("Q", "Use aw Q", SCRIPT_PARAM_ONOFF, true)
  93.  
  94.  
  95.  
  96. -- IAC Load
  97. myIAC = IAC()
  98.  
  99. -- Start
  100. OnLoop(function(myHero)
  101.     local unit = GetTarget(1500, DAMAGE_NORMAL)
  102.     if delay and delay<=GetTickCount() and ValidTarget(unit,GetCastRange(myHero,_Q)) and castQ and Config.Q then
  103.         PrintChat("USED Q")
  104.         CastTargetSpell(unit,_Q)
  105.         castQ=false
  106.     end
  107.     if ValidTarget(unit,GetCastRange(myHero,_E)) and CanUseSpell(myHero, _E) then
  108.     CastSpell(_E)
  109.     PrintChat("Used E")
  110.     end
  111. delay=false
  112.    
  113. end)
  114.  
  115.  
  116. OnProcessSpell(function(unit, spellProc)
  117.     if GetTeam(unit) ~= GetTeam(myHero) and GetObjectType(unit) == Obj_AI_Hero and Config.Q and Q_ON[GetObjectName(unit)] and ValidTarget(unit,GetCastRange(myHero,_Q)) then
  118.                     if debug then PrintChat(GetObjectType(unit)..":"..spellProc.name) end       --DEBUG
  119.        
  120.         for n,slot in pairs(Q_ON[GetObjectName(unit)]) do
  121.             if n==1 then
  122.                 delay=slot
  123.             else
  124.                 if debug then PrintChat("Looking for "..GetCastName(unit,slot)) end         --DEBUG
  125.                 if spellProc.name==GetCastName(unit,slot) then
  126.                
  127.                     PrintChat("Q'd on "..spellProc.name.." with "..delay.."ms delay")
  128.                     castQ=true
  129.                    
  130.                    
  131.                     delay=GetTickCount()+delay
  132.                 elseif spellProc.name=="goldcardpreattack" or spellProc.name=="yasuoq3" or spellProc.name=="yasuoq3w" then
  133.                     castQ=true
  134.                     delay=GetTickCount()
  135.                 end
  136.             end
  137.         end
  138.     end
  139. end)
  140.  
  141.  
  142. PrintChat("Yi Loaded")
  143. PrintChat("Enjoy your game - Logge")
  144. end -- End script
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement