Advertisement
Guest User

Yi Q Dodge by Logge

a guest
Aug 31st, 2015
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.46 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 awesome Q", SCRIPT_PARAM_ONOFF, true)
  93. Config.addParam("E", "Use E", SCRIPT_PARAM_ONOFF, true)
  94.  
  95.  
  96.  
  97. -- IAC Load
  98. myIAC = IAC()
  99.  
  100. -- Start
  101. OnLoop(function(myHero)
  102.     local unit = GetTarget(1500, DAMAGE_NORMAL)
  103.     if delay and delay<=GetTickCount() and ValidTarget(unit,GetCastRange(myHero,_Q)) and castQ and Config.Q then
  104.         PrintChat("USED Q")
  105.         CastTargetSpell(unit,_Q)
  106.         castQ=false
  107.     end
  108.     if ValidTarget(unit,GetCastRange(myHero,_E)) and CanUseSpell(myHero, _E) and Config.E then
  109.     CastSpell(_E)
  110.     PrintChat("Used E")
  111.     end
  112. delay=false
  113.    
  114. end)
  115.  
  116.  
  117. OnProcessSpell(function(unit, spellProc)
  118.     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
  119.                     if debug then PrintChat(GetObjectType(unit)..":"..spellProc.name) end       --DEBUG
  120.        
  121.         for n,slot in pairs(Q_ON[GetObjectName(unit)]) do
  122.             if n==1 then
  123.                 delay=slot
  124.             else
  125.                 if debug then PrintChat("Looking for "..GetCastName(unit,slot)) end         --DEBUG
  126.                 if spellProc.name==GetCastName(unit,slot) then
  127.                
  128.                     PrintChat("Q'd on "..spellProc.name.." with "..delay.."ms delay")
  129.                     castQ=true
  130.                    
  131.                    
  132.                     delay=GetTickCount()+delay
  133.                 elseif spellProc.name=="goldcardpreattack" or spellProc.name=="yasuoq3" or spellProc.name=="yasuoq3w" then
  134.                     castQ=true
  135.                     delay=GetTickCount()
  136.                 end
  137.             end
  138.         end
  139.     end
  140. end)
  141.  
  142.  
  143. PrintChat("Yi Loaded")
  144. PrintChat("Enjoy your game - Logge")
  145. end -- End script
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement