Advertisement
Guest User

Untitled

a guest
Aug 30th, 2015
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.57 KB | None | 0 0
  1. require('MapPositionGOS')
  2. PrintChat("D3ftland Vayne By Deftsu Loaded, Have A Good Game!")
  3. PrintChat("Please don't forget to turn off F7 orbwalker!")
  4. Config = scriptConfig("Vayne", "Vayne")
  5. Config.addParam("E", "Use E", SCRIPT_PARAM_ONOFF, true)
  6. Config.addParam("R", "Use R (logic)", SCRIPT_PARAM_ONOFF, true)
  7. Config.addParam("Item1","Use BotRK",SCRIPT_PARAM_ONOFF,true)
  8. Config.addParam("Item2","Use Bilgewatter",SCRIPT_PARAM_ONOFF,true)
  9. Config.addParam("Item3","Use Youmuu",SCRIPT_PARAM_ONOFF,true)
  10. Config.addParam("Item4", "Use QSS", SCRIPT_PARAM_ONOFF, true)
  11. MiscConfig = scriptConfig("Misc", "Misc")
  12. MiscConfig.addParam("AutoE", "Auto E", SCRIPT_PARAM_ONOFF, true)
  13. MiscConfig.addParam("Walltumble1", "Walltumble Mid", SCRIPT_PARAM_KEYDOWN, string.byte("T"))
  14. MiscConfig.addParam("Walltumble2", "Walltumble Drake", SCRIPT_PARAM_KEYDOWN, string.byte("U"))
  15. MiscConfig.addParam("Autolvl", "Gosu Autolvl", SCRIPT_PARAM_ONOFF, true)
  16. DrawingsConfig = scriptConfig("Drawings", "Drawings")
  17. DrawingsConfig.addParam("DrawQ","Draw Q", SCRIPT_PARAM_ONOFF, true)
  18. DrawingsConfig.addParam("DrawE","Draw E", SCRIPT_PARAM_ONOFF, true)
  19. DrawingsConfig.addParam("DrawWT","Draw WT Positions",SCRIPT_PARAM_ONOFF,true)
  20.  
  21. myIAC = IAC()
  22.  
  23. CHANELLING_SPELLS = {
  24. ["Caitlyn"] = {_R},
  25. ["Katarina"] = {_R},
  26. ["MasterYi"] = {_W},
  27. ["FiddleSticks"] = {_W, _R},
  28. ["Galio"] = {_R},
  29. ["Lucian"] = {_R},
  30. ["MissFortune"] = {_R},
  31. ["VelKoz"] = {_R},
  32. ["Nunu"] = {_R},
  33. ["Shen"] = {_R},
  34. ["Karthus"] = {_R},
  35. ["Malzahar"] = {_R},
  36. ["Pantheon"] = {_R},
  37. ["Warwick"] = {_R},
  38. ["Xerath"] = {_R},
  39. }
  40.  
  41. local callback = nil
  42.  
  43. OnProcessSpell(function(unit, spell)
  44. if not callback or not unit or GetObjectType(unit) ~= Obj_AI_Hero or GetTeam(unit) == GetTeam(GetMyHero()) then return end
  45. local unitChanellingSpells = CHANELLING_SPELLS[GetObjectName(unit)]
  46.  
  47. if unitChanellingSpells then
  48. for _, spellSlot in pairs(unitChanellingSpells) do
  49. if spell.name == GetCastName(unit, spellSlot) then callback(unit, CHANELLING_SPELLS) end
  50. end
  51. end
  52. end)
  53.  
  54. function addInterrupterCallback( callback0 )
  55. callback = callback0
  56. end
  57.  
  58. local mousePos = GetMousePos()
  59.  
  60. OnLoop(function(myHero)
  61. local target = GetTarget(700, DAMAGE_PHYSICAL)
  62.  
  63. if GetItemSlot(myHero,3153) > 0 and Config.Item1 and ValidTarget(target, 550) and GetCurrentHP(myHero)/GetMaxHP(myHero) < 0.5 and GetCurrentHP(target)/GetMaxHP(target) > 0.2 then
  64. CastTargetSpell(target, GetItemSlot(myHero,3153))
  65. end
  66.  
  67. if GetItemSlot(myHero,3144) > 0 and Config.Item2 and ValidTarget(target, 550) and GetCurrentHP(myHero)/GetMaxHP(myHero) < 0.5 and GetCurrentHP(target)/GetMaxHP(target) > 0.2 then
  68. CastTargetSpell(target, GetItemSlot(myHero,3144))
  69. end
  70.  
  71. if GetItemSlot(myHero,3142) > 0 and Config.Item3 then
  72. CastTargetSpell(myHero, GetItemSlot(myHero,3142))
  73. end
  74.  
  75. if GetItemSlot(myHero,3140) > 0 and Config.Item4 and GotBuff(myHero, "rocketgrab2") > 0 or GotBuff(myHero, "charm") > 0 or GotBuff(myHero, "fear") > 0 or GotBuff(myHero, "flee") > 0 or GotBuff(myHero, "snare") > 0 or GotBuff(myHero, "taunt") > 0 or GotBuff(myHero, "suppression") > 0 or GotBuff(myHero, "stun") > 0 or GotBuff(myHero, "zedultexecute") > 0 or GotBuff(myHero, "summonerexhaust") > 0 and (GetCurrentHP(myHero)/GetMaxHP(myHero))*100 < 75 then
  76. CastTargetSpell(myHero, GetItemSlot(myHero,3140))
  77. end
  78.  
  79. if GetItemSlot(myHero,3139) > 0 and Config.Item4 and GotBuff(myHero, "rocketgrab2") > 0 or GotBuff(myHero, "charm") > 0 or GotBuff(myHero, "fear") > 0 or GotBuff(myHero, "flee") > 0 or GotBuff(myHero, "snare") > 0 or GotBuff(myHero, "taunt") > 0 or GotBuff(myHero, "suppression") > 0 or GotBuff(myHero, "stun") > 0 or GotBuff(myHero, "zedultexecute") > 0 or GotBuff(myHero, "summonerexhaust") > 0 and (GetCurrentHP(myHero)/GetMaxHP(myHero))*100 < 75 then
  80. CastTargetSpell(myHero, GetItemSlot(myHero,3139))
  81. end
  82.  
  83. if Config.E then
  84. AutoE()
  85. end
  86.  
  87. for i,enemy in pairs(GetEnemyHeroes()) do
  88. if CanUseSpell(myHero, _R) == READY and (GetCurrentHP(enemy)/GetMaxHP(enemy))*100 < 75 and (GetCurrentHP(myHero)/GetMaxHP(myHero))*100 < 55 and EnemiesAround(GetMyHeroPos(), 1000) >= 2 and AlliesAround(GetMyHeroPos(), 1000) > 1 then
  89. CastSpell(_R)
  90. end
  91. end
  92.  
  93.  
  94. if MiscConfig.AutoE then
  95. AutoE()
  96. end
  97.  
  98. local HeroPos = GetOrigin(myHero)
  99.  
  100. if MiscConfig.Walltumble1 and HeroPos.x == 6962 and HeroPos.z == 8952 then
  101. CastSkillShot(_Q,6667.3271484375, 51, 8794.64453125)
  102. elseif MiscConfig.Walltumble1 then
  103. MoveToXYZ(6962, 51, 8952)
  104. end
  105.  
  106. if MiscConfig.Walltumble2 and HeroPos.x == 12060 and HeroPos.z == 4806 then
  107. CastSkillShot(_Q,11745.198242188, 51, 4625.4379882813)
  108. elseif MiscConfig.Walltumble2 then
  109. MoveToXYZ(12060, 51, 4806)
  110. end
  111.  
  112.  
  113. if DrawingsConfig.DrawQ then DrawCircle(HeroPos.x,HeroPos.y,HeroPos.z,GetCastRange(myHero,_Q),3,100,0xff00ff00) end
  114. if DrawingsConfig.DrawE then DrawCircle(HeroPos.x,HeroPos.y,HeroPos.z,GetCastRange(myHero,_E),3,100,0xff00ff00) end
  115. if DrawingsConfig.DrawWT then
  116. DrawCircle(6962, 51, 8952,100,1,1,0xffffffff)
  117. DrawCircle(12060, 51, 4806,100,1,1,0xffffffff)
  118. end
  119. end)
  120.  
  121. function AutoE()
  122. for _,target in pairs(GetEnemyHeroes()) do
  123. if ValidTarget(target,1000) then
  124. local enemyposx,enemyposy,enemypoz,selfx,selfy,selfz
  125. local distance1=24
  126. local distance2=118
  127. local distance3=212
  128. local distance4=306
  129. local distance5=400
  130.  
  131. local enemyposition = GetOrigin(target)
  132. enemyposx=enemyposition.x
  133. enemyposy=enemyposition.y
  134. enemyposz=enemyposition.z
  135. local TargetPos = Vector(enemyposx,enemyposy,enemyposz)
  136.  
  137. local self=GetOrigin(myHero)
  138. selfx = self.x
  139. selfy = self.y
  140. selfz = self.z
  141. local HeroPos = Vector(selfx, selfy, selfz)
  142.  
  143. local Pos1 = TargetPos-(TargetPos-HeroPos)*(-distance1/GetDistance(target))
  144. local Pos2 = TargetPos-(TargetPos-HeroPos)*(-distance2/GetDistance(target))
  145. local Pos3 = TargetPos-(TargetPos-HeroPos)*(-distance3/GetDistance(target))
  146. local Pos4 = TargetPos-(TargetPos-HeroPos)*(-distance4/GetDistance(target))
  147. local Pos5 = TargetPos-(TargetPos-HeroPos)*(-distance5/GetDistance(target))
  148.  
  149. if MapPosition:inWall(Pos1)==true then
  150. if GetDistance(target)<=550 then
  151. CastTargetSpell(target, _E)
  152. end
  153. end
  154.  
  155. if MapPosition:inWall(Pos2)==true then
  156. if GetDistance(target)<=550 then
  157. CastTargetSpell(target, _E)
  158. end
  159. end
  160.  
  161. if MapPosition:inWall(Pos3)==true then
  162. if GetDistance(target)<=550 then
  163. CastTargetSpell(target, _E)
  164. end
  165. end
  166.  
  167. if MapPosition:inWall(Pos4)==true then
  168. if GetDistance(target)<=550 then
  169. CastTargetSpell(target, _E)
  170. end
  171. end
  172.  
  173. if MapPosition:inWall(Pos5)==true then
  174. if GetDistance(target)<=550 then
  175. CastTargetSpell(target, _E)
  176. end
  177. end
  178.  
  179. end
  180. end
  181. end
  182.  
  183. if MiscConfig.Autolvl then
  184. if GetLevel(myHero) == 1 then
  185. LevelSpell(_Q)
  186. elseif GetLevel(myHero) == 2 then
  187. LevelSpell(_W)
  188. elseif GetLevel(myHero) == 3 then
  189. LevelSpell(_E)
  190. elseif GetLevel(myHero) == 4 then
  191. LevelSpell(_W)
  192. elseif GetLevel(myHero) == 5 then
  193. LevelSpell(_W)
  194. elseif GetLevel(myHero) == 6 then
  195. LevelSpell(_R)
  196. elseif GetLevel(myHero) == 7 then
  197. LevelSpell(_W)
  198. elseif GetLevel(myHero) == 8 then
  199. LevelSpell(_Q)
  200. elseif GetLevel(myHero) == 9 then
  201. LevelSpell(_W)
  202. elseif GetLevel(myHero) == 10 then
  203. LevelSpell(_Q)
  204. elseif GetLevel(myHero) == 11 then
  205. LevelSpell(_R)
  206. elseif GetLevel(myHero) == 12 then
  207. LevelSpell(_Q)
  208. elseif GetLevel(myHero) == 13 then
  209. LevelSpell(_Q)
  210. elseif GetLevel(myHero) == 14 then
  211. LevelSpell(_E)
  212. elseif GetLevel(myHero) == 15 then
  213. LevelSpell(_E)
  214. elseif GetLevel(myHero) == 16 then
  215. LevelSpell(_R)
  216. elseif GetLevel(myHero) == 17 then
  217. LevelSpell(_E)
  218. elseif GetLevel(myHero) == 18 then
  219. LevelSpell(_E)
  220. end
  221. end
  222.  
  223. addInterrupterCallback(function(target, spellType)
  224. if IsInDistance(target, GetCastRange(myHero,_E)) and CanUseSpell(myHero,_E) == READY and spellType == CHANELLING_SPELLS then
  225. CastTargetSpell(target, _E)
  226. end
  227. end)
  228.  
  229. function AlliesAround(pos, range)
  230. local c = 0
  231. if pos == nil then return 0 end
  232. for k,v in pairs(GetAllyHeroes()) do
  233. if v and ValidTarget(v) and GetDistanceSqr(pos,GetOrigin(v)) < range*range then
  234. c = c + 1
  235. end
  236. end
  237. return c
  238. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement