Advertisement
Cloudhax23

Untitled

Aug 16th, 2015
249
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.37 KB | None | 0 0
  1. PrintChat("D3ftland Jinx By Deftsu Loaded, Have A Good Game!")
  2. PrintChat("Please don't forget to turn off F7 orbwalker!")
  3. Config = scriptConfig("Jinx", "Jinx")
  4. Config.addParam("Q", "Use Q", SCRIPT_PARAM_ONOFF, true)
  5. Config.addParam("W", "Use W", SCRIPT_PARAM_ONOFF, true)
  6. Config.addParam("E", "Use E (beta)", SCRIPT_PARAM_ONOFF, true)
  7. Config.addParam("R", "Use R", SCRIPT_PARAM_ONOFF, true)
  8. Config.addParam("Qfarm", "Switch Q in X/V", SCRIPT_PARAM_ONOFF, true)
  9. ExtraConfig = scriptConfig("Extra", "Extra")
  10. ExtraConfig.addParam("Autolvl", "Autolvl Q-W-E", SCRIPT_PARAM_ONOFF, false)
  11. ExtraConfig.addParam("Item1", "Use BotRK", SCRIPT_PARAM_ONOFF, true)
  12. ExtraConfig.addParam("Item2", "Use Bilgewater", SCRIPT_PARAM_ONOFF, true)
  13. ExtraConfig.addParam("Item3", "Use Youmuu", SCRIPT_PARAM_ONOFF, true)
  14. ExtraConfig.addParam("Item4", "Use QSS (broken)", SCRIPT_PARAM_ONOFF, true)
  15. KSConfig = scriptConfig("KS", "Killsteal")
  16. KSConfig.addParam("KSW", "Killsteal with W", SCRIPT_PARAM_ONOFF, true)
  17. KSConfig.addParam("KSR", "Killsteal with R", SCRIPT_PARAM_ONOFF, true)
  18. HarassConfig = scriptConfig("Harass", "Harass")
  19. HarassConfig.addParam("HarassQ", "Harass Q (C)", SCRIPT_PARAM_ONOFF, true)
  20. HarassConfig.addParam("HarassW", "Harass W (C)", SCRIPT_PARAM_ONOFF, true)
  21. HarassConfig.addParam("HarassE", "Harass E (C)", SCRIPT_PARAM_ONOFF, false)
  22. DrawingsConfig = scriptConfig("Drawings", "Drawings")
  23. DrawingsConfig.addParam("DrawRange","Draw AA Range", SCRIPT_PARAM_ONOFF, true)
  24. DrawingsConfig.addParam("DrawW","Draw W", SCRIPT_PARAM_ONOFF, true)
  25. DrawingsConfig.addParam("DrawE","Draw E", SCRIPT_PARAM_ONOFF, true)
  26.  
  27. myIAC = IAC()
  28.  
  29. OnLoop(function(myHero)
  30. Killsteal()
  31.  
  32. if ExtraConfig.Autolvl then
  33. LevelUp()
  34. end
  35.  
  36. local target = GetTarget(2500, DAMAGE_PHYSICAL)
  37. if IWalkConfig.Combo then
  38. if CanUseSpell(myHero, _Q) == READY and Config.Q then
  39. if GetDistance(myHero, target) > 525 and GotBuff(myHero, "jinxqicon") > 0 then
  40. CastSpell(_Q)
  41. elseif GetDistance(myHero, target) < 570 and GotBuff(myHero, "JinxQ") > 0 then
  42. CastSpell(_Q)
  43. end
  44. end
  45.  
  46. local WPred = GetPredictionForPlayer(GetMyHeroPos(),target,GetMoveSpeed(target),3300,600,GetCastRange(myHero,_W),60,true,true)
  47. local EPred = GetPredictionForPlayer(GetMyHeroPos(),target,GetMoveSpeed(target),1750,1200,GetCastRange(myHero,_E),60,false,true)
  48. local RPred = GetPredictionForPlayer(GetMyHeroPos(),target,GetMoveSpeed(target),1200,700,20000,140,false,true)
  49.  
  50. if CanUseSpell(myHero, _E) == READY and EPred.HitChance == 1 and ValidTarget(target, GetCastRange(myHero,_E)) and Config.E then
  51. CastSkillShot(_E,EPred.PredPos.x,EPred.PredPos.y,EPred.PredPos.z)
  52. end
  53.  
  54. if CanUseSpell(myHero, _W) == READY and WPred.HitChance == 1 and ValidTarget(target, GetCastRange(myHero,_W)) and Config.W then
  55. CastSkillShot(_W,WPred.PredPos.x,WPred.PredPos.y,WPred.PredPos.z)
  56. end
  57.  
  58. if CanUseSpell(myHero, _R) == READY and RPred.HitChance == 1 and ValidTarget(target, 2500) and Config.R and GetCurrentHP(target) < CalcDamage(myHero, target, (GetMaxHP(target)-GetCurrentHP(target))*(0.2+0.05*GetCastLevel(myHero, _R))+(150+100*GetCastLevel(myHero, _R)+GetBonusDmg(myHero))*math.max(0.1, math.min(1, GetDistance(target)/1700))) then
  59. CastSkillShot(_R,RPred.PredPos.x,RPred.PredPos.y,RPred.PredPos.z)
  60. end
  61.  
  62. 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
  63. CastTargetSpell(target, GetItemSlot(myHero,3153))
  64. end
  65.  
  66. 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
  67. CastTargetSpell(target, GetItemSlot(myHero,3144))
  68. end
  69.  
  70. if GetItemSlot(myHero,3142) > 0 and Config.Item3 then
  71. CastTargetSpell(GetItemSlot(myHero,3142))
  72. end
  73.  
  74. end
  75.  
  76. local target = GetTarget(1500, DAMAGE_PHYSICAL)
  77. if IWalkConfig.Harass then
  78. if CanUseSpell(myHero, _Q) == READY and HarassConfig.HarassQ then
  79. if GetDistance(myHero, target) > 525 and GotBuff(myHero, "jinxqicon") > 0 then
  80. CastSpell(_Q)
  81. elseif GetDistance(myHero, target) < 570 and GotBuff(myHero, "JinxQ") > 0 then
  82. CastSpell(_Q)
  83. end
  84. end
  85.  
  86. local WPred = GetPredictionForPlayer(GetMyHeroPos(),target,GetMoveSpeed(target),3300,600,GetCastRange(myHero,_W),60,true,true)
  87. local EPred = GetPredictionForPlayer(GetMyHeroPos(),target,GetMoveSpeed(target),1750,1200,GetCastRange(myHero,_E),60,false,true)
  88.  
  89. if CanUseSpell(myHero, _E) == READY and EPred.HitChance == 1 and ValidTarget(target, GetCastRange(myHero,_E)) and HarassConfig.HarassE then
  90. CastSkillShot(_E,EPred.PredPos.x,EPred.PredPos.y,EPred.PredPos.z)
  91. end
  92.  
  93. if CanUseSpell(myHero, _W) == READY and WPred.HitChance == 1 and ValidTarget(target, GetCastRange(myHero,_W)) and HarassConfig.HarassW then
  94. CastSkillShot(_W,WPred.PredPos.x,WPred.PredPos.y,WPred.PredPos.z)
  95. end
  96. end
  97.  
  98. if IWalkConfig.LastHit then
  99. if GotBuff(myHero, "JinxQ") > 0 and Config.Qfarm then
  100. CastSpell(_Q)
  101. end
  102. end
  103.  
  104. if IWalkConfig.LaneClear then
  105. if GotBuff(myHero, "JinxQ") > 0 and Config.Qfarm then
  106. CastSpell(_Q)
  107. end
  108. end
  109. end)
  110.  
  111. function Killsteal()
  112. for i,enemy in pairs(GetEnemyHeroes()) do
  113. local WPred = GetPredictionForPlayer(GetMyHeroPos(),enemy,GetMoveSpeed(enemy),3300,600,GetCastRange(myHero,_W),60,true,true)
  114. local RPred = GetPredictionForPlayer(GetMyHeroPos(),enemy,GetMoveSpeed(enemy),1200,700,20000,140,false,true)
  115. if CanUseSpell(myHero, _W) == READY and ValidTarget(enemy, GetCastRange(myHero,_W)) and KSConfig.KSW and WPred.HitChance == 1 and GetCurrentHP(enemy) < CalcDamage(myHero, enemy, 50*GetCastLevel(myHero,_Q) - 40 + 1.4*GetBaseDamage(myHero)) then
  116. CastSkillShot(_W,WPred.PredPos.x,WPred.PredPos.y,WPred.PredPos.z)
  117. elseif CanUseSpell(myHero, _R) == READY and ValidTarget(enemy, 4000) and KSConfig.KSR and RPred.HitChance == 1 and GetCurrentHP(enemy) < CalcDamage(myHero, enemy, (GetMaxHP(enemy)-GetCurrentHP(enemy))*(0.2+0.05*GetCastLevel(myHero, _R))+(150+100*GetCastLevel(myHero, _R)+GetBonusDmg(myHero))*math.max(0.1, math.min(1, GetDistance(enemy)/1700))) then
  118. CastSkillShot(_R,RPred.PredPos.x,RPred.PredPos.y,RPred.PredPos.z)
  119. end
  120. end
  121. end
  122.  
  123. function LevelUp()
  124.  
  125. if GetLevel(myHero) == 1 then
  126. LevelSpell(_Q)
  127. elseif GetLevel(myHero) == 2 then
  128. LevelSpell(_E)
  129. elseif GetLevel(myHero) == 3 then
  130. LevelSpell(_W)
  131. elseif GetLevel(myHero) == 4 then
  132. LevelSpell(_Q)
  133. elseif GetLevel(myHero) == 5 then
  134. LevelSpell(_Q)
  135. elseif GetLevel(myHero) == 6 then
  136. LevelSpell(_R)
  137. elseif GetLevel(myHero) == 7 then
  138. LevelSpell(_Q)
  139. elseif GetLevel(myHero) == 8 then
  140. LevelSpell(_W)
  141. elseif GetLevel(myHero) == 9 then
  142. LevelSpell(_Q)
  143. elseif GetLevel(myHero) == 10 then
  144. LevelSpell(_W)
  145. elseif GetLevel(myHero) == 11 then
  146. LevelSpell(_R)
  147. elseif GetLevel(myHero) == 12 then
  148. LevelSpell(_W)
  149. elseif GetLevel(myHero) == 13 then
  150. LevelSpell(_W)
  151. elseif GetLevel(myHero) == 14 then
  152. LevelSpell(_E)
  153. elseif GetLevel(myHero) == 15 then
  154. LevelSpell(_E)
  155. elseif GetLevel(myHero) == 16 then
  156. LevelSpell(_R)
  157. elseif GetLevel(myHero) == 17 then
  158. LevelSpell(_E)
  159. elseif GetLevel(myHero) == 18 then
  160. LevelSpell(_E)
  161. end
  162. end
  163.  
  164. function Drawings()
  165. local HeroPos = GetOrigin(myHero)
  166. DrawCircle(HeroPos.x,HeroPos.y,HeroPos.z,GetRange(myHero),3,100,0xff00ff00)
  167. if CanUseSpell(myHero, _W) == READY and DrawingsConfig.DrawE then DrawCircle(HeroPos.x,HeroPos.y,HeroPos.z,GetCastRange(myHero,_W),3,100,0xff00ff00) end
  168. if CanUseSpell(myHero, _E) == READY and DrawingsConfig.DrawR then DrawCircle(HeroPos.x,HeroPos.y,HeroPos.z,GetCastRange(myHero,_E),3,100,0xff00ff00) end
  169. end
  170.  
  171. local enemyBasePos, delay, missileSpeed, damage, recallPos = nil, 0, 0, nil, nil
  172. ExtraConfig.addParam("Baseult", "Baseult", SCRIPT_PARAM_ONOFF, true)
  173. myHero = GetMyHero()
  174.  
  175. if GetTeam(myHero) == 100 then
  176. enemyBasePos = Vector(14340, 171, 14390)
  177. elseif GetTeam(myHero) == 200 then
  178. enemyBasePos = Vector(400, 200, 400)
  179. end
  180.  
  181. if GetObjectName(myHero) == "Jinx" then
  182. delay = 600
  183. missileSpeed = 2300
  184. damage = function(target) return CalcDamage(myHero, target, (GetMaxHP(target)-GetCurrentHP(target))*(0.2+0.05*GetCastLevel(myHero, _R)) + 150 + 100*GetCastLevel(myHero,_R) + GetBonusDmg(myHero)) end
  185. end
  186.  
  187. local recalling = {}
  188. local x = 5
  189. local y = 500
  190. local barWidth = 250
  191. local rowHeight = 18
  192. local onlyEnemies = true
  193. local onlyFOW = true
  194. ExtraConfig.addParam("Recalltracker", "Recall tracker", SCRIPT_PARAM_ONOFF, true)
  195.  
  196. OnLoop(function()
  197. if ExtraConfig.Recalltracker then
  198. local i = 0
  199. for hero, recallObj in pairs(recalling) do
  200. local percent=math.floor(GetCurrentHP(recallObj.hero)/GetMaxHP(recallObj.hero)*100)
  201. local color=percentToRGB(percent)
  202. local leftTime = recallObj.starttime - GetTickCount() + recallObj.info.totalTime
  203.  
  204. if leftTime<0 then leftTime = 0 end
  205. FillRect(x,y+rowHeight*i-2,168,rowHeight,0x50000000)
  206. if i>0 then FillRect(x,y+rowHeight*i-2,168,1,0xC0000000) end
  207.  
  208. DrawText(string.format("%s (%d%%)", hero, percent), 14, x+2, y+rowHeight*i, color)
  209.  
  210. if recallObj.info.isStart then
  211. DrawText(string.format("%.1fs", leftTime/1000), 14, x+115, y+rowHeight*i, color)
  212. FillRect(x+169,y+rowHeight*i, barWidth*leftTime/recallObj.info.totalTime,14,0x80000000)
  213. else
  214. if recallObj.killtime == nil then
  215. if recallObj.info.isFinish and not recallObj.info.isStart then
  216. recallObj.result = "finished"
  217. recallObj.killtime = GetTickCount()+2000
  218. elseif not recallObj.info.isFinish then
  219. recallObj.result = "cancelled"
  220. recallObj.killtime = GetTickCount()+2000
  221. end
  222.  
  223. end
  224. DrawText(recallObj.result, 14, x+115, y+rowHeight*i, color)
  225. end
  226.  
  227. if recallObj.killtime~=nil and GetTickCount() > recallObj.killtime then
  228. recalling[hero] = nil
  229. end
  230.  
  231. i=i+1
  232. end
  233. end
  234. end)
  235.  
  236. function percentToRGB(percent)
  237. local r, g
  238. if percent == 100 then
  239. percent = 99 end
  240.  
  241. if percent < 50 then
  242. r = math.floor(255 * (percent / 50))
  243. g = 255
  244. else
  245. r = 255
  246. g = math.floor(255 * ((50 - percent % 50) / 50))
  247. end
  248.  
  249. return 0xFF000000+g*0xFFFF+r*0xFF
  250. end
  251.  
  252. OnProcessRecall(function(Object,recallProc)
  253. if CanUseSpell(myHero, _R) == READY and ExtraConfig.Baseult and GetTeam(Object) ~= GetTeam(myHero) then
  254. if damage(Object) > GetCurrentHP(Object) then
  255. local timeToRecall = recallProc.totalTime
  256. local distance = GetDistance(enemyBasePos)
  257. local timeToHit = delay + (distance * 1000 / missileSpeed)
  258. if timeToRecall > timeToHit then
  259. recallPos = Vector(Object)
  260. print("BaseUlt on "..GetObjectName(Object), 2, 0xffff0000)
  261. DelayAction(
  262. function()
  263. if recallPos == Vector(Object) then
  264. CastSkillShot(_R, enemyBasePos.x, enemyBasePos.y, enemyBasePos.z)
  265. recallPos = nil
  266. end
  267. end,
  268. timeToRecall-timeToHit
  269. )
  270. end
  271. end
  272. end
  273.  
  274.  
  275. if onlyEnemies and GetTeam(GetMyHero())==GetTeam(Object) then return end
  276. if onlyFOW and recalling[GetObjectName(Object)] == nil and IsVisible(Object) then return end
  277.  
  278. rec = {}
  279. rec.hero = Object
  280. rec.info = recallProc
  281. rec.starttime = GetTickCount()
  282. rec.killtime = nil
  283. rec.result = nil
  284. recalling[GetObjectName(Object)] = rec
  285.  
  286. end)
  287. AddGapcloseEvent(_E, 0, false)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement