sociophobia

HQ Vayne v2.0 ty deftsu

Aug 11th, 2015
2,079
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.19 KB | None | 0 0
  1. require 'MapPositionGOS'
  2. PrintChat("Life sucks")
  3. PrintChat("Have you ever seen the walking dead? I do , everyday on the mirror")
  4. Config = scriptConfig("Vayne", "Laiha's Vayne")
  5. Config.addParam("Q", "Use Q", SCRIPT_PARAM_ONOFF, true)
  6. Config.addParam("AutoE", "Auto E", SCRIPT_PARAM_ONOFF, true)
  7. Config.addParam("Walltumble1", "Walltumble Mid", SCRIPT_PARAM_KEYDOWN, string.byte("T"))
  8. Config.addParam("Walltumble2", "Walltumble Drake", SCRIPT_PARAM_KEYDOWN, string.byte("U"))
  9. Config.addParam("R", "Use R (Soon)", SCRIPT_PARAM_ONOFF, true)
  10. Config.addParam("Autolvl", "Gosu Autolvl", SCRIPT_PARAM_ONOFF, false)
  11. DrawingsConfig = scriptConfig("Drawings", "Drawings")
  12. DrawingsConfig.addParam("DrawE","Draw E", SCRIPT_PARAM_ONOFF, true)
  13. DrawingsConfig.addParam("DrawE2","Draw E Push Distance", SCRIPT_PARAM_ONOFF, true)
  14. DrawingsConfig.addParam("DrawWT","Draw WT Positions",SCRIPT_PARAM_ONOFF,true)
  15. ItemsConfig = scriptConfig("Items", "Items")
  16. ItemsConfig.addParam("Item1","Use BotRk",SCRIPT_PARAM_ONOFF,true)
  17. ItemsConfig.addParam("Item2","Use Bilgewatmter Cutlass",SCRIPT_PARAM_ONOFF,true)
  18. ItemsConfig.addParam("Item3","Use Youmuu",SCRIPT_PARAM_ONOFF,true)
  19. local CHANELLING_SPELLS = {
  20. ["Caitlyn"] = _R,
  21. ["Katarina"] = _R,
  22. ["MasterYi"] = _W,
  23. ["Fiddlesticks"] = _R,
  24. ["Galio"] = _R,
  25. ["Lucian"] = _R,
  26. ["MissFortune"] = _R,
  27. ["VelKoz"] = _R,
  28. ["Nunu"] = _R,
  29. ["Shen"] = _R,
  30. ["Karthus"] = _R,
  31. ["Malzahar"] = _R,
  32. ["Pantheon"] = _R,
  33. ["Warwick"] = _R,
  34. ["Xerath"] = _R,
  35. }
  36.  
  37. myIAC = IAC()
  38.  
  39.  
  40.  
  41. OnLoop(function(myHero)
  42. Drawings()
  43.  
  44. if Config.Autolvl then
  45. LevelUp()
  46. end
  47.  
  48. if Config.AutoE then
  49. AutoE()
  50. end
  51.  
  52. if IWalkConfig.Combo then
  53.  
  54. local target = GetTarget(600, DAMAGE_PHYSICAL)
  55. local HeroPos = GetOrigin(myHero)
  56. local mousePos = GetMousePos()
  57. local AfterTumblePos = HeroPos + (Vector(mousePos) - HeroPos):normalized() * 300
  58. local DistanceAfterTumble = GetDistanceSqr(AfterTumblePos, Target)
  59. if ValidTarget(target, 600) and Config.Q then
  60.  
  61. if DistanceAfterTumble < 630*630 and DistanceAfterTumble > 300*300 then
  62. CastSkillShot(_Q, mousePos.x, mousePos.y, mousePos.z)
  63. end
  64. if GetDistanceSqr(Target) > 630*630 and DistanceAfterTumble < 630*630 then
  65. CastSkillShot(_Q, mousePos.x, mousePos.y, mousePos.z)
  66. end
  67.  
  68.  
  69. if GetItemSlot(myHero,3153) > 0 and ItemsConfig.Item1 and GetCurrentHP(myHero)/GetMaxHP(myHero) < 0.5 and GetCurrentHP(target)/GetMaxHP(target) > 0.2 then
  70. CastTargetSpell(target, GetItemSlot(myHero,3153))
  71. end
  72.  
  73. if GetItemSlot(myHero,3144) > 0 and ItemsConfig.Item2 and GetCurrentHP(myHero)/GetMaxHP(myHero) < 0.5 and GetCurrentHP(target)/GetMaxHP(target) > 0.2 then
  74. CastTargetSpell(target, GetItemSlot(myHero,3144))
  75. end
  76.  
  77. if GetItemSlot(myHero,3142) > 0 and ItemsConfig.Item3 then
  78. CastTargetSpell(target, GetItemSlot(myHero,3142))
  79. end
  80.  
  81.  
  82. end
  83. end
  84. local HeroPos = GetOrigin(myHero)
  85. if CanUseSpell(myHero, _Q) == READY then
  86. if Config.Walltumble1 and HeroPos.x == 6962 and HeroPos.z == 8952 then
  87. CastSkillShot(_Q,6667.3271484375, 51, 8794.64453125)
  88. elseif Config.Walltumble1 then
  89. MoveToXYZ(6962, 51, 8952)
  90. end
  91.  
  92. if Config.Walltumble2 and HeroPos.x == 12060 and HeroPos.z == 4806 then
  93. CastSkillShot(_Q,11745.198242188, 51, 4625.4379882813)
  94. elseif Config.Walltumble2 then
  95. MoveToXYZ(12060, 51, 4806)
  96. end
  97. end
  98. end)
  99.  
  100. function AutoE()
  101. for _,target in pairs(GetEnemyHeroes()) do
  102. if ValidTarget(target,20000) then
  103. local enemyposx,enemyposy,enemypoz,selfx,selfy,selfz
  104. local distance1=24
  105. local distance2=118
  106. local distance3=212
  107. local distance4=306
  108. local distance5=400
  109.  
  110. local enemyposition = GetOrigin(target)
  111. enemyposx=enemyposition.x
  112. enemyposy=enemyposition.y
  113. enemyposz=enemyposition.z
  114. local TargetPos = Vector(enemyposx,enemyposy,enemyposz)
  115.  
  116. local self=GetOrigin(myHero)
  117. selfx = self.x
  118. selfy = self.y
  119. selfz = self.z
  120. local HeroPos = Vector(selfx, selfy, selfz)
  121.  
  122. local Pos1 = TargetPos-(TargetPos-HeroPos)*(-distance1/GetDistance(target))
  123. local Pos2 = TargetPos-(TargetPos-HeroPos)*(-distance2/GetDistance(target))
  124. local Pos3 = TargetPos-(TargetPos-HeroPos)*(-distance3/GetDistance(target))
  125. local Pos4 = TargetPos-(TargetPos-HeroPos)*(-distance4/GetDistance(target))
  126. local Pos5 = TargetPos-(TargetPos-HeroPos)*(-distance5/GetDistance(target))
  127.  
  128. if MapPosition:inWall(Pos1)==true then
  129. if GetDistance(target)<=550 then
  130. CastTargetSpell(target, _E)
  131. end
  132. end
  133.  
  134. if MapPosition:inWall(Pos2)==true then
  135. if GetDistance(target)<=550 then
  136. CastTargetSpell(target, _E)
  137. end
  138. end
  139.  
  140. if MapPosition:inWall(Pos3)==true then
  141. if GetDistance(target)<=550 then
  142. CastTargetSpell(target, _E)
  143. end
  144. end
  145.  
  146. if MapPosition:inWall(Pos4)==true then
  147. if GetDistance(target)<=550 then
  148. CastTargetSpell(target, _E)
  149. end
  150. end
  151.  
  152. if MapPosition:inWall(Pos5)==true then
  153. if GetDistance(target)<=550 then
  154. CastTargetSpell(target, _E)
  155. end
  156. end
  157.  
  158. end
  159. end
  160. end
  161.  
  162. function LevelUp()
  163.  
  164. if GetLevel(myHero) == 1 then
  165. LevelSpell(_Q)
  166. elseif GetLevel(myHero) == 2 then
  167. LevelSpell(_W)
  168. elseif GetLevel(myHero) == 3 then
  169. LevelSpell(_E)
  170. elseif GetLevel(myHero) == 4 then
  171. LevelSpell(_W)
  172. elseif GetLevel(myHero) == 5 then
  173. LevelSpell(_W)
  174. elseif GetLevel(myHero) == 6 then
  175. LevelSpell(_R)
  176. elseif GetLevel(myHero) == 7 then
  177. LevelSpell(_W)
  178. elseif GetLevel(myHero) == 8 then
  179. LevelSpell(_Q)
  180. elseif GetLevel(myHero) == 9 then
  181. LevelSpell(_W)
  182. elseif GetLevel(myHero) == 10 then
  183. LevelSpell(_Q)
  184. elseif GetLevel(myHero) == 11 then
  185. LevelSpell(_R)
  186. elseif GetLevel(myHero) == 12 then
  187. LevelSpell(_Q)
  188. elseif GetLevel(myHero) == 13 then
  189. LevelSpell(_Q)
  190. elseif GetLevel(myHero) == 14 then
  191. LevelSpell(_E)
  192. elseif GetLevel(myHero) == 15 then
  193. LevelSpell(_E)
  194. elseif GetLevel(myHero) == 16 then
  195. LevelSpell(_R)
  196. elseif GetLevel(myHero) == 17 then
  197. LevelSpell(_E)
  198. elseif GetLevel(myHero) == 18 then
  199. LevelSpell(_E)
  200. end
  201. end
  202.  
  203. OnProcessSpell(function(unit, spell)
  204. if not unit or GetTeam(unit) == GetTeam(GetMyHero()) or not CHANELLING_SPELLS[GetObjectName(unit)] then
  205. if IsInDistance(unit, GetCastRange(myHero,_E)) and CanUseSpell(myHero, _E) == READY then
  206. CastTargetSpell(unit, _E)
  207. end
  208. end
  209. if (spell.name == GetCastName(unit, CHANELLING_SPELLS[GetObjectName(unit)])) and (spell.target == GetMyHero() or GetDistance(spell.endPos) < 2000) then
  210. if IsInDistance(unit, GetCastRange(myHero,_E)) and CanUseSpell(myHero,_E) == READY then
  211. CastTargetSpell(unit, _E)
  212. end
  213. end
  214. end)
  215.  
  216. function Drawings()
  217. myHeroPos=GetOrigin(myHero)
  218. if DrawingsConfig.DrawWT then
  219. DrawCircle(6962, 51, 8952,80, ARGB(0xFF,0,0xFF,0))
  220. DrawCircle(12060, 51, 4806,80, ARGB(0xFF,0,0xFF,0))
  221. end
  222.  
  223. if CanUseSpell(myHero, _E) == READY and DrawingsConfig.DrawE then
  224. for _, Targets in pairs(GetEnemyHeroes()) do
  225. local TargetPos=GetOrigin(Targets)
  226. local drawPos = WorldToScreen(1, TargetPos.x, TargetPos.y, TargetPos.z) -- Draw Position for AA Text
  227. local Damage = GetBaseDamage(myHero) + GetBonusDmg(myHero) -- Damage without W extra Damage
  228. if GetCastLevel(myHero, _W) > 0 then -- Check if W is skilled
  229. if GetCastLevel(myHero, _W) == 1 then -- W Spell Level 1
  230. Damage = 20 + (GetMaxHP(Targets) / 100 * 4) + (GetBaseDamage(myHero) + GetBonusDmg(myHero))
  231. elseif GetCastLevel(myHero, _W) == 2 then -- W Spell Level 2
  232. Damage = 30 + (GetMaxHP(Targets) / 100 * 5) + (GetBaseDamage(myHero) + GetBonusDmg(myHero))
  233. elseif GetCastLevel(myHero, _W) == 3 then -- W Spell Level 3
  234. Damage = 40 + (GetMaxHP(Targets) / 100 * 6) + (GetBaseDamage(myHero) + GetBonusDmg(myHero))
  235. elseif GetCastLevel(myHero, _W) == 4 then -- W Spell Level 4
  236. Damage = 50 + (GetMaxHP(Targets) / 100 * 7) + (GetBaseDamage(myHero) + GetBonusDmg(myHero))
  237. elseif GetCastLevel(myHero, _W) == 5 then -- W Spell Level 5
  238. Damage = 60 + (GetMaxHP(Targets) / 100 * 8) + (GetBaseDamage(myHero) + GetBonusDmg(myHero))
  239. end
  240. end
  241. if GetCastLevel(myHero, _W) == 0 then
  242. DrawText((math.floor(GetCurrentHP(Targets) / Damage) + 0.0) .." AA to Kill", 20, drawPos.x, drawPos.y, 0xffffffff)
  243. elseif GetCastLevel(myHero, _W) >= 1 then -- W Spell Level 1 or higher
  244. DrawText((math.floor(GetCurrentHP(Targets) / Damage * 2) + 0.0) .." AA to Kill", 20, drawPos.x, drawPos.y, 0xffffffff)
  245. end
  246. end
  247. DrawCircle(myHeroPos.x,myHeroPos.y,myHeroPos.z,GetCastRange(myHero,_E),3,100,0xff00ff00) end
  248. end
  249. AddGapcloseEvent(_E, 450, true)
Advertisement
Add Comment
Please, Sign In to add comment